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.

AM3352: emmc boot, emmc recognizing issue

Part Number: AM3352

We have a custom board based on beagle bone black where SD card is slot mmc0 and emmc of 8gb in mmc1. We have managed to change dts and mux configuration to detect SD card and when we use mmc commands like mmc info and fatload command, mmc0(SD) is working. But when we change mmc1 using command mmc dev 1 it is showing nothing , no info and mmc command related to mmc dev 1 is not all working. When spl and u-boot.img load from uart loaded the booting looks like this.

when mmc dev 1 command is given and then mmc info give mmc0 information. But in mmc dev 0 proper switching is taking place.

when given command mmc dev 1 it does not switch and no operation can be done on emmc. It shows as a no block device. Our emmc in schematic look like this.

eMMC is connected to mmc1.

Our emmc dts part look like this.

mmc2_pins: pinmux_mmc2_pins  {
		pinctrl-single,pins = <
			0x80 (PIN_INPUT_PULLUP | MUX_MODE2)
			0x84 (PIN_INPUT_PULLUP | MUX_MODE2)
			0x0 (PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad0.gpmc_ad0 */
			0x4 (PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad1.gpmc_ad1 */
			0x8 (PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad2.gpmc_ad2 */
			0xc (PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad3.gpmc_ad3 */
			0x10 (PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad4.gpmc_ad4 */
			0x14 (PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad5.gpmc_ad5 */
			0x18 (PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad6.gpmc_ad6 */
			0x1c (PIN_INPUT_PULLUP | MUX_MODE1)	/* gpmc_ad7.gpmc_ad7 */
		//	0x70 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_wait0.gpmc_wait0 */
		//	0x74 (PIN_INPUT_PULLUP | MUX_MODE7)	/* gpmc_wpn.gpio0_30 */
			0x7c (PIN_INPUT_PULLUP | MUX_MODE0)		/* gpmc_csn0.gpmc_csn0  */
		//	0x90 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_advn_ale.gpmc_advn_ale */
		//	0x94 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_oen_ren.gpmc_oen_ren */
		//	0x98 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_wen.gpmc_wen */
			0x9c (PIN_OUTPUT | MUX_MODE7)		/* gpmc_be0n_cle.gpmc_be0n_cle */
		>;
	};
	
	&mmc2 {
	status = "okay";
	vmmc-supply = <&vaux2_reg>;
	bus-width = <8>;
	pinctrl-names = "default";
	pinctrl-0 = <&mmc2_pins>;
	//cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
};

And in mux the struct is written as

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 */
    {OFFSET(gpmc_csn0), (MODE(0) | RXACTIVE | PULLUP_EN)},    /* MMC1_WP */
    {OFFSET(gpmc_be0n_cle), (MODE(7) | PULLUDDIS | RXACTIVE)},    /* MMC1_CD */
    {-1},
};

Our plan is to load images from SD card and write to eMMC. But eMMC is detected as mmc1 but in u-boot mmc commands don't work on them, we tried mmc dev 1, mmc read, mmc info nothing works. And in u-boot it is shown as no block device. How can we solve the problem? From mmc0 the commands are working but eMMC is not. Kindly please help on why emmc is not responding any commands.

  • Hello,
    What is the output from "dm tree" @u-boot prompt?
    Best,
    -Hong

  • hello hong guan64

    this is the output of dm tree command from uboot prompt

    best regards

    eldhose peter

  • Hello,
    It look like mmc0/mmc1 are listed and probed from "dm tree" @u-boot prompt.
    what is output when running cmds @u-boot, where x=0 and 1
    mmc list
    mmc dev x
    mmc part
    mmc info
    Best,
    -Hong

  • Hello,

    Thanks for quick reply

    Here is the output for mmc 0 and mmc1 running above commands

    When cmd mmc dev 0 is executed it properly switches to mmc 0 . And mmc info, mmc part all are working.

    But cmd  mmc dev 1 is executed it does not switch and displays the info and part of mmc 0.

    Earlier when dm tree executed mmc 1 is accepted as omap hsmmc but not as mmc_blk. How con you configure mmc1, ie emmc as block device.Is there any additional CONFIG you have to add or Is there is any CONFIG  to remove?

    Best Regards,

    Eldhose Peter

  • Hello,
    As you know there's no eMMC boot on TI AM335x EVM board. But there's eMMC boot on one of AM335x community board - Beagleboard
    - Beagleboard forum supported by community
    https://beagleboard.org/
    https://forum.beagleboard.org/

    - You may refer to beagle board DT files on mmc2 node for eMMC as listed below
    arch/arm/dts/am335x-boneblack.dts
    arch/arm/dts/am335x-bone-common.dtsi

    &mmc2 {
    	vmmc-supply = <&vmmcsd_fixed>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&emmc_pins>;
    	bus-width = <8>;
    	status = "okay";
    };

    Best,
    -Hong

  • Hello,

    Thanks for the reply,

    I did the compilation according to your instructions being beagle bone black as the configuration

    And I  get this

    Here you can see the emmc is acting as the same as before and mmc_blk is not enabled . Its not accepting as a block device. I did the configurations correct as you said. Is there any mistake any emmc schematic part? mmc dev 1 and cmds related to emmc are not working. Or is there any CONFIG to add.

    Best Regards,

    Eldhose Peter