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.

AM5716: MMC card not detected in U-boot

Part Number: AM5716
Other Parts Discussed in Thread: TMDXIDK5718

I am using Custom Board with Sitara AM5716. I have successfully boot it via U-boot by sending the SPL and U-boot image via UART. But in my U-Boot , the mmc device is not getting detected. The mmc device I am using on the board is  MTFC4GACAANA-4M IT. the device is connected to MMC2 of AM5716.  The mux_data in mu u-boot code is  as shown below::

const struct pad_conf_entry core_padconf_array_essential_am571x_idk[] = {
    {GPMC_A3, (M1 | PIN_OUTPUT | MANUAL_MODE)},    /* gpmc_a3.qspi1_cs2 */
    {GPMC_A4, (M1 | PIN_OUTPUT | MANUAL_MODE)},    /* gpmc_a4.qspi1_cs3 */
    {GPMC_A13, (M1 | PIN_INPUT | MANUAL_MODE)},    /* gpmc_a13.qspi1_rtclk */
    {GPMC_A14, (M1 | PIN_INPUT | MANUAL_MODE)},    /* gpmc_a14.qspi1_d3 */
    {GPMC_A15, (M1 | PIN_INPUT | MANUAL_MODE)},    /* gpmc_a15.qspi1_d2 */
    {GPMC_A16, (M1 | PIN_INPUT | MANUAL_MODE)},    /* gpmc_a16.qspi1_d0 */
    {GPMC_A17, (M1 | PIN_INPUT | MANUAL_MODE)},    /* gpmc_a17.qspi1_d1 */
    {GPMC_A18, (M1 | PIN_OUTPUT | MANUAL_MODE)},    /* gpmc_a18.qspi1_sclk */
    {GPMC_A19, (M1 | PIN_INPUT)},    /* gpmc_a19.mmc2_dat4 */
    {GPMC_A20, (M1 | PIN_INPUT)},    /* gpmc_a20.mmc2_dat5 */
    {GPMC_A21, (M1 | PIN_INPUT)},    /* gpmc_a21.mmc2_dat6 */
    {GPMC_A22, (M1 | PIN_INPUT)},    /* gpmc_a22.mmc2_dat7 */
    {GPMC_A23, (M1 | PIN_OUTPUT)},    /* gpmc_a23.mmc2_clk */
    {GPMC_A24, (M1 | PIN_INPUT)},    /* gpmc_a24.mmc2_dat0 */
    {GPMC_A25, (M1 | PIN_INPUT)},    /* gpmc_a25.mmc2_dat1 */
    {GPMC_A26, (M1 | PIN_INPUT)},    /* gpmc_a26.mmc2_dat2 */
    {GPMC_A27, (M1 | PIN_INPUT)},    /* gpmc_a27.mmc2_dat3 */
    {GPMC_CS1, (M1 | PIN_INPUT)},    /* gpmc_cs1.mmc2_cmd */

The screenshot of the u-boot boot screen is above.

Kindly guide me what I should I do to access mmc in U-boot.

 

 

  • Hi Nithin,

    From what I understand you are using AM571x custom board base on AM571x TI IDK board - TMDXIDK5718.

    Do you use AM57x TI PSDK? If yes, which version? Below is the link to AM57x TI PSDK latest version.

    software-dl.ti.com/.../index_FDS.html

    In TI PSDK, pinmux is done in u-boot DTS file(s), with pinctrl-single,pins entries.

    I would suggest you to try the pinmux in DTS files and/or check if you have made proper pinmux (in DTS or in pad_conf_entry core_padconf_array_essential_am571x_idk) after u-boot is loaded. Verify you have the correct MMC2 pinmux values in Control Module registers, check with u-boot "md" command.

    Regards,
    Pavel
  • Hi Pavel,
    I have used the perl script at git.ti.com/.../master to generate pinmux as mentioned in the link ::

    processors.wiki.ti.com/.../Pin_Mux_Utility_for_ARM_MPU_Processors

    I have used the the u-boot source files with "ti-processor-sdk-linux-am57xx-evm-03.02.00.05" , modified the pin mux file in
    /home/quest/Nithin/U-Boot_Git/u-boot/board/ti/am57xx/mux_data.h and built the u-boot and SPL binaries as mentioned in
    processors.wiki.ti.com/.../Linux_Core_U-Boot_User's_Guide with defconfig "am57xx_evm_defconfig".

    I am able to boot the system using these binaries via UART, but the MMC and QSPI Flash is not detected in the U-boot.
    I have verified the Pin mux file and it seems to be fine for MMC2.

    I have even tried the latest u-boot source files from it's git repository and tried the same. But the result is same.

    Kindly guide me , what to do next.

    Thanks and Regards,
    Nithin
  • Nithin,

    The AM571x EVM comes with:

    SD/MMC card attached to AM571x MMC1 interface.

    eMMC (16GByte) attached to AM571x MMC2 interface.


    Regarding your AM571x custom board, do you have something attached on MMC1? If not, you should disable this u-boot code, as these error messages might come from MMC1, not MMC2. You should disable MMC1, if you do not use it.

    Regarding the pinmux of MMC2, I see that MMC2 pins are correctly pinmux by default. What changes exactly you have made (if any) in the u-boot code base regarding MMC2 pinmux?

    If you are using latest TI PSDK u-boot, no changes are needed. Refer to the below files:

    u-boot-2017.01/board/ti/am57xx/mux_data.h
    u-boot-2017.01/arch/arm/dts/am571x-idk.dts

    Regards,
    Pavel
  • As advised by you, I referred u-boot/board/ti/am57xx/mux_data.h and modified the pin mux as ::

    {GPMC_A19, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a19.mmc2_dat4 */
    {GPMC_A20, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a20.mmc2_dat5 */
    {GPMC_A21, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a21.mmc2_dat6 */
    {GPMC_A22, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a22.mmc2_dat7 */
    {GPMC_A23, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a23.mmc2_clk */
    {GPMC_A24, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a24.mmc2_dat0 */
    {GPMC_A25, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a25.mmc2_dat1 */
    {GPMC_A26, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a26.mmc2_dat2 */
    {GPMC_A27, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_a27.mmc2_dat3 */
    {GPMC_CS1, (M1 | PIN_INPUT_PULLUP)}, /* gpmc_cs1.mmc2_cmd */


    Now emmc device got detected . Thanks a lot for your advice. I am able to write and read from emmc card now using the u-boot command.