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.

dm8148 mmc1 power 3.3v problem



We use dm8148 mmc1, In the kernel "omap_hsmmc.c" ->omap_hsmmc_conf_bus_power()

I find that :

/* Only MMC1 supports 3.0V */
if (host->id == OMAP_MMC1_DEVID) {
hctl = SDVS30;
capa = VS30 | VS18;
} else {
hctl = SDVS18;
capa = VS18;
}

Also In the datasheet(sprugz8d.pdf):18.4.20 Control Register (MMCHS_HCTL)

It said that "

MMCHS2. This field must be set to 5h.
MMCHS3. This field must be set to 5h.

".

So does this mean The mmc1 and mmc2 can only use 1.8V supply?

  • Echo,

    Echo Lee said:
    So does this mean The mmc1 and mmc2 can only use 1.8V supply?

    No I do not think so. Based on the DM814x datasheet, MMC/SD1 and MMC/SD2 can use 1.8V or 3.3V for their I/O pins:

    3.2.16 SD Signals (MMC/SD/SDIO)

    Table 3-28. SD1 Terminal Functions - use DVDD_SD and DVDD

    Table 3-29. SD2 Terminal Functions - use DVDD_GPMC and DVDD

    DVDD_SD, DVDD and DVDD_GPMC can be 1.8V or 3.3V.

    And in TRM, chapter 4 ROM code we have:

    The ROM code supports booting from MMC/SD cards in the following conditions:

    3V VCC power supply, support for 3V or 1.8V I/O voltages


    The ROM Code initializes the memory device or card connected on MMC interface using the standard
    High-Voltage range (3.0V).

    Exploring the u-boot (u-boot-2010.06-psp04.04.00.01), I see the below code:

    omap_hsmmc.c

    static int mmc_init_setup(struct mmc *mmc)
    {

    writel(DTW_1_BITMODE | SDBP_PWROFF | SDVS_3V0, &mmc_base->hctl);
    writel(readl(&mmc_base->capa) | VS30_3V0SUP | VS18_1V8SUP, &mmc_base->capa);

    }

    The u-boot is using the MMC1. The u-boot is writing:

    MMCHS_HCTL[11:9] SDVS = 0x6 (not 0x5)

    MMCHS_CAPA[26] VS18 = 1, [25] VS30=1 and leaves [24] to 0.

    See also the below e2e thread:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/259685.aspx

    Best regards,
    Pavel

  • Also, the DM814x EVM seems to use 3.3V for MMC1:

    2.1.3 SD/MMC Interface
    SD/MMC CARD connector MHC-W21-601-LF is interfaced to SD1/MMC1 port of the DM814x/AM387x. Power supply to the MMC card (VMMC) is controlled by the load switch MIC94060YC6.VMMC is derived from EVM3V3 supply. The enable pin of the Load switch U41 is connected to the GP1 [2]. Load switch is enabled by default (resistor R209 connecting GP1 [2] pin to EN pin of load switch is not mounted in default configuration).


    Regards,
    Pavel

  • Thanks for your quick reply。

    So does that mean the code below in the “omap_hsmmc.c”( Kernel) need to changed ?

    I have changed the code to V30 but I still cann't find the mmc1 device, It.What can be "ERRI CTO CCRC" the reason? Here is the log:

    mmc1: mmc_rescan: trying to init card at 400000 Hz
    mmc1: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0 timing 0
    mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
    mmc1: starting CMD52 arg 00000c00 flags 00000195
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD52, argument 0x00000c00
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req done (CMD52): -110: 00000000 00000000 00000000 00000000
    mmc1: starting CMD52 arg 80000c08 flags 00000195
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD52, argument 0x80000c08
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req done (CMD52): -110: 00000000 00000000 00000000 00000000
    mmc1: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0 timing 0
    mmc1: starting CMD0 arg 00000000 flags 000000c0
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD0, argument 0x00000000
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req done (CMD0): -110: 00000000 00000000 00000000 00000000
    mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
    mmc1: starting CMD8 arg 000001aa flags 000002f5
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD8, argument 0x000001aa
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req done (CMD8): -110: 00000000 00000000 00000000 00000000
    mmc1: starting CMD5 arg 00000000 flags 000002e1
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD5, argument 0x00000000
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req failed (CMD5): -110, retrying...
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD5, argument 0x00000000
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req failed (CMD5): -110, retrying...
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD5, argument 0x00000000
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req failed (CMD5): -110, retrying...
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD5, argument 0x00000000
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req done (CMD5): -110: 00000000 00000000 00000000 00000000

    mmc1: starting CMD55 arg 00000000 flags 000000f5
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD55, argument 0x00000000
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    mmc1: starting CMD55 arg 00000000 flags 000000f5
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD55, argument 0x00000000
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    mmc1: starting CMD55 arg 00000000 flags 000000f5
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD55, argument 0x00000000
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    mmc1: starting CMD55 arg 00000000 flags 000000f5
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD55, argument 0x00000000
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000

    mmc1: starting CMD1 arg 00000000 flags 000000e1
    mmci-omap-hs mmci-omap-hs.1: mmc1: CMD1, argument 0x00000000
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC
    mmc1: req done (CMD1): -110: 00000000 00000000 00000000 00000000

     mmc out_fail, power off
    mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0 

  • Echo,

    Echo Lee said:
    So does that mean the code below in the “omap_hsmmc.c”( Kernel) need to changed ?

    No, I do not think so. This code works fine on my side (DM8148 EVM with PSP04.04.00.01).

    Are you using EZSDK 5.05.02.00 / PSP 04.04.00.01? Are you using custom board and trying to work with MMC/SD card on MMC1/SD1?

    Regards,
    Pavel

  • So What can be the reason for mmc preoblem.

    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC

     

    And we can boot with mmc1 just 2G, but if I just use as mem, the size can be larger than 2G?

  • Echo,

    Are you using EZSDK 5.05.02.00 / PSP 04.04.00.01? Are you using custom board and trying to work with MMC/SD card on MMC1/SD1? Are you trying to boot from MMC1/SD1?

    Echo Lee said:
    mmci-omap-hs mmci-omap-hs.1: IRQ Status is 38000
    mmci-omap-hs mmci-omap-hs.1: MMC IRQ 0x38000 : ERRI CTO CCRC

    Where you have these messages? In u-boot, during linux kernel boot-up?

    Echo Lee said:
    And we can boot with mmc1 just 2G, but if I just use as mem, the size can be larger than 2G?

    Yes, size can be larger than 2GB for both (boot and memory).

    Check the below two resources, might be in help:

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

    0243.MMC.rtf

    Regards,
    Pavel

  • ,

             Thanks for your quick replay and  continuous concern.

      1.We are using DVRRDK_04.00.00.03, and we use our own board.We want to use eMMC boot mode, but now

          we cann‘t find mmc dev in the kernel yet.

      2.The log message is from kernel, I use mmc debug.

      3.About boot emmc size:In the <TMS320DM814x_sprz343c_errata.pdf>:

         It said that hardware of V3.0 or earlier cann’t use more than 2G, we just V3.0 hard.

         .

    4.I have refered to the mmc.rtf, I config the pin mux: 

  • Echo,

    Echo Lee said:
    We want to use eMMC boot mode

    For eMMC we have size restrictions, see the below e2e threads:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/328658.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/351680.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/273052.aspx

    Best regards,
    Pavel