Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6908201rwr; Tue, 25 Apr 2023 05:46:35 -0700 (PDT) X-Google-Smtp-Source: AKy350YNX87k5QOWWuNU7PqXlGdqWDCetsA8uqFLx/g47jmikgTnhqGPQHI+PayOm7zn57kPYYhJ X-Received: by 2002:a17:902:c086:b0:1a6:6b9d:5e12 with SMTP id j6-20020a170902c08600b001a66b9d5e12mr17803178pld.8.1682426794932; Tue, 25 Apr 2023 05:46:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682426794; cv=none; d=google.com; s=arc-20160816; b=PAAao1Az6d2HlxkbVJzbBK0tH5VFM7RpsF8iAYguukUeAKSuNAIQdlvs5As/EeQYtN TdODvLb8PW8IscWVkBRxxGLwHeHqRD1myzBTiLsKKgAGYx0R/GnrGnnFihMGFzSEVRQ3 MSF8mGGMeyc1vbp0vcf7jwvZfFRl88qhIGkBL/04S6r21Gk7dD19ekM2xnonZ+oLrZQY Z+Y+dOfaWJYbGUXylxePbx2PQb12tv0Zth5K0IAV74ifFHAmNmPFPvgtwYLGfCg36W7c PrlOoPx2Uklo7SPjyr3lPBhXaPjzDjBvIZ3M/nqzyrBw2aV17CyvMWxYoM3aw9iECH47 cuWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=M8TJz6TMqm7slfXEipNmibDQJ7voQTFLqHG+/oEd4jc=; b=oqopU3Gg9cZ0kCdXrd600eKvkRK17FIdTvYPQeLaw1pFHd0rJBJDj+N0hWZgZUyefx DfQ31STJVVbGMNUvbEvdlXCzx/GhVGVsraLGEIx9CgXtSdzYOGfWyfad76wDT/TVhtrA ydA99THaWwydy3Jf+xfRin1tVQQhjA+6vThE4uuqWMBuToQExT+rYKMGkWih2U0n/iGl +dZQFDvjFFnkmoXGunrUO0scb1bIvgy/Bbp0lnFryytOnQKT8fobs9i/WZIy0YKc22G7 D8yUK+VJMelmshDkRtvLreZnBiuKlZ3QCzeYk4xEi+fQGjMJGACs5ntsK6HITXlkjqHV xKdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=s9kUrL+T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020a170902714900b0019f27fe9d45si12538701plm.463.2023.04.25.05.46.23; Tue, 25 Apr 2023 05:46:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=s9kUrL+T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234118AbjDYMdh (ORCPT + 99 others); Tue, 25 Apr 2023 08:33:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233329AbjDYMdf (ORCPT ); Tue, 25 Apr 2023 08:33:35 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF226D314; Tue, 25 Apr 2023 05:33:08 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 71A9B5FD05; Tue, 25 Apr 2023 15:33:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1682425986; bh=M8TJz6TMqm7slfXEipNmibDQJ7voQTFLqHG+/oEd4jc=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=s9kUrL+T6Zn4L1hYQXkZPtfb5nCqgVi5eojV/l3rBAA12rYmOn7TiAAuw1FcVm04X H0udYw/FFlfCPMMChyes0CubfCt/lquS07lpaAO9rjRauSmIgn0nSBQnsaadh30nYi d22INMAJPcrjAgRZK48IszAfv2bSJgdCERitydKeKlKnN4NxbvDc/ibCi7VQR17GJ0 jFXNTwEGfeqc5br/Rc79cofD/kRRUJx5qV7u47XJtN6AQK2TqQFctg75/MC5UrgVpY ghuzBSxS37f8+Kwhy20kTi/BYga3kabJPsBmkwBX1HEpjncwlaI2nLmSD9wfa2jX6h cuW6PQoyVBt9g== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Tue, 25 Apr 2023 15:33:05 +0300 (MSK) Date: Tue, 25 Apr 2023 15:33:04 +0300 From: Dmitry Rokosov To: Martin Blumenstingl CC: , , , , , , , , , , , , , , Subject: Re: [PATCH v13 4/6] clk: meson: a1: add Amlogic A1 PLL clock controller driver Message-ID: <20230425123304.xjmrkraybp2siwdw@CAB-WSD-L081021> References: <20230405195927.13487-1-ddrokosov@sberdevices.ru> <20230405195927.13487-5-ddrokosov@sberdevices.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20220415 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/04/25 07:55:00 #21159618 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Martin, On Sun, Apr 23, 2023 at 11:12:27PM +0200, Martin Blumenstingl wrote: > Hello Dmitry, > > currently Jerome is busy so I am trying to continue where he left off. > I have followed the previous iterations a bit but may have missed some > details. So apologies if I'm repeating some questions that Jerome > previously asked. > Thank you very much for your effort! Please feel free to ask any questions you may have, without any hesitation. > On Wed, Apr 5, 2023 at 9:59 PM Dmitry Rokosov wrote: > [...] > > +config COMMON_CLK_A1_PLL > > + tristate "Meson A1 SoC PLL controller support" > Should this be "Amlogic A1 SoC PLL controller support"? > My understanding is that the "meson" name was dropped for this > generation of SoCs. > > [...] Yep, that's good point. Will change it in the next version. > > +static const struct of_device_id a1_pll_clkc_match_table[] = { > > + { .compatible = "amlogic,a1-pll-clkc", }, > > + {}, > nit-pick: please drop the comma after {} > This empty entry is a sentinel, no other entries are supposed to come > after this - so a trailing comma is not necessary. > > [...] OK > > +/* PLL register offset */ > > +#define ANACTRL_FIXPLL_CTRL0 0x0 > > +#define ANACTRL_FIXPLL_CTRL1 0x4 > > +#define ANACTRL_FIXPLL_STS 0x14 > > +#define ANACTRL_HIFIPLL_CTRL0 0xc0 > > +#define ANACTRL_HIFIPLL_CTRL1 0xc4 > > +#define ANACTRL_HIFIPLL_CTRL2 0xc8 > > +#define ANACTRL_HIFIPLL_CTRL3 0xcc > > +#define ANACTRL_HIFIPLL_CTRL4 0xd0 > > +#define ANACTRL_HIFIPLL_STS 0xd4 > Here I have a question that will potentially affect patch 3/6 > ("dt-bindings: clock: meson: add A1 PLL clock controller bindings"). > In the cover-letter you mentioned that quite a few clocks have been omitted. > Any dt-bindings that we create need to be stable going forward. That > means: the dt-bindings will always need to describe what the hardware > is capable of, not what the driver implements. > So my question is: do we have all needed inputs described in the > dt-bindings (even though we're omitting quite a few registers here > that will only be added/used in the future)? > Older SoCs require (temporarily) using the XTAL clock for CPU clock > tree changes. To make a long story short: I'm wondering if - at least > - the XTAL clock input is missing. The Amlogic A1 clock engine comprises four clock controllers for peripherals, PLL, CPU, and audio. While the first two have been introduced in the current patch series, the last two will be sent in the next iteration. Presently, the PLL controller driver includes all the required bindings, and the peripherals controller driver has all bindings except for the CPU-related clock. However, I do not believe this to be a significant issue. The clock DT bindings are organized to simplify the process of introducing new bindings, whether public or private. For instance, we may add new bindings to include/dt-bindings at the end of the list and increase the overall number, without disrupting the DT bindings ABI (the old numbers will remain unchanged). > > PS: I don't have an A1 datasheet nor a vendor kernel source (and even > less a board for testing). So I can't verify any of this myself and > I'm asking questions instead. > -- Thank you, Dmitry