Hi Simon, On 8/8/2026 7:32 PM, Simon Glass wrote: > Hi Jonas, > > On 2026-08-04T00:26:39, Jonas Karlman <[email protected]> wrote: >> clk: rockchip: rk3588: Always init clocks in SPL build >> >> The CPU PLLs and SPLL are only initialized in SPL on RK3588. >> >> Ensure clock driver is always probed after bind for SPL builds to >> initialize core PLLs and clocks in SPL phase on RK3588. >> >> Signed-off-by: Jonas Karlman <[email protected]> >> >> drivers/clk/rockchip/clk_rk3588.c | 14 ++++++++++++++ >> 1 file changed, 14 insertions(+) > >> diff --git a/drivers/clk/rockchip/clk_rk3588.c >> b/drivers/clk/rockchip/clk_rk3588.c >> @@ -2138,6 +2142,15 @@ static int rk3588_scru_clk_probe(struct udevice *dev) >> return 0; >> } >> >> +static int rk3588_scru_clk_bind(struct udevice *dev) >> +{ >> + /* Ensure clocks are initialized after bind in SPL build */ >> + if (IS_ENABLED(CONFIG_SPL_BUILD)) >> + dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND); >> + >> + return 0; >> +} > > The entire SCRU section starting at line 2052 is wrapped in #ifdef > CONFIG_XPL_BUILD, so this bind function only exists in an XPL build - > s0 are you specifically wanting this to only happen in the SPL phase? > If so, I think you should use xpl_phase() == PHASE_SPL
Correct, this should only happen in SPL builds, as originally intended. The change to XPL came from "drivers: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD" and you not wanting to address my remarks about the unintended changes for the Rockchip platform ;-) I have future refactoring plans for all RK35xx clock drivers, e.g. change to use FIELD_PREP_WM16 and more, was hoping to defer the unintended use of XPL_BUILD until such future series. For now we only have SPL support for RK35xx, so the mixed use of XPL and SPL have no real difference until that changes. Regards, Jonas > >> diff --git a/drivers/clk/rockchip/clk_rk3588.c >> b/drivers/clk/rockchip/clk_rk3588.c >> @@ -2009,6 +2009,10 @@ static int rk3588_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); >> + > > Same question here. > > Regards, > Simon
