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.

Linux/AM4372: U-Boot on Custom Board - MMC/SD Card detect issues

Part Number: AM4372

Tool/software: Linux

Hello everyone,

I am porting U-Boot to a custom board and I want to boot the board via an SD-Card.

Placing custom "MLO" and "u-boot.img" on the "/boot" Partition of an SD-Card (created via the "create-sdcard.sh") and plugging this into the SD-Card connector reveals not a single message.
Compiled with default "am43xx_evm_defconfig" but custom device tree.
(Bootmodelist of AM4372 is UART0, NAND_I2C, NAND, MMC0; picture from AM437x TRM page 192 Table 5-10 )

During ROM Code there is action on the MMC lines(verified by analysing with oscillioscope)!

Therefore i went into CCS and loaded files via the JTAG debugger (while a SD Card is plugged into the SD-Card slot):

To see Debug messages I added "#define DEBUG" in "include/configs/am43xx_evm.h"

The steps I took to execute code are (while SD Card is plugged in):

  • Launch targetconf (XDS110 and AM4372)
  • Connect to Cortex-A9
  • CPU-Reset(SW) Shift+CTRL+R
  • Tools -> Load Memory -> "u-boot/spl/u-boot-spl.bin" -> Start adress: 0x402f4000
  • Set PC to 0x402f4000 and execute (SPL works see console_log.txt) hold debug session
  • CPU_Reset(SW) Shift+CTRL+R
  • Tools -> Load Memory -> "u-boot/u-boot.bin" -> Start adress: 0x80800000 ( Tutorial wants to do Run->Load Programm but this does not work for me :/ )
  • Set PC to 0x80800000 and execute (Works see console_log.txt)
  • in Minicom: execute bdinfo, mmc list, mmc rescan, mmc dev 0,1, mmc part

4101.console_log.txt

In my dts file I enabled the mmc1 node with the following extra (template was the original am437x-gp-evm.dts ):

mmc0_pins: mmc0_pins {
	pinctrl-single,pins = <
		0x100 ( PIN_INPUT | MUX_MODE0 ) /*(D1) mmc0_clk.mmc0_clk*/
		0x104 ( PIN_INPUT | MUX_MODE0 )/* (D2) mmc0_cmd.mmc0_cmd */
		0xfc ( PIN_INPUT | MUX_MODE0 ) /* (C1) mmc0_dat0.mmc0_dat0 */
		0xf8 ( PIN_INPUT | MUX_MODE0 ) /* (C2) mmc0_dat1.mmc0_dat1 */
		0xf4 ( PIN_INPUT | MUX_MODE0 ) /* (B2) mmc0_dat2.mmc0_dat2 */
		0xf0 ( PIN_INPUT | MUX_MODE0 ) /* (B1) mmc0_dat3.mmc0_dat3 */
	>;
	}; /* Note: MMC0 Pin mux should be unnecessary here since it will always be enabled in board/ti/am43xx/mux.c ! */
...
&mmc1 {
	status = "okay";
	vmmc-supply = <&vmmcsd_fixed>;
	bus-width = <4>;
	pinctrl-names = "default";
	pinctrl-0 = <&mmc0_pins>; //unnecessary
        /* template references "spi0_cs1.gpio0_6" is that card detect?? i only need it for hotplugging right? */
	u-boot,dm-spl;
};

Conclusion and Questions

I suspect a driver issue (due to misconfig on my part).
It seems it has choosen the correct OMAP SD/MMC controller(enabled via .config) but the commands send to the SD card timeouts.
During debug session, the U-Boot Code should still probe the MMC, right?
Do you have suggestions or any tipps what might have gone wrong?

Thanks Chris

Additional Information:

Hardware:

AM437x GP EVM Revision 1.5B
Custom Board based on AM437x GP EVM
XDS-110 Debug Probe

Software:

Ubuntu 16.04 LTS
ti-processor-sdk-linux-am437x-evm-05.01.00.11
gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf
Code Composer Studio 8.2.0

  • Hello,

    I would suggest you first to verify that ROM Code is executing properly. For that purpose you can configure your boot pins for UART boot and check if you will have CCCC stream on the UART console. You can also dump the trace vector to check at which stage the boot flow hang. Refer to the below wiki for details:

    processors.wiki.ti.com/.../AM335x_board_bringup_tips

    Regards,
    Pavel
  • 1. Uart Boot Mode

        We were already able to see the CCC stream on the UART

    2. Tracing Vectors

    This is a useful feature to detect early problems. I did not know that, and honestly I would never have searched the AM335x references... :/

    WIth that knowledge I verified, that the MMC was not detected at ROM Code time.

    According to "5.2.3.2.5 Tracing Data" of the AM437x Technical Reference Manual the Vectors at 0x40338E40 -> 0x40338E50 (AM4372 TRM) do not show Vector4_Bit9 and Vector4_Bit10 to indicate a Ready MMC Card or a Data Read from MMC.

    All the resistors were placed but apparently a solder joint on the CLK line, close to the CPU, was not optimal and caused some issues.