u-boot/drivers/clk/imx
Marek Vasut eeb2db1edc clk: imx: Pass CCM udevice into clk_register_composite()
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 <marex@denx.de>
Reported-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Adam Ford <aford173@gmail.com> # imx8mp-beacon
2025-04-28 10:42:01 -03:00
..
clk-composite-8m.c clk: imx: Pass CCM udevice into clk_register_composite() 2025-04-28 10:42:01 -03:00
clk-composite-93.c clk: imx: Fix wrong flags assignment clk-composite-93 2024-07-06 09:25:00 -03:00
clk-fracn-gppll.c clk: imx: clk-fracn-gppll: Add new PLL rate 2024-12-07 09:07:04 -03:00
clk-gate2.c clk: imx: gate2: Resolve parent clock by name 2025-03-24 08:51:34 -03:00
clk-gate-93.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
clk-imx6q.c clk: imx: Pass struct udevice into imx_clk_fixed_factor*() 2025-03-24 08:51:35 -03:00
clk-imx8.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
clk-imx8.h Correct SPL uses of CMD_CLK 2023-02-09 16:32:25 -05:00
clk-imx8mm.c clk: imx: Finish converting clock-osc-24 back to osc_24 2025-04-25 08:50:23 -03:00
clk-imx8mn.c clk: imx: Finish converting clock-osc-24 back to osc_24 2025-04-25 08:50:23 -03:00
clk-imx8mp.c clk: imx8mp: Add media related clocks 2025-04-10 22:32:56 -03:00
clk-imx8mq.c clk: imx: Pass struct udevice into imx_clk_fixed_factor*() 2025-03-24 08:51:35 -03:00
clk-imx8qm.c clk: imx8: Add dummy clk 2024-10-18 09:41:09 -03:00
clk-imx8qxp.c clk: imx8: Add dummy clk 2024-10-18 09:41:09 -03:00
clk-imx93.c clk: imx: Pass struct udevice into imx_clk_fixed_factor*() 2025-03-24 08:51:35 -03:00
clk-imxrt1020.c clk: imx: Pass struct udevice into imx_clk_fixed_factor*() 2025-03-24 08:51:35 -03:00
clk-imxrt1050.c clk: imx: Pass struct udevice into imx_clk_fixed_factor*() 2025-03-24 08:51:35 -03:00
clk-imxrt1170.c clk: imx: Pass struct udevice into imx_clk_fixed_factor*() 2025-03-24 08:51:35 -03:00
clk-pfd.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
clk-pll14xx.c drivers: clk: Remove duplicate newlines 2024-07-22 10:53:04 -06:00
clk-pllv3.c clk: imx: pllv3: Resolve parent clock by name 2025-03-24 08:51:35 -03:00
clk.h clk: imx: Pass struct udevice into imx_clk_fixed_factor*() 2025-03-24 08:51:35 -03:00
Kconfig clk: imx: select SPL_CLK_COMPOSITE_CCF when SPL_CLK_IMX8MP 2025-03-19 13:17:21 -03:00
Makefile global: Rename SPL_TPL_ to PHASE_ 2024-10-11 11:44:48 -06:00