On Sun, Apr 27, 2025 at 12:40 PM Marek Vasut <ma...@denx.de> wrote:
>
> Pass the clock controller udevice into clk_register_composite(),
> so it can be passed further to any registered composite clocks
> and used for look up of parent clock referenced in DT "clocks"
> and "clock-names" properties by phandle and name pair.
>
> Use the clock controller udevice in imx8m_clk_mux_set_parent()
> to perform accurate look up of parent clock referenced in the
> CCM driver by name. If the clock name that is being looked up
> matches one of the names listed in the clock controller DT node
> "clock-names" array property, then the offset of the name is
> looked up in the "clocks" DT property and the phandle at that
> offset is resolved to the parent clock udevice. The test to
> determine whether a particular driver instance registered with
> clock uclass matches the parent clock is done by comparing the
> OF nodes of the clock registered with clock uclass and parent
> clock resolved from the phandle.
>
> Example:
>
> drivers/clk/imx/clk-imx8mm.c:
> static const char * const imx8mm_a53_sels[] = {"osc_24m", "arm_pll_out", ...
>                                       _____________|
> arch/arm/dts/imx8mm.dtsi:            |
> clk: clock-controller@30380000 {     v
>         clock-names = "osc_32k", "osc_24m", ...
>                                    |
>                                    v
>         clocks = <&osc_32k>, <&osc_24m>, ...
> };          _______________________|
> ...        |
> / {        v
>         osc_24m: clock-osc-24m {
>                 compatible = "fixed-clock";
> ...
> };
>
> Signed-off-by: Marek Vasut <ma...@denx.de>

Applied, thanks.

Reply via email to