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.

AM335x mmc2

Other Parts Discussed in Thread: WL1271, AM3354, TXB0108, AM3352, TPS65217

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

  • Hi Morgan,
     
    Note that the pins you are using for MMC2 are on different power domains:
     
    MMC2_DAT0 - VDDSHV3
    MMC2_DAT1 - VDDSHV3
    MMC2_DAT2 - VDDSHV3
    MMC2_DAT3 - VDDSHV3
    MMC2_CLK - VDDSHV2
    MMC2_CMD - VDDSHV2
     
    Are VDDSHV2 and  VDDSHV3 both on the same power rail in your board?
  • Hi Biser,

    Good idea! But, it turns out that we've tied both to 3.3V, as well as the supply for the SD Card we're testing with, so I don't think that's it.

    Thanks,

    Morgan

  • Hi Morgan,

    We are facing exactly same issue. Were you able to solve this?

    Can anyone from TI tell me if there is any issue with this configuration.

    Thanks,

    Vinod

  • Hi Vinod,

    Unfortunately, no we didn't make any headway on it. We ended up concluding that there's still some unresolved issue with mmc2, but don't know if it's chip or linux bsp related.

    Sorry,

    Morgan

  • Thanks Morgan for the reply.

    Can anyone from TI update us on this? Is there any limitation with MMC2 interface that we are overlooking here.

    Regards,

    Vinod

  • Can you give information which processor pins you are using for MMC2, also processor type and revision?
  • Hi Biser,

    We are using GPMC_A1 as MMC2_DAT0, GPMC_A2 as MMC2_DAT1, GPMC_A3 as MMC2_DAT2, GPMC_BE1# as MMC2_DAT4, GPMC_CLK as MMC2_CLK and GPMC_CS3# as as MMC2_CMD.

    We are using AM3354. I am not sure about revision but below is the log that we are getting while booting (Complete log is attached)

    Starting kernel ...

    [ 0.000000] Linux version 3.2.0-svn89 (root@RakeshKadian) (gcc version 4.4.3 (GCC) ) #71 Wed Jun 12 13:05:54 IST 2013
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine: am335xevm
    [ 0.000000] Memory policy: ECC disabled, Data cache writeback
    [ 0.000000] AM335X ES1.0 (sgx neon )
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024

    6170.sdio_logs1.txt

    Thanks,

    Vinod

  • The I/O pins seem correct. The pins should be pinmuxed in mode 3, with RXACTIVE enabled, and internal pullups enabled (note that default state for most pins is internal pulldown enabled). If you have external pullup resistors you can disable the internal pullup/pulldown resistors. Pullup resistor is not required only on the MMC2_CLK line. These pins are located on voltage domains VDDSHV2 and VDDSHV3, both of which should be connected to 3.3V power supply.
  • Hi Biser,

    The pin multiplexing and voltages are correct. I have some doubts and may be you can clarify it.

    We are using MMC2 to interface with WLAN controller over SDIO. The IO voltage for WiFi chip is 1.8V whereas the IO voltage given to AM3354 is 3.3V (VDDSHV2 and VDDSHV3). A level translator is used in between (TXB0108) for bidirectional lavel conversion.

    Now, SD_CAPA register can be configured to support 1.8V, 3.0V and 3.3V for MMC. But the description of SDVS bit of register SD_HCTL is very confusing. It says that if MMCHS 3: this field must be set to 5h i.e. 1.8V. So my question is whether MMC2 will support 3.3V operation or not? FYI, SD_CLK and SD_CMD lines are toggling properly with 0V to 3.3V levels during initialization.

    Now suppose, 3.3V operation is supported. So after debugging the initialization sequence in detail, we found that it is getting stuck because OCR bit is not getting set. This bit is again related to voltage levels. One issue that I am suspecting is that WiFi chip's OCR response for CMD5 may ask for 1.8V operation as the IO voltage is 1.8V for this chip but the IO voltage for processor MMC2 is 3.3V. So AM3354 is saying that the required voltage is not supported. This is only a hunch and I need to debug more to see what is response from WiFi chip. But may be you can clarify if this can be possible issue.

    Thanks,

    Vinod

  • Understanding the voltage support for MMC2 for AM335x is really confusing. Can anyone from TI comment on this?

    As I understand, TI is recommending SITARA family aggressively but if they can't help with this kind of issues/limitations, this is going to be very difficult for AM335x series as well as TI to compete with other similar processors in market.

    Thanks,

    Vinod

  • Hi Morgan ,

    I want to just ask have you take anyother way around or just you left it. Just want to ask if you have made some changes to mmc2 and make it work so that we can also do like you way.

    Thanks,

    Rakesh Kadian

  • Hi Rakesh,

    We ended up deciding that there's likely either a HW or SW problem with MMC2 and gave up on it. We would have rather used mmc2, but ended up re-designing to only use mmc0 and mmc1.

    Morgan

  • Hi 

    Anybody successful in interfacing mmc2 ?.I am using TiWi5 module with mmc2 on our custom Board (AM3352) which is not working .Earlier i had tried TWi5 module with mmc1 with beagle bone has worked pretty fine .

    [ 1.972863] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
    [ 2.018307] mmc1: card claims to support voltages below the defined range. These will be ignored.
    [ 2.038353] mmc1: error -110 whilst initialising SDIO card.

    Does anybody sure that mmc2 will work only with 1.8V ?.I have seen lots of e2e thread and nobody sure of operating voltage for mmc2 

    Sunil 

  • Can you post to which processor pins (ball number) is your module connected?

  • Hi Biser

    This is my pin mux configuration. mmc2 operate in 3.3v and Tiwi5 operates in 1.8 voltage and we have voltage translator between them. TiWi module is small daughter card   and we are operating the processor at 25MHz.

    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},
    };

    Sunil 

  • Hello,

    I'm also having a lot of trouble trying to make the MMC2 work. In my case, we use the bus to communicate with a WLAN device via SDIO with VDDSHV2 operating in 1V8, but so far nothing worked. When I connect the card in the MMC0 bus it does work even though the hardware design is pretty much the same (in this case, only the power supply used to power the WLAN chip is different). Also, my board configuration is somewhat the same you all posted so far...

    Have you a found a solution to this issue? Searching online I found mentions to some patches people use to change the MMC2 behavior, but I haven't tried any yet, I would prefer getting a position from TI first.

    DAVI

  • Hello,

    has anyone solved this problem?

    Biser, please give a comment we have the same issue with MMC2 on AM3358BZCZ100 using ti-sdk-06.
    CLK- and CMD-Line toggles, data0..3 not.

    best regards

    Bert Umlauft

    2133.SIOTV.TXT

    The Pinmux and Init:

    #define AM335XEVM_WLAN_IRQ_GPIO        GPIO_TO_PIN(2, 3)

    // geändert für WLAN Modul 1273
    struct wl12xx_platform_data am335xevm_wlan_data = {
        .irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO),
        .board_ref_clock  = WL12XX_REFCLOCK_38_XTAL, /* 38.4Mhz */
        .bt_enable_gpio   = GPIO_TO_PIN(1, 12),
        .wlan_enable_gpio = GPIO_TO_PIN(3, 21),
    };

    /* Module pin mux for wlan and bluetooth */
    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},
        {"gpmc_a0.gpio1_16",   OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, // wg. gpio2_0
        {NULL, 0},
    };

    static void mmc2_wl12xx_init(int evm_id, int profile)
    {
        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 | MMC_CAP_POWER_OFF_CARD;
        am335x_mmc[1].nonremovable = true;
        am335x_mmc[1].pm_caps = MMC_PM_KEEP_POWER;
        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 */
            printk(KERN_ALERT"!!!!!!WL12XX_INIT!!!!!!\n");
        /* mmc will be initialized when mmc0_init is called */
        return;
    }

    /* Beaglebone Black */
    static struct evm_dev_cfg beagleboneblack_dev_cfg[] = {
        {am335x_rtc_init,  DEV_ON_BASEBOARD, PROFILE_NONE},
        {clkout2_enable,   DEV_ON_BASEBOARD, PROFILE_NONE},
        {tps65217_init,       DEV_ON_BASEBOARD, PROFILE_NONE},
        {mii1_init,       DEV_ON_BASEBOARD, PROFILE_NONE},
        {usb0_init,       DEV_ON_BASEBOARD, PROFILE_NONE},
        {usb1_init,       DEV_ON_BASEBOARD, PROFILE_NONE},
    //    {mmc1_emmc_init,   DEV_ON_BASEBOARD, PROFILE_NONE},
        {mmc2_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
        {mmc0_init,       DEV_ON_BASEBOARD, PROFILE_NONE},
        {i2c2_init,       DEV_ON_BASEBOARD, PROFILE_NONE},
        {sgx_init,       DEV_ON_BASEBOARD, PROFILE_NONE},
        {d_can_init,       DEV_ON_BASEBOARD, PROFILE_NONE},
        {uart5_wl12xx_init,DEV_ON_BASEBOARD, PROFILE_NONE},
        {wl12xx_init,      DEV_ON_BASEBOARD, PROFILE_NONE},
        {led_mux_b_init,   DEV_ON_BASEBOARD, PROFILE_NONE},
        {NULL, 0, 0},
    };

  • Well, my MMC2 bus is working. Turns out my hardware had an issue and I also changed the Kernel code, so I'm not particularly sure which one solved it. The changes in the code were intended to make the MMC2 bus works the same way the others do (there were some differences). I'm pasting the diff below, I hope it helps.

    --- a/arch/arm/mach-omap2/hsmmc.c	2013-06-25 18:37:58.000000000 -0300
    +++ b/arch/arm/mach-omap2/hsmmc.c	2014-05-14 10:37:50.873824028 -0300
    @@ -175,11 +175,12 @@
     {
     	u32 reg;
     
    -	if (mmc->slots[0].internal_clock) {
    -		reg = omap_ctrl_readl(control_devconf1_offset);
    +	reg = omap_ctrl_readl(control_devconf1_offset);
    +	if (mmc->slots[0].internal_clock)
     		reg |= OMAP2_MMCSDIO2ADPCLKISEL;
    -		omap_ctrl_writel(reg, control_devconf1_offset);
    -	}
    +	else
    +		reg &= ~OMAP2_MMCSDIO2ADPCLKISEL;
    +	omap_ctrl_writel(reg, control_devconf1_offset);
     }
     
     static void hsmmc23_before_set_reg(struct device *dev, int slot,
    @@ -402,6 +404,7 @@
     		}
     		break;
     	case 2:
    +	case 3:
     		if (cpu_is_omap3517() || cpu_is_omap3505())
     			mmc->slots[0].set_power = am35x_hsmmc2_set_power;
     
    @@ -414,8 +417,7 @@
     			c->caps &= ~MMC_CAP_8_BIT_DATA;
     			c->caps |= MMC_CAP_4_BIT_DATA;
     		}
    -		/* FALLTHROUGH */
    -	case 3:
    +
     		if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
     			/* off-chip level shifting, or none */
     			mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
    --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c	2013-06-25 18:38:23.000000000 -0300
    +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c	2014-05-02 15:01:10.179263437 -0300
    @@ -2049,8 +2049,8 @@
     	{ }
     };
     
    -static struct omap_hwmod_ocp_if am33xx_l3_main__mmc2 = {
    -	.master		= &am33xx_l3_main_hwmod,
    +static struct omap_hwmod_ocp_if am33xx_l4ls__mmc2 = {
    +	.master		= &am33xx_l4ls_hwmod,
     	.slave		= &am33xx_mmc2_hwmod,
     	.clk		= "mmc2_ick",
     	.addr		= am33xx_mmc2_addr_space,
    @@ -2058,7 +2058,7 @@
     };
     
     static struct omap_hwmod_ocp_if *am33xx_mmc2_slaves[] = {
    -	&am33xx_l3_main__mmc2,
    +	&am33xx_l4ls__mmc2,
     };
     
     static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
    @@ -2067,7 +2067,7 @@
     static struct omap_hwmod am33xx_mmc2_hwmod = {
     	.name		= "mmc3",
     	.class		= &am33xx_mmc_hwmod_class,
    -	.clkdm_name	= "l3s_clkdm",
    +	.clkdm_name	= "l4ls_clkdm",
     	.mpu_irqs	= am33xx_mmc2_irqs,
     	.main_clk	= "mmc2_fck",
     	.sdma_reqs	= am33xx_mmc2_edma_reqs,

    Regarding my pin configuration, it is as follows:

    static struct pinmux_config mmc2_pin_mux[] = {
       {"gpmc_csn3.mmc2_cmd",  OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
       {"gpmc_clk.mmc2_clk",   OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
       {"gpmc_ad12.mmc2_dat0", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
       {"gpmc_ad13.mmc2_dat1", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
       {"gpmc_ad14.mmc2_dat2", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
       {"gpmc_ad15.mmc2_dat3", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
       {NULL, 0},
    };

    DAVI

  • Hello Davi,

    thanks for your fast reply. I have modified my kernelcode like yours, but nothing changed.

    I get the follwowing message (with modifcation or without):

    [   10.066436] mmc1: card claims to support voltages below the defined range. These will be ignored.
    [   10.086181] mmc1: error -110 whilst initialising SDIO card

    I initialized MMC2,  I don't know why it complains about MMC1.


    best regrads

    Bert Umlauft

  • That number does not correspond to the bus number, it should not be a problem. You can check it at hsmmc.c.

    I forgot to paste the hsmmc struct I use:

    static struct omap2_hsmmc_info am335x_mmc[] __initdata = {
       {
          .mmc            = 1,
          .caps           = MMC_CAP_4_BIT_DATA,
          .gpio_cd        = GPIO_TO_PIN(2, 26),
          .ocr_mask       = MMC_VDD_32_33 | MMC_VDD_33_34,
       },
       {
           .mmc          = 3,
           .name         = "unifi",
           .caps         = MMC_CAP_4_BIT_DATA,
           .nonremovable = true,
           .gpio_cd      = -EINVAL,
           .gpio_wp      = -EINVAL,
           .ocr_mask     = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
       },
       {} /* Terminator */
    };

    In my case, VDDSHV2 is 1.8V, but it only worked after I started using ocr_mask as shown above. I don't know why, but I figured that even if the Kernel tries to set the voltage to 3.3V, nothing would happen because it would stop at 1.8V... Another thing, unifi is the WiFi's driver name.

    DAVI

  • VDDSHV2 is tied to 3.3V and this is the value i measured on the buslines too. The SDIO Module is equipped with a level Shifter to 1.8V. The CLK an CMD line toggles but data0..3 does not.

    There are many postings about the same behavior of MMC2, is there any TI-Support for the MMC2 issue?
    Has anyone solved his MMC2-Problem.

    best regards
    Bert Umlauft

  • The data pins aren't used in this stage. All the communication between the driver and the module attached to the MMC bus is done with CMD and CLK pins in the polling process...

    A similar thing was happening in the hardware I am working with. Together with these changes in the Kernel's code, we found out that the MMC driver (omap_hsmmc is the one that polls the buses) only recognized the SDIO device in the bus when all lines were configured with the processor's internal pull up enabled, as I showed previously in my pinmux configuration. In fact, all those pins starts at high level and our hardware had to be fixed in order to comply. The device we connect in the MMC2 bus does not require these pull ups and nobody checked the pins reset state...

    When I was debugging our board to find out why the driver kept printing error messages like yours, I started using printk() to check which part of the driver was complaining. In the end we had to adapt our board to a previously unknown scenario and the driver in general was fine. Nevertheless, changing the driver code helped to narrow down what was going on and in my case helped even more because we need to inform both 1V8 and 3V3 to ocr_mask. I can only suggest you do the same...

    It is also a good idea to check your hardware. I can confirm the bus does work even if you use two different internal muxes. In my case, CLK and CMD are in mux0 and the four data lines are in mux1.

    DAVI

  • Hi,

    I have also an issue with mmc2 @ an AM3352 phyCore and a custom Board.

    My muxing and initialisation looks like this:

    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 = -EINVAL,
      .ocr_mask       = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3V3 */
     },
     { 
      .mmc = 2,
      .name = "EX_SD",
      .caps = MMC_CAP_4_BIT_DATA,
      .nonremovable = false,
      .gpio_cd = GPIO_TO_PIN(3, 16),
      .gpio_wp = -EINVAL,
      .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3V3 */
     },
     {
      .mmc            = 0, /* will be set at runtime */
     },
     {}      /* Terminator */
    };

     

    /* Module 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},
    };

    /* Module pin mux for mmc2 */
    static struct pinmux_config mmc2_pin_mux[] = {
     {"gpmc_ad12.mmc2_dat0", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
     {"gpmc_ad13.mmc2_dat1", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
     {"gpmc_ad14.mmc2_dat2", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
     {"gpmc_ad15.mmc2_dat3", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
     {"gpmc_csn3.mmc2_cmd", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
     {"mii1_rxd1.mmc2_clk", OMAP_MUX_MODE6 | AM33XX_PIN_INPUT_PULLUP},
     {"mcasp0_axr0.mmc2_sdcd", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLUP},
     {NULL, 0},
    };

    static void mmc0_init(void)
    {
     setup_pin_mux(mmc0_pin_mux);
     setup_pin_mux(mmc2_pin_mux);
     omap2_hsmmc_init(am335x_mmc);
     return;
    }

    The inti is called @ boot time.

    @ Kernel Booting mmc0 works like a charm. The Kernel and Barebox is booting from it.

    But mmc2 doesn't work. I looked at the cmd and clk line. cmd line is @ everytime high due to a 10k Pullup in the Schematic.

    Unfortunatly the clk line is @ everytime low. Nothing happens there. And after booting only mmc0 is available. Where is the Problem?? clk is directly connected to the SD-Card without any pullup/down. I tested it with plugging in an SD-Card before and after Kernel booting... nothing. :-(

    Can somebody help me?

     

     

     

  • It's only a wild guess, but if you can see a CMD signal in the line when the board boots and then nothing happens once the Kernel is up and running, the problem may be because the MMC driver (omap_hsmmc) didn't recognize whatever was attached to MMC2.

    In our board we can not poll the bus once the driver is running. We noticed that omap_hsmmc polls all buses when it loads and we don't know how to make it re-poll everything without unloading and reloading it. This behaviour is almost a nonissue for us and that's why we never bothered to look for a solution.

    Anyhow, if you can't see CMD/CLK ever this is another problem entirely and would be a hardware thing.

    Hope it helps.

    DAVI

  • It's already solved. I muxed the detection Pin from mmc2 to sdcd. But the TI hsmmc Driver is using GPIO Signals.

    So, i changed it from Mode 4 to Mode 7 and everything was working. But it took some time do find this Information....

  • I am also facing the same issue to make the MMC2 up in my custom board that uses the am3352 processor. Can any one please help in assisting me what should be the right approach I should follow.

    Regards

    Sudipta.

  • Hello,

    what do you mean by "the same issue"? Please details your problem as this post is a little bit old.

    FYI, I use eMMC on MMC2 port with VDDHSV2 at 3.3V or 1.8V depending on the flash and both are working correctly.

  • It is worth noting that all code listed in this thread in order to solve my problem was based on ti-sdk-am335x-evm-06.00.00.00 which uses Linux version 3.2.0...

    DAVI