]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3588: Sync sdmmc node from linux-next
authorJonas Karlman <jonas@kwiboo.se>
Mon, 17 Apr 2023 19:07:21 +0000 (19:07 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 21 Apr 2023 07:16:01 +0000 (15:16 +0800)
Sync the sdmmc node from linux-next, include required nodes in SPL and
imply Kconfig options required for functional sdmmc clk in SPL and
U-Boot proper.

This make it possible for both SPL and U-Boot proper to configure sdmmc
clocks. In SPL, before TF-A is loaded, scru regs is configured, in
U-Boot proper a SCMI message is sent to TF-A.

Fixes: 95c8656b72dc ("ARM: dts: rockchip: rk3588s-u-boot: Add sdmmc node")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi
arch/arm/dts/rk3588s-u-boot.dtsi
arch/arm/dts/rk3588s.dtsi
arch/arm/mach-rockchip/Kconfig

index 3235bd36e4c866eb43ce17a0f05cd111671f3209..373f369c6556b62d569edadf6b554aa91c087b52 100644 (file)
@@ -18,7 +18,5 @@
 
 &sdmmc {
        bus-width = <4>;
-       bootph-all;
-       u-boot,spl-fifo-mode;
        status = "okay";
 };
index b61d6e0fdbfcb25fe8a922052c926be6dd0779e1..4c6f0311d6a1f3b347a4d633c606c81709566b7a 100644 (file)
@@ -17,7 +17,5 @@
 
 &sdmmc {
        bus-width = <4>;
-       bootph-pre-ram;
-       u-boot,spl-fifo-mode;
        status = "okay";
 };
index 1e225d71efc2378b7ffce8f6ba34ab34cad0e504..3cb22f35420e7cbe87e4186a7fe2b1ed945074fa 100644 (file)
                reg = <0x0 0xfd58a000 0x0 0x2000>;
        };
 
-       sdmmc: mmc@fe2c0000 {
-               compatible = "rockchip,rk3588-dw-mshc", "rockchip,rk3288-dw-mshc";
-               reg = <0x0 0xfe2c0000 0x0 0x4000>;
-               interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH 0>;
-               clocks = <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>,
-                        <&scmi_clk SCMI_HCLK_SD>, <&scmi_clk SCMI_CCLK_SD>;
-               clock-names = "ciu-drive", "ciu-sample", "biu", "ciu";
-               fifo-depth = <0x100>;
-               max-frequency = <200000000>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
-               status = "disabled";
-       };
-
        otp: nvmem@fecc0000 {
                compatible = "rockchip,rk3588-otp";
                reg = <0x0 0xfecc0000 0x0 0x400>;
        status = "okay";
 };
 
+&scmi {
+       bootph-pre-ram;
+};
+
+&scmi_clk {
+       bootph-pre-ram;
+};
+
+&sdmmc {
+       bootph-pre-ram;
+       u-boot,spl-fifo-mode;
+};
+
 &uart2 {
        clock-frequency = <24000000>;
        bootph-pre-ram;
index 005cde61b4b29b8bf24da8a833fdd9c68a366ad3..fca8503aed8cf4aa26a308d73be1311c6de18b43 100644 (file)
                };
        };
 
+       sdmmc: mmc@fe2c0000 {
+               compatible = "rockchip,rk3588-dw-mshc", "rockchip,rk3288-dw-mshc";
+               reg = <0x0 0xfe2c0000 0x0 0x4000>;
+               interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&scmi_clk SCMI_HCLK_SD>, <&scmi_clk SCMI_CCLK_SD>,
+                        <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
+               clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
+               fifo-depth = <0x100>;
+               max-frequency = <200000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
+               power-domains = <&power RK3588_PD_SDMMC>;
+               status = "disabled";
+       };
+
        sdhci: mmc@fe2e0000 {
                compatible = "rockchip,rk3588-dwcmshc";
                reg = <0x0 0xfe2e0000 0x0 0x10000>;
index ce632f757ff824b2102638f565d14bf62c413f8d..327779a79818ec5e81d5386f9cb6bb564ece8126 100644 (file)
@@ -316,6 +316,8 @@ config ROCKCHIP_RK3588
        imply OF_LIBFDT_OVERLAY
        imply ROCKCHIP_OTP
        imply MISC_INIT_R
+       imply CLK_SCMI
+       imply SCMI_FIRMWARE
        help
          The Rockchip RK3588 is a ARM-based SoC with quad-core Cortex-A76 and
          quad-core Cortex-A55 including NEON and GPU, 6TOPS NPU, Mali-G610 MP4,