[PATCH v2] clk: fixed-rate: Use "clock-output-names" to name fixed clocks

Marek Vasut marex at denx.de
Sun Apr 20 00:52:55 CEST 2025


On 4/19/25 9:11 PM, Fabio Estevam wrote:
> Hi Marek,
> 
> On Fri, Apr 18, 2025 at 11:53 AM Marek Vasut <marex at denx.de> wrote:
> 
>> The "clock-output-names" is NEVER used for any clock look up.
> 
> In Linux, "clock-output-names" is used to register the name of the
> fixed-rate clock.
> 
>  From Linux drivers/clk/clk-fixed-rate.c:
> 
> ```
> static struct clk_hw *_of_fixed_clk_setup(struct device_node *node)
> {
> ....
> 
> of_property_read_string(node, "clock-output-names", &clk_name);
> 
> hw = clk_hw_register_fixed_rate_with_accuracy(NULL, clk_name, NULL,
>      0, rate, accuracy);
> ```
> 
> In U-Boot, we should register a fixed-rate clock with the same name as in Linux.
> 
> This patch aims to make the U-Boot fixed-rate clock name conform to
> Linux standards.
> 
>> I am fine with the first half of the description, but the second half is
>> wrong and this actually does not fix anything. Simply remove
>> clock-output-names from the osc_24m and the code will be broken again.
> 
> In Linux, if "clock-output-names" is removed from the osc_24m node,
> the console becomes corrupted
> on an imx8mp-evk.

This is likely unrelated bug, see reply from Adam.

>> The clk_resolve_parent_clk() is meant to perform the aforementioned
>> resolution(), that is what "[PATCH v2 00/24] clk: Add
>> clk_resolve_parent_clk() and fix up iMX clock drivers" actually fixed.
>> It seems there is something still missing and clk_resolve_parent_clk()
>> does not do the resolution properly for some clock, but that is what
>> needs to be understood and fixed, not worked around this way.
> 
> Please try to reproduce the problem on your end.
> 
> On an imx8mp-based board, run 'usb start' in U-Boot, and this command will fail.
I'll see what I can do tomorrow-ish .


More information about the U-Boot mailing list