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.

AM4376: Help with EMMC u-boot bringup

Part Number: AM4376

Hello all,

I'm trying to bringup a custom board based on the AM43xx EVM platform, pretty close to the SK, but with no SD card slot and only a eMMC 5.1 connected to MMC1 port.

Following the u-boot linux port steps software-dl.ti.com/.../U-Boot.html, I reached a point I want to partition and overall check the eMMC from u-boot console.

I'm booting from UART0 and upon boot I'm doing:

U-Boot 2019.01-ge4efe2e437-dirty (Oct 15 2020 - 10:35:54 -0400) 



CPU : AM437X-GP rev 1.2 

Model: TI AM437x HUBPLUS 

DRAM: 256 MiB 

PMIC: TPS65218 

NAND: 0 MiB 

MMC: OMAP SD/MMC: 0 

Net: No ethernet found. 

Hit any key to stop autoboot: 0 

## Error: "update_to_fit" not defined 

## Error: "envboot" not defined 

## Error: "mmcboot" not defined 

## Error: "usbboot" not defined 

=> mmc info 

Card did not respond to voltage select!

The steps I followed to add the eMMC to devicetree were:

  1. Added the following pinmux config to the dts file:
    emmc_pins: emmc_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x880, PIN_INPUT | MUX_MODE2) /* (B9) gpmc_csn1.mmc1_clk */
    			AM4372_IOPAD(0x884, PIN_INPUT | MUX_MODE2) /* (F10) gpmc_csn2.mmc1_cmd */
    			AM4372_IOPAD(0x800, PIN_INPUT | MUX_MODE1) /* (B5) gpmc_ad0.mmc1_dat0 */
    			AM4372_IOPAD(0x804, PIN_INPUT | MUX_MODE1) /* (A5) gpmc_ad1.mmc1_dat1 */
    			AM4372_IOPAD(0x808, PIN_INPUT | MUX_MODE1) /* (B6) gpmc_ad2.mmc1_dat2 */
    			AM4372_IOPAD(0x80c, PIN_INPUT | MUX_MODE1) /* (A6) gpmc_ad3.mmc1_dat3 */
    			AM4372_IOPAD(0x810, PIN_INPUT | MUX_MODE1) /* (B7) gpmc_ad4.mmc1_dat4 */
    			AM4372_IOPAD(0x814, PIN_INPUT | MUX_MODE1) /* (A7) gpmc_ad5.mmc1_dat5 */
    			AM4372_IOPAD(0x818, PIN_INPUT | MUX_MODE1) /* (C8) gpmc_ad6.mmc1_dat6 */
    			AM4372_IOPAD(0x81c, PIN_INPUT | MUX_MODE1) /* (B8) gpmc_ad7.mmc1_dat7 */
    		>;
    	};
    &mmc1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&emmc_pins>;
    	vmmc-supply = <&vmmcsd_fixed>;
    	vqmmc-supply = <&vmmcsd_fixed>;
    	bus-width = <8>;
    	ti,non-removable;
    	max-frequency = <26000000>;
    	no-1-8-v;
    	reset-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
    };
    
    vmmcsd_fixed: fixedregulator-sd {
    		compatible = "regulator-fixed";
    		regulator-name = "vmmcsd_fixed";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		enable-active-high;
    	};
  2. Added the following pinmux to mux.c
    static struct module_pin_mux mmc1_pin_mux[] = {
    	{OFFSET(gpmc_ad7), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT7 */
    	{OFFSET(gpmc_ad6), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT6 */
    	{OFFSET(gpmc_ad5), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT5 */
    	{OFFSET(gpmc_ad4), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT4 */
    	{OFFSET(gpmc_ad3), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT3 */
    	{OFFSET(gpmc_ad2), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT2 */
    	{OFFSET(gpmc_ad1), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT1 */
    	{OFFSET(gpmc_ad0), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT0 */
    	{OFFSET(gpmc_csn1), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_CLK */
    	{OFFSET(gpmc_csn2), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_CMD */
    	{-1},
    };
  3. Added 
    configure_module_pin_mux(mmc1_pin_mux);
    to 
    void enable_board_pin_mux(void) {}
    in mux.c

  4. Made sure RST_n gpio going to the eMMC stays high.

Did I miss some place where I need to add additional configuration to initialize the eMMC?

Do I have to add some extra configuration for backward compatibility, the eMMC I'm using is a 5.1 HS400 compatible.

All help will be greatly appreciated!