Re: [PATCH v2 1/3] clk: nuvoton: ma35d1: Add missing WDT/WWDT parent clocks

From: Krzysztof Kozlowski

Date: Thu Sep 24 2026 - 09:49:21 EST


On Mon, Sep 21, 2026 at 08:44:45AM +0200, Miquel Raynal wrote:
> The WDT and WWDT muxes list PCLK3/4096 and PCLK4/4096 among their
> possible parents, but the driver never registers the corresponding
> clocks, so these parents could never be used.
>
> Add pclk3_div4096 and pclk4_div4096 as fixed factor children of pclk3
> and pclk4 and expose them through the clock provider.
>
> Reported-by: Jacky Huang <ychuang570808@xxxxxxxxx>
> Closes: https://lore.kernel.org/linux-clk/b8a8a65b-e302-4747-bc90-4920fc48795a@xxxxxxxxx/
> Suggested-by: Jacky Huang <ychuang570808@xxxxxxxxx>
> Fixes: 691521a367cf ("clk: nuvoton: Add clock driver for ma35d1 clock controller")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
> ---
> drivers/clk/nuvoton/clk-ma35d1.c | 2 ++
> include/dt-bindings/clock/nuvoton,ma35d1-clk.h | 4 +++-

Please do not combine patches.

> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/nuvoton/clk-ma35d1.c b/drivers/clk/nuvoton/clk-ma35d1.c
> index 9f65d0623517..9d57de6a1e56 100644
> --- a/drivers/clk/nuvoton/clk-ma35d1.c
> +++ b/drivers/clk/nuvoton/clk-ma35d1.c
> @@ -543,6 +543,8 @@ static int ma35d1_clocks_probe(struct platform_device *pdev)
> hws[HCLK3] = ma35d1_clk_fixed_factor(dev, "hclk3", "sysclk1_mux", 1, 2);
> hws[PCLK3] = ma35d1_clk_fixed_factor(dev, "pclk3", "sysclk1_mux", 1, 2);
> hws[PCLK4] = ma35d1_clk_fixed_factor(dev, "pclk4", "sysclk1_mux", 1, 2);
> + hws[PCLK3_DIV4096] = ma35d1_clk_fixed_factor(dev, "pclk3_div4096", "pclk3", 1, 4096);
> + hws[PCLK4_DIV4096] = ma35d1_clk_fixed_factor(dev, "pclk4_div4096", "pclk4", 1, 4096);
>
> hws[USBPHY0] = ma35d1_clk_fixed("usbphy0", 480000000);
> hws[USBPHY1] = ma35d1_clk_fixed("usbphy1", 480000000);
> diff --git a/include/dt-bindings/clock/nuvoton,ma35d1-clk.h b/include/dt-bindings/clock/nuvoton,ma35d1-clk.h
> index ba2d70f776a6..d3fd8251c806 100644
> --- a/include/dt-bindings/clock/nuvoton,ma35d1-clk.h
> +++ b/include/dt-bindings/clock/nuvoton,ma35d1-clk.h
> @@ -248,6 +248,8 @@
> #define ADC_GATE 233
> #define EADC_DIV 234
> #define EADC_GATE 235
> -#define CLK_MAX_IDX 236
> +#define PCLK3_DIV4096 236
> +#define PCLK4_DIV4096 237
> +#define CLK_MAX_IDX 238

This cannot be updated. If it has to, then not a binding and should be
first dropped from the bindings like we did for most of the platforms
having similar issue.

Best regards,
Krzysztof