]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3399: Configure sdmmc regulator pinctrl in SPL
authorJonas Karlman <jonas@kwiboo.se>
Tue, 30 Apr 2024 15:30:25 +0000 (15:30 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Tue, 7 May 2024 07:56:08 +0000 (15:56 +0800)
A few boards have shown to be required to properly configure pinctrl
for the fixed regulator gpio pin used by sdmmc before being able to read
from SD-cards.

Include the related gpio, regulator and pinctrl nodes and enable related
Kconfig options so that pinctrl can be configured in SPL for boards that
may be affected by such issue.

Also change to imply SPL_DM_SEQ_ALIAS for all boards because it must be
enabled for working gpio usage in SPL after a future DT sync.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
22 files changed:
arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
arch/arm/dts/rk3399-orangepi-u-boot.dtsi
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
arch/arm/mach-rockchip/Kconfig
configs/chromebook_bob_defconfig
configs/chromebook_kevin_defconfig
configs/nanopc-t4-rk3399_defconfig
configs/nanopi-m4-2gb-rk3399_defconfig
configs/nanopi-m4-rk3399_defconfig
configs/nanopi-m4b-rk3399_defconfig
configs/nanopi-neo4-rk3399_defconfig
configs/nanopi-r4s-rk3399_defconfig
configs/orangepi-rk3399_defconfig
configs/pinebook-pro-rk3399_defconfig
configs/pinephone-pro-rk3399_defconfig
configs/puma-rk3399_defconfig
configs/roc-pc-mezzanine-rk3399_defconfig
configs/roc-pc-rk3399_defconfig
configs/rock-pi-4-rk3399_defconfig
configs/rockpro64-rk3399_defconfig

index a126bbaf086f5bbf6eabe30de979ba057d003569..e0d7a518dfc2a9e27bd506fa61cbb265c19bc9c1 100644 (file)
@@ -5,6 +5,18 @@
 
 #include "rk3399-u-boot.dtsi"
 
+&gpio0 {
+       bootph-pre-ram;
+};
+
 &sdmmc {
        pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
 };
+
+&sdmmc0_pwr_h {
+       bootph-pre-ram;
+};
+
+&vcc3v0_sd {
+       bootph-pre-ram;
+};
index d4327ea607c4360244253bc678b6638265baf329..b7452eca22548477cde863e2e5161d58bc343dac 100644 (file)
@@ -6,6 +6,18 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-ddr3-1333.dtsi"
 
+&gpio0 {
+       bootph-pre-ram;
+};
+
+&sdmmc0_pwr_h {
+       bootph-pre-ram;
+};
+
+&vcc3v0_sd {
+       bootph-pre-ram;
+};
+
 &vdd_log {
        regulator-init-microvolt = <950000>;
 };
index 17af95a114fc9a9a462af5c657f27de2e18a276d..2341db444ef358de087d5c1f3ca907090668057c 100644 (file)
        rockchip,panel = <&edp_panel>;
 };
 
+&gpio0 {
+       bootph-pre-ram;
+};
+
 &sdhci {
        max-frequency = <25000000>;
 };
        max-frequency = <20000000>;
 };
 
+&sdmmc0_pwr_h_pin {
+       bootph-pre-ram;
+};
+
 &spiflash {
        bootph-pre-ram;
        bootph-some-ram;
 };
 
+&vcc3v0_sd {
+       bootph-pre-ram;
+};
+
 &vdd_log {
        regulator-init-microvolt = <950000>;
 };
index d40daacc7823d48fbb461506eaf92283b080cf32..aecf7dbe383c90fb40c1cf4bda2c3f0870c748d9 100644 (file)
        vin-supply = <&vcc_vbus_typec0>;
 };
 
+&gpio4 {
+       bootph-pre-ram;
+};
+
 &spi1 {
        flash@0 {
                bootph-pre-ram;
        };
 };
 
+&vcc3v0_sd {
+       bootph-pre-ram;
+};
+
+&vcc3v0_sd_en {
+       bootph-pre-ram;
+};
+
 &vcc5v0_host {
        regulator-always-on;
 };
index e280739057df5aaccc91710384bdd5ef384a8072..43b67991fe5aca1e5e7422e44b2a27ab18003a5a 100644 (file)
         };
 };
 
+&gpio0 {
+       bootph-pre-ram;
+};
+
 &sdhci {
        cap-mmc-highspeed;
        mmc-ddr-1_8v;
 };
 
+&sdmmc0_pwr_h {
+       bootph-pre-ram;
+};
+
 &spi1 {
        flash@0 {
                bootph-pre-ram;
        };
 };
 
