* Radxa ROCK 5T: SD card startup failure
@ 2026-01-09 15:10 Michael Tretter
2026-02-09 16:43 ` Ahmad Fatoum
0 siblings, 1 reply; 2+ messages in thread
From: Michael Tretter @ 2026-01-09 15:10 UTC (permalink / raw)
To: barebox
Hi,
since Commit a3bf6c16f77d ("dts: update to v6.19-rc1"), barebox fails to
initialize the SD card on my Radxa ROCK T5 board.
I tracked the failure down to a change of the pinctrl setting for the
card detect pin to RK_FUNC_GPIO (see sdmmc_det_pin). If I change the
pinctrl mux back to 1, the SD card is initialized correctly.
If the error happens, the dw_mmc driver reports a DATA ERROR on CMD13
with BIT(13) set (DWMCI_INTMSK_SBE) and runs into a timeout afterward:
dw_mmc fe2c0000.mmc@fe2c0000.of: registered as mmc1
dw_mmc fe2c0000.mmc@fe2c0000.of: Using fifo-depth=256
mmc1: clock 0.0MHz width 1 timing legacy
dw_mmc fe2c0000.mmc@fe2c0000.of: Buswidth = 0, clock: 0
mmc1: clock 0.400000MHz width 1 timing legacy
dw_mmc fe2c0000.mmc@fe2c0000.of: Buswidth = 0, clock: 400000
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD0
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD8
mmc1: SD Card Rev. 2.00 or later detected
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD55
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD41
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD55
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD41
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD55
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD41
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD55
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD41
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD55
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD41
mmc1: Put the Card in Identify Mode
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD2
mmc1: Card's identification data is: 03534453-44333247-8555412B-AC0191F5
mmc1: Get/Set relative address
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD3
mmc1: Get card's specific data
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD9
mmc1: Card's specific data is: 400E0032-5B590000-EDC87F80-0A4040C3
mmc1: Transfer speed: 25000000
mmc1: Max. block length are: Write=512, Read=512 Bytes
mmc1: Read block length: 512, Write block length: 512
mmc1: Select the card, and put it into Transfer Mode
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD7
mmc1: Changing transfer frequency
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD55
mmc1: Trying to read the SCR (try 1 of 3)
dw_mmc fe2c0000.mmc@fe2c0000.of: desc@ 0x00000000ad25b000 0x8000001c 0x00000008 0xad25aac0 0xad25b010
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD51
dw_mmc fe2c0000.mmc@fe2c0000.of: desc@ 0x00000000ad25b000 0x8000001c 0x00000040 0xad25aac0 0xad25b010
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD6
dw_mmc fe2c0000.mmc@fe2c0000.of: desc@ 0x00000000ad25b000 0x8000001c 0x00000040 0xad25aac0 0xad25b010
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD6
mmc1: detected SD card version 2.0
mmc1: Capacity: 30436 MiB
mmc1: Erase group is 1 sector(s). Trim not supported
mmc1: Prepare for bus width change
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD55
mmc1: Set SD bus width to 4 bit
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD6
mmc1: clock 0.400000MHz width 4 timing legacy
dw_mmc fe2c0000.mmc@fe2c0000.of: Buswidth = 2, clock: 400000
mmc1: clock 50.0MHz width 4 timing SD HS
dw_mmc fe2c0000.mmc@fe2c0000.of: Buswidth = 2, clock: 50000000
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD55
dw_mmc fe2c0000.mmc@fe2c0000.of: desc@ 0x00000000ad25b000 0x8000001c 0x00000040 0xad25d780 0xad25b010
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD13
dw_mmc fe2c0000.mmc@fe2c0000.of: DATA ERROR!
dw_mmc fe2c0000.mmc@fe2c0000.of: desc@ 0x00000000ad25b000 0x8000001c 0x00000040 0xad25d780 0xad25b010
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD13
dw_mmc fe2c0000.mmc@fe2c0000.of: Send command timeout..
dw_mmc fe2c0000.mmc@fe2c0000.of: desc@ 0x00000000ad25b000 0x8000001c 0x00000040 0xad25d780 0xad25b010
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD13
dw_mmc fe2c0000.mmc@fe2c0000.of: Send command timeout..
dw_mmc fe2c0000.mmc@fe2c0000.of: desc@ 0x00000000ad25b000 0x8000001c 0x00000040 0xad25d780 0xad25b010
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD13
dw_mmc fe2c0000.mmc@fe2c0000.of: Send command timeout..
mmc1: unable to read ssr: Connection timed out
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD16
dw_mmc fe2c0000.mmc@fe2c0000.of: Send command timeout..
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD16
dw_mmc fe2c0000.mmc@fe2c0000.of: Send command timeout..
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD16
dw_mmc fe2c0000.mmc@fe2c0000.of: Send command timeout..
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD16
dw_mmc fe2c0000.mmc@fe2c0000.of: Send command timeout..
dw_mmc fe2c0000.mmc@fe2c0000.of: Sending CMD16
dw_mmc fe2c0000.mmc@fe2c0000.of: Send command timeout..
WARNING: mmc1: Card's startup fails with -110
It seems to me that the SD host controller fails to correctly initialize
if the card detect it directly muxed as GPIO instead of muxing it to the
SD host controller. At least that's what I understand from
https://lore.kernel.org/linux-rockchip/4920950.GXAFRqVoOG@diego/.
May there be some configuration in the SD host controller that needs to
be changed to ignore the card detect?
Michael
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Radxa ROCK 5T: SD card startup failure
2026-01-09 15:10 Radxa ROCK 5T: SD card startup failure Michael Tretter
@ 2026-02-09 16:43 ` Ahmad Fatoum
0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2026-02-09 16:43 UTC (permalink / raw)
To: Michael Tretter, barebox
Hello Michael,
On 1/9/26 4:10 PM, Michael Tretter wrote:
> It seems to me that the SD host controller fails to correctly initialize
> if the card detect it directly muxed as GPIO instead of muxing it to the
> SD host controller. At least that's what I understand from
> https://lore.kernel.org/linux-rockchip/4920950.GXAFRqVoOG@diego/.
>
> May there be some configuration in the SD host controller that needs to
> be changed to ignore the card detect?
The driver didn't clear the card-detect bit in DWMCI_RINTSTS, which may
be the culprit.
Could you please give the potential fix at [1] a test?
If this doesn't resolve the issue, we will have to do revert the DT
change in arch/arm/dts before v2026.02.0.
[1]:
https://lore.barebox.org/barebox/20260209164045.1924618-1-a.fatoum@pengutronix.de/T/#u
Thanks,
Ahmad
>
> Michael
>
>
--
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:[~2026-02-09 16:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-09 15:10 Radxa ROCK 5T: SD card startup failure Michael Tretter
2026-02-09 16:43 ` Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox