AM62A7: SD card timeout and boot-up failure

Part Number: AM62A7

Tool/software:

I am running into the following error when booting on SD:

sdhci_transfer_data: Transfer data timeout
sdhci_send_command: Timeout for status update: 00000000 00000001
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_send_command: MMC: 1 busy timeout increasing to: 200 ms.
sdhci_send_command: MMC: 1 busy timeout increasing to: 400 ms.
sdhci_send_command: MMC: 1 busy timeout increasing to: 800 ms.
sdhci_send_command: MMC: 1 busy timeout increasing to: 1600 ms.
sdhci_send_command: MMC: 1 busy timeout increasing to: 3200 ms.
sdhci_send_command: MMC: 1 busy timeout.
sdhci_set_clock: Timeout to wait cmd & data inhibit
sdhci_send_command: MMC: 1 busy timeout.
sdhci_set_clock: Timeout to wait cmd & data inhibit
unable to select a mode
spl: mmc init failed with error: -524
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

This is running a AM62A7 on a custom motherboard. I have tried to disable the high speed SD card modes with the attached patchfile on the 10.00.00.08 SDK:

From 803ac2e728dbadf08e85b88224e2169ea4f84a65 Mon Sep 17 00:00:00 2001
From: Aaditya Watwe <aaditya.watwe@gmail.com>
Date: Fri, 11 Oct 2024 10:22:31 -0700
Subject: Disable clocks faster than 25MHz for flash

---
 arch/arm/dts/k3-am62a-main.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/dts/k3-am62a-main.dtsi b/arch/arm/dts/k3-am62a-main.dtsi
index e5adae8209..b08cc39e7a 100644
--- a/arch/arm/dts/k3-am62a-main.dtsi
+++ b/arch/arm/dts/k3-am62a-main.dtsi
@@ -588,7 +588,9 @@
 		ti,clkbuf-sel = <0x7>;
 		ti,otap-del-sel-legacy = <0x0>;
 		ti,otap-del-sel-mmc-hs = <0x0>;
+		/* Disable fast eMMC standards
 		ti,otap-del-sel-hs200 = <0x6>;
+		*/
 		status = "disabled";
 	};
 
@@ -605,9 +607,11 @@
 		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0xf>;
 		ti,otap-del-sel-sdr25 = <0xf>;
+		/* Disable fast SD standards
 		ti,otap-del-sel-sdr50 = <0xc>;
 		ti,otap-del-sel-sdr104 = <0x6>;
 		ti,otap-del-sel-ddr50 = <0x9>;
+		*/
 		ti,itap-del-sel-legacy = <0x0>;
 		ti,itap-del-sel-sd-hs = <0x0>;
 		ti,itap-del-sel-sdr12 = <0x0>;
@@ -628,9 +632,11 @@
 		ti,otap-del-sel-sd-hs = <0x0>;
 		ti,otap-del-sel-sdr12 = <0xf>;
 		ti,otap-del-sel-sdr25 = <0xf>;
+		/* Disable fast SD standards
 		ti,otap-del-sel-sdr50 = <0xc>;
 		ti,otap-del-sel-sdr104 = <0x6>;
 		ti,otap-del-sel-ddr50 = <0x9>;
+		*/
 		ti,itap-del-sel-legacy = <0x0>;
 		ti,itap-del-sel-sd-hs = <0x0>;
 		ti,itap-del-sel-sdr12 = <0x0>;
-- 
2.46.0

We have probed the clock signal between the AM62A SoC and the SD card, and observed that it runs at 25MHz and quickly stops (the clock flatlines on the oscilloscope).

