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/AM5708: MMC SDHCI driver crash in AM5708

Part Number: AM5708

Tool/software: Linux

Hi,

I'm using kernel 4.14.79.

Apart from the problem I'm facing in previous thread,

Linux/AM5708: SD/EMMC detect sequence problem - Processors forum - Processors - TI E2E support forum...

e2e.ti.com
Part Number: AM5708 Tool/software: Linux Hi, I'm using AM5708 based custom board. We have SD card slot on MMC1 and EMMC mounted on MMC2. Previously, we

I'm also facing crash for mmc0 in SDHCI omap driver.

We have SD card on mmc0 and EMMC on mmc1. Whenever I boot using EMMC and SD card is not connected, I face these crash logs after random time since boot.

[  776.975999] ------------[ cut here ]------------
[  776.980755] WARNING: CPU: 0 PID: 64 at drivers/mmc/host/sdhci-omap.c:742 sdhci_omap_init_74_clocks+0xb0/0x114
[  776.990999] Modules linked in: bc_example(O) omapdrm drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyareac
[  777.046558] CPU: 0 PID: 64 Comm: kworker/0:3 Tainted: G           O    4.14.79.18.0_Edge_Kernel+ #1
[  777.055645] Hardware name: Generic DRA72X (Flattened Device Tree)
[  777.061773] Workqueue: events_freezable mmc_rescan
[  777.066588] Backtrace: 
[  777.069054] [<c010b4c4>] (dump_backtrace) from [<c010b794>] (show_stack+0x18/0x1c)
[  777.076659]  r7:00000009 r6:60010013 r5:00000000 r4:c0d5e9d4
[  777.082349] [<c010b77c>] (show_stack) from [<c0892570>] (dump_stack+0x8c/0xa0)
[  777.089607] [<c08924e4>] (dump_stack) from [<c012b034>] (__warn+0xec/0x104)
[  777.096600]  r7:00000009 r6:c0b16618 r5:00000000 r4:00000000
[  777.102285] [<c012af48>] (__warn) from [<c012b104>] (warn_slowpath_null+0x28/0x30)
[  777.109888]  r9:00000000 r8:c09664f8 r7:000000b4 r6:e7150af9 r5:d3f64380 r4:00000000
[  777.117669] [<c012b0dc>] (warn_slowpath_null) from [<c0676e58>] (sdhci_omap_init_74_clocks+0xb0/0x114)
[  777.127019] [<c0676da8>] (sdhci_omap_init_74_clocks) from [<c066ec34>] (sdhci_set_ios+0xd4/0x3dc)
[  777.135929]  r7:d3f64000 r6:d3f64380 r5:d3f64210 r4:d3f64000
[  777.141615] [<c066eb60>] (sdhci_set_ios) from [<c0675f34>] (sdhci_omap_set_ios+0xd8/0x10c)
[  777.149916]  r9:00000000 r8:c09664f8 r7:00000000 r6:00000000 r5:d3f64210 r4:d3f64000
[  777.157695] [<c0675e5c>] (sdhci_omap_set_ios) from [<c06589d8>] (mmc_power_up.part.7+0xf4/0x100)
[  777.166520]  r9:00000000 r8:c09664f8 r7:00000000 r6:00000001 r5:d3f64210 r4:d3f64000
[  777.174299] [<c06588e4>] (mmc_power_up.part.7) from [<c0659840>] (mmc_rescan+0x274/0x3f4)
[  777.182512]  r7:c09664f0 r6:d3f64000 r5:000493e0 r4:d3f6426c
[  777.188201] [<c06595cc>] (mmc_rescan) from [<c0141e50>] (process_one_work+0x128/0x410)
[  777.196152]  r9:00000000 r8:df8cff00 r7:00000000 r6:df8ccb40 r5:d3f74900 r4:d3f6426c
[  777.203933] [<c0141d28>] (process_one_work) from [<c0142190>] (worker_thread+0x58/0x5a0)
[  777.212059]  r10:d3f8c000 r9:df8ccb58 r8:c0d02d00 r7:00000008 r6:d3f74918 r5:df8ccb40
[  777.219920]  r4:d3f74900
[  777.222469] [<c0142138>] (worker_thread) from [<c0147d94>] (kthread+0x138/0x168)
[  777.229897]  r10:df473e80 r9:d3f7681c r8:d3f74900 r7:d3f8c000 r6:d3f767c0 r5:00000000
[  777.237759]  r4:d3f76800
[  777.240306] [<c0147c5c>] (kthread) from [<c0107cf8>] (ret_from_fork+0x14/0x3c)
[  777.247559]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0147c5c
[  777.255421]  r4:d3f767c0

