Has anyone had any luck getting mmc2 working on AM335x? I'm working with some custom hardware, and have had good luck getting mmc0 and mmc1 working with SD Cards. (Well, mmc0 works right off, I followed some other posts to get mmc1 working).
But, when I attempt to get mmc2 working (via an adaptor out to a sd card), I run into a number of issues, including crashes. I can see MMC2_CMD and MMC2_CLK toggling at startup, but no data on D0:3.
Specifically, I'm using openembedded and the beaglebone-targeted cloud 9 build. I've modified arch/arm/mach-omap2/board-am335x.c to have:
static struct pinmux_config mmc2_wl12xx_pin_mux[] = {
{"gpmc_a1.mmc2_dat0", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_a2.mmc2_dat1", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_a3.mmc2_dat2", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ben1.mmc2_dat3", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_csn3.mmc2_cmd", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_clk.mmc2_clk", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{NULL, 0},
};
static void mmc2_wl12xx_init(int evm_id, int profile)
{
printk("mmc2_wl12xx_init\n");
setup_pin_mux(mmc2_wl12xx_pin_mux);
am335x_mmc[1].mmc = 3;
am335x_mmc[1].name = "wl1271";
am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA;
am335x_mmc[1].nonremovable = true;
am335x_mmc[1].gpio_cd = -EINVAL;
am335x_mmc[1].gpio_wp = -EINVAL;
am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
/* mmc will be initialized when mmc0_init is called */
return;
}
// this is our custom init structure
static struct evm_dev_cfg beaglebone_dev_cfg[] = {
{usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{emmc_bone_init, DEV_ON_BASEBOARD, PROFILE_NONE}, // mcj for emmc / bone sd card
{mcj_mmc2_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE}, // mcj for mmc2
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{NULL, 0, 0},
};
Has anyone had any luck with mmc2, or can spot my error?
Thanks,
Morgan