mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: i.MX8MP: increase off-on delay on the SD Vcc regulator
@ 2022-11-01 13:30 Marco Felsch
  2022-11-02  8:13 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Felsch @ 2022-11-01 13:30 UTC (permalink / raw)
  To: barebox

This commit is required to fix the SD card detection mechanism. Without
this commit the SD card (auto-)detection fails when booted from this
sd-card:

  mmc1: Query interface conditions failed: -110
  mmc1: SD operation condition set timed out

The commit is ported from U-Boot:

| commit 247bbeb74c186963d9365db3136d0285618bd9a7
| Author: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
| Date:   Sat Dec 5 17:29:17 2020 +0000
|
|     ARM: dts: imx8m: increase off-on delay on the SD Vcc regulator
|
|     Some SD Card controller and power circuitry has increased capacitance,
|     which keeps the internal logic remains powered after regulator is switch
|     off. This is generally the case when card is switched to SD104 mode,
|     where a power cycle should be performed. In case if the card internal
|     logic remains powered, it causes a subsequent failure of mode
|     transition, effectively leading to failed enumeration.
|
|     Introduce a delay of 20 msec in order to provide a possibility for
|     internal card circuitry to drain voltages and perform a power cycle
|     correctly.
|
|     Similar fix is done in commit c49d0ac38a76 ("ARM: dts: rmobile: Increase
|     off-on delay on the SD Vcc regulator") targeted Renesas SOCs.
|
|     Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
|     Cc: Stefano Babic <sbabic@denx.de>

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 arch/arm/dts/imx8mp-evk.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/imx8mp-evk.dts b/arch/arm/dts/imx8mp-evk.dts
index 3264ade4b8..77b438287c 100644
--- a/arch/arm/dts/imx8mp-evk.dts
+++ b/arch/arm/dts/imx8mp-evk.dts
@@ -35,6 +35,10 @@
 	reset-deassert-us = <100000>;
 };
 
+&reg_usdhc2_vmmc {
+	off-on-delay-us = <20000>;
+};
+
 &usdhc2 {
 	#address-cells = <1>;
 	#size-cells = <1>;
-- 
2.30.2




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

* Re: [PATCH] ARM: dts: i.MX8MP: increase off-on delay on the SD Vcc regulator
  2022-11-01 13:30 [PATCH] ARM: dts: i.MX8MP: increase off-on delay on the SD Vcc regulator Marco Felsch
@ 2022-11-02  8:13 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2022-11-02  8:13 UTC (permalink / raw)
  To: Marco Felsch; +Cc: barebox

On Tue, Nov 01, 2022 at 02:30:50PM +0100, Marco Felsch wrote:
> This commit is required to fix the SD card detection mechanism. Without
> this commit the SD card (auto-)detection fails when booted from this
> sd-card:
> 
>   mmc1: Query interface conditions failed: -110
>   mmc1: SD operation condition set timed out
> 
> The commit is ported from U-Boot:
> 
> | commit 247bbeb74c186963d9365db3136d0285618bd9a7
> | Author: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
> | Date:   Sat Dec 5 17:29:17 2020 +0000
> |
> |     ARM: dts: imx8m: increase off-on delay on the SD Vcc regulator
> |
> |     Some SD Card controller and power circuitry has increased capacitance,
> |     which keeps the internal logic remains powered after regulator is switch
> |     off. This is generally the case when card is switched to SD104 mode,
> |     where a power cycle should be performed. In case if the card internal
> |     logic remains powered, it causes a subsequent failure of mode
> |     transition, effectively leading to failed enumeration.
> |
> |     Introduce a delay of 20 msec in order to provide a possibility for
> |     internal card circuitry to drain voltages and perform a power cycle
> |     correctly.
> |
> |     Similar fix is done in commit c49d0ac38a76 ("ARM: dts: rmobile: Increase
> |     off-on delay on the SD Vcc regulator") targeted Renesas SOCs.
> |
> |     Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
> |     Cc: Stefano Babic <sbabic@denx.de>
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
>  arch/arm/dts/imx8mp-evk.dts | 4 ++++
>  1 file changed, 4 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/dts/imx8mp-evk.dts b/arch/arm/dts/imx8mp-evk.dts
> index 3264ade4b8..77b438287c 100644
> --- a/arch/arm/dts/imx8mp-evk.dts
> +++ b/arch/arm/dts/imx8mp-evk.dts
> @@ -35,6 +35,10 @@
>  	reset-deassert-us = <100000>;
>  };
>  
> +&reg_usdhc2_vmmc {
> +	off-on-delay-us = <20000>;
> +};
> +
>  &usdhc2 {
>  	#address-cells = <1>;
>  	#size-cells = <1>;
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2022-11-02  8:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 13:30 [PATCH] ARM: dts: i.MX8MP: increase off-on delay on the SD Vcc regulator Marco Felsch
2022-11-02  8:13 ` Sascha Hauer

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