Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro
@ 2022-09-04 23:36 Ondrej Jirman
  2022-09-05 18:57 ` Caleb Connolly
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ondrej Jirman @ 2022-09-04 23:36 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Ondrej Jirman, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner,
	Martijn Braam, Tom Fitzhenry, Caleb Connolly, Arnaud Ferraris,
	Nícolas F. R. A. Prado,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/Rockchip SoC support, open list

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")
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
index f00c80361377a..2e058c3150256 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
@@ -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 {
-- 
2.37.3


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro
  2022-09-04 23:36 [PATCH] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro Ondrej Jirman
@ 2022-09-05 18:57 ` Caleb Connolly
  2022-09-05 20:52 ` Tom Fitzhenry
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Caleb Connolly @ 2022-09-05 18:57 UTC (permalink / raw)
  To: Ondrej Jirman, linux-rockchip
  Cc: Rob Herring, Krzysztof Kozlowski, Heiko Stuebner, Martijn Braam,
	Tom Fitzhenry, Arnaud Ferraris, Nícolas F. R. A. Prado,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/Rockchip SoC support, open list



On 05/09/2022 00:36, Ondrej Jirman wrote:
> 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")
> Signed-off-by: Ondrej Jirman <megi@xff.cz>

Reviewed-by: Caleb Connolly <kc@postmarketos.org>
> ---
>   arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> index f00c80361377a..2e058c3150256 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> @@ -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 {

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro
  2022-09-04 23:36 [PATCH] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro Ondrej Jirman
  2022-09-05 18:57 ` Caleb Connolly
@ 2022-09-05 20:52 ` Tom Fitzhenry
  2022-09-05 22:20 ` Heiko Stuebner
  2022-09-06  0:45 ` Nícolas F. R. A. Prado
  3 siblings, 0 replies; 5+ messages in thread
From: Tom Fitzhenry @ 2022-09-05 20:52 UTC (permalink / raw)
  To: Ondrej Jirman, linux-rockchip
  Cc: Rob Herring, Krzysztof Kozlowski, Heiko Stuebner, Martijn Braam,
	Caleb Connolly, Arnaud Ferraris, Nícolas F. R. A. Prado,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/Rockchip SoC support, open list

On 5/9/22 09:36, Ondrej Jirman wrote:
> 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

> 
> Fix the constraints to something that LDO9 can be actually configured for.
> 
> Fixes: 78a21c7d5952 ("arm64: dts: rockchip: Add initial support for Pine64 PinePhone Pro")
> Signed-off-by: Ondrej Jirman <megi@xff.cz>

Reviewed-by: Tom Fitzhenry <tom@tom-fitzhenry.me.uk>
Tested-by: Tom Fitzhenry <tom@tom-fitzhenry.me.uk>

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro
  2022-09-04 23:36 [PATCH] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro Ondrej Jirman
  2022-09-05 18:57 ` Caleb Connolly
  2022-09-05 20:52 ` Tom Fitzhenry
@ 2022-09-05 22:20 ` Heiko Stuebner
  2022-09-06  0:45 ` Nícolas F. R. A. Prado
  3 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2022-09-05 22:20 UTC (permalink / raw)
  To: Ondrej Jirman, linux-rockchip
  Cc: Heiko Stuebner, Caleb Connolly, Tom Fitzhenry,
	Nícolas F . R . A . Prado, Krzysztof Kozlowski,
	Arnaud Ferraris, open list, Martijn Braam,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/Rockchip SoC support, Rob Herring

On Mon, 5 Sep 2022 01:36:47 +0200, Ondrej Jirman wrote:
> 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,
-- 
Heiko Stuebner <heiko@sntech.de>

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro
  2022-09-04 23:36 [PATCH] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro Ondrej Jirman
                   ` (2 preceding siblings ...)
  2022-09-05 22:20 ` Heiko Stuebner
@ 2022-09-06  0:45 ` Nícolas F. R. A. Prado
  3 siblings, 0 replies; 5+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-09-06  0:45 UTC (permalink / raw)
  To: Ondrej Jirman
  Cc: linux-rockchip, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner,
	Martijn Braam, Tom Fitzhenry, Caleb Connolly, Arnaud Ferraris,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/Rockchip SoC support, open list

On Mon, Sep 05, 2022 at 01:36:47AM +0200, Ondrej Jirman wrote:
> 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")
> Signed-off-by: Ondrej Jirman <megi@xff.cz>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> index f00c80361377a..2e058c3150256 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> @@ -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

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-06  0:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-04 23:36 [PATCH] arm64: dts: rockchip: Fix SD card controller probe on Pinephone Pro Ondrej Jirman
2022-09-05 18:57 ` Caleb Connolly
2022-09-05 20:52 ` Tom Fitzhenry
2022-09-05 22:20 ` Heiko Stuebner
2022-09-06  0:45 ` Nícolas F. R. A. Prado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox