Re: [PATCH RFC RFT v3 07/13] clk: meson: gxbb: Model the PLL pre-divider as a divider clock
From: Jerome Brunet
Date: Thu Dec 03 2026 - 10:31:31 EST
> 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.
>
> The GP0 PLL table lists contiguous multipliers, describe it with a
> pll_mult_range instead of a table.
>
> Signed-off-by: Jian Hu <jian.hu@xxxxxxxxxxx>
> ---
> drivers/clk/meson/gxbb.c | 260 ++++++++++++++++++++++++++++-------------------
> 1 file changed, 158 insertions(+), 102 deletions(-)
>
> diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
> index 2d5128c0bf9e..b7350788b73e 100644
> --- a/drivers/clk/meson/gxbb.c
> +++ b/drivers/clk/meson/gxbb.c
> @@ -115,6 +115,29 @@
> #define HHI_BT656_CLK_CNTL 0x3d4
> #define HHI_SAR_CLK_CNTL 0x3d8
>
> +static struct clk_regmap gxbb_fixed_prediv = {
> + .data = &(struct clk_regmap_div_data){
> + .offset = HHI_MPLL_CNTL,
> + .shift = 9,
> + .width = 5,
> + /*
> + * CLK_DIVIDER_ONE_BASED: the register value is the divisor
> + * itself, so a value of 3 gives a divisor of 3.
> + * The hardware design sets the division factor of this prescaler
> + * to 3 to produce a 2G output.
> + */
Again paraphrasing doc.
--
Jerome