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.

"mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz" trace but no second sd card detection on AM3352

Other Parts Discussed in Thread: AM3352

Hello

my board is based on AM3352 with 2 SD cards (mmc0 is working fine, second is not)

The only trace i have in linux booting is :

mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz

i have made the following modifications to have a second SD card reader :

1° call mmc1_init :

   {mmc1_init,    DEV_ON_BASEBOARD, PROFILE_ALL}, /* added */
    {mmc0_init,    DEV_ON_BASEBOARD, PROFILE_ALL},

2° update mmc1 init according to my GPIOs for CD and WP :

    setup_pin_mux(mmc1_common_pin_mux);
    setup_pin_mux(mmc1_wp_only_pin_mux);
    setup_pin_mux(mmc1_cd_only_pin_mux);

    am335x_mmc[1].mmc = 2;
    am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA;
    am335x_mmc[1].gpio_cd = GPIO_TO_PIN(0, 14);  //GPIO0_14
    am335x_mmc[1].gpio_wp = GPIO_TO_PIN(3, 15); //GPIO3_15
    am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
}

3° update mmc1_common_pin_mux according to my GPIOs

static struct pinmux_config mmc1_common_pin_mux[] = {
    {"gpmc_ad11.mmc1_dat3",    OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_ad10.mmc1_dat2",    OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_ad9.mmc1_dat1",    OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_ad8.mmc1_dat0",    OMAP_MUX_MODE1 | 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},
};

static struct pinmux_config mmc1_wp_only_pin_mux[] = {
    {"mcasp0_fsx.gpio3_15", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, //WP=3.15
    {NULL, 0},
};

static struct pinmux_config mmc1_cd_only_pin_mux[] = {
    {"uart1_rxd.gpio0_14", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, //CD=0.14
    {NULL, 0},
};

4°keep the following struture

static struct omap2_hsmmc_info am335x_mmc[] __initdata = {
    {
        .mmc            = 1,
        .caps           = MMC_CAP_4_BIT_DATA,
        .gpio_cd        = GPIO_TO_PIN(0, 6),
        .gpio_wp        = GPIO_TO_PIN(3, 18),
        .ocr_mask       = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3V3 */
    },
    {
        .mmc            = 0,    /* will be set at runtime */
    },
    {
        .mmc            = 0,    /* will be set at runtime */
    },
    {}      /* Terminator */
};

Does any one knows what i missed to add mmc1 detection ?

regards