Skip to contentSkip to conversation

ARM: dts: imx: Set default tuning step for imx6sx usdhc

PATCH Applied Xiaolei Wang 3 participants 3 messages Jul 26, 2023 – Jul 30, 2023

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

PATCH 1/1 ARM: dts: imx: Set default tuning step for imx6sx usdhc

If the tuning step is not set, the tuning step is set to 1. For some sd cards, the following Tuning timeout will occur.

Tuning failed, falling back to fixed sampling clock

So set the default tuning step. This refers to the NXP vendor's commit below:

https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/
arch/arm/boot/dts/imx6sx.dtsi#L1108-L1109

Fixes 1e336aa0c025 ("mmc: sdhci-esdhc-imx: correct the tuning start tap and step setting")
---
 arch/arm/boot/dts/nxp/imx/imx6sx.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/nxp/imx/imx6sx.dtsi +6 -0
index 3a4308666552..5bed7b411a3a 100644
@@ -1010,6 +1010,8 @@ usdhc1: mmc@2190000 {
 					 <&clks IMX6SX_CLK_USDHC1>;
 				clock-names = "ipg", "ahb", "per";
 				bus-width = <4>;
+				fsl,tuning-start-tap = <20>;
+				fsl,tuning-step= <2>;
 				status = "disabled";
 			};
 
@@ -1022,6 +1024,8 @@ usdhc2: mmc@2194000 {
 					 <&clks IMX6SX_CLK_USDHC2>;
 				clock-names = "ipg", "ahb", "per";
 				bus-width = <4>;
+				fsl,tuning-start-tap = <20>;
+				fsl,tuning-step= <2>;
 				status = "disabled";
 			};
 
@@ -1034,6 +1038,8 @@ usdhc3: mmc@2198000 {
 					 <&clks IMX6SX_CLK_USDHC3>;
 				clock-names = "ipg", "ahb", "per";
 				bus-width = <4>;
+				fsl,tuning-start-tap = <20>;
+				fsl,tuning-step= <2>;
 				status = "disabled";
 			};
 
Signature · 1 line
2.25.1
reviewer Reviewed-by on v1 1/1
#1 lore raw

Hi Xiaolei,

Quoted 6 lines · Xiaolei Wang

If the tuning step is not set, the tuning step is set to 1. For some sd cards, the following Tuning timeout will occur.

Tuning failed, falling back to fixed sampling clock

Quoted 8 lines

So set the default tuning step. This refers to the NXP vendor's commit below:

https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/
arch/arm/boot/dts/imx6sx.dtsi#L1108-L1109

Fixes 1e336aa0c025 ("mmc: sdhci-esdhc-imx: correct the tuning start tap and step setting")

Thanks for your patch:

Applied
#2 lore raw
In reply to Xiaolei Wang
Quoted 5 lines · Xiaolei Wang

If the tuning step is not set, the tuning step is set to 1. For some sd cards, the following Tuning timeout will occur.

Tuning failed, falling back to fixed sampling clock

Quoted 8 lines

So set the default tuning step. This refers to the NXP vendor's commit below:

https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/
arch/arm/boot/dts/imx6sx.dtsi#L1108-L1109

Fixes 1e336aa0c025 ("mmc: sdhci-esdhc-imx: correct the tuning start tap and step setting")

Applied, thanks!