Hello everyone,
I have a AM335x Board and I am successfully accesing a SD-Card on MMC0. I used MMC2 in another project which does also work well.
Now I am using MMC1 to connect a SD-Card which does not work.
The MMC Debug messages hint me that the card is not detected, it gets disabled immediatly after the first messages pop up. But I can't find the correct setting for the initialization.
Question 1:
Do I need to register the MMC1 anywhere else in the code, otherwise then that part that I post below?
Question 2:
Is this a card detect issue, is the MMC1 handled differently then MMC0?
Here is my muxxing:
static struct omap2_hsmmc_info am335x_mmc[] __initdata = {
{
.mmc = 1,
.caps = MMC_CAP_4_BIT_DATA,
//.gpio_cd = GPIO_TO_PIN(0, 6),
.gpio_cd = -EINVAL,
.gpio_wp = -EINVAL,
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3V3 */
},
{
.mmc = 2,
.caps = MMC_CAP_4_BIT_DATA,
.nonremovable = true,
.gpio_cd = -EINVAL,
.gpio_wp = -EINVAL,
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
},
{
.mmc = 0, /* will be set at runtime */
},
{} /* Terminator */
};
/* mmc0 initialization */
static void mmc0_init(void)
{
setup_pin_mux(mmc0_pin_mux);
setup_pin_mux(mmc1_pin_mux);
omap2_hsmmc_init(am335x_mmc);
return;
}
/* pin-mux for mmc0 */
static struct pinmux_config mmc0_pin_mux[] = {
{"mmc0_dat3.mmc0_dat3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"mmc0_dat2.mmc0_dat2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"mmc0_dat1.mmc0_dat1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"mmc0_dat0.mmc0_dat0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"mmc0_clk.mmc0_clk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"mmc0_cmd.mmc0_cmd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
/* {"spi0_cs1.mmc0_sdcd", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},*/
{NULL, 0},
};
/* pin-mux for mmc1 */
static struct pinmux_config mmc1_pin_mux[] = {
{"gpmc_ad11.mmc1_dat3", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad10.mmc1_dat2", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad9.mmc1_dat1", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad8.mmc1_dat0", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_csn1.mmc1_clk", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_csn2.mmc1_cmd", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP},
{NULL, 0},
};