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.

DM385 MMC3 usage

Other Parts Discussed in Thread: DM385

Hi!

Finally we have our custom board(DM385 based). On this board we want to connect WL18xx to MMC3. But first we are trying to bring up MMC3.

I read all threads on this forum about MMC3 on DM8148. I've made proper changes to kernel files acording to "famous" MMC.rtf. card detect is hardcoded to always true for mmc3.

Now I have following situation:

- mmc is registered in system, but nothing detected.

- I am looking with oscilloscope on SD2_xxx lines. During send_op_cond I see clock on SD2_CLK line. But I don't see anything on SD2_CMD line. Just 1.8V level -> "1".  I've checked pin mux, SD2_CMD is configured correct.

Two boards have the same behaviour.

Don't know where to look more for changes..

So, I have several questions:

1) Doesn MMC3 exists in DM385/388? Is it fully functional?

2) What else can affect on SD2_CMD behaviour? If, for example, MMC3 DMA configuration is wrong - could it affect on pin behaviour(during command)?

3) In DM8148 TRM I can see Table 1-101. EDMA Multiplexed Synchronization Events on page 231. But I can't find such table in DM385 TRM. Are they identical? Can I replace CAN_IF1DMA interrupt? I am confused because there is no table and no CAN on DM385.

Thank you.

  • Hi.

    I've tested SD lines through MMCHS_SYSTEST register and I see that all need lines are connected. I can see changes on SD2_D0-3, SD2_CMD, SD2_CLK. But anyway don't see activity on SD2_CMD during polling in mmc_rescan.

    [ 31.070000] mmc0: mmc_rescan: trying to init card at 400000 Hz
    [ 31.070000] mmc0: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 7 width 0 timing 0
    [ 31.080000] Powering on wl18xx..
    [ 31.180000] mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 7 width 0 timing 0
    [ 31.200000] mmc0: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 7 width 0 timing 0
    [ 31.210000] mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 7 width 0 timing 0
    [ 31.220000] mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
    [ 31.220000] Powering off wl18xx..

     

    ./mem_rdwr.out --rd 481409f4

    [host]

    [host] 0x481409f4:
    [host] 00020002
    [host]

    2 - SD2_CMD mux selected.

    What can else affect SD2_CMD behaviour other than pinmux?

  • I've added MMC2 support to u-boot, and I see the same - SD2_CLK is going, SD2_CMD - not.

    U-boot doesn't use DMA, so the problem is probably not in DMA config under Linux.

    It seems that it is some hardware difference between MMC2 and MMC0/MMC1 that should be configured.

    The only difference I see is in System Interconnect. MMCSD2 is L3F Target, MMCSD0/MMCSD1 is L4S target.. But what should be else configured?

    TI Guru's, I need your help..

  • Ok.

    I've got signal in u-boot. SD2_CMD generally works in u-boot.  But still no signal under Linux.

  • Dmitry,

    Have you check the below wiki page?

    http://processors.wiki.ti.com/index.php/TI81xx_PSP_Porting_Guide#MMC.2FSD_Driver

    Dmitry Bodnya said:
    I've got signal in u-boot. SD2_CMD generally works in u-boot.  But still no signal under Linux.

    You can check the SD2 settings in u-boot (pin mux, register settings/values) and compare these with the SD2 settings in linux.

    Regards,
    Pavel

  • Hi, Pavel!

    I found a problem. It was in driver. It was with card detect. The way I resolved card detect(just return true for my machine) was wrong. The correct way is to analyze of machine_id and host_id in omap_hsmmc_card_detection_disabled function.

    This function (omap_hsmmc_card_detection_disabled) used during sdio command send. And for my machine the result was 0 (like CD is enabled). And command sending didn't happend.

    Now this function looks like this:

    static int omap_hsmmc_card_detection_disabled(struct omap_hsmmc_host *host)
    {
    /*
    * According to TI814X's TRM, mmc0's card detection pin is not
    * connected. As a result, the card cannot be detected and the
    * insertion bit in PSTATE will always be 0 and any requests will
    * timeout. As a workaround, assume that a card is always inserted.
    */
    if (cpu_is_ti814x() && host->id == 0)
    return 1;
    
    //Our board has wl18xx on mmc3/sd2, so card detect disabled 
    if((host->id == 2)&&(machine_is_<your_board_machine_id>()))
    {
    return 1;
    }
    
    return 0;
    }