Please advise as to how we can start debugging this issue.

  • Hello,

    Have you tried booting after disabling all the UHS modes like so

    diff --git a/arch/arm/dts/k3-am62a-main.dtsi b/arch/arm/dts/k3-am62a-main.dtsi
    index e5adae8209d..ff410c53cb9 100644
    --- a/arch/arm/dts/k3-am62a-main.dtsi
    +++ b/arch/arm/dts/k3-am62a-main.dtsi
    @@ -603,11 +603,11 @@
     		ti,clkbuf-sel = <0x7>;
     		ti,otap-del-sel-legacy = <0x0>;
     		ti,otap-del-sel-sd-hs = <0x0>;
    -		ti,otap-del-sel-sdr12 = <0xf>;
    -		ti,otap-del-sel-sdr25 = <0xf>;
    -		ti,otap-del-sel-sdr50 = <0xc>;
    -		ti,otap-del-sel-sdr104 = <0x6>;
    -		ti,otap-del-sel-ddr50 = <0x9>;
    +		// ti,otap-del-sel-sdr12 = <0xf>;
    +		// ti,otap-del-sel-sdr25 = <0xf>;
    +		// ti,otap-del-sel-sdr50 = <0xc>;
    +		// ti,otap-del-sel-sdr104 = <0x6>;
    +		// ti,otap-del-sel-ddr50 = <0x9>;
     		ti,itap-del-sel-legacy = <0x0>;
     		ti,itap-del-sel-sd-hs = <0x0>;
     		ti,itap-del-sel-sdr12 = <0x0>;
    

    In case it also fails, please share the full logs to see at which U-Boot stage the issue is coming.

    Thanks!

  • I was able to proceed with a similar patch

    From fbc31621293cee68b033f856c781ed91af1488c6 Mon Sep 17 00:00:00 2001
    From: Aaditya Watwe <aaditya.watwe@theheaviside.com>
    Date: Fri, 11 Oct 2024 17:16:43 -0700
    Subject: Disable faster clocks for flash
    
    ---
     arch/arm/dts/k3-am62a-main.dtsi | 40 ++++++++++++++++++++-------------
     1 file changed, 25 insertions(+), 15 deletions(-)
    
    diff --git a/arch/arm/dts/k3-am62a-main.dtsi b/arch/arm/dts/k3-am62a-main.dtsi
    index e5adae8209..7a8dc8b336 100644
    --- a/arch/arm/dts/k3-am62a-main.dtsi
    +++ b/arch/arm/dts/k3-am62a-main.dtsi
    @@ -588,7 +588,9 @@
     		ti,clkbuf-sel = <0x7>;
     		ti,otap-del-sel-legacy = <0x0>;
     		ti,otap-del-sel-mmc-hs = <0x0>;
    -		ti,otap-del-sel-hs200 = <0x6>;
    +		/* Disable fast eMMC standards
    +		 * ti,otap-del-sel-hs200 = <0x6>;
    +		 */
     		status = "disabled";
     	};
     
    @@ -603,15 +605,19 @@
     		ti,clkbuf-sel = <0x7>;
     		ti,otap-del-sel-legacy = <0x0>;
     		ti,otap-del-sel-sd-hs = <0x0>;
    -		ti,otap-del-sel-sdr12 = <0xf>;
    -		ti,otap-del-sel-sdr25 = <0xf>;
    -		ti,otap-del-sel-sdr50 = <0xc>;
    -		ti,otap-del-sel-sdr104 = <0x6>;
    -		ti,otap-del-sel-ddr50 = <0x9>;
    +		/* Disable fast SD standards
    +		 * ti,otap-del-sel-sdr12 = <0xf>;
    +		 * ti,otap-del-sel-sdr25 = <0xf>;
    +		 * ti,otap-del-sel-sdr50 = <0xc>;
    +		 * ti,otap-del-sel-sdr104 = <0x6>;
    +		 * ti,otap-del-sel-ddr50 = <0x9>;
    +		 */
     		ti,itap-del-sel-legacy = <0x0>;
     		ti,itap-del-sel-sd-hs = <0x0>;
    -		ti,itap-del-sel-sdr12 = <0x0>;
    -		ti,itap-del-sel-sdr25 = <0x0>;
    +		/* Disable fast SD standards
    +		 * ti,itap-del-sel-sdr12 = <0x0>;
    +		 * ti,itap-del-sel-sdr25 = <0x0>;
    +		 */
     		status = "disabled";
     	};
     
    @@ -626,15 +632,19 @@
     		ti,clkbuf-sel = <0x7>;
     		ti,otap-del-sel-legacy = <0x0>;
     		ti,otap-del-sel-sd-hs = <0x0>;
    -		ti,otap-del-sel-sdr12 = <0xf>;
    -		ti,otap-del-sel-sdr25 = <0xf>;
    -		ti,otap-del-sel-sdr50 = <0xc>;
    -		ti,otap-del-sel-sdr104 = <0x6>;
    -		ti,otap-del-sel-ddr50 = <0x9>;
    +		/* Disable fast SD standards
    +		 * ti,otap-del-sel-sdr12 = <0xf>;
    +		 * ti,otap-del-sel-sdr25 = <0xf>;
    +		 * ti,otap-del-sel-sdr50 = <0xc>;
    +		 * ti,otap-del-sel-sdr104 = <0x6>;
    +		 * ti,otap-del-sel-ddr50 = <0x9>;
    +		 */
     		ti,itap-del-sel-legacy = <0x0>;
     		ti,itap-del-sel-sd-hs = <0x0>;
    -		ti,itap-del-sel-sdr12 = <0x0>;
    -		ti,itap-del-sel-sdr25 = <0x0>;
    +		/* Disable fast SD standards
    +		 * ti,itap-del-sel-sdr12 = <0x0>;
    +		 * ti,itap-del-sel-sdr25 = <0x0>;
    +		 */
     		status = "disabled";
     	};
     
    -- 
    2.46.0
    

  • *note: this was applied to both u-boot AND the ti-linux kernel