[PATCH RFC RFT v3 11/13] clk: meson: s7: Model the PLL pre-divider as a divider clock

Carlo Caione ccaione at baylibre.com
Tue Dec 1 03:37:44 PST 2026


On Tue, Dec 01, 2026 at 16:56:24 +0100, Jian Hu via B4 Relay wrote:
> From: Jian Hu <jian.hu at 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 at 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 at baylibre.com> # S7 BH201

Thanks!

--
Carlo Caione



More information about the linux-arm-kernel mailing list