+&vcc3v0_sd {
+       bootph-pre-ram;
+};
+
 &vdd_center {
        regulator-min-microvolt = <950000>;
        regulator-max-microvolt = <950000>;
index 7d6374b735861cd51c6549444ba82ffb2d4701f1..262cb7cba3ea689b509da0798e9f2561b1f82a8a 100644 (file)
@@ -277,6 +277,7 @@ config ROCKCHIP_RK3399
        imply ROCKCHIP_COMMON_BOARD
        imply ROCKCHIP_EFUSE
        imply ROCKCHIP_SDRAM_COMMON
+       imply SPL_DM_SEQ_ALIAS
        imply SPL_FIT_SIGNATURE
        imply SPL_ROCKCHIP_COMMON_BOARD
        imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
index 5ffd5195ea19383d5a039e6c1b20d2baf8af28af..9e15d9e3b8f654d18bd7819168fdf498dce0bfba 100644 (file)
@@ -61,7 +61,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
index bacdcc367bdacbd9a060d06278603fb2acb53b69..a79703c0a138c80e5461a020361e8a304f88b64a 100644 (file)
@@ -62,7 +62,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
index f935716ccf478862670b99e17fc450894c87cfbd..89c36e273a9bc4b925ba19bbacac09f8af9cfece 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopc-t4"
@@ -42,6 +43,7 @@ CONFIG_GMAC_ROCKCHIP=y
 CONFIG_NVME_PCI=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
index d142b702ce89bd9c70e1b35bde4c7b8eaaaed540..eb1d2c1f51fc9bd4b78e6fd8d9b3ce516d12c1ef 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4-2gb"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
index 8ce879da4c07b5a56cd2016847e143e3d24f8ad5..bc0b90b3d861d81cdcc45f955aabab6a474bfcc7 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
index 33ef74a1f6909bb8756eaedce6c89a5f3b62085a..678f4d9d823fc48546f766f625c0546bdcf3a811 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4b"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
index 45a7d0a3257d70f370375f6e56a78518d655e902..d9b7a90e84024f195562ca565d42e31c490d2056 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-neo4"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
index a666547fe5975687e25169a29d99b21d69849679..1fcccf2bae6ea98dcf1e654e0ebb9bbc8fd58ac3 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-r4s"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
index 337eeab8b42bd2521b157d6565eb6667cdc8df8d..703732ad15f07ef855ade044d5cba85148ab037d 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-orangepi"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
index a250624dfaa9b0a44daf3ab1829e9a4b5765eea7..dd8bc2b72cc375f5b2fa3b27fb9e3a10956903aa 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_SF_DEFAULT_SPEED=20000000
 CONFIG_ENV_SIZE=0x8000
@@ -44,7 +45,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_LED=y
@@ -72,6 +72,7 @@ CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_DM_PMIC_FAN53555=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
index dcdac6b32d6d4e8e106b9c8d2cb5d481bf6b4216..c36898364b5da0f68c189c9caf2846b689864ed3 100644 (file)
@@ -43,7 +43,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_LED=y
index 53fc62bf7e35403ff10abc287afab15e656d09d2..5edba19e6ce8365d7076b8719992c147b9902f70 100644 (file)
@@ -50,7 +50,6 @@ CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_GPIO_HOG=y
 CONFIG_SPL_GPIO_HOG=y
 CONFIG_ROCKCHIP_GPIO=y
index f281df6c1b1209d6f2beb82e997ca03ca23ad463..e13356faabbc01730531b7d0e766fc5d92b1f1ab 100644 (file)
@@ -41,7 +41,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_MMC_DW=y
@@ -57,6 +56,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y
 CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 # CONFIG_RAM_ROCKCHIP_DEBUG is not set
index 0d4a03db9e65bd45dd1a9db5c0b7c49d800de2af..dee342898d1f12806f9b8e656550bbba46318b0e 100644 (file)
@@ -41,7 +41,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_MMC_DW=y
@@ -56,6 +55,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y
 CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 # CONFIG_RAM_ROCKCHIP_DEBUG is not set
index 6cf445dd6338dddf46eb3768342d4e78fd26f234..e5a2bba8e7ff092ba0a48c555821da9d83933761 100644 (file)
@@ -43,7 +43,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DFU_MMC=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
index 6c829089fd912f8f8706a39685112fb1fef3d4a0..173f8f75020d7da313d2dfaf36d7aa110ce85e39 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x8000
 CONFIG_ENV_OFFSET=0x3F8000
@@ -41,7 +42,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_SATA=y
 CONFIG_SCSI_AHCI=y
 CONFIG_AHCI_PCI=y
@@ -65,6 +65,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y
 CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y