This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DRA754: SD Card UHS-1 mode not consistent

Part Number: DRA754

Tool/software: Linux

We are using 3.01.00.03 processor sdk automotive version.

We verified the UHS functionality in SD card, however the switching to UHS mode is not consistent, it alternates between working/not-working.

Then in the release notes for 3.02.00.03, there is a line saying "SD card is enumerated in ddr/high speed mode not UHS mode.Boot is delayed by almost 1sec" Removing pull up resistor on MMC1 clock line reduces chances of hitting this issue. The solution says "reduces the chances of hitting this issue" which means this issue can still occur.

We disabled the pull-up on the MMC clock. Now the switching is more consistent, but still randomly the switching fails.

One more observation is when the UHS switching fails, it has to fallback to High Speed, that is not happening. Once UHS switching fails, the card does not respond to any command and it fails.

 In the log given below, after the line "[ 295.946504] mmc1: Signal voltage switch failed, power cycling card" there is no response from the SD card.

The dump of the regs after  the switch fails:

root@#:/sys/kernel/debug/mmc1# cat regs
mmc1:
sdio irq mode polling
ctx_loss: 1

regs:
CON: 0x00110600
PSTATE: 0x00040000
HCTL: 0x00000d10
SYSCTL: 0x000e0007
IE: 0x00000000
ISE: 0x00000000
CAPA: 0x26e90080
root@mmt2020-a879-b0:/sys/kernel/debug/mmc1#
root@mmt2020-a879-b0:/sys/kernel/debug/mmc1#

294.780286] mmc1: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 0 timing 0
[ 294.781327] rescan try freq freq[i]=400000 host->f_min=400000 i=0
[ 294.787722] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 294.801452] mmc1: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 0 timing 0
[ 294.804238] omap_hsmmc 4809c000.mmc: i/o voltage switch to 3V
[ 294.804259] omap_hsmmc 4809c000.mmc: Initial signal voltage of 3.3v
[ 294.818867] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 294.838864] mmc1: starting CMD52 arg 00000c00 flags 00000195
[ 295.354871] mmc1: req done (CMD52): -16: 00000000 00000000 00000000 00000000
[ 295.354891] mmc1: starting CMD52 arg 80000c08 flags 00000195
[ 295.854469] mmc1: req done (CMD52): -16: 00000000 00000000 00000000 00000000
[ 295.854489] mmc1: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 0 timing 0
[ 295.855507] mmc1: starting CMD0 arg 00000000 flags 000000c0
[ 295.855673] mmc1: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 295.856708] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 295.857723] mmc1: starting CMD8 arg 000001aa flags 000002f5
[ 295.858029] mmc1: req done (CMD8): 0: 000001aa 00000000 00000000 00000000
[ 295.858057] mmc1: starting CMD5 arg 00000000 flags 000002e1
[ 295.858438] mmc1: req failed (CMD5): -110, retrying...
[ 295.859403] mmc1: req failed (CMD5): -110, retrying...
[ 295.859788] mmc1: req failed (CMD5): -110, retrying...
[ 295.860153] mmc1: req done (CMD5): -110: 00000000 00000000 00000000 00000000
[ 295.860311] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 295.860623] mmc1: req done (CMD55): 0: 00400120 00000000 00000000 00000000
[ 295.860655] mmc1: starting CMD41 arg 00000000 flags 000000e1
[ 295.860966] mmc1: req done (CMD41): 0: 00ff8000 00000000 00000000 00000000
[ 295.861001] mmc1: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 0 timing 0
[ 295.862018] mmc1: starting CMD0 arg 00000000 flags 000000c0
[ 295.862182] mmc1: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[ 295.863214] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 295.864229] mmc1: starting CMD8 arg 000001aa flags 000002f5
[ 295.864538] mmc1: req done (CMD8): 0: 000001aa 00000000 00000000 00000000
[ 295.864570] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 295.864878] mmc1: req done (CMD55): 0: 00000120 00000000 00000000 00000000
[ 295.864916] mmc1: starting CMD41 arg 41200000 flags 000000e1
[ 295.865225] mmc1: req done (CMD41): 0: 00ff8000 00000000 00000000 00000000
[ 295.881829] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 295.882148] mmc1: req done (CMD55): 0: 00000120 00000000 00000000 00000000
[ 295.883240] mmc1: starting CMD41 arg 41200000 flags 000000e1
[ 295.883554] mmc1: req done (CMD41): 0: 00ff8000 00000000 00000000 00000000
[ 295.898994] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 295.899307] mmc1: req done (CMD55): 0: 00000120 00000000 00000000 00000000
[ 295.899342] mmc1: starting CMD41 arg 41200000 flags 000000e1
[ 295.899654] mmc1: req done (CMD41): 0: 00ff8000 00000000 00000000 00000000
[ 295.918908] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 295.919224] mmc1: req done (CMD55): 0: 00000120 00000000 00000000 00000000
[ 295.919282] mmc1: starting CMD41 arg 41200000 flags 000000e1
[ 295.919592] mmc1: req done (CMD41): 0: c1ff8000 00000000 00000000 00000000
[ 295.919623] mmc1: starting CMD11 arg 00000000 flags 00000015
[ 295.919928] mmc1: req done (CMD11): 0: 00000300 00000000 00000000 00000000
[ 295.920960] mmc1: clock 0Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 295.938875] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 295.941015] omap_hsmmc 4809c000.mmc: card busy high
[ 295.946504] mmc1: Signal voltage switch failed, power cycling card
[ 295.946518] mmc1: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 0 timing 0
[ 295.948536] mmc1: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 0 timing 0
[ 295.950070] omap_hsmmc 4809c000.mmc: i/o voltage switch to 3V
[ 295.950085] omap_hsmmc 4809c000.mmc: Initial signal voltage of 3.3v
[ 295.968968] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 295.988844] mmc1: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 0 timing 0
[ 295.989864] mmc1: starting CMD0 arg 00000000 flags 000000c0
[ 295.989944] mmc1: req done (CMD0): -110: 00000000 00000000 00000000 00000000
[ 295.990980] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 295.991996] mmc1: starting CMD8 arg 000001aa flags 000002f5
[ 295.992075] mmc1: req done (CMD8): -110: 00000000 00000000 00000000 00000000
[ 295.992106] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 295.992185] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 295.992213] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 295.992289] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 295.992391] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 295.992469] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 295.992504] mmc1: starting CMD55 arg 00000000 flags 000000f5
[ 295.992582] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 295.992614] mmc1: error -110 whilst initialising SD card
[ 295.998179] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 295.998194] mmc1: starting CMD1 arg 00000000 flags 000000e1
[ 295.998272] mmc1: req done (CMD1): -110: 00000000 00000000 00000000 00000000
[ 295.998298] powering off...