Class 10 SD cards do not work

Hi,

I’m very troubled.
I’m working with inforce6301 (Snapdragon 410(APQ8016)).

I got the following error and fails to write when I write any files to class 10 SD card.
Class 4 SD card works well.
I think the following topic is similar but the patch which is in it does not work.

Oct 14 15:49:46 linaro-alip kernel: [   66.530142] mmc1: Timeout waiting for hardware interrupt.
Oct 14 15:49:46 linaro-alip kernel: [   66.530152] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
Oct 14 15:49:46 linaro-alip kernel: [   66.530165] mmc1: sdhci: Sys addr:  0x00000008 | Version:  0x00002e02
Oct 14 15:49:46 linaro-alip kernel: [   66.530173] mmc1: sdhci: Blk size:  0x00000200 | Blk cnt:  0x00000000
Oct 14 15:49:46 linaro-alip kernel: [   66.530181] mmc1: sdhci: Argument:  0x00002e70 | Trn mode: 0x0000002b
Oct 14 15:49:46 linaro-alip kernel: [   66.530189] mmc1: sdhci: Present:   0x03f80107 | Host ctl: 0x0000001f
Oct 14 15:49:46 linaro-alip kernel: [   66.530197] mmc1: sdhci: Power:     0x00000001 | Blk gap:  0x00000000
Oct 14 15:49:46 linaro-alip kernel: [   66.530205] mmc1: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
Oct 14 15:49:46 linaro-alip kernel: [   66.530213] mmc1: sdhci: Timeout:   0x0000000e | Int stat: 0x00000000
Oct 14 15:49:46 linaro-alip kernel: [   66.530221] mmc1: sdhci: Int enab:  0x02ff900b | Sig enab: 0x02ff100b
Oct 14 15:49:46 linaro-alip kernel: [   66.530228] mmc1: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
Oct 14 15:49:46 linaro-alip kernel: [   66.530237] mmc1: sdhci: Caps:      0x322dc8b2 | Caps_1:   0x00008007
Oct 14 15:49:46 linaro-alip kernel: [   66.530245] mmc1: sdhci: Cmd:       0x0000193a | Max curr: 0x00000000
Oct 14 15:49:46 linaro-alip kernel: [   66.530253] mmc1: sdhci: Resp[0]:   0x00800d00 | Resp[1]:  0x00000000
Oct 14 15:49:46 linaro-alip kernel: [   66.530261] mmc1: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000900
Oct 14 15:49:46 linaro-alip kernel: [   66.530268] mmc1: sdhci: Host ctl2: 0x0000000b
Oct 14 15:49:46 linaro-alip kernel: [   66.530276] mmc1: sdhci: ADMA Err:  0x00000003 | ADMA Ptr: 0x00000000bec78218
Oct 14 15:49:46 linaro-alip kernel: [   66.530282] mmc1: sdhci: ============================================
Oct 14 15:49:46 linaro-alip kernel: [   66.531281] mmcblk1: error -110 transferring data, sector 11888, nr 8, cmd response 0x0, card status 0x400c00
Oct 14 15:49:56 linaro-alip kernel: [   77.026149] mmc1: Timeout waiting for hardware interrupt.
Oct 14 15:49:56 linaro-alip kernel: [   77.026167] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
Oct 14 15:49:56 linaro-alip kernel: [   77.026187] mmc1: sdhci: Sys addr:  0x00000008 | Version:  0x00002e02
Oct 14 15:49:56 linaro-alip kernel: [   77.026203] mmc1: sdhci: Blk size:  0x00000200 | Blk cnt:  0x00000000
Oct 14 15:49:56 linaro-alip kernel: [   77.026218] mmc1: sdhci: Argument:  0x00012e20 | Trn mode: 0x0000002b
Oct 14 15:49:56 linaro-alip kernel: [   77.026234] mmc1: sdhci: Present:   0x03f80107 | Host ctl: 0x0000001f
Oct 14 15:49:56 linaro-alip kernel: [   77.026249] mmc1: sdhci: Power:     0x00000001 | Blk gap:  0x00000000
Oct 14 15:49:56 linaro-alip kernel: [   77.026263] mmc1: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
Oct 14 15:49:56 linaro-alip kernel: [   77.026278] mmc1: sdhci: Timeout:   0x0000000e | Int stat: 0x00000000
Oct 14 15:49:56 linaro-alip kernel: [   77.026294] mmc1: sdhci: Int enab:  0x02ff900b | Sig enab: 0x02ff100b
Oct 14 15:49:56 linaro-alip kernel: [   77.026308] mmc1: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
Oct 14 15:49:56 linaro-alip kernel: [   77.026324] mmc1: sdhci: Caps:      0x322dc8b2 | Caps_1:   0x00008007
Oct 14 15:49:56 linaro-alip kernel: [   77.026339] mmc1: sdhci: Cmd:       0x0000193a | Max curr: 0x00000000
Oct 14 15:49:56 linaro-alip kernel: [   77.026354] mmc1: sdhci: Resp[0]:   0x00800d00 | Resp[1]:  0x00000000
Oct 14 15:49:56 linaro-alip kernel: [   77.026369] mmc1: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000900
Oct 14 15:49:56 linaro-alip kernel: [   77.026381] mmc1: sdhci: Host ctl2: 0x0000000b
Oct 14 15:49:56 linaro-alip kernel: [   77.026398] mmc1: sdhci: ADMA Err:  0x00000003 | ADMA Ptr: 0x00000000bec78218
Oct 14 15:49:56 linaro-alip kernel: [   77.026409] mmc1: sdhci: ============================================
Oct 14 15:49:56 linaro-alip kernel: [   77.029207] mmcblk1: error -110 transferring data, sector 77344, nr 8, cmd response 0x0, card status 0x400c00
Oct 14 15:50:27 linaro-alip kernel: [  107.490156] mmc1: Timeout waiting for hardware interrupt.
Oct 14 15:50:27 linaro-alip kernel: [  107.490175] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
Oct 14 15:50:27 linaro-alip kernel: [  107.490196] mmc1: sdhci: Sys addr:  0x00000020 | Version:  0x00002e02
Oct 14 15:50:27 linaro-alip kernel: [  107.490212] mmc1: sdhci: Blk size:  0x00000200 | Blk cnt:  0x00000000
Oct 14 15:50:27 linaro-alip kernel: [  107.490227] mmc1: sdhci: Argument:  0x00342110 | Trn mode: 0x0000002b
Oct 14 15:50:27 linaro-alip kernel: [  107.490242] mmc1: sdhci: Present:   0x03f80107 | Host ctl: 0x0000001f
Oct 14 15:50:27 linaro-alip kernel: [  107.490257] mmc1: sdhci: Power:     0x00000001 | Blk gap:  0x00000000
Oct 14 15:50:27 linaro-alip kernel: [  107.490272] mmc1: sdhci: Wake-up:   0x00000000 | Clock:    0x00000007
Oct 14 15:50:27 linaro-alip kernel: [  107.490287] mmc1: sdhci: Timeout:   0x0000000e | Int stat: 0x00000000
Oct 14 15:50:27 linaro-alip kernel: [  107.490302] mmc1: sdhci: Int enab:  0x02ff900b | Sig enab: 0x02ff100b
Oct 14 15:50:27 linaro-alip kernel: [  107.490317] mmc1: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
Oct 14 15:50:27 linaro-alip kernel: [  107.490332] mmc1: sdhci: Caps:      0x322dc8b2 | Caps_1:   0x00008007
Oct 14 15:50:27 linaro-alip kernel: [  107.490348] mmc1: sdhci: Cmd:       0x0000193a | Max curr: 0x00000000
Oct 14 15:50:27 linaro-alip kernel: [  107.490363] mmc1: sdhci: Resp[0]:   0x00800d00 | Resp[1]:  0x00000000
Oct 14 15:50:27 linaro-alip kernel: [  107.490378] mmc1: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000900
Oct 14 15:50:27 linaro-alip kernel: [  107.490390] mmc1: sdhci: Host ctl2: 0x0000000b
Oct 14 15:50:27 linaro-alip kernel: [  107.490407] mmc1: sdhci: ADMA Err:  0x00000003 | ADMA Ptr: 0x00000000bec78224
Oct 14 15:50:27 linaro-alip kernel: [  107.490418] mmc1: sdhci: ============================================
Oct 14 15:50:27 linaro-alip kernel: [  107.491556] mmcblk1: error -110 transferring data, sector 3416336, nr 32, cmd response 0x0, card status 0x400c00

