]> git.dujemihanovic.xyz Git - u-boot.git/commit
rockchip: rk3588: Add support for sdmmc clocks in SPL
authorJonas Karlman <jonas@kwiboo.se>
Mon, 17 Apr 2023 19:07:20 +0000 (19:07 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 21 Apr 2023 07:16:01 +0000 (15:16 +0800)
commit6737771600d4fd8eb48663ea8da37f3f4f49aad5
tree687751891c437114ecf071e2697a1ae23406de5d
parent22297581187c346740d5af4ee603701142b58fd6
rockchip: rk3588: Add support for sdmmc clocks in SPL

Booting from sdmmc on RK3588 currently works because of a workaround in
the device tree, clocks are reordered so that the driver use ciu-sample
instead of ciu, and the BootRom initializes sdmmc clocks before SPL is
loaded into DRAM.

The sdmmc clocks are normally controlled by TF-A using SCMI. However,
there is a need to control these clocks in SPL, before TF-A has started.

This adds a rk3588_scru driver to control the sdmmc clocks in SPL before
TF-A has started, using scru regs. It also adds a small glue driver to
bind the scmi clock node to the rk3588_scru driver in SPL.

Fixes: 7a474df74023 ("clk: rockchip: Add rk3588 clk support")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/include/asm/arch-rockchip/clock.h
arch/arm/include/asm/arch-rockchip/cru_rk3588.h
drivers/clk/rockchip/clk_rk3588.c