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.

booting from SD card only without using eMMC (am437x)

Hi,

I have 2 sets of custom boards, both having AM437x processors. Architecturally both boards are the same, except that one of the boards (board B) does not have eMMC on it. I try to run linux on both and it runs perfect on board A (that has eMMC). On board B, U boot gets loaded, kernel starts loading and gets stuck at this point:

Waiting for root device /dev/mmcblk0p2...

I have tried the following so far:

1. Changed status of mmc2 (in linux kernel dts file) as 'disabled'         

{     location: ti-sdk-am437x-evm-07.01.00.00/board-support/linux-3.12.10-ti2013.12.01/arch/arm/boot/dts/am437x.dts    }

2. commented out parts of mmc1 (this is where eMMC is at in uboot folder) from mux.c file in u-boot folder

3. Halted u-boot and setting a delay of upto 100 and then executing bootd

4. Verified scripts that formats sd card and also creates sd card.

Now I know for sure that AM437x can boot without an eMMC. Could anybody please let me know the exact places where the code needs to be tweaked so as to boot from SD card only and that it doesn't look for eMMC at all? This is kind of a blocker for us and our development will shoot ahead once we get this issue resolved!

thanks,

Rohit.

 

  • Hi Rohit,

    AM437x should be able to boot from SD card. Have you checked the hw connections & pinmuxing of MMC interface (clk, cmd, dat. WP, and especially SDCD - card detct) ?

    Have you checked your u-boot environment settings in u-boot/include/configs/am43xx_evm.h?

    Best Regards,
    Yordan
  • Hi Yordan,

    Thanks for your reply. I've checked the pin muxing & hw connections. They seem to be okay. As for the SDCD (card detect signal), on this board (board B) there is a pull up to 3.3V to that pin and it is not connected anywhere else.

    I also verified the am43xx_evm.h, loadaddr is 0x8020_0000 (it won't change for SD card only option, would it?)

    Adding to that, in the #define FIND_FDT_FILE, I've set reference to dtb file like this:


    #define FIND_FDT_FILE \
    "findfdt="\
    "if test $board_name = AM43__GP; then " \
    "setenv fdtfile am437x-<myboard>.dtb; fi; " \
    and changed the .dts file to correct pin muxing, this way:
    mmc1_pins: pinmux_mmc1_pins {
    pinctrl-single,pins = <
    0x100 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */
    0x104 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
    0x0f0 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
    0x0f4 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
    0x0f8 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
    0x0fc (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
    0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
    >;
    };

    I think address 0x160 which is the sdcd, should be set to PIN_INPUT_PULLUP & MUX_MODE5 (mmcsd) ?
    Let me know your thoughts..

  • Hi,


    Sorry for the delayed response.

    Rohit said:
    I think address 0x160 which is the sdcd, should be set to PIN_INPUT_PULLUP & MUX_MODE5 (mmcsd) ?

    Correct.

    According to device data manual MMC0_SDCD signal muxed on pin spi0_cs1 should be set as INPUT, with PULLUP enabled & its muxmode should be MUX_MODE5.  If you leave it as MUX_MODE7, device ball is used as gpio.

    Best Regards,
    Yordan

  • Hi Yordan,
    Sorry for the late reply.
    After a lot of digging, our team with the help of ti experts, found out that the problem was something different all together.
    So, it turns out that if one is not going to use the card detect signal at all, then that pin should be held low all the time and also to add this line: "broken-cd;" into the &mmc1 section of the dts file.
    Hope this helps to other people who are trying to figure out the same thing..
  • Hi Rohit,

    Thanks for sharing this info.

    Best Regards,
    Yordan
  • Just a clarification here:

    you should not have to ground the CD signal when using broken-cd in the device tree bindings.  broken-cd should be used when there is no card detect signal present in your system, so the CD signal itself will be ignored (thus you could use the signal for something else).  Furthermore, the ROM does not require the CD signal for booting from MMC

    regards,

    James