The RK3576 clock driver configures the CPU PLLs and CPU clocks when
probed in SPL. However, the driver is only probed on demand, so this
configuration is skipped when no SPL consumer requests a clock, e.g.
when booting from RAM/USB.
Prior to the commit c6bba31dbdd4 ("rockchip: spl-boot-order: Defer probe
of boot device") all boot devices where typically probed, with a side
effect that clock driver likely also where probed, prior to the
boot_from_devices() call.
Flag the clock driver to be probed after bind in SPL to help ensure a
deterministic probe and clock configuration behavior prior to booting
from devices.
Signed-off-by: Jonas Karlman <[email protected]>
Tested-by: Alexey Charkov <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Quentin Schulz <[email protected]>
---
Changes in v3:
- Collect r-b tag
Changes in v2:
- Update commit message
- Collect t-b and r-b tags
---
drivers/clk/rockchip/clk_rk3576.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/clk/rockchip/clk_rk3576.c
b/drivers/clk/rockchip/clk_rk3576.c
index 75b705ffba2f..1988f0472dec 100644
--- a/drivers/clk/rockchip/clk_rk3576.c
+++ b/drivers/clk/rockchip/clk_rk3576.c
@@ -2526,6 +2526,10 @@ static int rk3576_clk_bind(struct udevice *dev)
struct udevice *sys_child;
struct sysreset_reg *priv;
+ /* Ensure clocks are initialized after bind in SPL build */
+ if (IS_ENABLED(CONFIG_SPL_BUILD))
+ dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND);
+
/* The reset driver does not have a device node, so bind it here */
ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset",
&sys_child);
--
2.55.0