On Sat, Apr 19, 2025 at 2:12 PM Fabio Estevam <feste...@gmail.com> wrote: > > Hi Marek, > > On Fri, Apr 18, 2025 at 11:53 AM Marek Vasut <ma...@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. > > > 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.
>From what I can tell, on the imx8mp, the usb_phy_ref parent->dev->name value s "clock-osc-24m" which never matches "osc_24" and I put some debug code into clk_mux_fetch_parent_index. I think clk_mux_fetch_parent_index needs some additional logic to go up the chain to the root node and look for 'clock-names' to match in addition to what it already does. I am just not sure of the best method to go up the tree to find the root node that defines it. adam > > Thanks