lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250501054604.23368-1-himanshu.bhavani@siliconsignals.io>
Date: Thu,  1 May 2025 11:16:03 +0530
From: Himanshu Bhavani <himanshu.bhavani@...iconsignals.io>
To: krzk+dt@...nel.org,
	tarang.raval@...iconsignals.io
Cc: Himanshu Bhavani <himanshu.bhavani@...iconsignals.io>,
	Rob Herring <robh@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>,
	devicetree@...r.kernel.org,
	imx@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout

Fix SD card timeout issue caused by LDO5 regulator getting disabled
after boot.

The kernel log shows LDO5 being disabled, which leads to a timeout
on USDHC2:
[   33.760561] LDO5: disabling
[   81.119861] mmc1: Timeout waiting for hardware interrupt.

To prevent this, set regulator-boot-on and regulator-always-on for
LDO5. Also add the vqmmc regulator to properly support 1.8V/3.3V
signaling for USDHC2 using a GPIO-controlled regulator.

Fixes: 6c2a1f4f71258 ("arm64: dts: imx8mp-var-som-symphony: Add Variscite Symphony board and VAR-SOM-MX8MP SoM")
Signed-off-by: Himanshu Bhavani <himanshu.bhavani@...iconsignals.io>
---

kernel hangs during boot with the following logs:

[   33.760561] LDO5: disabling
[   81.119861] mmc1: Timeout waiting for hardware interrupt.
[   81.119872] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[   81.119876] mmc1: sdhci: Sys addr:  0x00000010 | Version:  0x00000002
[   81.119882] mmc1: sdhci: Blk size:  0x00000200 | Blk cnt:  0x00000010
[   81.119886] mmc1: sdhci: Argument:  0x00844358 | Trn mode: 0x0000002b
[   81.119891] mmc1: sdhci: Present:   0x01f88009 | Host ctl: 0x00000012
[   81.119896] mmc1: sdhci: Power:     0x00000002 | Blk gap:  0x00000080
[   81.119900] mmc1: sdhci: Wake-up:   0x00000008 | Clock:    0x0000003f
[   81.119904] mmc1: sdhci: Timeout:   0x0000008f | Int stat: 0x00000000
[   81.119908] mmc1: sdhci: Int enab:  0x117f100b | Sig enab: 0x117f100b
[   81.119912] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000502
[   81.119917] mmc1: sdhci: Caps:      0x07eb0000 | Caps_1:   0x0000b407
[   81.119921] mmc1: sdhci: Cmd:       0x0000193a | Max curr: 0x00ffffff
[   81.119925] mmc1: sdhci: Resp[0]:   0x00000900 | Resp[1]:  0x0076b27f
[   81.119929] mmc1: sdhci: Resp[2]:   0x325b5900 | Resp[3]:  0x00000900
[   81.119933] mmc1: sdhci: Host ctl2: 0x00000008
[   81.119937] mmc1: sdhci: ADMA Err:  0x00000003 | ADMA Ptr: 0x4003f204
[   81.119941] mmc1: sdhci-esdhc-imx: ========= ESDHC IMX DEBUG STATUS DUMP =========
[   81.119944] mmc1: sdhci-esdhc-imx: cmd debug status:  0x21b0
[   81.119949] mmc1: sdhci-esdhc-imx: data debug status:  0x2200
[   81.119954] mmc1: sdhci-esdhc-imx: trans debug status:  0x2300
[   81.119959] mmc1: sdhci-esdhc-imx: dma debug status:  0x2400
[   81.119964] mmc1: sdhci-esdhc-imx: adma debug status:  0x2594
[   81.119970] mmc1: sdhci-esdhc-imx: fifo debug status:  0x2608
[   81.119976] mmc1: sdhci-esdhc-imx: async fifo debug status:  0x2798
[   81.119981] mmc1: sdhci: ===========================================

---
 arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi
index b2ac2583a592..8d50e8382a1a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi
@@ -35,7 +35,6 @@ memory@...00000 {
 		      <0x1 0x00000000 0 0xc0000000>;
 	};
 
-
 	reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
 	        compatible = "regulator-fixed";
 	        regulator-name = "VSD_3V3";
@@ -46,6 +45,16 @@ reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
 	        startup-delay-us = <100>;
 	        off-on-delay-us = <12000>;
 	};
+
+	reg_usdhc2_vqmmc: regulator-usdhc2-vqmmc {
+		compatible = "regulator-gpio";
+		regulator-name = "VSD_VSEL";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+		gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
+		gpios-states = <1>;
+		states = <3300000 0x0 1800000 0x1>;
+	};
 };
 
 &A53_0 {
@@ -158,6 +167,8 @@ ldo5: LDO5 {
 				regulator-name = "LDO5";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
+				regulator-always-on;
 			};
 		};
 	};
@@ -205,6 +216,7 @@ &usdhc2 {
         pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
         cd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
         vmmc-supply = <&reg_usdhc2_vmmc>;
+	vqmmc-supply = <&reg_usdhc2_vqmmc>;
         bus-width = <4>;
         status = "okay";
 };
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