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.

sdio probing of MMC3 in 2.6.37 (devkit 2.1 gingerbread)

Other Parts Discussed in Thread: WL1271, OMAP3515

Hi folks,

I have a board with a WL1271 on MMC3 where I'm seeing a timeout in response to send_io_op_cond on 2.6.37. Exact same board setup works fine with 2.6.39. Pin-mux settings are the same (in fact, I'm using same mlo, u-boot binary when comparing the .37 with .39). My guess there is some difference between MMC3 setup/probing in 2.6.37 and 2.6.39. I noticed there are a lot of differences between .37 and .39 in arch/arm/mach-omap2/hsmmc.c. I was curious if anyone else has gotten a SDIO device probing correctly (ie: seeing the tuple message) with MMC3 on 2.6.37.

 

on 2.6.39:

[    4.422851] mmc1: card claims to support voltages below the defined range. These will be ignored.

[    4.443695] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)

[    4.450866] mmc1: new SDIO card at address 0001

on 2.6.37:

[    4.855926] mmc_rescan:1481 mmc1

[    4.859283] mmc_rescan:1492

[    4.862274] mmc_rescan:1495

[    4.865203] mmc_rescan:1500

[    4.868133] mmc_rescan:1507

[    4.871063] mmc_rescan:1511

[    4.873992] mmc_rescan:1514

[    4.876953] mmc_rescan:1529

[    4.879882] mmc_rescan:1533

[    4.882812] omap_hsmmc_set_ios:1591

[    4.886474] omap_hsmmc_set_ios:1602 id=0

[    4.890594] mmc_regulator_set_ocr:807 mmc1

[    4.894927] mmc_regulator_set_ocr:830 mmc1 voltage -22 min 4300000 max 4400000

[    4.902526] mmc_regulator_set_ocr:838 mmc1

[    4.906921] mmc_regulator_set_ocr:844 mmc1

[    4.911193] mmc_regulator_set_ocr:852 mmc1

[    4.927032] omap_hsmmc_set_ios:1617

[    4.953277] omap_hsmmc_set_ios:1591

[    4.956970] omap_hsmmc_set_ios:1608 id=0

[    4.961120] omap_hsmmc_set_ios:1617

[    4.985351] omap_hsmmc_set_ios:1591

[    4.989013] omap_hsmmc_set_ios:1617

[    4.995025] omap_hsmmc_set_ios:1591

[    4.998687] omap_hsmmc_set_ios:1617

[    5.003417] mmc_rescan:1553, ocr_avail=0xffffffea

[    5.008758] mmc_rescan:1559 ocr=0x0

[    5.013763] mmc_rescan:1561 err=-110, timeout=110

( above is where send_io_op_cond times out and as a result fails to attach sdio to the MMC3 interface)

[    5.018768] mmc_rescan:1602

[    5.023010] mmc_rescan:1611

[    5.026336] mmc_rescan:1624

[    5.029266] omap_hsmmc_set_ios:1591

[    5.032928] mmc_regulator_set_ocr:807 mmc1

[    5.037231] mmc_regulator_set_ocr:852 mmc1

[    5.041564] mmc_regulator_set_ocr:856 mmc1

[    5.045837] omap_hsmmc_set_ios:1617

in .39, there is a bunch of code for omap_hsmmc_mux which is not present in .37. Would welcome any advice. I noticed in .37, no one else is using MMC3 in arch/arm/mach-omap2/board-*.c except pandora but pandora uses wl1251 and uses a hardcoded card_init to bypass sdio probing.

Thanks,

