[PATCH] imx93-u-boot: Describe the CPU clocks in the devicetree

Sébastien Szymanski sebastien.szymanski at armadeus.com
Fri Jul 19 17:47:42 CEST 2024


On 7/19/24 16:13, Fabio Estevam wrote:
> Hi Sébastien,
> 
> On Fri, Jul 19, 2024 at 11:00 AM Sébastien Szymanski
> <sebastien.szymanski at armadeus.com> wrote:
> 
>>> +&A55_0 {
>>> +     clocks = <&clk IMX93_CLK_ARM_PLL>;
>>
>> Why IMX93_CLK_ARM_PLL and not IMX93_CLK_A55_SEL ?
> 
> IMX93_CLK_A55_SEL is a mux that can select between a55_alt versus arm_pll.
> 
> The real CPU clock is IMX93_CLK_ARM_PLL, so this one better represents it.

Ok, thank for the explanation.

> 
> This is also consistent with the other i.MX8M SoCs.
> 
> Take imx8mm.dtsi for example:
> 
> A53_0: cpu at 0 {
> ....
>       clocks = <&clk IMX8MM_CLK_ARM>;
> 
> This also uses the "real" CPU clock, not the mux one (imx8mm_a53_sels).
> 
> I also plan to upstream this clock change to the Linux devicetree.

I did look at imx8mm.dtsi but the clock IMX8MM_CLK_ARM is not defined in 
U-Boot and in Linux it's defined as:

hws[IMX8MM_CLK_ARM] = imx_clk_hw_cpu("arm", "arm_a53_core",
                                      hws[IMX8MM_CLK_A53_CORE]->clk,
				     hws[IMX8MM_CLK_A53_CORE]->clk,
                                      hws[IMX8MM_ARM_PLL_OUT]->clk,
				     hws[IMX8MM_CLK_A53_DIV]->clk);

So in Linux for the i.MX93, the clocks property in the device tree has 
to be IMX93_CLK_A55_CORE:

clks[IMX93_CLK_A55_CORE] = imx_clk_hw_cpu("a55_core", "a55_sel",
					clks[IMX93_CLK_A55_SEL]->clk,
					clks[IMX93_CLK_A55_SEL]->clk,
					clks[IMX93_CLK_ARM_PLL]->clk,
					clks[IMX93_CLK_A55_GATE]->clk);

?

Regards,

> 
> Thanks

-- 
Sébastien Szymanski, Armadeus Systems
Software engineer



More information about the U-Boot mailing list