[PATCH 2/4] arm64: dts: imx8mn: Remove unreferenced clock-controller clocks in SPL DTs
Marek Vasut
marex at denx.de
Fri Apr 25 19:10:10 CEST 2025
On 4/25/25 3:52 PM, Fabio Estevam wrote:
> From: Marek Vasut <marex at denx.de>
>
> Since 50cdd3f74af3 ("clk: imx: clk-imx8mn Fix nand and spi clock parent"),
> drivers/clk/imx/clk-imx8mn.c clk_get_by_name(dev, "osc_24m", &osc_24m_clk)
> fails with error -22 EINVAL in SPL. This is because clk_get_by_name() in the
> end calls fdtdec_parse_phandle_with_args(), which iterates over all phandles
> in clock-controller at 30380000 { clocks = <&osc_32k>, <&osc_24m>, ... } node
> 'clocks' property in an attempt to find the "osc_24m" clock, but fails to
> resolve the &osc_32k phandle and returns with -EINVAL.
>
> Remove the clocks property phandles which cannot be resolved because their
> matching nodes are removed from SPL DTs, so fdtdec_parse_phandle_with_args()
> can resolve all the remaining valid nodes and successfully look up the osc_24m
> clock.
>
> Fixes: 50cdd3f74af3 ("clk: imx: clk-imx8mn Fix nand and spi clock parent")
> Signed-off-by: Marek Vasut <marex at denx.de>
> Signed-off-by: Fabio Estevam <festevam at denx.de>
> ---
> arch/arm/dts/imx8mn-u-boot.dtsi | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/dts/imx8mn-u-boot.dtsi b/arch/arm/dts/imx8mn-u-boot.dtsi
> index 96a6df94c6c..bb0e5b4e31c 100644
> --- a/arch/arm/dts/imx8mn-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mn-u-boot.dtsi
> @@ -51,6 +51,10 @@
> /delete-property/ assigned-clocks;
> /delete-property/ assigned-clock-parents;
> /delete-property/ assigned-clock-rates;
> +#ifdef CONFIG_SPL_BUILD
> + clocks = <&osc_24m>;
> + clock-names = "osc_24m";
> +#endif
> };
See my comment on 4/4 .
More information about the U-Boot
mailing list