I am using Linux kernel 4.14 so I tried with the following release but it does not work.
https://releases.linaro.org/96boards/dragonboard410c/linaro/debian/18.01/
https://releases.linaro.org/96boards/dragonboard410c/linaro/debian/19.01/
Do you have the patch to solve this problem for 4.14 ?

Thank you.

You should try latest release, which includes all latest fixes: Linaro Releases

Regarding sdcard, I think the following patches should help:

Hi Loic,

Thank you for your reply.

I tried with the latest (20.07).
But I got the error like the following when I use class 10 SD card.
Class 4 still works.

[  216.446694] sdhci_msm 7864900.sdhci: Card stuck in wrong state! card_busy_detect status: 0xd00
[  226.598696] sdhci_msm 7864900.sdhci: Card stuck in wrong state! card_busy_detect status: 0xd00
[  236.702695] sdhci_msm 7864900.sdhci: Card stuck in wrong state! card_busy_detect status: 0xd00
[  247.238698] sdhci_msm 7864900.sdhci: Card stuck in wrong state! card_busy_detect status: 0xd00

I am investigating about this but I have not had solution yet.
Do you know something about this error ?

Thank you.

Not aware about this issue, is it the same with previous release?

@Loic

This error is not occurred with previous release.

I solved this problem by changing device tree.
I added max-frequency = <50000000>; .

sdhc_2: sdhci@07864000 {
    compatible = "qcom,sdhci-msm-v4";
    reg = <0x07864900 0x11c>, <0x07864000 0x800>;
    reg-names = "hc_mem", "core_mem";
    interrupts = <0 125 0>, <0 221 0>;
    interrupt-names = "hc_irq", "pwr_irq";
    clocks = <&gcc GCC_SDCC2_APPS_CLK>,
         <&gcc GCC_SDCC2_AHB_CLK>,
         <&xo_board>;
    clock-names = "core", "iface", "xo";
    bus-width = <4>;
    max-frequency = <50000000>;
    status = "disabled";
};

Thank you.

1 Like

Hi,

I am also facing the same issue. I have tried the above mentioned change in dts file but still getting the same issue in class10. Please suggest any pointer to fix this issue for the class10 card. I am using Linux Kernel Version-5.4.25

card stuck in wrong state card_busy_detect status 0xd00

sdhci@48102000 {
compatible = “snps,dwcmshc-sdhci”;
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_sdhci>;
reg = <0x48102000 0x1000>;
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&syst_hclk>, <&syst_hclk>;
clock-names = “core”, “bus”;
bus-width = <4>;
vmmc-supply = <&reg_3p3v>;
vqmmc-supply = <&reg_3p3v>;
max-frequency = <50000000>;
};

Does not seem to be a dragonboard -410c, right?

yes…It is not Dragon board.

yes…It is not Dragon board.