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.

MMCHS2 SDIO clock can not change

Other Parts Discussed in Thread: DM3730

Hi Everyone :

I have a board that connect a Broadcom 4329(wifi module) to DM3730 through the MMC2 interface in sdio mode

And the wifi module work well ,that is , i can connect to wifi AP and use browser to internet

But , I suffer a strange problem now

According to dm3730 datasheet , I can change the sdio clock frequence base on following



But actually,the sdio clock frequence always keep on 96MHz not 48MHz even write "0xe0087" to 480B412C(MMCHS_SYSCTL)
The above value should set the CLKD=2 and the out put clock frequence should be devide by CLKD

Here is another information,

I find the MMCHS2 sdio clock is about 96MHz , but the voltage only 11.7829mV(=0.11V)


Does anyone can give me suggestion how to enable the  MMCHS2 voltage ?

ps : I am using beagleboard kernel which verion 2.6.32

  • Hi Mr Lu.

    Why don't you use TI connectivity chip? It has better support and integration with TI boards.

    Anyway, The 96MHz is OMAP master clock. It's always 96MHz. In order to change the clock for the MMC you need to calculate the divisor (96MHz/clockrate) you want. Shift it by 6 to set the CLKD, also enable ICE and DTO. Without turning on the ICE the clock won't change.

    Don't modify any other bits on the SYSCTL register.

    Thanks,

    - Elad.

  • Hi Mr Elad :

    Thanks for your information ,

    I did modify the CLKD and Enable ICE and DTO, but it is still 96MHz which not I want..

    BTW, the clock voltage is too low , is it right ?

    I have been measure the  MMC1 which connect to SD card ,

    the MMC1 clock is about 50MHz and clock voltage about 1.6V (see follow picture)

    Both MMC1 and MMC2 execute the same code , but the result is totally different especially on voltage

    Now, I suspect the MMC2 voltage too low to change the MMC2 sdio clock ...

    So, just want to know how to enable MMC2 sdio clock voltage

  • The voltage is 3.2V as it should (on non TI connectivity).

    I'm a little confuse:

    1. Which MMC are you trying to change the clock to? Which one is the SD card and which one is your WLAN card?

    2. How do you change the SYSCTL register? (There are 4 of them, each on to a different slot number) What is the physical address? 

    3. Are you working on Linux environment? If so, you have API that initialize the card and overwrite the SYSCTRL. Are you sure that during your messurment other system software component didn't overwrite it?

    Thank you,

    - Elad.

  • Hi Elad :

    1. Which MMC are you trying to change the clock to? Which one is the SD card and which one is your WLAN card?

    =>I use MMC1 as SD Card and MMC2 as my WLAN card

    2. How do you change the SYSCTL register? (There are 4 of them, each on to a different slot number) What is the physical address? 

    3. Are you working on Linux environment? If so, you have API that initialize the card and overwrite the SYSCTRL. Are you sure that during your messurment other system software component didn't overwrite it?

    =>

    I am working on Linux environment and using omap_hsmmc_set_ios which locate on /kernel/driver/mmc/host/ompa_hsmmc.c

    omap_hsmmc_set_ios use OMAP_HSMMC_WRITE to write register

    I also dump the the address which i write to register , the value is fa0b412c (I think is virtual address because it prototype is __iomem)

    Hope these information is helpful for you

  • These are the right settings.

    I'm not sure how your wifi chip is integrated to the OS. But the MMC host driver get's is clock as a request of ""mmc_set_ios" and inside the mmc_ios there is a structure telling what is the bus_width and what is the clock.

    Usually you have a "card" driver (I guess broadcom card driver) which loaded by class-id and needed to call the ios function. This will change the omap_hsmmc driver to work with a different clock.

    Patching the driver will be a little hard since it's common to both SD card and connectivity so you need to switch on "host id".

    Trying to write the register yourself will cause the mmc driver to overwrite your settings.

    - Elad

  • Hi Elad :

    thanks for your explanation

    It looks like all procedure are right , but still do not know why the clock and voltage is still wrong

    According to mmc/core.c , default mmc2 sdio clocks should be set to 48MHz

    I will keep trace why the voltage is wrong,

    I guess wrong voltage value cause the mmc2 sdio clock change fail

  • why do you think the voltage is wrong?

    it's peak to peak, seems like 3.2V~

  • Now , MMC2 sido can be generated which I want

    But the generated clock will be choppy

    For example , if the clock rate I want is 48MHz

    According to above setting , the output clock rate will be  as 48MHz -> random(Maybe 1MHz~96MHz)  -> 48Mhz -> random(Maybe 1MHz~96MHz)

    and keep repeat

    Any register should set to avoid this saturation ?

  • I'm not sure that I understand.

    1. Did you change the ios arguments?

    2. What do you mean by "random clock"? That's never happen without regitser change.

    - Elad.

  • From the log ,

    Only wifi enable will change the ios arguments

    BTW, random clock mean the clock output value is not a fixed value

    For example , if desired output clock is 48MHz and use instrument to measure output clock

    you will see clock value will be 48MHz(Maybe keep on 2 seconds) then clock disappear (the output clock is not fixed value , it is variance)

    but wait a second , the 48MHz clock will appear

    Then repeat appear -> disappear ...