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.

AM5748: AM5748 emmc Issue

Part Number: AM5748

Hi all

In our custom board, we are trying to boot am5748 MLO and u-boot.img from SPI flash then the kernel and file system from emmc which is connected to mmc3 port. My question is can we connect emmc to mm3 port if so how to enable from u-boot.

I tried to enable it in u-boot by adding a DT node for mm3 as below

In dra7.dtsi

        mmc3: mmc@480ad000 {
            compatible = "ti,dra7-hsmmc", "ti,omap4-hsmmc";
            reg = <0x480ad000 0x400>;
            interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
            ti,hwmods = "mmc3";
            ti,dual-volt;
            ti,needs-special-reset;
            dmas = <&sdma_xbar 77>, <&sdma_xbar 78>;
            dma-names = "tx", "rx";
            status = "disabled";
            /* Errata i887 limits max-frequency of MMC3 to 64 MHz*/
            pbias-supply = <&pbias_mmc_reg>;
            max-frequency = <64000000>;
            sd-uhs-sdr12;
            sd-uhs-sdr25;
            sd-uhs-sdr50;
        };

In am57xx-idk-common.dtsi

&mmc3 {
    status = "okay";
    vmmc-supply = <&v3_3d>;
    bus-width = <8>;
    ti,non-removable;
    max-frequency = <64000000>;
};

In am574x-idk.dts

&mmc3 {
    pinctrl-names = "default";
    pinctrl-0 = <&mmc3_pins_default>;
};

In board.c I am calling mmc init function omap_mmc_init(2,0,0,-1,-1);

In the console I am getting the error as below

U-Boot SPL 2018.01 (Feb 14 2019 - 17:33:22)
DRA762-GP ES1.0 ABZ package
Trying to boot from MMC1
no pinctrl state for default mode
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

reading u-boot.img
reading u-boot.img
reading u-boot.img
reading u-boot.img


U-Boot 2018.01 (Feb 14 2019 - 17:33:22 +0530)

CPU  : DRA762-GP ES1.0 ABZ package
Model: TI AM5748 IDK
BOARD: AM5748DRAM:  1 GiB
MMC:   omap_hsmmc_init_setup: timedout waiting for cc2!
mmc@480ad000 - probe failed: -110
OMAP SD/MMC: 0, OMAP SD/MMC: 1, OMAP SD/MMC: 2
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

Why I am getting this error and provide me the solution

Thank you

