linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout
@ 2025-05-05  5:58 Himanshu Bhavani
  2025-05-05  6:30 ` Tarang Raval
  2025-05-09 14:49 ` Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Himanshu Bhavani @ 2025-05-05  5:58 UTC (permalink / raw)
  To: shawnguo, tarang.raval
  Cc: Himanshu Bhavani, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, devicetree,
	imx, linux-arm-kernel, linux-kernel

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@siliconsignals.io>
---
 arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi | 12 +++++++++++-
 1 file changed, 11 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..b59da91fdd04 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@40000000 {
 		      <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>;
+		gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
+		states = <3300000 0x0 1800000 0x1>;
+		vin-supply = <&ldo5>;
+	};
 };
 
 &A53_0 {
@@ -205,6 +214,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



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

* Re: [PATCH v2] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout
  2025-05-05  5:58 [PATCH v2] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout Himanshu Bhavani
@ 2025-05-05  6:30 ` Tarang Raval
  2025-05-09 14:49 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Tarang Raval @ 2025-05-05  6:30 UTC (permalink / raw)
  To: Himanshu Bhavani, shawnguo@kernel.org
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

Hi Himanshu,

> 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@siliconsignals.io>

Acked-by: Tarang Raval <tarang.raval@siliconsignals.io>

Best Regards,
Tarang 

> ---
>  arch/arm64/boot/dts/freescale/imx8mp-var-som.dtsi | 12 +++++++++++-
>  1 file changed, 11 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..b59da91fdd04 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@40000000 {
>                        <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>;
> +               gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
> +               states = <3300000 0x0 1800000 0x1>;
> +               vin-supply = <&ldo5>;
> +       };
>  };
>  
>  &A53_0 {
> @@ -205,6 +214,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

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

* Re: [PATCH v2] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout
  2025-05-05  5:58 [PATCH v2] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout Himanshu Bhavani
  2025-05-05  6:30 ` Tarang Raval
@ 2025-05-09 14:49 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2025-05-09 14:49 UTC (permalink / raw)
  To: Himanshu Bhavani
  Cc: shawnguo, tarang.raval, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, devicetree, imx, linux-arm-kernel, linux-kernel

On Mon, May 05, 2025 at 11:28:27AM +0530, Himanshu Bhavani wrote:
> 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@siliconsignals.io>

Applied, thanks!



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

end of thread, other threads:[~2025-05-09 20:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-05  5:58 [PATCH v2] arm64: dts: imx8mp-var-som: Fix LDO5 shutdown causing SD card timeout Himanshu Bhavani
2025-05-05  6:30 ` Tarang Raval
2025-05-09 14:49 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).