AnsweredAssumed Answered

[U-boot] Implementing changes in SD interface | Custom Sabreauto based board

Question asked by Sooraj S on Dec 26, 2017
Latest reply on Jan 12, 2018 by Sooraj S

Difference in SD-card interference between Sabreauto and our custom board [Vdash]


  1. Sabreauto SD interference

    In Sabreauto reference board, NANDF_CS2 is using as the “Card detect” pin of SD card.

  2. Vdash SD Interference

    In our design, we are using micro SD card. In micro-SD “Card Detect” pin is multiplexed with DAT3 pin of SD card.


    1. Card Detect function need to remove from the program, or set the SD3_DAT3 pin initially as Card detect and then as DATA3 of SD card interface.

    2. Set the SD interface program for single bit communication

    3. Confirm that GPIO_2 pin is in logic high state.

    Here is the diff of changes i made  to "board/freescale/mx6qsabreauto/mx6qsabreauto.c" , Please ignore changes to usdhc2_pads its for emmc interference . After this change the Error
    "MMC: no card present"
    vanished . Now new error
    mmc_init: -110 timeout: 1456.
    Now i had to make this change  in "drivers/mmc/mmc.c" to make it go away, i noticed

    cmd.cmdidx = SD_CMD_APP_SD_STATUS;

    was causing the last error mmc_init: -110 SD_CMD_APP_SD_STATUS value is 13.

    current u-boot log
    U-Boot 2017.03-nxp/imx_v2017.03_4.9.11_1.0.0_ga+ga2fea67 (Dec 27 2017 - 12:21:58 +0530)

    CPU:   Freescale i.MX6Q rev1.2 996 MHz (running at 792 MHz)
    CPU:   Automotive temperature grade (-40C to 125C) at 47C
    Reset cause: POR
    Model: Freescale i.MX6 Quad SABRE Automotive Board
    Board Revision : 0
    Board: MX6Q-Sabreauto rev B
    DRAM:  2 GiB
    PMIC: PFUZE100! DEV_ID=0x10 REV_ID=0x21
    MMC:   FSL_SDHC: 0, FSL_SDHC: 1
    *** Warning - read failed, using default environment

    No panel detected: default to Hannstar-XGA
    Display: Hannstar-XGA (1024x768)
    In:    serial
    Out:   serial
    Err:   serial
    switch to partitions #0, OK
    mmc1 is current device
    Net:   No ethernet found.
    Boot from USB for mfgtools
    Use default environment for                  mfgtools
    Run bootcmd_mfg: run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
    Hit any key to stop autoboot:  0
    Bad Linux ARM zImage magic!
    => mmc info
    Device: FSL_SDHC
    Manufacturer ID: 3
    OEM: 5344
    Name: SS16G
    Tran Speed: 50000000
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 14.8 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    => mmc list
    FSL_SDHC: 0
    FSL_SDHC: 1 (SD)

   Our SD-card interference doesn't require voltage switching its using 3.3v always

  I flashed u-boot.imx binary to SD-card using Linux machine

sudo dd if=u-boot.imx of=/dev/mmcblk0 bs=512 seek=2 && sync

  and in boot configuration i select SD-card , Internal Boot and  Boot Configuration and now i do not get u-boot on booting        the boot , the Kermit console is completely blank.
   On using mgftool the log , it surely loads u-boot , kernel, ramdisk and dtb but after this its not able to connect SD-card to pc in mass storage mode  .


Is there something iam missing ?