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.

Error while using MMC2 for wlan in Am335x evm based board

Other Parts Discussed in Thread: WL1283, WL1271

Hello everybody,

I am trying to bring up Wl1283 on a board based on AM335X evm  using MMC2. I have initialised mmc2_wl12xx_init() in the evm_dev_cfg structure.But it is not able to bring up wlan .It is showing following messages

mmc1: host doesn't support card's voltages
mmc1: error -22 whilst initialising SDIO card
I don't know why it is showing mmc1?

Is mmc2 not initialized properly? If not , where should i change to make it working???

Thanks and Warm regards

Rakesh

  • Hello,

    I'm having the same problem in my custom board. In my case, I use BlueGiga's WF111 card and when I load the omap_hsmmc driver to detect it the same messages are being displayed on my console.

    Have you found a solution to this issue?

    Regards,

    DAVI

  • Are you using the kernel from the AM335x SDK? Which version? Have you made any regulator related changes to the kernel configuration?

    Have you checked for electrical problems on your board?

    Do you have a CPLD switch on your board (as the AM335x GP EVM)? If you do, please make sure that your CPLD configuration corresponds to the evm_def_cfg configuration inside the kernel board file.

    Best regards,
    Miroslav

  • I'm my case, the configurations are the same as those used in the EVM board. The only difference are the pins I use.

    Our custom board uses the following pinmux configuration:

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

    While EVM uses the following configuration:

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

    We used the program Pinmux Utility in order to choose those pins, but a few days ago it came to our attention that we ended up mixing two MUXs for the MMC2 bus. Regardless, the program does NOT flag that as an error, so now we are confused, it seems that MMC is the only bus that can mix MUX0 with MUX1... The EVM board uses every pin in the same MUX (MUX0) and the WL1271 attached to the MMC2 bus does work there.

    I'm attaching the configuration file for further analysis. Would this pins work, meaning I don't need to focus my attention in which balls I'm using?

    6837.4834.PinMuxDesignState_AM335x Rev 1.x.dat

    Regards,

    DAVI

  • The pinmux seems correct. What is your VDDSHV2 voltage? Does it correspond to the WiFI module I/O voltage?

  • VDDSHV2 is 1.8V in our design. Actually, I got a fix for the message when I set the struct omap2_hsmmc_info as shown below

    static struct omap2_hsmmc_info am335x_mmc[] __initdata = {
       {
          .mmc            = 1,
          .caps           = MMC_CAP_4_BIT_DATA,
          .gpio_cd        = GPIO_TO_PIN(2, 26), /* GPIO2.26 */
          .ocr_mask       = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3V3 */
       },
       {
           .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 */
    };

    Now, the mmc driver goes up to the point where it lists the SDIO card in the bus. Regardless, the ocr_mask as it is doesn't seem to be right, so I'm assuming there is a code issue going on inside the Kernel, but I haven't had the time to look it up and check why merging MMC_VDD_165_195 with the other two works...

    Regards,

    DAVI