Skip to contentSkip to conversation

arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro

PATCH Applied Ondrej Jirman 5 participants 5 messages Sep 4, 2022 – Sep 6, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro

Voltage constraints on vccio_sd are invalid. They don't match the voltages that LDO9 can generate, and this causes rk808-regulator driver to fail to probe with -EINVAL when it tries to apply the constraints during boot.

Fix the constraints to something that LDO9 can be actually configured for.

Fixes 78a21c7d5952 ("arm64: dts: rockchip: Add initial support for Pine64 PinePhone Pro")
---
 arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +2 -2
index f00c80361377a..2e058c3150256 100644
@@ -253,8 +253,8 @@ regulator-state-mem {
 
 			vccio_sd: LDO_REG9 {
 				regulator-name = "vccio_sd";
-				regulator-min-microvolt = <1710000>;
-				regulator-max-microvolt = <3150000>;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
 			};
 
 			vcc3v3_s0: SWITCH_REG {
Signature · 1 line
2.37.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Ondrej Jirman

Voltage constraints on vccio_sd are invalid. They don't match the voltages that LDO9 can generate, and this causes rk808-regulator driver to fail to probe with -EINVAL when it tries to apply the constraints during boot.

Fix the constraints to something that LDO9 can be actually configured for.

Fixes 78a21c7d5952 ("arm64: dts: rockchip: Add initial support for Pine64 PinePhone Pro")
Quoted 19 lines
---
  arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +2 -2
index f00c80361377a..2e058c3150256 100644
@@ -253,8 +253,8 @@ regulator-state-mem {
 
  			vccio_sd: LDO_REG9 {
  				regulator-name = "vccio_sd";
-				regulator-min-microvolt = <1710000>;
-				regulator-max-microvolt = <3150000>;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
  			};
 
  			vcc3v3_s0: SWITCH_REG {
Reviewed-by Tested-by on v1 1/1
#2 lore raw
In reply to Ondrej Jirman
Quoted 3 lines · Ondrej Jirman

Voltage constraints on vccio_sd are invalid. They don't match the voltages that LDO9 can generate, and this causes rk808-regulator driver to fail to probe with -EINVAL when it tries to apply the constraints during boot.

On most boots, the SD card probe succeeds, and is able to be mounted.

On some boots, however, I observe this bug with error message:

vccio_sd: failed to apply 3150000-3150000uV constraint: -EINVAL

Quoted 5 lines

Fix the constraints to something that LDO9 can be actually configured for.

Fixes 78a21c7d5952 ("arm64: dts: rockchip: Add initial support for Pine64 PinePhone Pro")
maintainer Applied
#3 lore raw
In reply to Ondrej Jirman
Quoted 5 lines · Ondrej Jirman

Voltage constraints on vccio_sd are invalid. They don't match the voltages that LDO9 can generate, and this causes rk808-regulator driver to fail to probe with -EINVAL when it tries to apply the constraints during boot.

Fix the constraints to something that LDO9 can be actually configured for.

Applied, thanks!

[1/1] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro

      commit: 024744964ef6c0a65e348afafd4e1feae08eba5e

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>
#4 lore raw
In reply to Ondrej Jirman
Quoted 17 lines · Ondrej Jirman

Voltage constraints on vccio_sd are invalid. They don't match the voltages that LDO9 can generate, and this causes rk808-regulator driver to fail to probe with -EINVAL when it tries to apply the constraints during boot.

Fix the constraints to something that LDO9 can be actually configured for.

Fixes 78a21c7d5952 ("arm64: dts: rockchip: Add initial support for Pine64 PinePhone Pro")
---
 arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0 -0
index f00c80361377a..2e058c3150256 100644

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts regulator-state-mem { · line 257

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +2 -2
@@ -253,8 +253,8 @@ regulator-state-mem {
 
 			vccio_sd: LDO_REG9 {
 				regulator-name = "vccio_sd";
-				regulator-min-microvolt = <1710000>;
-				regulator-max-microvolt = <3150000>;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;

Shouldn't the maximum be 3.1V? The SDMMC0_VDD pin on RK3399 that this regulator is connected to expects a maximum voltage of 3.15V, so 3.3V would be too high. The output voltage for LDO9 is configured in 100mV steps, so I imagine that's why 3.15V fails, but 3.1V should work fine. I haven't tested yet though.

Thanks,
Nícolas