[PATCH RFC RFT v3 07/13] clk: meson: gxbb: 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.
> 
> 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 at amlogic.com>
> ---
>  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




More information about the linux-arm-kernel mailing list