Re: [PATCH v2 18/18] rockchip: rk3399: Configure sdmmc regulator pinctrl in SPL
On 2024/4/30 23:30, Jonas Karlman wrote: 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 Reviewed-by: Kever Yang Thanks, - Kever --- v2: New patch split from "Fix loading FIT from SD-card" patch --- arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 12 arch/arm/dts/rk3399-orangepi-u-boot.dtsi | 12 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 12 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 12 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi| 12 arch/arm/mach-rockchip/Kconfig | 1 + configs/chromebook_bob_defconfig | 1 - configs/chromebook_kevin_defconfig | 1 - configs/nanopc-t4-rk3399_defconfig | 2 ++ configs/nanopi-m4-2gb-rk3399_defconfig | 2 ++ configs/nanopi-m4-rk3399_defconfig | 2 ++ configs/nanopi-m4b-rk3399_defconfig | 2 ++ configs/nanopi-neo4-rk3399_defconfig | 2 ++ configs/nanopi-r4s-rk3399_defconfig | 2 ++ configs/orangepi-rk3399_defconfig| 2 ++ configs/pinebook-pro-rk3399_defconfig| 3 ++- configs/pinephone-pro-rk3399_defconfig | 1 - configs/puma-rk3399_defconfig| 1 - configs/roc-pc-mezzanine-rk3399_defconfig| 2 +- configs/roc-pc-rk3399_defconfig | 2 +- configs/rock-pi-4-rk3399_defconfig | 1 - configs/rockpro64-rk3399_defconfig | 3 ++- 22 files changed, 81 insertions(+), 9 deletions(-) diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi index a126bbaf086f..e0d7a518dfc2 100644 --- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi @@ -5,6 +5,18 @@ #include "rk3399-u-boot.dtsi" + { + bootph-pre-ram; +}; + { pinctrl-0 = <_bus4 _clk _cmd _cd>; }; + +_pwr_h { + bootph-pre-ram; +}; + +_sd { + bootph-pre-ram; +}; diff --git a/arch/arm/dts/rk3399-orangepi-u-boot.dtsi b/arch/arm/dts/rk3399-orangepi-u-boot.dtsi index d4327ea607c4..b7452eca2254 100644 --- a/arch/arm/dts/rk3399-orangepi-u-boot.dtsi +++ b/arch/arm/dts/rk3399-orangepi-u-boot.dtsi @@ -6,6 +6,18 @@ #include "rk3399-u-boot.dtsi" #include "rk3399-sdram-ddr3-1333.dtsi" + { + bootph-pre-ram; +}; + +_pwr_h { + bootph-pre-ram; +}; + +_sd { + bootph-pre-ram; +}; + _log { regulator-init-microvolt = <95>; }; diff --git a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi index 17af95a114fc..2341db444ef3 100644 --- a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +++ b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi @@ -10,6 +10,10 @@ rockchip,panel = <_panel>; }; + { + bootph-pre-ram; +}; + { max-frequency = <2500>; }; @@ -18,11 +22,19 @@ max-frequency = <2000>; }; +_pwr_h_pin { + bootph-pre-ram; +}; + { bootph-pre-ram; bootph-some-ram; }; +_sd { + bootph-pre-ram; +}; + _log { regulator-init-microvolt = <95>; }; diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi index d40daacc7823..aecf7dbe383c 100644 --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi @@ -32,6 +32,10 @@ vin-supply = <_vbus_typec0>; }; + { + bootph-pre-ram; +}; + { flash@0 { bootph-pre-ram; @@ -39,6 +43,14 @@ }; }; +_sd { + bootph-pre-ram; +}; + +_sd_en { + bootph-pre-ram; +}; + _host { regulator-always-on; }; diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi index e280739057df..43b67991fe5a 100644 --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi @@ -28,11 +28,19 @@ }; }; + { + bootph-pre-ram; +}; + { cap-mmc-highspeed; mmc-ddr-1_8v; }; +_pwr_h { + bootph-pre-ram; +}; + { flash@0 { bootph-pre-ram; @@ -40,6 +48,10 @@ }; }; +_sd { + bootph-pre-ram; +}; + _center { regulator-min-microvolt = <95>; regulator-max-microvolt = <95>; diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 7d6374b73586..262cb7cba3ea 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -277,6 +277,7 @@ config ROCKCHIP_RK3399
[PATCH v2 18/18] rockchip: rk3399: Configure sdmmc regulator pinctrl in SPL
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 --- v2: New patch split from "Fix loading FIT from SD-card" patch --- arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 12 arch/arm/dts/rk3399-orangepi-u-boot.dtsi | 12 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 12 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 12 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi| 12 arch/arm/mach-rockchip/Kconfig | 1 + configs/chromebook_bob_defconfig | 1 - configs/chromebook_kevin_defconfig | 1 - configs/nanopc-t4-rk3399_defconfig | 2 ++ configs/nanopi-m4-2gb-rk3399_defconfig | 2 ++ configs/nanopi-m4-rk3399_defconfig | 2 ++ configs/nanopi-m4b-rk3399_defconfig | 2 ++ configs/nanopi-neo4-rk3399_defconfig | 2 ++ configs/nanopi-r4s-rk3399_defconfig | 2 ++ configs/orangepi-rk3399_defconfig| 2 ++ configs/pinebook-pro-rk3399_defconfig| 3 ++- configs/pinephone-pro-rk3399_defconfig | 1 - configs/puma-rk3399_defconfig| 1 - configs/roc-pc-mezzanine-rk3399_defconfig| 2 +- configs/roc-pc-rk3399_defconfig | 2 +- configs/rock-pi-4-rk3399_defconfig | 1 - configs/rockpro64-rk3399_defconfig | 3 ++- 22 files changed, 81 insertions(+), 9 deletions(-) diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi index a126bbaf086f..e0d7a518dfc2 100644 --- a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi @@ -5,6 +5,18 @@ #include "rk3399-u-boot.dtsi" + { + bootph-pre-ram; +}; + { pinctrl-0 = <_bus4 _clk _cmd _cd>; }; + +_pwr_h { + bootph-pre-ram; +}; + +_sd { + bootph-pre-ram; +}; diff --git a/arch/arm/dts/rk3399-orangepi-u-boot.dtsi b/arch/arm/dts/rk3399-orangepi-u-boot.dtsi index d4327ea607c4..b7452eca2254 100644 --- a/arch/arm/dts/rk3399-orangepi-u-boot.dtsi +++ b/arch/arm/dts/rk3399-orangepi-u-boot.dtsi @@ -6,6 +6,18 @@ #include "rk3399-u-boot.dtsi" #include "rk3399-sdram-ddr3-1333.dtsi" + { + bootph-pre-ram; +}; + +_pwr_h { + bootph-pre-ram; +}; + +_sd { + bootph-pre-ram; +}; + _log { regulator-init-microvolt = <95>; }; diff --git a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi index 17af95a114fc..2341db444ef3 100644 --- a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +++ b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi @@ -10,6 +10,10 @@ rockchip,panel = <_panel>; }; + { + bootph-pre-ram; +}; + { max-frequency = <2500>; }; @@ -18,11 +22,19 @@ max-frequency = <2000>; }; +_pwr_h_pin { + bootph-pre-ram; +}; + { bootph-pre-ram; bootph-some-ram; }; +_sd { + bootph-pre-ram; +}; + _log { regulator-init-microvolt = <95>; }; diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi index d40daacc7823..aecf7dbe383c 100644 --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi @@ -32,6 +32,10 @@ vin-supply = <_vbus_typec0>; }; + { + bootph-pre-ram; +}; + { flash@0 { bootph-pre-ram; @@ -39,6 +43,14 @@ }; }; +_sd { + bootph-pre-ram; +}; + +_sd_en { + bootph-pre-ram; +}; + _host { regulator-always-on; }; diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi index e280739057df..43b67991fe5a 100644 --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi @@ -28,11 +28,19 @@ }; }; + { + bootph-pre-ram; +}; + { cap-mmc-highspeed; mmc-ddr-1_8v; }; +_pwr_h { + bootph-pre-ram; +}; + { flash@0 { bootph-pre-ram; @@ -40,6 +48,10 @@ }; }; +_sd { + bootph-pre-ram; +}; + _center { regulator-min-microvolt = <95>; regulator-max-microvolt = <95>; diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 7d6374b73586..262cb7cba3ea 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -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