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.

AM437X u-boot emmc issue

Dear All,

I have an am437x evm board, but I failed to use emmc on u-boot. (u-boot-2013.10-ti2013.12.01)

In the u-boot source code have not to set the MMC1 pin mux, I added it successfully. And the SEL_eMMCORNANDn was pull-up now.

Typing "mmc dev 1“ on the u-boot prompt, I get the following message:

mmc_send_cmd: timedout waiting on cmd inhibit to clear
mmc1 is current device

Looks like the emmc can not deal some commands. And I can't read from/write to emmc:

U-Boot# mmc read 0x81000000 1 0x100

mmc_send_cmd: timedout waiting on cmd inhibit to clear
MMC: block number 0x101 exceeds max(0x0)
0 blocks read: ERROR

Anyone have the similar problem?

Kindly help.

Thanks,

Jakebo

  • Hi,

    Have you checked the EMMC_RSTn signal?

  • Hello Biser,

    Thanks very much for you help!

    The EMMC_RSTn signal was high.

    If set the EMMC_RSTn to low, I get the following output:

    U-Boot# mmc dev 1
    Card did not respond to voltage select!
    mmc1(part 0) is current device

    And I have not idea now :(

  • EMMC_RSTn should be high. Have you checked whether MMC1 is initialized before you try to access the eMMC?

  • Jakebo, ensure that you have also removed the NAND from the pinmux for the pins you want to use for emmc. Can you send the changes you made to uboot?

    Thanks,
    James
  • Hi James,

    Thanks for your help very much!

    I added the following codes to board/ti/am43xx/mux.c

    /* Added by JBO for mmc1 */
    static struct module_pin_mux mmc1_pin_mux[] = {
        {OFFSET(gpmc_csn1), (MODE(2) | PULLUDDIS | RXACTIVE | DSPULLUDEN)},
        {OFFSET(gpmc_csn2), (MODE(2) | PULLUP_EN | RXACTIVE | DSPULLUDEN)},
        {OFFSET(gpmc_ad0),  (MODE(1) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, /* mmc1_dat0 */
        {OFFSET(gpmc_ad1),  (MODE(1) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, /* mmc1_dat1 */
        {OFFSET(gpmc_ad2),  (MODE(1) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, /* mmc1_dat2 */
        {OFFSET(gpmc_ad3),  (MODE(1) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, /* mmc1_dat3 */
        {OFFSET(gpmc_ad4),  (MODE(1) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, /* mmc1_dat4 */
        {OFFSET(gpmc_ad5),  (MODE(1) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, /* mmc1_dat5 */
        {OFFSET(gpmc_ad6),  (MODE(1) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, /* mmc1_dat6 */
        {OFFSET(gpmc_ad7),  (MODE(1) | PULLUP_EN | RXACTIVE | DSPULLUDEN)}, /* mmc1_dat7 */
        {-1},
    };
    
    
    void enable_board_pin_mux(void)
    {
        configure_module_pin_mux(mmc0_pin_mux);
        configure_module_pin_mux(mmc1_pin_mux); /* Added by JBO */
        ............
    }

    The above codes are enough? I have not remove the pinmux of NAND, I will try to do it.

    Thanks!

    Jakebo

  • Hi Biser,

    Thanks for your reply.

    I think the MMC1 was initialized(But not sure), since the function "omap_mmc_init" in drivers/mmc/omap_hsmmc.c was called two times, the dev_index was 0 in first time, and it was 1 in second time.

    int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio, int wp_gpio)

    And 'mmc list' command in u-boot reported the list, it looks like mmc1 was initialized:

    U-Boot# mmc list
    OMAP SD/MMC: 0
     OMAP SD/MMC: 1

    Anything I missed?

    Thanks in Advance!

    Jakebo