Devicetree
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: Fix vcc_sdio regulator max voltage on Pinebook Pro
@ 2026-05-19  9:44 Hugo Osvaldo Barrera
  2026-05-19 10:05 ` sashiko-bot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hugo Osvaldo Barrera @ 2026-05-19  9:44 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Tobias Schramm, devicetree, linux-rockchip, Hugo Osvaldo Barrera

The vcc_sdio regulator supports 1.8V to 3.4V output range according to
its datasheet.

The current DT incorrectly limits the max voltage to 3.0V. This limit
causes issues issues downstream with u-boot, which refuses to apply the
out-of range value, and falls back to the minimum in that range: 1.8V.
This is insufficient to power the SD card, so driver initialisation
fails and booting from it does not work.

Set regulator-max-microvolt to 3400000 µV to match hardware capability.
This matches the rk3399-orangepi for the same regulator.

Signed-off-by: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
---
 arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
index b5c05928142c..f21fcdc1b49a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
@@ -526,7 +526,7 @@ vcc_sdio: LDO_REG4 {
 				regulator-always-on;
 				regulator-boot-on;
 				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <3000000>;
+				regulator-max-microvolt = <3400000>;
 
 				regulator-state-mem {
 					regulator-on-in-suspend;
-- 
2.54.0



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

* Re: [PATCH] arm64: dts: rockchip: Fix vcc_sdio regulator max voltage on Pinebook Pro
  2026-05-19  9:44 [PATCH] arm64: dts: rockchip: Fix vcc_sdio regulator max voltage on Pinebook Pro Hugo Osvaldo Barrera
@ 2026-05-19 10:05 ` sashiko-bot
  2026-05-21  8:49 ` Dang Huynh
  2026-06-02 21:14 ` Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-05-19 10:05 UTC (permalink / raw)
  To: Hugo Osvaldo Barrera; +Cc: robh, conor+dt, devicetree

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The patch leaves `vcc3v0_sd` incorrectly defined as 3.0V, causing Linux to misconfigure `vcc_sdio` and expose the RK3399 I/O pins to overvoltage from the SD card.
- [High] `vcc_sdio` remains powered during suspend while the SD card VDD is removed, causing potentially damaging back-powering.
--

commit 2b1796d52c7328502f3af71aefe96d0d149cf297
Author: Hugo Osvaldo Barrera <hugo@whynothugo.nl>

arm64: dts: rockchip: Fix vcc_sdio regulator max voltage on Pinebook Pro

This commit updates the vcc_sdio regulator to support a maximum of 3.4V,
matching the hardware capability. This fixes downstream u-boot issues where
it falls back to 1.8V, preventing SD card boot.

> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
> index b5c05928142c0..f21fcdc1b49a5 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
> @@ -526,7 +526,7 @@ vcc_sdio: LDO_REG4 {
>  				regulator-always-on;
>  				regulator-boot-on;
>  				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <3000000>;
> +				regulator-max-microvolt = <3400000>;

This isn't a bug introduced by this patch, but should the vcc3v0_sd regulator
also be updated to 3.3V?

The vcc3v0_sd regulator is defined as 3.0V in the DT, but it is a fixed load
switch powered by vcc3v3_sys (3.3V), so the SD card physically receives 3.3V.

The MMC core relies on vcc3v0_sd to determine the maximum SD card voltage,
limiting the I/O voltage (vqmmc, mapped to vcc_sdio) to 3.0V.

With the SD card operating at 3.3V and the RK3399 I/O pins powered at 3.0V,
will the SD card drive 3.3V data lines into the 3.0V I/O pins? This exceeds
the RK3399 absolute maximum rating for I/O pins (VCCIO + 0.3V), which could
risk hardware degradation and latch-up.

>  
>  				regulator-state-mem {
>  					regulator-on-in-suspend;

This isn't a bug introduced by this patch, but does keeping vcc_sdio on during
suspend cause back-powering issues?

The vcc_sdio regulator is configured with regulator-on-in-suspend and
regulator-suspend-microvolt = <3000000>, keeping the RK3399 sdmmc I/O domain
powered at 3.0V during suspend.

However, the SD card's main VDD supply (vcc3v0_sd) has regulator-off-in-suspend,
dropping to 0V.

With the I/O lines pulled up to 3.0V by the RK3399 and the SD card unpowered,
can current leak through the SD card's internal ESD protection diodes, draining
the battery during suspend and potentially causing latch-up or damage?

Since vcc_sdio only powers the sdmmc-supply IO domain on this board, should
its state memory be changed to regulator-off-in-suspend to match vcc3v0_sd?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260519094439.7918-1-hugo@whynothugo.nl?part=1

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

* Re: [PATCH] arm64: dts: rockchip: Fix vcc_sdio regulator max voltage on Pinebook Pro
  2026-05-19  9:44 [PATCH] arm64: dts: rockchip: Fix vcc_sdio regulator max voltage on Pinebook Pro Hugo Osvaldo Barrera
  2026-05-19 10:05 ` sashiko-bot
@ 2026-05-21  8:49 ` Dang Huynh
  2026-06-02 21:14 ` Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Dang Huynh @ 2026-05-21  8:49 UTC (permalink / raw)
  To: Hugo Osvaldo Barrera
  Cc: Heiko Stuebner, Tobias Schramm, devicetree, linux-rockchip

Hi,

On Tue, May 19, 2026 at 11:44:39AM +0200, Hugo Osvaldo Barrera wrote:
> The vcc_sdio regulator supports 1.8V to 3.4V output range according to
> its datasheet.
> 
> The current DT incorrectly limits the max voltage to 3.0V. This limit
> causes issues issues downstream with u-boot, which refuses to apply the

Just a heads up, you can run mainline U-Boot on the Pinebook Pro without
any modification.

But after looking at the datasheet for the AP6256, I can confirm that
this change matches perfectly with the recommended ratings.

Reviewed-by: Dang Huynh <dang.huynh@mainlining.org>

> out-of range value, and falls back to the minimum in that range: 1.8V.
> This is insufficient to power the SD card, so driver initialisation
> fails and booting from it does not work.
> 
> Set regulator-max-microvolt to 3400000 µV to match hardware capability.
> This matches the rk3399-orangepi for the same regulator.
> 
> Signed-off-by: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
> index b5c05928142c..f21fcdc1b49a 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
> @@ -526,7 +526,7 @@ vcc_sdio: LDO_REG4 {
>  				regulator-always-on;
>  				regulator-boot-on;
>  				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <3000000>;
> +				regulator-max-microvolt = <3400000>;
>  
>  				regulator-state-mem {
>  					regulator-on-in-suspend;

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

* Re: [PATCH] arm64: dts: rockchip: Fix vcc_sdio regulator max voltage on Pinebook Pro
  2026-05-19  9:44 [PATCH] arm64: dts: rockchip: Fix vcc_sdio regulator max voltage on Pinebook Pro Hugo Osvaldo Barrera
  2026-05-19 10:05 ` sashiko-bot
  2026-05-21  8:49 ` Dang Huynh
@ 2026-06-02 21:14 ` Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2026-06-02 21:14 UTC (permalink / raw)
  To: Hugo Osvaldo Barrera
  Cc: Heiko Stuebner, Tobias Schramm, devicetree, linux-rockchip


On Tue, 19 May 2026 11:44:39 +0200, Hugo Osvaldo Barrera wrote:
> The vcc_sdio regulator supports 1.8V to 3.4V output range according to
> its datasheet.
> 
> The current DT incorrectly limits the max voltage to 3.0V. This limit
> causes issues issues downstream with u-boot, which refuses to apply the
> out-of range value, and falls back to the minimum in that range: 1.8V.
> This is insufficient to power the SD card, so driver initialisation
> fails and booting from it does not work.
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: rockchip: Fix vcc_sdio regulator max voltage on Pinebook Pro
      commit: 8545eda00fdf3d7e17933ce0f706d005b1bad42d

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

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

end of thread, other threads:[~2026-06-02 21:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19  9:44 [PATCH] arm64: dts: rockchip: Fix vcc_sdio regulator max voltage on Pinebook Pro Hugo Osvaldo Barrera
2026-05-19 10:05 ` sashiko-bot
2026-05-21  8:49 ` Dang Huynh
2026-06-02 21:14 ` Heiko Stuebner

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