Skip to contentSkip to conversation

arm64: dts: rockchip: odroid-m1: keep vcc3v3_pcie enabled from boot

PATCH Applied Miguel Jesus Seron Gonzalez 2 participants 3 messages Oct 19 – Nov 1

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

PATCH 1/1 arm64: dts: rockchip: odroid-m1: keep vcc3v3_pcie enabled from boot

The 3.3V supply of the M.2 slot is a GPIO-controlled fixed regulator without regulator-boot-on. When the regulator driver probes, it requests the enable GPIO as low, cutting power to an NVMe drive that the bootloader has already powered up and used. When the PCIe controller is built in, it probes a few milliseconds later and re-enables the supply. The drive therefore sees a brief power glitch without enough time to fully discharge.

Some drives do not survive this. With a DRAM-less Transcend MTE110S (TS128GMTE110S), the board froze during NVMe probe in roughly half of the cold boots, before the display came up. Kernels that probe PCIe later (e.g. as modules, ~3.7 s after boot) are not affected, because the drive stays off long enough to reset cleanly.

Mark the regulator as boot-on, so that the regulator driver keeps the enable GPIO high when it probes and the supply is never toggled after the bootloader has enabled it. The PCIe controller then takes it as its vpcie3v3-supply, which keeps it enabled afterwards.

With this change, 5 out of 5 cold boots after power cuts of 2, 6, 30 and 60 seconds succeeded. Afterwards the supply remained enabled with one user, with no NVMe or regulator errors and NVMe reads at 1.2 GB/s.

Fixes 35b28582aa3d ("arm64: dts: rockchip: Add PCIEe v3 nodes to ODROID-M1")

---

Notes:
Found while debugging Home Assistant OS on an ODROID-M1, where the same change is being carried as a downstream patch:
https://github.com/home-assistant/operating-system/issues/5103
https://github.com/home-assistant/operating-system/pull/5104

 arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts +1 -0
index 442a2bc43..6d29fa926 100644
@@ -106,6 +106,7 @@ simple-audio-card,codec {
 	vcc3v3_pcie: regulator-vcc3v3-pcie {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc3v3_pcie";
+		regulator-boot-on;
 		enable-active-high;
 		gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";

base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222

Signature · 1 line
2.53.0
#1 lore raw
Quoted 2 lines · Miguel Jesus Seron Gonzalez
Fixes 35b28582aa3d ("arm64: dts: rockchip: Add PCIEe v3 nodes to ODROID-M1")

I forgot to add the Assisted-by tag that Documentation/process/coding-assistants.rst asks for. The changelog and the patch were prepared with the help of Claude (Anthropic). I reviewed them, and the testing was done on my own board.

Assisted-by Claude:claude-opus-5-5
maintainer Applied
#2 lore raw
In reply to Miguel Jesus Seron Gonzalez
Quoted 9 lines · Miguel Jesus Seron Gonzalez

The 3.3V supply of the M.2 slot is a GPIO-controlled fixed regulator without regulator-boot-on. When the regulator driver probes, it requests the enable GPIO as low, cutting power to an NVMe drive that the bootloader has already powered up and used. When the PCIe controller is built in, it probes a few milliseconds later and re-enables the supply. The drive therefore sees a brief power glitch without enough time to fully discharge.

[...]

Applied, thanks!

[1/1] arm64: dts: rockchip: odroid-m1: keep vcc3v3_pcie enabled from boot

      commit: ff9ff0e5e40dde8e7d769c86d8314b37b323cac7

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>