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

Jerome Brunet jbrunet at baylibre.com
Thu Dec 3 07:31:04 PST 2026


> 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/c3-pll.c | 97 ++++++++++++++++++++++++++++++++++++----------
>  1 file changed, 76 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/clk/meson/c3-pll.c b/drivers/clk/meson/c3-pll.c
> index dd047d17488c..984f43f1c76c 100644
> --- a/drivers/clk/meson/c3-pll.c
> +++ b/drivers/clk/meson/c3-pll.c
> @@ -230,6 +230,34 @@ static struct clk_regmap c3_fclk_div7 = {
>  	},
>  };
>  
> +/* Force the pre-divider at 1 to minimize PLL jitter */
> +static const struct clk_div_table c3_pll_prediv_div_table[] = {
> +	{ .val = 1, .div = 1 },
> +	{ /* sentinel */ }
> +};
> +
> +static struct clk_regmap c3_gp0_prediv = {
> +	.data = &(struct clk_regmap_div_data) {
> +		.offset = ANACTRL_GP0PLL_CTRL0,
> +		.shift	= 10,
> +		.width	= 5,
> +		.table	= c3_pll_prediv_div_table,
> +		/*
> +		 * CLK_DIVIDER_INVALID_ZERO to report 0 Hz during registration.
> +		 * The same applies below.
> +		 */

Paraphrasing the flag doc. useless

Reviewed-by: Jerome Brunet <jbrunet at baylibre.com>

-- 
Jerome




More information about the linux-arm-kernel mailing list