Deepak.H.M

  • Hello Deepak,

    You need to add the MMC3 pinmux setting in <Processor SDK>/board-support/u-boot-<version>/board/ti/am57xx/mux_data.h file.

    Best regards,
    Kemal

  • I added that also
    {MMC3_CLK, (M0 | SLEWCONTROL)}, /* mmc3_clk.pr2_mii1_txd3 */
    {MMC3_CMD, (M0)}, /* mmc3_cmd.pr2_mii1_txd2 */
    {MMC3_DAT0, (M0)}, /* mmc3_dat0.pr2_mii1_txd1 */
    {MMC3_DAT1, (M0)}, /* mmc3_dat1.pr2_mii1_txd0 */
    {MMC3_DAT2, (M0)}, /* mmc3_dat2.pr2_mii_mr1_clk */
    {MMC3_DAT3, (M0)}, /* mmc3_dat3.pr2_mii1_rxdv */
    {MMC3_DAT4, (M0)}, /* mmc3_dat4.pr2_mii1_rxd3 */
    {MMC3_DAT5, (M0)}, /* mmc3_dat5.pr2_mii1_rxd2 */
    {MMC3_DAT6, (M0)}, /* mmc3_dat6.pr2_mii1_rxd1 */
    {MMC3_DAT7, (M0)}, /* mmc3_dat7.pr2_mii1_rxd0 */
    {VOUT1_FLD, (M14 | PIN_OUTPUT)}, /* vout1_fld.gpio4_21 */
    Thank you
  • Try these.

    {MMC3_CLK, (M0 | SLEWCONTROL)}, /* mmc3_clk.pr2_mii1_txd3 */
    {MMC3_CMD, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_cmd.pr2_mii1_txd2 */
    {MMC3_DAT0, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat0.pr2_mii1_txd1 */
    {MMC3_DAT1, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat1.pr2_mii1_txd0 */
    {MMC3_DAT2, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat2.pr2_mii_mr1_clk */
    {MMC3_DAT3, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat3.pr2_mii1_rxdv */
    {MMC3_DAT4, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat4.pr2_mii1_rxd3 */
    {MMC3_DAT5, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat5.pr2_mii1_rxd2 */
    {MMC3_DAT6, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat6.pr2_mii1_rxd1 */
    {MMC3_DAT7, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat7.pr2_mii1_rxd0 */
    {VOUT1_FLD, (M14 | PIN_OUTPUT)}, /* vout1_fld.gpio4_21 */
  • Hi Kemal R. Shakir,

    I tried this but no change, same error.

    Thank You
    Deepak.H.M
  • Can you post the output of these commands?

    => mmc list
    => mmc dev 0
    => mmc part
    => mmc info
    => mmc dev 1
    => mmc part
    => mmc info
    => mmc dev 2
    => mmc part
    => mmc info
    => mmc rescan
    => mmc list
    => mmc dev 0
    => mmc dev 1
    => mmc dev 2
  • Hi Kemal,

    => mmc list
    OMAP SD/MMC: 0 (SD)
    OMAP SD/MMC: 1
    OMAP SD/MMC: 2
    => mmc dev 0
    switch to partitions #0, OK
    mmc0 is current device
    => mmc part

    Partition Map for MMC device 0 -- Partition Type: DOS

    Part Start Sector Num Sectors UUID Type
    1 2048 143360 00089c16-01 0c Boot
    2 145408 15345664 00089c16-02 83
    => mmc info
    Device: OMAP SD/MMC
    Manufacturer ID: 3
    OEM: 5344
    Name: SS08G
    Bus Speed: 48000000
    Mode : SD High Speed (50MHz)
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 7.4 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    => mmc dev 1
    Card did not respond to voltage select!
    => mmc part

    Partition Map for MMC device 0 -- Partition Type: DOS

    Part Start Sector Num Sectors UUID Type
    1 2048 143360 00089c16-01 0c Boot
    2 145408 15345664 00089c16-02 83
    => mmc info
    Device: OMAP SD/MMC
    Manufacturer ID: 3
    OEM: 5344
    Name: SS08G
    Bus Speed: 48000000
    Mode : SD High Speed (50MHz)
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 7.4 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    => mmc dev 2
    mmc_init_stream: timedout waiting for cc!
    dev_get_priv: null device
    omap_hsmmc_send_cmd : timeout: No status update
    => mmc part

    Partition Map for MMC device 0 -- Partition Type: DOS

    Part Start Sector Num Sectors UUID Type
    1 2048 143360 00089c16-01 0c Boot
    2 145408 15345664 00089c16-02 83
    => mmc info
    Device: OMAP SD/MMC
    Manufacturer ID: 3
    OEM: 5344
    Name: SS08G
    Bus Speed: 48000000
    Mode : SD High Speed (50MHz)
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 7.4 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    => mmc rescan
    => mmc list
    OMAP SD/MMC: 0 (SD)
    OMAP SD/MMC: 1
    OMAP SD/MMC: 2
    => mmc dev 0
    switch to partitions #0, OK
    mmc0 is current device
    => mmc dev 1
    Card did not respond to voltage select!
    => mmc dev 2
    mmc_init_stream: timedout waiting for cc!
    dev_get_priv: null device
    omap_hsmmc_send_cmd : timeout: No status update

    Thank You
  • probe failed: -110 indicates a timeout in mmc stream negotiation. This can be either caused by e poor connection or by improper DDR configurations. Please, check what activity is there on the mmc3 lines with an oscilloscope and revise your DDR configurations.
  • Hi kemal,
    I checked with CRO there is No activity at clk or cmd but i can able to detect it from kernal and I will check DDR config now.

    Thank You
  • Hello Deepak,

    MMC3 clock is not enable in U-Boot. Can you apply this patch and check if the clock is now present on that line?

    cd <Processor SDK>/board-support/u-boot-<version>/
    git apply 0001-AM57xx-Enable-MMC3-clock-in-U-Boot.patch

    Best regards,
    Kemal

  • Hi Kemal R,

    Thanks for the replay, I got it log way back sorry I forgot to replay here, I can able to read the device.

    Thank You

    Deepak.H.M

  • Hello Deepak,

    I am happy to hear that you made it work. Can you then mark the issue as resolved and close it.

    Thanks,
    Kemal