All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC
@ 2023-10-17  6:50 haibo.chen
  2023-10-17  6:50 ` [PATCH 2/3] arm64: dts: imx93: change tuning start to get a large scan range for standard tuning haibo.chen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: haibo.chen @ 2023-10-17  6:50 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, devicetree, haibo.chen

From: Haibo Chen <haibo.chen@nxp.com>

imx93 pad integrate has one issue, refer to ERR052021:

ERR052021 uSDHC: Sometimes uSDHC does not work under VDD_SOC low
		 drive mode and nominal mode
Description:
uSDHC PADs have one integration issue.
When CMD/DATA lines direction change from output to input, uSDHC
controller begin sampling, the integration issue will make input
enable signal from uSDHC propagated to the PAD with a long delay,
thus the new input value on the pad comes to uSDHC lately. The
uSDHC sampled the old input value and the sampling result is wrong.

Workaround:
Set uSDHC CMD/DATA PADs iomux register SION bit to 1, then PADs will
propagate input to uSDHC with no delay, so correct value is sampled.

This issue will wrongly trigger the start bit when sample the USDHC
command response, cause the USDHC trigger command CRC/index/endbit
error, which will finally impact the tuning pass window, espically
will impact the standard tuning logic, and can't find a correct delay
cell to get the best timing.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 .../boot/dts/freescale/imx93-11x11-evk.dts    | 30 ++++++++++---------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
index 2b9d47716f75..021caf471bf6 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
@@ -237,18 +237,19 @@ MX93_PAD_DAP_TCLK_SWCLK__LPUART5_CTS_B		0x31e
 		>;
 	};
 
+	/* need to config the SION for data and cmd pad, refer to ERR052021 */
 	pinctrl_usdhc1: usdhc1grp {
 		fsl,pins = <
 			MX93_PAD_SD1_CLK__USDHC1_CLK		0x15fe
-			MX93_PAD_SD1_CMD__USDHC1_CMD		0x13fe
-			MX93_PAD_SD1_DATA0__USDHC1_DATA0	0x13fe
-			MX93_PAD_SD1_DATA1__USDHC1_DATA1	0x13fe
-			MX93_PAD_SD1_DATA2__USDHC1_DATA2	0x13fe
-			MX93_PAD_SD1_DATA3__USDHC1_DATA3	0x13fe
-			MX93_PAD_SD1_DATA4__USDHC1_DATA4	0x13fe
-			MX93_PAD_SD1_DATA5__USDHC1_DATA5	0x13fe
-			MX93_PAD_SD1_DATA6__USDHC1_DATA6	0x13fe
-			MX93_PAD_SD1_DATA7__USDHC1_DATA7	0x13fe
+			MX93_PAD_SD1_CMD__USDHC1_CMD		0x400013fe
+			MX93_PAD_SD1_DATA0__USDHC1_DATA0	0x400013fe
+			MX93_PAD_SD1_DATA1__USDHC1_DATA1	0x400013fe
+			MX93_PAD_SD1_DATA2__USDHC1_DATA2	0x400013fe
+			MX93_PAD_SD1_DATA3__USDHC1_DATA3	0x400013fe
+			MX93_PAD_SD1_DATA4__USDHC1_DATA4	0x400013fe
+			MX93_PAD_SD1_DATA5__USDHC1_DATA5	0x400013fe
+			MX93_PAD_SD1_DATA6__USDHC1_DATA6	0x400013fe
+			MX93_PAD_SD1_DATA7__USDHC1_DATA7	0x400013fe
 			MX93_PAD_SD1_STROBE__USDHC1_STROBE	0x15fe
 		>;
 	};
@@ -265,14 +266,15 @@ MX93_PAD_SD2_CD_B__GPIO3_IO00		0x31e
 		>;
 	};
 
+	/* need to config the SION for data and cmd pad, refer to ERR052021 */
 	pinctrl_usdhc2: usdhc2grp {
 		fsl,pins = <
 			MX93_PAD_SD2_CLK__USDHC2_CLK		0x15fe
-			MX93_PAD_SD2_CMD__USDHC2_CMD		0x13fe
-			MX93_PAD_SD2_DATA0__USDHC2_DATA0	0x13fe
-			MX93_PAD_SD2_DATA1__USDHC2_DATA1	0x13fe
-			MX93_PAD_SD2_DATA2__USDHC2_DATA2	0x13fe
-			MX93_PAD_SD2_DATA3__USDHC2_DATA3	0x13fe
+			MX93_PAD_SD2_CMD__USDHC2_CMD		0x400013fe
+			MX93_PAD_SD2_DATA0__USDHC2_DATA0	0x400013fe
+			MX93_PAD_SD2_DATA1__USDHC2_DATA1	0x400013fe
+			MX93_PAD_SD2_DATA2__USDHC2_DATA2	0x400013fe
+			MX93_PAD_SD2_DATA3__USDHC2_DATA3	0x400013fe
 			MX93_PAD_SD2_VSELECT__USDHC2_VSELECT	0x51e
 		>;
 	};
-- 
2.34.1


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

* [PATCH 2/3] arm64: dts: imx93: change tuning start to get a large scan range for standard tuning
  2023-10-17  6:50 [PATCH 1/3] arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC haibo.chen
@ 2023-10-17  6:50 ` haibo.chen
  2023-10-17  6:50 ` [PATCH 3/3] arm64: dts: imx93-11x11-evk: add 12 ms delay to make sure the VDD_SD power off haibo.chen
  2023-11-27  2:25 ` [PATCH 1/3] arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC Shawn Guo
  2 siblings, 0 replies; 4+ messages in thread
