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.

PROCESSOR-SDK-AM335X: Booting from sd-card fails in kernel, rootfs not mounted

Part Number: PROCESSOR-SDK-AM335X

I am looking to find a reson for my kernel (8.02 build) is not to be able to boot. It seems that it is not able to mount the rootfs.

Custom device very similar to bbb.

Here's a part of the console when booting:

[    3.028549] sdhci: Secure Digital Host Controller Interface driver
[    3.034808] sdhci: Copyright(c) Pierre Ossman
[    3.040401] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.047657] sdhci-omap: sdhci_omap_probe called....
[    3.074446] sdhci-omap: sdhci_omap_probe called....
[    3.079905] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
[    3.087859] sdhci-omap: sdhci_omap_probe result error -517
[    3.164755] omap_voltage_late_init: Voltage driver support not added
[    3.207844] OMAP GPIO hardware version 0.1
[    3.233934] mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
[    3.241797] sdhci-omap: sdhci_omap_probe result success 0
[    3.302206] sdhci-omap: sdhci_omap_probe called....
[    3.318540] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[    3.338036] sdhci-omap 48060000.mmc: Got CD GPIO
[    3.343076] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
[    3.360265] mmc1: new high speed MMC card at address 0001
[    3.386622] mmcblk1: mmc1:0001 4FTE4R 3.64 GiB
[    3.391483] mmcblk1boot0: mmc1:0001 4FTE4R partition 1 4.00 MiB
[    3.414987] mmcblk1boot1: mmc1:0001 4FTE4R partition 2 4.00 MiB
[    3.430725] mmcblk1rpmb: mmc1:0001 4FTE4R partition 3 512 KiB, chardev (243:0)
[    3.532388] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
[    3.554064] sdhci-omap: sdhci_omap_probe result success 0
[    3.554720] Waiting for root device PARTUUID=3d292a74-02...
In the lines before the last one I do not see any problem with identifying the sd card.
I also have a emmc connected, but never got to that part.
  • Hi Thomas,

    Do you have SD card on MMC1 and eMMC on MMC2? If so,

    [    3.233934] mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
    [    3.360265] mmc1: new high speed MMC card at address 0001
    [    3.386622] mmcblk1: mmc1:0001 4FTE4R 3.64 GiB
    [    3.391483] mmcblk1boot0: mmc1:0001 4FTE4R partition 1 4.00 MiB
    [    3.414987] mmcblk1boot1: mmc1:0001 4FTE4R partition 2 4.00 MiB
    [    3.430725] mmcblk1rpmb: mmc1:0001 4FTE4R partition 3 512 KiB, chardev (243:0)

    This seems to be the enumeration for the eMMC.

    [    3.532388] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
    [    3.554064] sdhci-omap: sdhci_omap_probe result success 0
    [    3.554720] Waiting for root device PARTUUID=3d292a74-02...

    and the sdcard is not detected.

    You can try to disable eMMC node in kernel device tree first, that probably would make the kernel log cleaner. Then you can enable eMMC later after you got the sdcard working.

  • I have disabled the emmc in the device tree. Here are the relevant trace with unrelated stuff removed:

    [    2.907375] sdhci: Secure Digital Host Controller Interface driver
    [    2.913634] sdhci: Copyright(c) Pierre Ossman
    [    2.919246] sdhci-pltfm: SDHCI platform and OF driver helper
    [    3.072160] omap_voltage_late_init: Voltage driver support not added
    [    3.083123] sdhci-omap: sdhci_omap_probe result error -517
    [    3.107697] OMAP GPIO hardware version 0.1

    [    3.260265] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
    [    3.274996] sdhci-omap 48060000.mmc: Got CD GPIO
    [    3.285884] sdhci-omap: sdhci_omap_probe calling soc_device_match()....
    [    3.292685] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
    [    3.353130] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
    [    3.360924] sdhci-omap: sdhci_omap_probe result success 0
    [    3.373198] Waiting for root device PARTUUID=3d292a74-02...
    Also I have added som trace to the sd modules...
    Here without anything removed:
    [ 2.907375] sdhci: Secure Digital Host Controller Interface driver
    [ 2.913634] sdhci: Copyright(c) Pierre Ossman
    [ 2.919246] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 2.926513] sdhci-omap: sdhci_omap_probe called, calling of_match_device()....
    [ 2.926530] sdhci-omap: sdhci_omap_probe calling sdhci_pltfm_init()....
    [ 2.934747] ledtrig-cpu: registered to indicate activity on CPUs
    [ 2.947692] sdhci-omap: sdhci_omap_probe calling sdhci_priv()....
    [ 2.947701] sdhci-omap: sdhci_omap_probe calling sdhci_pltfm_priv()....
    [ 2.953959] sdhci-omap: sdhci_omap_probe calling sdhci_get_of_property()....
    [ 2.960627] sdhci-omap: sdhci_omap_probe calling mmc_of_parse()....
    [ 2.972286] davinci-mcasp 48038000.mcasp: IRQ common not found
    [ 2.984620] : mmc_of_parse called....
    [ 2.984628] : mmc_of_parse calling device_property_read_u32(bus-width)....
    [ 2.988313] : mmc_of_parse calling device_property_read_u32(max-frequency)....
    [ 2.997029] NET: Registered protocol family 10
    [ 3.009008] : mmc_of_parse calling device_property_read_u32(non-removable)....
    [ 3.009019] : mmc_of_parse calling mmc_gpiod_request_cd(cd, )....
    [ 3.016313] : mmc_gpiod_request_cd called.... calling devm_gpiod_get_index()
    [ 3.030786] Segment Routing with IPv6
    [ 3.034646] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [ 3.041340] NET: Registered protocol family 17
    [ 3.045952] : mmc_gpiod_request_cd devm_gpiod_get_index() result IS_ERR
    [ 3.045959] : mmc_of_parse mmc_gpiod_request_cd(cd, ) ret = -517....
    [ 3.052603] sdhci-omap: sdhci_omap_probe calling mmc_of_parse FAILED ret = -517....
    [ 3.059452] Key type dns_resolver registered
    [ 3.072160] omap_voltage_late_init: Voltage driver support not added
    [ 3.083123] sdhci-omap: sdhci_omap_probe result error -517
    [ 3.083917] Loading compiled-in X.509 certificates
    [ 3.107697] OMAP GPIO hardware version 0.1
    [ 3.114268] pca953x 0-0020: supply vcc not found, using dummy regulator
    [ 3.121123] pca953x 0-0020: using no AI
    [ 3.154225] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 3.171699] sdhci-omap: sdhci_omap_probe called, calling of_match_device()....
    [ 3.171716] sdhci-omap: sdhci_omap_probe calling sdhci_pltfm_init()....
    [ 3.181078] ALSA device list:
    [ 3.191156] sdhci-omap: sdhci_omap_probe calling sdhci_priv()....
    [ 3.191165] sdhci-omap: sdhci_omap_probe calling sdhci_pltfm_priv()....
    [ 3.197333] No soundcards found.
    [ 3.207405] sdhci-omap: sdhci_omap_probe calling sdhci_get_of_property()....
    [ 3.207432] sdhci-omap: sdhci_omap_probe calling mmc_of_parse()....
    [ 3.214529] : mmc_of_parse called....
    [ 3.220822] : mmc_of_parse calling device_property_read_u32(bus-width)....
    [ 3.225256] : mmc_of_parse calling device_property_read_u32(max-frequency)....
    [ 3.232174] : mmc_of_parse calling device_property_read_u32(non-removable)....
    [ 3.239523] : mmc_of_parse calling mmc_gpiod_request_cd(cd, )....
    [ 3.246842] : mmc_gpiod_request_cd called.... calling devm_gpiod_get_index()
    [ 3.260251] : mmc_gpiod_request_cd calling gpiod_set_debounce()
    [ 3.260265] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
    [ 3.274988] : mmc_of_parse mmc_gpiod_request_cd(cd, ) ret = 0....
    [ 3.274996] sdhci-omap 48060000.mmc: Got CD GPIO
    [ 3.285884] sdhci-omap: sdhci_omap_probe calling soc_device_match()....
    [ 3.292685] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
    [ 3.353130] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
    [ 3.360924] sdhci-omap: sdhci_omap_probe result success 0
    [ 3.373198] Waiting for root device PARTUUID=3d292a74-02...
    One of my problems is, I do not know exactly what to expect. But something similar to when the emmc partitions was found in the first tracw.
  • For periferials there is the issue of indexing from 0 or 1... Looking at the pinmux, it has 0 indexing and in that case I have:

    SD card on the MMC0 (mmc1)

    Pinmux

        sdcard_pins: pinmux_sdcard_pins {
            pinctrl-single,pins = <
                AM33XX_PADCONF(AM335X_PIN_SPI0_CS1, PIN_INPUT, MUX_MODE7)       /* spio0_cs1.gpio0_6 */
                AM33XX_PADCONF(AM335X_PIN_MMC0_DAT0, PIN_INPUT_PULLUP, MUX_MODE0)
                AM33XX_PADCONF(AM335X_PIN_MMC0_DAT1, PIN_INPUT_PULLUP, MUX_MODE0)
                AM33XX_PADCONF(AM335X_PIN_MMC0_DAT2, PIN_INPUT_PULLUP, MUX_MODE0)
                AM33XX_PADCONF(AM335X_PIN_MMC0_DAT3, PIN_INPUT_PULLUP, MUX_MODE0)
                AM33XX_PADCONF(AM335X_PIN_MMC0_CMD, PIN_INPUT_PULLUP, MUX_MODE0)
                AM33XX_PADCONF(AM335X_PIN_MMC0_CLK, PIN_INPUT_PULLUP, MUX_MODE0)
            >;
        };

    &mmc1 {

        status = "okay";
        bus-width = <0x4>;
        pinctrl-names = "default";
        pinctrl-0 = <&sdcard_pins>;
        cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
        vmmc-supply = <&vmmcsd_fixed>;  
    };

    eMMC on MMC1 (mmc2)

    Pinmux:

        emmc_pins: pinmux_emmc_pins {
            pinctrl-single,pins = <
                AM33XX_PADCONF(AM335X_PIN_GPMC_CSN1, PIN_INPUT_PULLUP, MUX_MODE2) /* gpmc_csn1.mmc1_clk */
                AM33XX_PADCONF(AM335X_PIN_GPMC_CSN2, PIN_INPUT_PULLUP, MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
                AM33XX_PADCONF(AM335X_PIN_GPMC_AD0, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
                AM33XX_PADCONF(AM335X_PIN_GPMC_AD1, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
                AM33XX_PADCONF(AM335X_PIN_GPMC_AD2, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
                AM33XX_PADCONF(AM335X_PIN_GPMC_AD3, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
                AM33XX_PADCONF(AM335X_PIN_GPMC_AD4, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
                AM33XX_PADCONF(AM335X_PIN_GPMC_AD5, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
                AM33XX_PADCONF(AM335X_PIN_GPMC_AD6, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
                AM33XX_PADCONF(AM335X_PIN_GPMC_AD7, PIN_INPUT_PULLUP, MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
            >;
        };  
    &mmc2 {
        vmmc-supply = <&vmmcsd_fixed>;
        pinctrl-names = "default";
        pinctrl-0 = <&emmc_pins>;
        bus-width = <8>;
        status = "okay";
        non-removable;  
    };
  • On an older revision of the board, I can boot the SD-card. The same sd-card will have the same output except after the

    Waiting for root device...

    I get (first 3 lines are something I have added):

    PROLON: mmc_attach_sd() called
    PROLON: mmc_attach_sd() calling mmc_attach_bus
    PROLON: mmc_attach_sd() result ocr_avail_sd 3145728
    mmc0: new high speed SDHC card at address 0007
    mmcblk0: mmc0:0007 SD16G 14.5 GiB
    mmcblk0: p1 p2
    EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    VFS: Mounted root (ext4 filesystem) on device 179:2.
    devtmpfs: mounted
    Freeing unused kernel memory: 1024K
    Run /sbin/init as init process

    What could be the reasone that mmc_attach_sd() is not called on my new target. The SD-card device tree and pin connections are the same!

    As far as I am aware the difference between the two board revisions is that the new board is mounted with a differend DRAM, could this really be causing the issue?

  • I have two boards from different productions. The circuit design is compleatly identical but the new boards are not able to boot from sd-card and hangs waiting for root device as described above.

    I have a few differences in components. Could this be related to the DRAM?  

    OLD (OK) NEW (STOPS)
    CPU AM3352-1000 AM3354-800
    PMIC TSP65217C TSP65217C
    DRAM
    AS4C256M16D3LB-12BCN
    K4B4G1646E-BYK0