[  777.260798] ---[ end trace e867a9a40e97f5c6 ]---
[  787.680728] mmc0: Timeout waiting for hardware cmd interrupt.
[  787.686506] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[  787.692976] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x00003302
[  787.699444] mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
[  787.705911] mmc0: sdhci: Argument:  0x00000c00 | Trn mode: 0x00000000
[  787.712378] mmc0: sdhci: Present:   0x00000001 | Host ctl: 0x00000000
[  787.718844] mmc0: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
[  787.725310] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x0000a007
[  787.731776] mmc0: sdhci: Timeout:   0x00000000 | Int stat: 0x00018001
[  787.738242] mmc0: sdhci: Int enab:  0x007f0003 | Sig enab: 0x007f0003
[  787.744708] mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000001
[  787.751174] mmc0: sdhci: Caps:      0x25e90080 | Caps_1:   0x00000f77
[  787.757639] mmc0: sdhci: Cmd:       0x0000341a | Max curr: 0x00000000
[  787.764106] mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
[  787.770572] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[  787.777037] mmc0: sdhci: Host ctl2: 0x00000000
[  787.781497] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x00000000

And these logs keeps coming untill I restart the board.

How can I fix this problem?

Thanks,

Gunjal

  • Hello Gunjal,

    Gunjal Shah said:
    Apart from the problem I'm facing in previous thread,

    This is not a problem. Actually this change was made to permanently detect the eMMC as /dev/mmcblk1. Please, read this commit message.

    git log 9aaf3437aa72ed5370bf32c99580a3fa2c330e3d
    
        mmc: block: Use the mmc host device index as the mmcblk device index
       
        Commit 520bd7a8b415 ("mmc: core: Optimize boot time by detecting cards
        simultaneously") causes regressions for some platforms.
       
        These platforms relies on fixed mmcblk device indexes, instead of
        deploying the defacto standard with UUID/PARTUUID. In other words their
        rootfs needs to be available at hardcoded paths, like /dev/mmcblk0p2.
       
        Such guarantees have never been made by the kernel, but clearly the above
        commit changes the behaviour. More precisely, because of that the order
        changes of how cards becomes detected, so do their corresponding mmcblk
        device indexes.
       
        As the above commit significantly improves boot time for some platforms
        (magnitude of seconds), let's avoid reverting this change but instead
        restore the behaviour of how mmcblk device indexes becomes picked.
       
        By using the same index for the mmcblk device as for the corresponding mmc
        host device, the probe order of mmc host devices decides the index we get
        for the mmcblk device.
       
        For those platforms that suffers from a regression, one could expect that
        this updated behaviour should be sufficient to meet their expectations of
        "fixed" mmcblk device indexes.
       
        Another side effect from this change, is that the same index is used for
        the mmc host device, the mmcblk device and the mmc block queue. That
        should clarify their relationship.

    If you do not modify the MMC driver you won't see that crash too. As I said modify your U-Boot environments and pass the /dev/mmcblk1 to rootpath when you are booting from eMMC, in case if you are not passing the generic PARTUUID as rootpath.

    Best regards,
    Kemal

  • Hi Kemal,

    This SDHCI driver crash that I'm facing is without any modification in MMC driver.
    I'm following your solution from the previous thread and giving /dev/mmcblk1p2 as mmcroot to mount.
    I'm able to successfully boot from that but after some random time, I'm having these driver crash logs.

    If you see the logs, it's getting generated during mmc_rescan for mmc0 (which I've not connected).

    Thanks,
    Gunjal
  • Hello Gunjal,

    Could you please confirm if you are still observing the logs with the SD card connected?

    Regards,
    Krunal
  • Hi krunal,

    I'm not observing these logs when SD card is connected.
    I'm observing these logs only when SD card is not connected and I boot using eMMC.

    Thanks,
    Gunjal
  • Hello Gunjal,

    I have not been able to replicate the issue on a AM572 GPEVM. Also, with regards to eMMC/SD card, please share your dts changes.

    Regards,
    Krunal
  • Hello,

    I will be closing the ticket and if you are still experiencing issues, please feel free to open the ticket in the future.

    Regards,
    Krunal
  • Hi Krunal,


    Sorry for the late reply. But, this problem still exists in SDHCI driver.

    I had changed mmc drivers to omap_hsmmc instead of SDHCI for now but SDHCI driver problem still exists and I would like to have some solution for it.

    Here are my dts configuration for SD (MMC1) and eMMC (MMC2),

       mmc1_pins_default: mmc1_pins_default {
           pinctrl-single,pins = <
               0x354 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_clk.clk */
               0x358 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_cmd.cmd */
               0x35c (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat0.dat0 */
               0x360 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat1.dat1 */
               0x364 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat2.dat2 */
               0x368 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat3.dat3 */
               0x36c (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_sdcd.sdcd */
           >;
       };
    
       mmc1_pins_ddr50: pinmux_mmc1_ddr50_pins {
           pinctrl-single,pins = <
               0x354 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)  /* mmc1_clk.clk */
               0x358 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)  /* mmc1_cmd.cmd */
               0x35c (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)  /* mmc1_dat0.dat0 */
               0x360 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)  /* mmc1_dat1.dat1 */
               0x364 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)  /* mmc1_dat2.dat2 */
               0x368 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)  /* mmc1_dat3.dat3 */
               0x36c (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0)  /* mmc1_sdcd.sdcd */
           >;
       };
    
        mmc2_pins_default: mmc2_pins_default {
            pinctrl-single,pins = <
                DRA7XX_CORE_IOPAD(0x349c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a23.mmc2_clk */
                DRA7XX_CORE_IOPAD(0x34b0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */
                DRA7XX_CORE_IOPAD(0x34a0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */
                DRA7XX_CORE_IOPAD(0x34a4, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */
                DRA7XX_CORE_IOPAD(0x34a8, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */
                DRA7XX_CORE_IOPAD(0x34ac, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */
                DRA7XX_CORE_IOPAD(0x348c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */
                DRA7XX_CORE_IOPAD(0x3490, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */
                DRA7XX_CORE_IOPAD(0x3494, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */
                DRA7XX_CORE_IOPAD(0x3498, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */
            >;
        };
    
        mmc2_pins_hs: mmc2_pins_hs {
            pinctrl-single,pins = <
                DRA7XX_CORE_IOPAD(0x349c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a23.mmc2_clk */
                DRA7XX_CORE_IOPAD(0x34b0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */
                DRA7XX_CORE_IOPAD(0x34a0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */
                DRA7XX_CORE_IOPAD(0x34a4, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */
                DRA7XX_CORE_IOPAD(0x34a8, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */
                DRA7XX_CORE_IOPAD(0x34ac, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */
                DRA7XX_CORE_IOPAD(0x348c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */
                DRA7XX_CORE_IOPAD(0x3490, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */
                DRA7XX_CORE_IOPAD(0x3494, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */
                DRA7XX_CORE_IOPAD(0x3498, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */
            >;
        };
    
        mmc2_pins_ddr_rev20: mmc2_pins_ddr_rev20 {
            pinctrl-single,pins = <
                DRA7XX_CORE_IOPAD(0x349c, PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a23.mmc2_clk */
                DRA7XX_CORE_IOPAD(0x34b0, PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */
                DRA7XX_CORE_IOPAD(0x34a0, PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */
                DRA7XX_CORE_IOPAD(0x34a4, PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */
                DRA7XX_CORE_IOPAD(0x34a8, PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */
                DRA7XX_CORE_IOPAD(0x34ac, PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */
                DRA7XX_CORE_IOPAD(0x348c, PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */
                DRA7XX_CORE_IOPAD(0x3490, PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */
                DRA7XX_CORE_IOPAD(0x3494, PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */
                DRA7XX_CORE_IOPAD(0x3498, PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */
            >;
        };
    
    
       mmc1_iodelay_ddr50_conf: mmc1_iodelay_ddr50_conf {
           pinctrl-single,pins = <
               0x618 A_DELAY_PS(588) G_DELAY_PS(0)  /* CFG_MMC1_CLK_IN */
               0x624 A_DELAY_PS(1000) G_DELAY_PS(0) /* CFG_MMC1_CMD_IN */
               0x630 A_DELAY_PS(1375) G_DELAY_PS(0) /* CFG_MMC1_DAT0_IN */
               0x63C A_DELAY_PS(1000) G_DELAY_PS(0) /* CFG_MMC1_DAT1_IN */
               0x648 A_DELAY_PS(1000) G_DELAY_PS(0) /* CFG_MMC1_DAT2_IN */
               0x654 A_DELAY_PS(1000) G_DELAY_PS(0) /* CFG_MMC1_DAT3_IN */
               0x620 A_DELAY_PS(1230) G_DELAY_PS(0) /* CFG_MMC1_CLK_OUT */
               0x62C A_DELAY_PS(0) G_DELAY_PS(0)    /* CFG_MMC1_CMD_OUT */
               0x638 A_DELAY_PS(56) G_DELAY_PS(0)   /* CFG_MMC1_DAT0_OUT */
               0x644 A_DELAY_PS(76) G_DELAY_PS(0)   /* CFG_MMC1_DAT1_OUT */
               0x650 A_DELAY_PS(91) G_DELAY_PS(0)   /* CFG_MMC1_DAT2_OUT */
               0x65C A_DELAY_PS(99) G_DELAY_PS(0)   /* CFG_MMC1_DAT3_OUT */
               0x628 A_DELAY_PS(0) G_DELAY_PS(0)    /* CFG_MMC1_CMD_OEN */
               0x634 A_DELAY_PS(0) G_DELAY_PS(0)    /* CFG_MMC1_DAT0_OEN */
               0x640 A_DELAY_PS(0) G_DELAY_PS(0)    /* CFG_MMC1_DAT1_OEN */
               0x64C A_DELAY_PS(0) G_DELAY_PS(0)    /* CFG_MMC1_DAT2_OEN */
               0x658 A_DELAY_PS(0) G_DELAY_PS(0)    /* CFG_MMC1_DAT3_OEN */
           >;
       };
    
        mmc2_iodelay_ddr_conf: mmc2_iodelay_ddr_conf {
            pinctrl-pin-array = <
                0x18c A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A19_IN */
                0x1a4 A_DELAY_PS(119) G_DELAY_PS(0) /* CFG_GPMC_A20_IN */
                0x1b0 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A21_IN */
                0x1bc A_DELAY_PS(18) G_DELAY_PS(0)  /* CFG_GPMC_A22_IN */
                0x1c8 A_DELAY_PS(894) G_DELAY_PS(0) /* CFG_GPMC_A23_IN */
                0x1d4 A_DELAY_PS(30) G_DELAY_PS(0)  /* CFG_GPMC_A24_IN */
                0x1e0 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A25_IN */
                0x1ec A_DELAY_PS(23) G_DELAY_PS(0)  /* CFG_GPMC_A26_IN */
                0x1f8 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A27_IN */
                0x360 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_CS1_IN */
                0x194 A_DELAY_PS(152) G_DELAY_PS(0) /* CFG_GPMC_A19_OUT */
                0x1ac A_DELAY_PS(206) G_DELAY_PS(0) /* CFG_GPMC_A20_OUT */
                0x1b8 A_DELAY_PS(78) G_DELAY_PS(0)  /* CFG_GPMC_A21_OUT */
                0x1c4 A_DELAY_PS(2) G_DELAY_PS(0)   /* CFG_GPMC_A22_OUT */
                0x1d0 A_DELAY_PS(266) G_DELAY_PS(0) /* CFG_GPMC_A23_OUT */
                0x1dc A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A24_OUT */
                0x1e8 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A25_OUT */
                0x1f4 A_DELAY_PS(43) G_DELAY_PS(0)  /* CFG_GPMC_A26_OUT */
                0x200 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A27_OUT */
                0x368 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_CS1_OUT */
                0x190 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A19_OEN */
                0x1a8 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A20_OEN */
                0x1b4 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A21_OEN */
                0x1c0 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A22_OEN */
                0x1d8 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A24_OEN */
                0x1e4 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A25_OEN */
                0x1f0 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A26_OEN */
                0x1fc A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_A27_OEN */
                0x364 A_DELAY_PS(0) G_DELAY_PS(0)   /* CFG_GPMC_CS1_OEN */
            >;
        };
    
    
    &mmc1 {
       status = "okay";
       vmmc-supply = <&lp8733_ldo0_reg>;
       pinctrl-names = "default", "ddr50";
       pinctrl-0 = <&mmc1_pins_default>;
       pinctrl-1 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr50_conf>;
       bus-width = <4>;
       max-frequency = <192000000>;
    };
    
    &mmc2 {
        status = "okay";
        vmmc-supply = <&v3_3d>;
        vqmmc-supply = <&v3_3d>;
        pinctrl-names = "default", "hs", "ddr_1_8v";
        pinctrl-0 = <&mmc2_pins_default>;
        pinctrl-1 = <&mmc2_pins_hs>;
        pinctrl-2 = <&mmc2_pins_ddr_rev20 &mmc2_iodelay_ddr_conf>;
        bus-width = <8>;
        ti,non-removable;
        max-frequency = <96000000>;
        no-1-8-v;
    };
    

    One more thing I would like to know is, in kernel 4.4.41 default mmc drivers for dra7 SOCs were omap_hsmmc and in kernel 4.14.79 default mmc drivers are sdhci. What difference it makes if I chose omap_hsmmc instead of sdhci since as of now I'm not facing any issues in omap_hsmmc?

    Regards,

    Gunjal

  • Hello Gunjal,

    Thank you for reporting this. This driver change was made to add a high speed mode capabilities. Are you saying that your board's eMMC doesn't work with the new dra7-sdhci driver and works with the old omap4-hsmmc driver?  Can you confirm?

    Best regards,
    Kemal

  • Hi Kemal,

    I don't have any problem in booting from eMMC with dra7-sdhci driver.

    As I had said we have SD card on mmc0 and eMMC on mmc1, when SD card is not connected and I boot with eMMC, I'm able to boot successfully. But, after boot on some random time, I receive above crash logs from mmc drivers for mmc0, which is for SD card (Not connected currently).

    Thanks,

    Gunjal

  • Yes but you get this above crash logs from mmc drivers for mmc0 which is for SD card (Not connected currently) with dra7-sdhci driver right? If you use the omap4-hsmmc driver with the same circumstances, will this crash occur again?

  • No, this crash doesn't happen with omap-hsmmc driver.
  • Hi,

    I have another problem related to this.

    Till now, I was configuring eMMC in "hs" and "ddr1_8" modes only.

    Now I want to configure eMMC in "hs200" mode which I was using in older kernel.

    So, I made changes in my dts for it,

       mmc2_pins_hs200_1_8v: mmc2_pins_hs200_1_8v {
           pinctrl-single,pins = <
               0x9c (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a23.mmc2_clk */
               0xb0 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */
               0xa0 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */
               0xa4 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */
               0xa8 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */
               0xac (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */
               0x8c (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */
               0x90 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */
               0x94 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */
               0x98 (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */
           >;
       };
    
    
       mmc2_iodelay_hs200_1_8v_conf: mmc2_iodelay_hs200_1_8v_conf {
           pinctrl-single,pins = <
               0x190 A_DELAY_PS(274) G_DELAY_PS(0)       /* CFG_GPMC_A19_OEN */
               0x194 A_DELAY_PS(162) G_DELAY_PS(0)       /* CFG_GPMC_A19_OUT */
               0x1a8 A_DELAY_PS(401) G_DELAY_PS(0)       /* CFG_GPMC_A20_OEN */
               0x1ac A_DELAY_PS(73) G_DELAY_PS(0)        /* CFG_GPMC_A20_OUT */
               0x1b4 A_DELAY_PS(465) G_DELAY_PS(0)       /* CFG_GPMC_A21_OEN */
               0x1b8 A_DELAY_PS(115) G_DELAY_PS(0)       /* CFG_GPMC_A21_OUT */
               0x1c0 A_DELAY_PS(633) G_DELAY_PS(0)       /* CFG_GPMC_A22_OEN */
               0x1c4 A_DELAY_PS(47) G_DELAY_PS(0)        /* CFG_GPMC_A22_OUT */
               0x1d0 A_DELAY_PS(935) G_DELAY_PS(280)     /* CFG_GPMC_A23_OUT */
               0x1d8 A_DELAY_PS(621) G_DELAY_PS(0)       /* CFG_GPMC_A24_OEN */
               0x1dc A_DELAY_PS(0) G_DELAY_PS(0)         /* CFG_GPMC_A24_OUT */
               0x1e4 A_DELAY_PS(183) G_DELAY_PS(0)       /* CFG_GPMC_A25_OEN */
               0x1e8 A_DELAY_PS(0) G_DELAY_PS(0)         /* CFG_GPMC_A25_OUT */
               0x1f0 A_DELAY_PS(467) G_DELAY_PS(0)       /* CFG_GPMC_A26_OEN */
               0x1f4 A_DELAY_PS(0) G_DELAY_PS(0)         /* CFG_GPMC_A26_OUT */
               0x1fc A_DELAY_PS(262) G_DELAY_PS(0)       /* CFG_GPMC_A27_OEN */
               0x200 A_DELAY_PS(46) G_DELAY_PS(0)        /* CFG_GPMC_A27_OUT */
               0x364 A_DELAY_PS(684) G_DELAY_PS(0)       /* CFG_GPMC_CS1_OEN */
               0x368 A_DELAY_PS(76) G_DELAY_PS(0)        /* CFG_GPMC_CS1_OUT */
            >;
        };
    
    
    &mmc2 {
        status = "okay";
        vmmc-supply = <&v1_8v>;
        pinctrl-names = "default", "hs", "ddr_1_8v", "hs200_1_8v";
        pinctrl-0 = <&mmc2_pins_default>;
        pinctrl-1 = <&mmc2_pins_hs>;
        pinctrl-2 = <&mmc2_pins_ddr_rev20 &mmc2_iodelay_ddr_conf>;
        pinctrl-3 = <&mmc2_pins_hs200_1_8v &mmc2_iodelay_hs200_1_8v_conf>;
        cap-mmc-dual-data-rate;
        cap-mmc-highspeed;
        bus-width = <8>;
        ti,non-removable;
    
        /*no-1-8-v;*/
    
        max-frequency = <192000000>;
    };
    

    After enabling hs200 mode, eMMC boot is failing with following message,

    mmc1: error -110 whilst initialising MMC card

    If I change the max-frequency to 96MHz, then I'm able to boot successfullt with hs200 mode, but then I'm not getting desired speed for eMMC.

    One more thing,

    If I change the mmc drivers to the default "sdhci_omap" drivers, then I'm able to boot with hs200 eMMC mode with 192MHz frequency also.

    But with this driver, I have the other crash problem mentioned in previous post.

    Can you provide any help on this as well?

    If I'm able to boot with hs200 192MHz mode in eMMC, then I'm fine using "omap_hsmmc" drivers.

    Regards,

    Gunjal

  • Hi Gunjal,

    For debug purpose, I am wondering if you could please disable mmc1 (status = "disable") or comment out the mmc1 instance where you declare the bus width/pinctrl-names/pinctrl-0. This ensures that the driver does not look for the SD card and lets see if the crash messages disappear. I know you would like to have both instances enabled but lets first confirm if the crash is indeed because of the driver not finding any SD card.

    Regards,
    Krunal
  • Hi Gunjal,

    I am wondering if you have any updates on the mmc errors.

    Regards,
    Krunal
  • Hi Krunal,

    Actaully, before trying what you've said, I was trying to re-produce the mmc0 crash with same configurations (From which I was getting the crash).
    Till now, I'm unable to re-produce the crash, so I have put one of my device in test mode. I'll get back to you in one or two days with whatever update I have.

    Regards,
    Gunjal
  • Hi Krunal,

    I tried to re-produce the mmc0 crash, but I haven't been able to re-produce it. I was using the same configuration that I had posted on this thread and from which I was getting that crash.

    Instead, now I'm seeing crash for my WiFi (wl18xx) interface which is on mmc2 sdio interface.

    Please the crash below,

    [   92.003864] wlcore: ERROR timeout waiting for the hardware to complete initialization
    [   93.735804] ------------[ cut here ]------------
    [   93.747064] WARNING: CPU: 0 PID: 904 at /home/gunjal/Desktop/project/edge-yocto/build/tmp/work-shared/am57xx-edge/kernel-source/drivers/net/wireless/ti/wlcore/sdio.c:145 wl12xx_sdio_raw_write+0xb8/0x13]
    [   93.806923] Modules linked in: bc_example(O) omapdrm drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea fb pru_rproc pruss_intc pruss wl18xx wlcore mac80211 c
    [   93.973705] CPU: 0 PID: 904 Comm: ifconfig Tainted: G           O    4.14.79.18.0_Edge_Kernel+ #55
    [   93.982705] Hardware name: Generic DRA72X (Flattened Device Tree)
    [   93.988823] Backtrace:
    [   93.991293] [<c010b4c4>] (dump_backtrace) from [<c010b794>] (show_stack+0x18/0x1c)
    [   93.998899]  r7:00000009 r6:600c0113 r5:00000000 r4:c0d5ead4
    [   94.004588] [<c010b77c>] (show_stack) from [<c08977b0>] (dump_stack+0x8c/0xa0)
    [   94.011844] [<c0897724>] (dump_stack) from [<c012b034>] (__warn+0xec/0x104)
    [   94.018837]  r7:00000009 r6:bf048ae8 r5:00000000 r4:00000000
    [   94.024523] [<c012af48>] (__warn) from [<c012b104>] (warn_slowpath_null+0x28/0x30)
    [   94.032127]  r9:00000000 r8:00004000 r7:cd478000 r6:d3338c10 r5:00000000 r4:d3848c00
    [   94.039911] [<c012b0dc>] (warn_slowpath_null) from [<bf0472e4>] (wl12xx_sdio_raw_write+0xb8/0x13c [wlcore_sdio])
    [   94.050179] [<bf04722c>] (wl12xx_sdio_raw_write [wlcore_sdio]) from [<bf384118>] (wlcore_boot_upload_firmware+0x224/0x45c [wlcore])
    [   94.062057]  r9:bf393cc0 r8:00014000 r7:80900000 r6:d3790de0 r5:00000000 r4:80900000
    [   94.069885] [<bf383ef4>] (wlcore_boot_upload_firmware [wlcore]) from [<bf3acf90>] (wl18xx_boot+0x8a4/0xc58 [wl18xx])
    [   94.080454]  r10:00000000 r9:d323ec50 r8:00000014 r7:bf393cc0 r6:c0b3ac64 r5:00000000
    [   94.088316]  r4:d3790de0
    [   94.090905] [<bf3ac6ec>] (wl18xx_boot [wl18xx]) from [<bf376a58>] (wl1271_op_add_interface+0x6b4/0x908 [wlcore])
    [   94.101124]  r8:00000002 r7:d3790e1c r6:bf393cc0 r5:d3790de0 r4:00000000
    [   94.107986] [<bf3763a4>] (wl1271_op_add_interface [wlcore]) from [<bf2d4148>] (drv_add_interface+0x38/0x84 [mac80211])
    [   94.118730]  r10:00000000 r9:00000000 r8:00000001 r7:d323e540 r6:d3790460 r5:d323e000
    [   94.126591]  r4:d323e540
    [   94.129313] [<bf2d4110>] (drv_add_interface [mac80211]) from [<bf2e76c8>] (ieee80211_do_open+0x454/0x93c [mac80211])
    [   94.139880]  r5:d323e000 r4:d323e548
    [   94.143649] [<bf2e7274>] (ieee80211_do_open [mac80211]) from [<bf2e7c08>] (ieee80211_open+0x58/0x5c [mac80211])
    [   94.153782]  r10:00000000 r9:0002a234 r8:00000000 r7:d323e030 r6:bf32960c r5:00001043
    [   94.161644]  r4:d323e540
    [   94.164281] [<bf2e7bb0>] (ieee80211_open [mac80211]) from [<c070fbe8>] (__dev_open+0xb0/0x114)
    [   94.172929]  r5:00001043 r4:d323e000
    [   94.176525] [<c070fb38>] (__dev_open) from [<c070ff58>] (__dev_change_flags+0x150/0x178)
    [   94.184650]  r7:00001002 r6:00000001 r5:00001043 r4:d323e000
    [   94.190339] [<c070fe08>] (__dev_change_flags) from [<c070ffa0>] (dev_change_flags+0x20/0x50)
    [   94.198814]  r8:00000000 r7:d36a010c r6:00001002 r5:d323e140 r4:d323e000
    [   94.205551] [<c070ff80>] (dev_change_flags) from [<c0796968>] (devinet_ioctl+0x694/0x754)
    [   94.213765]  r9:0002a234 r8:beca6780 r7:d36a010c r6:00000000 r5:d043de90 r4:00000000
    [   94.221547] [<c07962d4>] (devinet_ioctl) from [<c0798f3c>] (inet_ioctl+0x19c/0x1c8)
    [   94.229237]  r10:00000036 r9:00000005 r8:beca6780 r7:c0d56240 r6:beca6780 r5:cef93560
    [   94.237099]  r4:00008914
    [   94.239647] [<c0798da0>] (inet_ioctl) from [<c06ecc04>] (sock_ioctl+0x134/0x2cc)
    [   94.247081] [<c06ecad0>] (sock_ioctl) from [<c0249a64>] (do_vfs_ioctl+0xa8/0x7b4)
    [   94.254595]  r7:00000005 r6:d3355600 r5:cef93560 r4:beca6780
    [   94.260284] [<c02499bc>] (do_vfs_ioctl) from [<c024a1e4>] (SyS_ioctl+0x74/0x84)
    [   94.267626]  r10:00000036 r9:00000005 r8:beca6780 r7:00008914 r6:d3355600 r5:d3355600
    [   94.275488]  r4:00000000
    [   94.278037] [<c024a170>] (SyS_ioctl) from [<c0107c20>] (ret_fast_syscall+0x0/0x4c)
    [   94.285641]  r9:d043c000 r8:c0107e24 r7:00000036 r6:beca6848 r5:00001043 r4:0002a5a4
    [   94.973992] ---[ end trace 31967bf1e3649a2a ]---
    [   94.988256] wl1271_sdio mmc2:0001:2: sdio write failed (-110)
    [   95.260915] ------------[ cut here ]------------
    [   95.269861] WARNING: CPU: 0 PID: 904 at /home/gunjal/Desktop/project/edge-yocto/build/tmp/work-shared/am57xx-edge/kernel-source/drivers/net/wireless/ti/wlcore/sdio.c:145 wl12xx_sdio_raw_write+0xb8/0x13]
    [   95.328699] Modules linked in: bc_example(O) omapdrm drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea fb pru_rproc pruss_intc pruss wl18xx wlcore mac80211 c
    [   95.503711] CPU: 0 PID: 904 Comm: ifconfig Tainted: G        W  O    4.14.79.18.0_Edge_Kernel+ #55
    [   95.512714] Hardware name: Generic DRA72X (Flattened Device Tree)
    [   95.518834] Backtrace:
    [   95.521305] [<c010b4c4>] (dump_backtrace) from [<c010b794>] (show_stack+0x18/0x1c)
    [   95.528909]  r7:00000009 r6:600c0113 r5:00000000 r4:c0d5ead4
    [   95.534597] [<c010b77c>] (show_stack) from [<c08977b0>] (dump_stack+0x8c/0xa0)
    [   95.541855] [<c0897724>] (dump_stack) from [<c012b034>] (__warn+0xec/0x104)
    [   95.548848]  r7:00000009 r6:bf048ae8 r5:00000000 r4:00000000
    [   95.554534] [<c012af48>] (__warn) from [<c012b104>] (warn_slowpath_null+0x28/0x30)
    [   95.562137]  r9:00000000 r8:00000004 r7:d35aaa80 r6:d3338c10 r5:0001ffc4 r4:d3848c00
    [   95.569922] [<c012b0dc>] (warn_slowpath_null) from [<bf0472e4>] (wl12xx_sdio_raw_write+0xb8/0x13c [wlcore_sdio])
    [   95.580192] [<bf04722c>] (wl12xx_sdio_raw_write [wlcore_sdio]) from [<bf37cbb4>] (wlcore_set_partition+0xe8/0x4c8 [wlcore])
    [   95.591372]  r9:d323ec50 r8:00000001 r7:d3790e1c r6:bf04722c r5:bf3b5064 r4:d3790de0
    [   95.599215] [<bf37cacc>] (wlcore_set_partition [wlcore]) from [<bf372a2c>] (wl12xx_set_power_on+0x84/0x148 [wlcore])
    [   95.609781]  r6:bf393cc0 r5:00000001 r4:d3790de0
    [   95.614481] [<bf3729a8>] (wl12xx_set_power_on [wlcore]) from [<bf376a2c>] (wl1271_op_add_interface+0x688/0x908 [wlcore])
    [   95.625397]  r5:d3790de0 r4:ffffff92
    [   95.629122] [<bf3763a4>] (wl1271_op_add_interface [wlcore]) from [<bf2d4148>] (drv_add_interface+0x38/0x84 [mac80211])
    [   95.639866]  r10:00000000 r9:00000000 r8:00000001 r7:d323e540 r6:d3790460 r5:d323e000
    [   95.647729]  r4:d323e540
    [   95.650451] [<bf2d4110>] (drv_add_interface [mac80211]) from [<bf2e76c8>] (ieee80211_do_open+0x454/0x93c [mac80211])
    [   95.661018]  r5:d323e000 r4:d323e548
    [   95.664789] [<bf2e7274>] (ieee80211_do_open [mac80211]) from [<bf2e7c08>] (ieee80211_open+0x58/0x5c [mac80211])
    [   95.674923]  r10:00000000 r9:0002a234 r8:00000000 r7:d323e030 r6:bf32960c r5:00001043
    [   95.682785]  r4:d323e540
    [   95.685424] [<bf2e7bb0>] (ieee80211_open [mac80211]) from [<c070fbe8>] (__dev_open+0xb0/0x114)
    [   95.694072]  r5:00001043 r4:d323e000
    [   95.697668] [<c070fb38>] (__dev_open) from [<c070ff58>] (__dev_change_flags+0x150/0x178)
    [   95.705793]  r7:00001002 r6:00000001 r5:00001043 r4:d323e000
    [   95.711482] [<c070fe08>] (__dev_change_flags) from [<c070ffa0>] (dev_change_flags+0x20/0x50)
    [   95.719956]  r8:00000000 r7:d36a010c r6:00001002 r5:d323e140 r4:d323e000
    [   95.726693] [<c070ff80>] (dev_change_flags) from [<c0796968>] (devinet_ioctl+0x694/0x754)
    [   95.734907]  r9:0002a234 r8:beca6780 r7:d36a010c r6:00000000 r5:d043de90 r4:00000000
    [   95.742687] [<c07962d4>] (devinet_ioctl) from [<c0798f3c>] (inet_ioctl+0x19c/0x1c8)
    [   95.750377]  r10:00000036 r9:00000005 r8:beca6780 r7:c0d56240 r6:beca6780 r5:cef93560
    [   95.758240]  r4:00008914
    [   95.760787] [<c0798da0>] (inet_ioctl) from [<c06ecc04>] (sock_ioctl+0x134/0x2cc)
    [   95.768222] [<c06ecad0>] (sock_ioctl) from [<c0249a64>] (do_vfs_ioctl+0xa8/0x7b4)
    [   95.775736]  r7:00000005 r6:d3355600 r5:cef93560 r4:beca6780
    [   95.781424] [<c02499bc>] (do_vfs_ioctl) from [<c024a1e4>] (SyS_ioctl+0x74/0x84)
    [   95.788765]  r10:00000036 r9:00000005 r8:beca6780 r7:00008914 r6:d3355600 r5:d3355600
    [   95.796627]  r4:00000000
    [   95.799177] [<c024a170>] (SyS_ioctl) from [<c0107c20>] (ret_fast_syscall+0x0/0x4c)
    [   95.806780]  r9:d043c000 r8:c0107e24 r7:00000036 r6:beca6848 r5:00001043 r4:0002a5a4
    [   96.482458] ---[ end trace 31967bf1e3649a2b ]---
    [   96.495661] wl1271_sdio mmc2:0001:2: sdio write failed (-123)
    [   96.514697] wlcore: ERROR firmware boot failed despite 3 retries
    SIOCSIFFLAGS: No medium found
    [   96.604131] mmc2: card 0001 removed
    [   96.767072] sdhci-omap 480ad000.mmc: card claims to support voltages below defined range
    [   96.847561] mmc2: new high speed SDIO card at address 0001
    [   97.534095] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
    [   97.566635] wlcore: loaded
    

    Here are my configurations,

       wlan_en_reg: fixedregulator-mmcwl {
           compatible = "regulator-fixed";
           regulator-name = "wlan_en_regulator";
           regulator-min-microvolt = <1800000>;
           regulator-max-microvolt = <1800000>;
    
           /* WLAN_EN GPIO for this board - Bank7, pin10 */
           gpio = <&gpio7 10 0>;
    
           /* WLAN card specific delay */
           startup-delay-us = <70000>;
           enable-active-high;
       };
    
       wlan_pins_default: pinmux_wlan_pins_default {
           pinctrl-single,pins = <
               0x3B0 ( PIN_OUTPUT_PULLDOWN | MUX_MODE14 ) /* (B24) spi1_cs0.gpio7_10 WL_EN */
               0x2F0 ( PIN_INPUT | MUX_MODE14 )           /* (F16) mcasp1_axr15.gpio6_6 WLAN_IRQ */
           >;
       };
    
    &mmc3 {
       status = "okay";
       vmmc-supply = <&wlan_en_reg>;
       bus-width = <4>;
       pinctrl-names = "default";
       cap-power-off-card;
       keep-power-in-suspend;
       pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50";
       pinctrl-0 = <&mmc3_pins_default &wlan_pins_default>;
       pinctrl-1 = <&mmc3_pins_hs>;
       pinctrl-2 = <&mmc3_pins_sdr12>;
       pinctrl-3 = <&mmc3_pins_sdr25>;
       pinctrl-4 = <&mmc3_pins_sdr50 &mmc3_iodelay_sdr50_rev20_conf>;
    
       #address-cells = <1>;
       #size-cells = <0>;
       wlcore: wlcore@0 {
           compatible = "ti,wl1837";
           reg = <2>;
           interrupt-parent = <&gpio6>;
           interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
       };
    };

    I'm seeing this crash when I'm trying to connect to WiFi using wpa_suppicant and wpa_cli utility commands.

    And for this also, I'm not having this crash on omap_hsmmc driver.

    So, as of now I'm using omap_hsmmc driver. 

    Regards,

    Gunjal

  • Hi Gunjal,

    Could you please add "ti, non-removable" and "ti,needs-special-hs-handling" to the mmc3 properties? Also, for now just define "pinctrl-names = "default" "; and "pinctrl-0 = <&mmc3_pins_default &wlan_pins_default>; ".

    Regards,
    Krunal