From: haibo.chen @ 2023-10-17  6:50 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, devicetree, haibo.chen

From: Haibo Chen <haibo.chen@nxp.com>

For original setting, the start point is 20, after the SION setting,
ERR052021 can be workaround, but start point from 20 is too large,
especially for the LD 133MHz case.

Set the tuning start point as 1, tuning step as 2, so that, for the
40 times tuning logic, it can cover 1~81, its large and safe enough
for all different devices like eMMC/SD/SDIO.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx93.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
index ceccf4766440..ce76ae9e1856 100644
--- a/arch/arm64/boot/dts/freescale/imx93.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
@@ -874,7 +874,7 @@ usdhc1: mmc@42850000 {
 					 <&clk IMX93_CLK_USDHC1_GATE>;
 				clock-names = "ipg", "ahb", "per";
 				bus-width = <8>;
-				fsl,tuning-start-tap = <20>;
+				fsl,tuning-start-tap = <1>;
 				fsl,tuning-step = <2>;
 				status = "disabled";
 			};
@@ -888,7 +888,7 @@ usdhc2: mmc@42860000 {
 					 <&clk IMX93_CLK_USDHC2_GATE>;
 				clock-names = "ipg", "ahb", "per";
 				bus-width = <4>;
-				fsl,tuning-start-tap = <20>;
+				fsl,tuning-start-tap = <1>;
 				fsl,tuning-step = <2>;
 				status = "disabled";
 			};
@@ -951,7 +951,7 @@ usdhc3: mmc@428b0000 {
 					 <&clk IMX93_CLK_USDHC3_GATE>;
 				clock-names = "ipg", "ahb", "per";
 				bus-width = <4>;
-				fsl,tuning-start-tap = <20>;
+				fsl,tuning-start-tap = <1>;
 				fsl,tuning-step = <2>;
 				status = "disabled";
 			};
-- 
2.34.1


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

* [PATCH 3/3] arm64: dts: imx93-11x11-evk: add 12 ms delay to make sure the VDD_SD power off
  2023-10-17  6:50 [PATCH 1/3] arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC haibo.chen
  2023-10-17  6:50 ` [PATCH 2/3] arm64: dts: imx93: change tuning start to get a large scan range for standard tuning haibo.chen
@ 2023-10-17  6:50 ` haibo.chen
  2023-11-27  2:25 ` [PATCH 1/3] arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC Shawn Guo
  2 siblings, 0 replies; 4+ messages in thread
From: haibo.chen @ 2023-10-17  6:50 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, devicetree, haibo.chen

From: Haibo Chen <haibo.chen@nxp.com>

To support SD3.0 mode, according to the SD spec, a clean power off
for the VDD_SD is keep the VDD_SD lower than 0.5V for at least 1ms.
On imx93 board, gate off the VDD_SD, it will cost about 10ms to see
the voltage change from 3.3v to 0.5v. So at least need to dealy 11ms
to make sure a clean power off and power on. Here add 12ms dealy.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
index 021caf471bf6..9921ea13ab48 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
@@ -76,6 +76,7 @@ reg_usdhc2_vmmc: regulator-usdhc2 {
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
 		gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;
+		off-on-delay-us = <12000>;
 		enable-active-high;
 	};
 };
-- 
2.34.1


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

* Re: [PATCH 1/3] arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC
  2023-10-17  6:50 [PATCH 1/3] arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC haibo.chen
  2023-10-17  6:50 ` [PATCH 2/3] arm64: dts: imx93: change tuning start to get a large scan range for standard tuning haibo.chen
  2023-10-17  6:50 ` [PATCH 3/3] arm64: dts: imx93-11x11-evk: add 12 ms delay to make sure the VDD_SD power off haibo.chen
@ 2023-11-27  2:25 ` Shawn Guo
  2 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2023-11-27  2:25 UTC (permalink / raw)
  To: haibo.chen
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, s.hauer, kernel,
	festevam, linux-imx, devicetree

On Tue, Oct 17, 2023 at 02:50:46PM +0800, haibo.chen@nxp.com wrote:
> From: Haibo Chen <haibo.chen@nxp.com>
> 
> imx93 pad integrate has one issue, refer to ERR052021:
> 
> ERR052021 uSDHC: Sometimes uSDHC does not work under VDD_SOC low
> 		 drive mode and nominal mode
> Description:
> uSDHC PADs have one integration issue.
> When CMD/DATA lines direction change from output to input, uSDHC
> controller begin sampling, the integration issue will make input
> enable signal from uSDHC propagated to the PAD with a long delay,
> thus the new input value on the pad comes to uSDHC lately. The
> uSDHC sampled the old input value and the sampling result is wrong.
> 
> Workaround:
> Set uSDHC CMD/DATA PADs iomux register SION bit to 1, then PADs will
> propagate input to uSDHC with no delay, so correct value is sampled.
> 
> This issue will wrongly trigger the start bit when sample the USDHC
> command response, cause the USDHC trigger command CRC/index/endbit
> error, which will finally impact the tuning pass window, espically
> will impact the standard tuning logic, and can't find a correct delay
> cell to get the best timing.
> 
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>

Applied all, thanks!

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

end of thread, other threads:[~2023-11-27  2:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-17  6:50 [PATCH 1/3] arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC haibo.chen
2023-10-17  6:50 ` [PATCH 2/3] arm64: dts: imx93: change tuning start to get a large scan range for standard tuning haibo.chen
2023-10-17  6:50 ` [PATCH 3/3] arm64: dts: imx93-11x11-evk: add 12 ms delay to make sure the VDD_SD power off haibo.chen
2023-11-27  2:25 ` [PATCH 1/3] arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.