clk: rockchip: rk3066: set up the PLLs in U-Boot proper without TPL
Subsystems (2)
PATCH 1/1 clk: rockchip: rk3066: set up the PLLs in U-Boot proper without TPL
The PLLs are set up by TPL. When U-Boot proper is started straight by the boot ROM after a vendor DRAM init (no TPL), GPLL is still in slow mode and the peripheral clocks run from the 24 MHz oscillator.
Also run rk3066_clk_init() in U-Boot proper when GPLL is found in slow mode.
Tested on an MK808B (RK3066) with the vendor DRAM init and U-Boot from the NAND ID blocks.
Co-Authored-By Claude Opus 5.5 <[email protected]>
Signed-off-by Yalçın Can <[email protected]>
--- drivers/clk/rockchip/clk_rk3066.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/clk/rockchip/clk_rk3066.c +7 -1
@@ -657,7 +657,13 @@ static int rk3066_clk_probe(struct udevice *dev) priv->cru =map_sysmem (plat->dtd.reg[0 ], plat->dtd.reg[1 ]);#endif -if (IS_ENABLED (CONFIG_TPL_BUILD )) { +/* +* Normally TPL sets up the PLLs. When U-Boot proper is started straight by the +* boot ROM after a vendor DRAM init (no TPL), GPLL is still in slow mode: do it here. +*/ +if (IS_ENABLED (CONFIG_TPL_BUILD ) || + (!IS_ENABLED (CONFIG_XPL_BUILD ) && +FIELD_GET (GPLL_MODE_MASK ,readl (&priv->cru->cru_mode_con)) ==PLL_MODE_SLOW )) {rk3066_clk_init (priv->cru, priv->grf);/* Init CPU frequency. */
Signature · 1 line
2.47.3