jaya

 

  • Hi

        I  have the same problem with 2.6.37: mmc_rescan has a timeout in response to sdio_reset and send_io_op_cond on 2.6.37. There is a WG7310 module on my omap3515 board.

        But I do not try with 2.6.39.   

       Can anyone help us?

       Thanks.

       Peter

  • Hi Peter,

     

    I was able to solve my problem for 2.6.37. 2.6.37's pin mux handling is a mess. You may want to start a separate thread for your omap3515 issue, hopefully, you'll have more luck with TI support than I have.

     

    Thanks,

    jaya

  • Hi jaya,

       Thank for your reply.

        My problem is , my mmc2 host didn't received any response from wifi module. 

       pins mux are set in u-boot.

            MUX_VAL(CP(MMC2_CLK),        (IDIS | PTU | EN  | M0))         /*MMC2_CLK*/\
            MUX_VAL(CP(MMC2_CMD),       (IEN  | PTU | EN  | M0))         /*MMC2_CMD*/\
            MUX_VAL(CP(MMC2_DAT0),      (IEN  | PTU | EN  | M0))         /*MMC2_DAT0*/\
            MUX_VAL(CP(MMC2_DAT1),      (IEN  | PTU | EN  | M0))         /*MMC2_DAT1*/\
            MUX_VAL(CP(MMC2_DAT2),      (IEN  | PTU | EN  | M0))         /*MMC2_DAT2*/\
            MUX_VAL(CP(MMC2_DAT3),      (IEN  | PTU | EN  | M0))         /*MMC2_DAT3*/\
            MUX_VAL(CP(MMC2_DAT4),      (IEN  | PTU | EN  | M4))         /*GPIO136 - WIFI IRQ*/\
            MUX_VAL(CP(MMC2_DAT5),      (IDIS | PTD | DIS | M4))         /*GPIO137 - WIFI_EN*/\

    WIFI_EN gpio is enable, it is control in linux driver. and the power supply is correct.

    when mmc2 host send cmd5(SDIO command 5) to wifi module, it did not receive any response and timeout, it can not detect any sdio card.

    I can sure the main board and wifi module are OK. The wifi module can run correctly on the wince system.

     

    How do you solve your problem? Would you give me more detail?

    Thanks

    Peter

  • Peter,

     

    I suggest you do the pin mux initialization in the linux board file (arch/arm/mach-omap2/board-xxxxx.c) and don't rely on u-boot.

    There is a chance that the GPIO mechnism is being reset during kernel start and you loose the muxes.

    Did you verify that this is not he case here?

     

    If you can post your board file here, I can have a look at it.

     

    Best Regards,

    Eyal

  • Hi Eyal

    I do the mmc2 pin mux initialization in the linux board file and solve the problem.

    Thank you very much.

    Best Regards

    Peter

  • Dear All,

    We are also facing the same issue for WG7310 on MMC3. 

    Our settings in u-boot for MMC3 are:

    MUX_VAL(CP(ETK_CLK_ES2), (IDIS | PTU | EN  | M2)) /*ETK_CLK -- MMC3_CLK*/\

    MUX_VAL(CP(ETK_CTL_ES2), (IDIS | PTU | EN  | M2)) /*ETK_CTL -- MMC3_CMD*/\

     

    MUX_VAL(CP(ETK_D3_ES2 ), (IEN  | PTU | EN  | M2)) /*ETK_D3 -- MMC3_DAT3*/\

    MUX_VAL(CP(ETK_D4_ES2 ), (IEN  | PTU | EN  | M2)) /*ETK_D4 -- MMC3_DAT0*/\

    MUX_VAL(CP(ETK_D5_ES2 ), (IEN  | PTU | EN  | M2)) /*ETK_D5 -- MMC3_DAT1*/\

    MUX_VAL(CP(ETK_D6_ES2 ), (IEN  | PTU | EN  | M2)) /*ETK_D6 -- MMC3_DAT2*/\

    MUX_VAL(CP(UART3_RTS_SD), (IDIS | PTD | DIS  | M4)) /*WLAN_EN*/
    MUX_VAL(CP(DSS_DATA18), (IEN  | PTU | EN  | M4)) /*WLAN_IRQ */

    Settings in kernel for MMC3:

    OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP), //WLAN_IRQ

    OMAP3_MUX(UART3_RTS_SD, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), //WLAN_EN

     

    /* MMC3 SDIO pin muxes for WLAN */

    OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE2 | OMAP_PIN_OUTPUT), //MMC3_CLK

    OMAP3_MUX(ETK_CTL, OMAP_MUX_MODE2 | OMAP_PIN_OUTPUT), //MMC3_CMD

    OMAP3_MUX(ETK_D3, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), //MMC3_DAT3

    OMAP3_MUX(ETK_D4, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), //MMC3_DAT0

    OMAP3_MUX(ETK_D5, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), //MMC3_DAT1

    OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), //MMC3_DAT2

     

    So, when we are booting up the device we can not see any signal on scope for MMC3_CMD and MMC3_CLK. And wifi-bt module detection at MMC3 fails with error -110.

    Following is a piece of log:

     

    [    3.456237] ##First we search for SDIO...=-110

    [    3.460876] ##...then normal SD...

    [    3.466674] ##...and finally MMC.

    [    3.470123] ##It is mmc...

    [    3.472930] ##mmc_attach_mmc##mmc card detect err=0

    [    3.648742] mmc1: new high speed MMC card at address 0001

    [    3.654785] mmcblk1: mmc1:0001 SEM04G 3.68 GiB

    [    3.662811]  mmcblk1: p1

    [    3.783935] ##First we search for SDIO...=-110

    [we are supposed to detect the MMC3 device here]

    [    3.788574] ##...then normal SD...

    [    3.794067] ##...and finally MMC.

    [    4.429077] EXT3-fs: barriers not enabled

    [    4.433776] kjournald starting.  Commit interval 5 seconds

    ...
    ...

    Could you please suggest if we are missing anything?

     

    Thanks,

    -Ninad.

  • Ninad,

     

    Did you verify that you see the slow clock (32.768 Khz) on module pin?

    This clcok is expected to be generated by the host processor.

     

    Best Regards,

    Eyal Reizer

  • Dear Eyal,

    Thank you for the quick reply.

    I cannot see the MMC3_CLK on module pin. As per my understanding goes I should see the MMC3_CMD signals even if no clock signals are present. Please let me know if I am wrong.

    Could you please tell me what could be the possible reasons that I am not able to see the clock? because we have enabled all the gpios and signals.

    Thanks,

    -Ninad.

  • Ninad,

     

    Other than the pin muxes can you make sure that you have the rest of the MMC intialization for working with the wlan module?

    Please look for eexample at the following link:

     

    http://www.spinics.net/lists/linux-omap/msg46834.html

     

    Pay attention to the addition of the MMC structure element "wl1271" to omap2_hsmmc_info mmc[]

    And also the registration of the WLAN enable ping to the power management.

     

    Best Regards,

    Eyal Reizer

     

  • Dear Eyal,

    Yes I am setting all the structures appropriately for wl12xx on MMC3. Still it does not detect the wifi module :(

    Don't know what else needs to be done.

    Thanks,

    -Ninad.

  • Ninad,

     

    I would verify that the 32Khz (slow clock) is seen on the module. I believe it is pin 48 of the module.

    Without this clock the module would not be detected at all.

     

    Best Regards,

    Eyal Reizer

  • Dear Eyal,

     

    Ok. I'll first verify the clock issue and let you know if any success.

     

    Thanks,

    -Ninad.

  • Hi Ninad,

    make sure you kernel config suport mux_support.

  • Dear Eyal,

    I checked the slow clock rate on our device and it is coming 32KHz. So, that is not the issue it seems.

    The main issue is I am not able to get the MMC3_CLK (SDIO_CLK pin 37).

    Also, the mux configuration seems to be correct as I posted in my last comments.

    Really blocked on this issue now.

     

    Dear Peter,

    Yes the mux_support is enabled in the config.

    Thanks,

    -Ninad.

  • Dear Eyal,

     

    There is some update on this issue:

    I can see the MMC3_CLK working and activity at MMC3_CMD pin at the time of initialization (function mmc_send_io_op_cond()) it means its trying to detect but it fails with timeout (110) error. I tried putting it in while loop but it never succeeds.

    Also, I verified the power sequence for WL1271and WL_EN, DC_REQ, SDIO_CLK, SLOWCLK all seems to be fine as per the datasheet. But still not able to detect the module on MMC3.

    Could you please provide some pointers.

    Thanks,

    -Ninad.

  • Ninad,

    I believe input enable (pin-mux) has to be set for bi-directional lines including mmc_clk. Please try setting mmc3_clk and mmc3_cmd to OMAP_PIN_INPUT_PULLUP.

    Regards

    Sinoj

  • Dear Sinoj,

    Yes we did change the MMC3_CLK and MMC3_CMD mux later for INPUT_PULLUP (sorry for not updating this information earlier). But it has no effect :(

    Thanks,

    -Ninad.