The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Carlo Caione <ccaione@baylibre.com>
To: jian.hu@amlogic.com
Cc: Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney+clk@redhat.com>,
	 Jerome Brunet <jbrunet+clk@baylibre.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	 Jerome Brunet <jbrunet@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	 Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-clk@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-amlogic@lists.infradead.org,
	 linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH RFC RFT v3 11/13] clk: meson: s7: Model the PLL pre-divider as a divider clock
Date: Tue, 1 Dec 2026 12:37:44 +0100	[thread overview]
Message-ID: <aw6wbLqTpp1mrPf0@macbook> (raw)
In-Reply-To: <20261201-meson_refactor_n-v3-11-f85a4460fd80@amlogic.com>

On Tue, Dec 01, 2026 at 16:56:24 +0100, Jian Hu via B4 Relay wrote:
> From: Jian Hu <jian.hu@amlogic.com>
> 
> The pre-divider is currently described by a dedicated n parameter,
> although it is a plain divider between the input clock and the DCO.
> 
> Model it as a regular divider clock and make it the parent of the DCO.
> 
> Signed-off-by: Jian Hu <jian.hu@amlogic.com>
> ---
>  drivers/clk/meson/s7-pll.c | 33 ++++++++++++++++++++++++++-------
>  1 file changed, 26 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/clk/meson/s7-pll.c b/drivers/clk/meson/s7-pll.c
> index 5b115c3ff35e..0387c25082ac 100644
> --- a/drivers/clk/meson/s7-pll.c
> +++ b/drivers/clk/meson/s7-pll.c
> @@ -38,6 +38,29 @@
>  #define HDMIPLL_CTRL3			0x1cc
>  #define HDMIPLL_STS			0x1dc
>  
> +static struct clk_regmap s7_fixed_pll_prediv = {
> +	.data = &(struct clk_regmap_div_data) {
> +		.offset = FIXPLL_CTRL0,
> +		.shift	= 11,
> +		.width	= 5,
> +		/*
> +		 * CLK_DIVIDER_ONE_BASED: the register value is the divisor
> +		 * itself, so a value of 1 gives a divisor of 1 and the PLL
> +		 * input is not divided. The hardware keeps this pre-divider
> +		 * at 1, which minimizes the PLL jitter.
> +		 */

Nit: the firmware runs the fixed PLL with N=3 (FIXPLL_CTRL0 =
0x92091bf4), so fixed_pll_prediv is 8 MHz here. The clock is read-only,
so I'd just drop that sentence. With that:

Tested-by: Carlo Caione <ccaione@baylibre.com> # S7 BH201

Thanks!

--
Carlo Caione

  reply	other threads:[~2026-12-01 11:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  8:56 [PATCH RFC RFT v3 00/13] clk: meson: Refactor PLL pre-divider as a divider clock Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 01/13] clk: divider: Add CLK_DIVIDER_INVALID_ZERO flag Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 02/13] clk: meson: clk-regmap: Widen the divider flags to 16 bits Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 03/13] dt-bindings: clock: amlogic: Add PLL pre-divider clock IDs Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 04/13] clk: meson: axg: Model the PLL pre-divider as a divider clock Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 05/13] clk: meson: a1: " Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 06/13] clk: meson: c3: " Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 07/13] clk: meson: gxbb: " Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 08/13] clk: meson: g12a: " Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 09/13] clk: meson: meson8: " Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 10/13] clk: meson: s4: " Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 11/13] clk: meson: s7: " Jian Hu via B4 Relay
2026-12-01 11:37   ` Carlo Caione [this message]
2026-12-01  8:56 ` [PATCH RFC RFT v3 12/13] clk: meson: t7: " Jian Hu via B4 Relay
2026-12-01  8:56 ` [PATCH RFC RFT v3 13/13] clk: meson: pll: Remove the dedicated n parameter Jian Hu via B4 Relay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aw6wbLqTpp1mrPf0@macbook \
    --to=ccaione@baylibre.com \
    --cc=bmasney+clk@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet+clk@baylibre.com \
    --cc=jbrunet@baylibre.com \
    --cc=jian.hu@amlogic.com \
    --cc=khilman@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox