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.