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.

Dra752 : How to enable full size SD/MMC (mmc3) card slot on Jacinto 6 Rev G board ?

Other Parts Discussed in Thread: DRA752, PCF8575

Hi All,

I have DRA752 ES 1.1 Jacinto 6 Rev G board, below are the board details. I wanted to use the SD/MMC card slot that is present on the middle board, and found that none of the SD/MMC cards are detected from that port when inserted into that slot. I believe its "mmc3" which indicates status as "disabled" in dra7-evm.dts.  Is there any way to enable the Full size SD/MMC (mmc3) card slot on the board ??

U-Boot 2013.04 (Jul 08 2014 - 14:18:21)

CPU  : DRA752 ES1.1
Board: DRA7xx
I2C:   ready
DRAM:  1.5 GiB
WARNING: Caches not enabled
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
In:    serial
Out:   serial
Err:   serial
Net:   cpsw
Hit any key to stop autoboot:  0
mmc0 is current device
SD/MMC found on device 0
reading boot.scr
383 bytes read in 4 ms (92.8 KiB/s)
Running bootscript from mmc0 ...
##

Appreciate your Inputs !


Thanks & Regards,

Skrishna

  • Hello Skrishna,

    The Jacinto 6 EVM use MMC2 for boot purposes. The DIP switch SW5 is also available to control the MMC2_BOOT signal for boot mode configuration.


    You must configure your board's boot switches - SW5 and sysboot switches SW2 and SW3.

    Refer to to the DRA7XX EVM Quick Start Guide for proper configuration of your DIP switch settings -

    http://downloads.ti.com/dsps/dsps_public_sw/glsdk/latest/exports/DRA7xx_EVM_Quick_Start_Guide.pdf

    Best regards,

    Yanko

  • Hello Yanko,

    Thanks a lot for quick response !!

    So we use SD/MMC card slot only for BOOT purposes ?? Can't we use that as MMC storage media when the system has booted  ?

    Thanks in Advance !

    -Skrishna

  • Hello Yanko,

    I am currently booting from microSD which seems to be MMC1 in kernel dts files, and MMC2 to be eMMC:

    File: arch/arm/boot/dts/dra7-evm.dts

    eMMC:

    &mmc2 {
            vmmc-supply = <&vmmc2_fixed>;
            bus-width = <8>;
            ti,non-removable;
    };

    SD/MMC:

    &mmc3 {
            bus-width = <8>;
            ti,non-removable;
            status = "disabled";
    };

    Does this mean SD/MMC card slot is intentionally disabled ?

    Thanks & Regards,

    Skrishna

  • Hello Skrishna,

    #Q1: Can't we use that as MMC storage media when the system has booted?

    - Yes, you can use MMC2 as MMC storage media, when the system has booted.

    For Android kitkat release:

    1|shell@jacinto6evm:/ $ df
    Filesystem               Size     Used     Free   Blksize
    /dev [  795.150451] type=1400 audit(87178.187:4): avc:  denied  { getattr } for  pid=2988 comm="df" name="/" dev="functionfs" ino=3871 scontext=u:r:init_shell:s0 tcontext=u:object_r:unlabeled:s0 tclass=filesystem
                      621.6M   164.0K   621.4M   4096
    /mnt/asec              621.6M     0.0K   621.6M   4096
    /mnt/obb               621.6M     0.0K   621.6M   4096
    /system                495.9M   253.1M   242.9M   4096
    /factory                11.7M    40.0K    11.7M   4096
    /cache                 248.0M   136.0K   247.8M   4096
    /data                    2.7G    57.4M     2.6G   4096
    /mnt/shell/emulated      2.7G    57.4M     2.6G   4096
    /mnt/media_rw/sdcard1: Permission denied
    1|shell@jacinto6evm:/ $

    #Q2: Does this mean SD/MMC card slot is intentionally disabled?

    - vmmc-supply: A regulator for VMMC

    &mmc1 {
        vmmc-supply = <&ldo1_reg>;
        bus-width = <4>;
        cd-gpios = <&gpio6 27 0>;
    };

    &mmc2 {
        vmmc-supply = <&vmmc2_fixed>;
        bus-width = <8>;
        ti,non-removable;
    };

    &mmc3 {
        bus-width = <8>;
        ti,non-removable;
        status = "disabled";
    };

    &mmc4 {
        vmmc-supply = <&vmmcwl_fixed>;
        bus-width = <4>;
        cap-power-off-card;
        keep-power-in-suspend;
        ti,non-removable;
    };

    As you can see from the source above, mmc3 does not have an assigned supply. Therefore MMC3 is disabled. Its data bus are routed on INTERFACE CONN3, in Jacinto 6 EVM.

    The string status = "disabled" is the correct way of disabling nodes in the devicetree. MMC3 is disabled.

    The microSD connector/socket is connected to MMC1.

    MMC2_BOOT SW5.3 Low = Enable MMC2 Interface for eMMC flash boot => the MMC2 is connected to eMMC memory.  

    Best regards,

    Yanko

  • Hello Yanko,

    In android kernel "/mnt/media_rw/sdcard1: Permission denied" is the SD/MMC card or microSD ? Does this full size SD card works on Android kernel on Jacinto6 DRA752 ES 1.1 board?

    Thanks & Regards,

    Srikanth

  • Hello Srikanth,

    I use microSD card. This is the only available socket on Jacinto 6 DRA752 EVM.

    I only demonstrated you, that you can use micro SD card as storage.

    /mnt/media_rw/sdcard1: Permission denied

    See the log, when I put the microSD in socket:

    [  113.650390] mmc0: card e624 removed
    [  114.661041] init: no such service 'fuse_sdcard1'
    [  121.615844] mmc0: host does not support reading read-only switch. assuming write-enable.
    [  121.627960] mmc0: new high speed SD card at address e624
    [  121.634613] mmcblk1: mmc0:e624 SU02G 1.84 GiB
    [  121.648223]  mmcblk1: p1
    [  122.042266] init: no such service 'fuse_sdcard1'
    [  140.134704] mmc0: card e624 removed
    [  141.141571] init: no such service 'fuse_sdcard1'
    [  144.818847] mmc0: host does not support reading read-only switch. assuming write-enable.
    [  144.830902] mmc0: new high speed SD card at address e624
    [  144.838226] mmcblk1: mmc0:e624 SU02G 1.84 GiB
    [  144.851898]  mmcblk1: p1
    [  145.222473] init: no such service 'fuse_sdcard1'

    Go to terminal hit "ls -l /mnt/" command in adb shell if

    127|shell@jacinto6evm:/ # ls -l /mnt/
    drwxr-xr-x root     system            1970-01-01 00:00 asec
    drwx------ media_rw media_rw          1970-01-01 00:00 media_rw
    drwxr-xr-x root     system            1970-01-01 00:00 obb
    lrwxrwxrwx root     root              1970-01-01 00:00 sdcard -> /storage/emulated/legacy
    drwx------ root     root              1970-01-01 00:00 secure
    drwx------ shell    shell             1970-01-01 00:00 shell

    if its of media_rw group then your application does not have permissions to write "/mnt/extsd/". The permission is granted only to the system applications.

    To obtain the information in your storage, I think it is necessary to be installed a file manager for android.

    Best regards,

    Yanko

  • Full size SD/MMC Card slot (not microSD slot) below the display board, where we see can LCD interface cable connected to display PCB.

    Hello Yanko,

    In the above picture you can see the MMC/SD (Full size) slot on the bottom of middle PCB. I was asking about this card slot rather than microSD, which I am already using for booting the board. 

    Appreciate your efforts!

    Thanks,

    Srikanth

  • Hello Srikanth,

    Unfortunately, on my board DRA7xxEVM there is no MMC/SD (Full size) slot. On my board there is only microSD slot.

    You are using JAMR3 board which has  SD/MMC Connector 6 in 1 MMC+, MMCMobile, SD, MMC, miniSD, RS-MMC.

    This board must connect to (EXP P3) INTERFACE CONN3 connector on DRA7xx EVM. This MMC/SD slot is connected to MMC3 module in DRA7xx.


    To use this module you only must enable MMC3 or change the status from disabled to enabled in dra7xx-evm.dts file.

    Best regards,

    Yanko

  • Hello Yanko,

    Thanks for confirmation!

    Do we need to change status = "okay"; or status = "enabled"; ?? Also don't we need voltage supply vmmc-supply & GPIO configuration "cd-gpios" ?

    Can you please provide actual "mmc3" changes in DTS file that you feel should work ?

    Best Regards,

    Srikanth

  • Hello Yanko,

    I tried to change the status to "enabled" and also "okay" in the dra7-evm.dts for mmc3, but did not got the slot working after this change:

    &mmc3 {
            bus-width = <8>;
            ti,non-removable;
            status = "enabled";
    };

    But after this, I could not see any change in behaviour or card detection after inserting SD card in the MMC3 slot.

    I see only MMC1 shown in the rootfs:

    --------------------------------------------------

    /dev/mmcblk0p2 on /media/sd-mmcblk0p2 type ext4 (rw,relatime,data=ordered)
    /dev/mmcblk0p1 on /media/sd-mmcblk0p1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

    --------------------------------------------------

    Thanks,

    Srikanth

  • Srikanth,

    There is no necessary for vmmc-supply. The MMC card slot is supplied on the JAMR3 board.

    At first you must fix a change in dra7.dtsi file.

    See following:

    mmc3: mmc@480ad000 {
    compatible = "ti,omap4-hsmmc";
    reg = <0x480ad000 0x400>;
    interrupts = <0 94 0x4>;
    ti,hwmods = "mmc3";
    clocks = <&mmc3_gfclk_div>, <&mmc3_clk32k>;
    clock-names = "fck", "clk32k";
    ti,needs-special-reset;
    dmas = <&sdma 77>, <&sdma 78>;
    dma-names = "tx", "rx";
    status = "disabled";    // add this row in your dra7.dtsi file
    };

    "ti,hwmods" field is used to fetch the base address and irq resources from TI, omap hwmod data base during device registration. Future plan is to migrate hwmod data base contents into device tree blob so that, all the required data will be used from device tree dts file.

    Example: Step1:

    mmc3: mmc@480ad000 {
                compatible = "ti,omap4-hsmmc";
                reg = <0x480ad000 0x400>;
                interrupts = <0 94 0x4>;
                ti,hwmods = "mmc3";
                ti,needs-special-reset;
                dmas = <&sdma 77>, <&sdma 78>;
                dma-names = "tx", "rx";

                status = "disabled";

            };

    Step 2: board specific .dts file dra7-evm.dts apply following change:

    &mmc3 {
        bus-width = <8>;
        ti,non-removable;
        status = "disabled" "okay";
    }

    See the following patch:

    http://lists.infradead.org/pipermail/linux-arm-kernel/2013-August/195657.html

    Check if the clock signals to MMC3 are available, in file omap_hwmod_7xx_data: -

    static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
        { .role = "clk32k", .clk = "mmc3_clk32k" },
    };

    static struct omap_hwmod dra7xx_mmc3_hwmod = {
        .name        = "mmc3",
        .class        = &dra7xx_mmc_hwmod_class,
        .clkdm_name    = "l4per_clkdm",
        .mpu_irqs    = dra7xx_mmc3_irqs,
        .sdma_reqs    = dra7xx_mmc3_sdma_reqs,
        .main_clk    = "mmc3_gfclk_div",
        .prcm = {
            .omap4 = {
                .clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
                .context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
                .modulemode   = MODULEMODE_SWCTRL,
            },
        },
        .opt_clks    = mmc3_opt_clks,
        .opt_clks_cnt    = ARRAY_SIZE(mmc3_opt_clks),
    };

    Best regards,
    Yanko

  • Hello Yanko,

    The DTS change looks change reasonable, but it has several other dependencies which went in dra7xx-clocks.dtsi  (not present in 3.8 GLSDK kernel) file, and throws the error :

    [root@lenovo linux-ti]$ make -j16 ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage dtbs modules
      CHK     include/generated/uapi/linux/version.h
      DTC     arch/arm/boot/dts/dra7-evm-revE1.dtb
      DTC     arch/arm/boot/dts/dra7-evm.dtb
    ERROR (phandle_references): Reference to non-existent node or label "mmc3_gfclk_div"

    ERROR (phandle_references): Reference to non-existent node or label "mmc3_clk32k"

    ERROR: Input tree has errors, aborting (use -f to force output)
    make[1]: *** [arch/arm/boot/dts/dra7-evm.dtb] Error 2
    make[1]: *** Waiting for unfinished jobs....
    ERROR (phandle_references): Reference to non-existent node or label "mmc3_gfclk_div"

    ERROR (phandle_references): Reference to non-existent node or label "mmc3_clk32k"

    ERROR: Input tree has errors, aborting (use -f to force output)
    make[1]: *** [arch/arm/boot/dts/dra7-evm-revE1.dtb] Error 2
    make: *** [dtbs] Error 2

    The ti-linux-3.12.y changes are significantly different from 3.8-glsdk kernel. Is there any way to fix this ?

    Thanks,

    Srikanth

  • Hello Srikanth,

    It seems that the MMC3 module is not enabled in your GLSDK.

    For this purpose, you must enable MMC3 in u-boot. Apply the following changes In the file ti-glsdk_dra7xx-evm_6_04_00_02/board-support/u-boot/board/ti/dra7xx/ evm.c

     To enable the mmc3 on DRA7xx it must be added

    int board_mmc_init(bd_t *bis)
    {
        omap_mmc_init(0, 0, 0, -1, -1);
        omap_mmc_init(1, 0, 0, -1, -1);

        omap_mmc_init(2, 0, 0, -1, -1);
        return 0;
    }

    Next step is to enable essential clock domains, modules and do some additional special settings needed in file ti-glsdk_dra7xx-evm_6_04_00_02/board-support/u-boot/arch/arm/cpu/armv7/omap5/ hw_data.c. See function void enable_basic_clocks(void).

    Check mux settings in file ti-glsdk_dra7xx-evm_6_04_00_02/board-support/u-boot/board/ti/dra7xx/ mux_data.h

    In the end check the clock configuration in the files u-boot/arch/arm/cpu/armv7/omap5/ -  hw_data.c and prcm_regs.c if clock signals to MMC3 modules are enabled.


    Apply these steps also in your kernel.

    Best regards,

    Yanko

     

  • Hello Yanko,

    With the u-boot changes, I was able to see the MMC2 being show by u-boot:

    U-Boot 2013.04 (Jul 18 2014 - 19:25:27)
                                            
    CPU  : DRA752 ES1.1                     
    Board: DRA7xx
    I2C:   ready
    DRAM:  1.5 GiB
    WARNING: Caches not enabled
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1, OMAP SD/MMC: 2
    In:    serial
    Out:   serial

    For kernel changes, I see there is some more work needed than just enabling the mmc3. What actually needs in kernel apart from enabling in the MMC3 DTS ?

    Thanks & Regards,

    Sriaknth

  • Hello Sriaknth,

    To enable MMC3 in Kernel, you must configure:

    - Power domain for MMC3 - enable power to MMC3 module. MMC3 belongs to PD_L4PER

    - Clock signals for MMC3 - MMC3 belongs to L4_PER1 clock domain. Enable clock signals MMC3_ICLK, MMC3_FCLK MMC3_CLK_32K
    The names of the source signals are - L4PER_L3_GICLK, MMC3_GFCLK, L4PER_32K_GFCLK

    Check the MUXmode settings of the MMC3 pins by the registers:
    CTRL_CORE_PAD_MMC3_CLK    - 0x4A00 377C
    CTRL_CORE_PAD_MMC3_CMD   - 0x4A00 3780
    CTRL_CORE_PAD_MMC3_DAT0  - 0x4A00 3784
    CTRL_CORE_PAD_MMC3_DAT1 -  0x4A00 3788
    CTRL_CORE_PAD_MMC3_DAT2 -  0x4A00 378C
    CTRL_CORE_PAD_MMC3_DAT3 -  0x4A00 3790
    CTRL_CORE_PAD_MMC3_DAT4 -  0x4A00 3794
    CTRL_CORE_PAD_MMC3_DAT5 -  0x4A00 3798
    CTRL_CORE_PAD_MMC3_DAT6  - 0x4A00 379C
    CTRL_CORE_PAD_MMC3_DAT7 -  0x4A00 37A0

    I suggest you following the driver structure of configuration for other MMC modules.  Available in GLSDK.

    Use the information described in DRA7xx TRM.

    Best regards,

    Yanko

  • Hello Yanko,

    I did necessary changes in kernel as mentioned by you and found the following during bootup of kernel, with no device detected in the end !

    [    2.462036] omap_hsmmc 480b4000.mmc: pins are not configured from the driver
    [    2.524536] omap_hsmmc 480ad000.mmc: pins are not configured from the driver
    [    2.567260] mmc0: host does not support reading read-only switch. assuming write-enable.

    I see same message for mmc1 & mmc2, but still they are working as expected.  But MMC3 doesn't seem to function at this stage.

    Any pointers to dig into this ?

    Thanks,

    Srikanth

  • Hello Srikanth,

    In your case, you must configure the proper mode for the MMC3 pins.

    For this purpose you must set the dedicated registers in Control Module:

    CTRL_CORE_PAD_MMC3_CLK[3:0] MMC3_CMD_MUXMODE  - 0x0 mmc3_cmd

    CTRL_CORE_PAD_MMC3_DAT0 to CTRL_CORE_PAD_MMC3_DAT7 [3:0] - 0x0 mmc3_dat

    Add following in your dra7-evm.dts file:

    For example:

    mmc3_pins: pinmux_mmc3_pins {
            pinctrl-single,pins = <
                0x37C 0x60000    /* MMC3_CLK:  MODE0 */
                0x380 0x60003    /* MMC3_CMD: MODE0 */
                0x384 0x60003    /* MMC3_DAT0: MODE0 */
                0x388 0x60003    /* MMC3_DAT1: MODE0 */
                0x38C 0x60003    /* MMC3_DAT2: MODE0 */
                0x390 0x60003    /* MMC3_DAT3: MODE0 */

    :
            ;
        };


    Afterwards, you must configure MMC3 module. Its registers are mapped on MMC3 Base Address - 0x480A D000
    Please, reuse the settings for registers of MMC1 or MMC2.

    You must add 0x480A D000 address in board-support/linux/arch/arm/mach-omap2/mmc.h

    #include <linux/mmc/host.h>
    #include <linux/platform_data/mmc-omap.h>

    #define OMAP24XX_NR_MMC        2
    #define OMAP2420_MMC_SIZE    OMAP1_MMC_SIZE
    #define OMAP2_MMC1_BASE        0x4809c000

    #define OMAP2_MMC3_BASE        0x480AD000

    #define OMAP4_MMC_REG_OFFSET    0x100

    Best regards,

    Yanko

  • Hello Srikanth,

    Do you have any updates about the configuration of MMC3 module?

    Best regards,

    Yanko

  • Hello Yanko,

    I did add the new changes mentioned by you but still no luck. In the first place, I believe MMC3 needs "regulator", because It threw this warning in the beginning :

    [    2.540100] omap_hsmmc 480ad000.mmc: vmmc regulator missing

    So then I tried adding regulator changes, similar to mmc1. The It says:

    omap_hsmmc 480ad000.mmc: pins are not configured from the driver

    Then I added the latest changes of "mmc.h" and pinctrl changes to DTS file as shown below:

    complete patch:

    diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
    index f2a0b15..bc84f26 100755
    --- a/arch/arm/boot/dts/dra7-evm.dts
    +++ b/arch/arm/boot/dts/dra7-evm.dts
    @@ -37,6 +37,13 @@
                    regulator-max-microvolt = <3000000>;
            };
     
    +       vmmc3_fixed: fixedregulator-mmc3 {
    +               compatible = "regulator-fixed";
    +               regulator-name = "vmmc3_fixed";
    +               regulator-min-microvolt = <3000000>;
    +               regulator-max-microvolt = <3000000>;
    +       };
    +
            vmmcwl_fixed: fixedregulator-mmcwl {
                    compatible = "regulator-fixed";
                    regulator-name = "vmmcwl_fixed";
    @@ -539,6 +546,17 @@
                    >;
            };
     
    +       mmc3_pins: pinmux_mmc3_pins {
    +               pinctrl-single,pins = <
    +                       0x37C 0x60000    /* MMC3_CLK:  MODE0 */
    +                       0x380 0x60003    /* MMC3_CMD: MODE0 */
    +                       0x384 0x60003    /* MMC3_DAT0: MODE0 */
    +                       0x388 0x60003    /* MMC3_DAT1: MODE0 */
    +                       0x38C 0x60003    /* MMC3_DAT2: MODE0 */
    +                       0x390 0x60003    /* MMC3_DAT3: MODE0 */
    +               >;
    +       };
    +
     };
     
     &gmac {
    @@ -997,9 +1015,10 @@
     };
     
     &mmc3 {
    +       vmmc-supply = <&vmmc3_fixed>;
            bus-width = <8>;
            ti,non-removable;
    -       status = "disabled";
    +       status = "okay";
     };
     
     &mmc4 {
    diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
    index 6d69d89..9e42423 100644
    --- a/arch/arm/boot/dts/dra7.dtsi
    +++ b/arch/arm/boot/dts/dra7.dtsi
    @@ -126,6 +126,16 @@
                            compatible = "ti,omap-clock";
                    };
     
    +               mmc3_gfclk_div: mmc3_gfclk_div {
    +                       #clock-cells = <0>;
    +                       compatible = "ti,omap-clock";
    +               };
    +
    +               mmc3_clk32k: mmc3_clk32k {
    +                       #clock-cells = <0>;
    +                       compatible = "ti,omap-clock";
    +               };
    +
                    dpll_mpu_ck: dpll_mpu_ck {
                            #clock-cells = <0>;
                            compatible = "ti,omap-clock";
    @@ -770,6 +780,8 @@
                            reg = <0x480ad000 0x400>;
                            interrupts = <0 94 0x4>;
                            ti,hwmods = "mmc3";
    +                       clocks = <&mmc3_gfclk_div>, <&mmc3_clk32k>;
    +                       clock-names = "fck", "clk32k";
                            ti,needs-special-reset;
                            dmas = <&sdma 77>, <&sdma 78>;
                            dma-names = "tx", "rx";
    diff --git a/arch/arm/mach-omap2/mmc.h b/arch/arm/mach-omap2/mmc.h
    index 0cd4b08..8f7a257 100644
    --- a/arch/arm/mach-omap2/mmc.h
    +++ b/arch/arm/mach-omap2/mmc.h
    @@ -4,7 +4,7 @@
     #define OMAP24XX_NR_MMC                2
     #define OMAP2420_MMC_SIZE      OMAP1_MMC_SIZE
     #define OMAP2_MMC1_BASE                0x4809c000
    -
    +#define OMAP2_MMC3_BASE         0x480AD000
     #define OMAP4_MMC_REG_OFFSET   0x100
     
     #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
    diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    index 9dae2ab..672eff5 100644
    --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    @@ -2117,8 +2117,8 @@ static struct omap_hwmod_irq_info dra7xx_mmc3_irqs[] = {
     };
     
     static struct omap_hwmod_dma_info dra7xx_mmc3_sdma_reqs[] = {
    -       { .name = "77", .dma_req = 76 + DRA7XX_DMA_REQ_START },
    -       { .name = "78", .dma_req = 77 + DRA7XX_DMA_REQ_START },
    +       { .name = "tx", .dma_req = 76 + DRA7XX_DMA_REQ_START },
    +       { .name = "rx", .dma_req = 77 + DRA7XX_DMA_REQ_START },
            { .dma_req = -1 }
     };

    I could not get other changes from TRM for control PAD settings, since I have TRM for ES 1.0 and not ES 1.1.

    With above patch, I see the same status as previous:

    root@dra7xx-evm:~# dmesg | grep -i 480ad000
    [    2.540527] omap_hsmmc 480ad000.mmc: pins are not configured from the driver
    root@dra7xx-evm:~#

    Can you please confirm, If any of the above changes in patch are irrelevant or needs modification ?

    Thanks in Advance !

    Best Regards,

    Srikanth

     

  • The "tx" & "rx" DMA name changes were required to overcome this warning :

    +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    @@ -2117,8 +2117,8 @@ static struct omap_hwmod_irq_info dra7xx_mmc3_irqs[] = {
     };
     
     static struct omap_hwmod_dma_info dra7xx_mmc3_sdma_reqs[] = {
    -       { .name = "77", .dma_req = 76 + DRA7XX_DMA_REQ_START },
    -       { .name = "78", .dma_req = 77 + DRA7XX_DMA_REQ_START },
    +       { .name = "tx", .dma_req = 76 + DRA7XX_DMA_REQ_START },
    +       { .name = "rx", .dma_req = 77 + DRA7XX_DMA_REQ_START },
            { .dma_req = -1 }
     };

    root@dra7xx-evm:~# dmesg | grep -i 480ad000
    [    2.508087] omap_hsmmc 480ad000.mmc: cannot get DMA TX channel
    root@dra7xx-evm:~#

    Thanks,

    Srikanth

  • Hello Srikanth,

    I would like to notice that mmc3 module on the VAYU EVM board does not have power supply.

    As I already said, MMC3 signals are available on INTERFACE CONN3 EXP_P3 on VAYU board. See the VAYU EVM schematic.

    You must enable MMC3 module with registers: CM_L4PER_MMC3_CLKCTRL[1:0] MODULEMODE and PM_L4PER_PWRSTCTRL[1:0] POWERSTATE  - 0x3: ON State

    See the patch - http://lists.infradead.org/pipermail/linux-arm-kernel/2010-July/021143.html

    Best regards,

    Yanko

  • Hello Yanko,

    With respect to following changes that you propose :

    You must enable MMC3 module with registers: CM_L4PER_MMC3_CLKCTRL[1:0] MODULEMODE and PM_L4PER_PWRSTCTRL[1:0] POWERSTATE  - 0x3: ON State

    Which file should I look into ??

    Thanks & Regards,

    Srikanth

  • Hello Srikanth,

    I checked for settings on this registers in the actual Linux drivers for Jacinto 6. It seems that it is set correctly. You can see in arch/arm/mach-omap2/cclock7xx_data.c and arch/arm/mach-omap2/omap_hwmod_7xx_data.c

    /* mmc3 */
    static struct omap_hwmod_irq_info dra7xx_mmc3_irqs[] = {
        { .irq = 94 + DRA7XX_IRQ_GIC_START },
        { .irq = -1 }
    };

    static struct omap_hwmod_dma_info dra7xx_mmc3_sdma_reqs[] = {
        { .name = "77", .dma_req = 76 + DRA7XX_DMA_REQ_START },
        { .name = "78", .dma_req = 77 + DRA7XX_DMA_REQ_START },
        { .dma_req = -1 }
    };

    static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
        { .role = "clk32k", .clk = "mmc3_clk32k" },
    };

    static struct omap_hwmod dra7xx_mmc3_hwmod = {
        .name        = "mmc3",
        .class        = &dra7xx_mmc_hwmod_class,
        .clkdm_name    = "l4per_clkdm",
        .mpu_irqs    = dra7xx_mmc3_irqs,
        .sdma_reqs    = dra7xx_mmc3_sdma_reqs,
        .main_clk    = "mmc3_gfclk_div",
        .prcm = {
            .omap4 = {
                .clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
                .context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
                .modulemode   = MODULEMODE_SWCTRL,     - CM_L4PER_MMC3_CLKCTRL[1:0] MODULEMODE
            },
        },
        .opt_clks    = mmc3_opt_clks,
        .opt_clks_cnt    = ARRAY_SIZE(mmc3_opt_clks),
    };

    Your issues with MMC3 configuration are due to the MMC3 module is not set in this file:

    /board-support/linux/arch/arm/mach-omap2/hsmmc.c

    Add the MMC3 in omap_hsmmc_mux function:

    static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
                int controller_nr)
    {
        if (gpio_is_valid(mmc_controller->slots[0].switch_pin) &&
            (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
            omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
                        OMAP_PIN_INPUT_PULLUP);
        if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) &&
            (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
            omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
                        OMAP_PIN_INPUT_PULLUP);
        if (cpu_is_omap34xx()) {
            if (controller_nr == 0) {
                omap_mux_init_signal("sdmmc1_clk",
                    OMAP_PIN_INPUT_PULLUP);
                omap_mux_init_signal("sdmmc1_cmd",
                    OMAP_PIN_INPUT_PULLUP);
                omap_mux_init_signal("sdmmc1_dat0",
                    OMAP_PIN_INPUT_PULLUP);
                if (mmc_controller->slots[0].caps &
                    (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
                    omap_mux_init_signal("sdmmc1_dat1",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc1_dat2",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc1_dat3",
                        OMAP_PIN_INPUT_PULLUP);
                }
                if (mmc_controller->slots[0].caps &
                            MMC_CAP_8_BIT_DATA) {
                    omap_mux_init_signal("sdmmc1_dat4",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc1_dat5",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc1_dat6",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc1_dat7",
                        OMAP_PIN_INPUT_PULLUP);
                }
            }
            if (controller_nr == 1) {
                /* MMC2 */
                omap_mux_init_signal("sdmmc2_clk",
                    OMAP_PIN_INPUT_PULLUP);
                omap_mux_init_signal("sdmmc2_cmd",
                    OMAP_PIN_INPUT_PULLUP);
                omap_mux_init_signal("sdmmc2_dat0",
                    OMAP_PIN_INPUT_PULLUP);

                /*
                 * For 8 wire configurations, Lines DAT4, 5, 6 and 7
                 * need to be muxed in the board-*.c files
                 */
                if (mmc_controller->slots[0].caps &
                    (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
                    omap_mux_init_signal("sdmmc2_dat1",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc2_dat2",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc2_dat3",
                        OMAP_PIN_INPUT_PULLUP);
                }
                if (mmc_controller->slots[0].caps &
                                MMC_CAP_8_BIT_DATA) {
                    omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7",
                        OMAP_PIN_INPUT_PULLUP);
                }
            }

            /*
             * For MMC3 the pins need to be muxed in the board-*.c files
             */
        }
    }

    Check the MMC3 configurations in

    ti-glsdk_dra7xx-evm_6_04_00_02/board-support/linux/drivers/mmc/host /omap_hsmmc.c

    /*
     * One controller can have multiple slots, like on some omap boards using
     * omap.c controller driver. Luckily this is not currently done on any known
     * omap_hsmmc.c device.
     */
    #define mmc_slot(host)        (host->pdata->slots[host->slot_id])

    Best regards,

    Yanko

  • Hi Yanko,

    The MMC1 & MMC2 pinmux changes are intended for omap34xx cpu:

    static inline void omap_hsmmc_mux (

    ...

    if (cpu_is_omap34xx()) {
                    if (controller_nr == 0) {

    I tried adding dra7_soc to the condition and added MMC3 configurations. But that didn't help.

    Also I noted in :

    static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
                                            struct omap_mmc_platform_data *mmc)
    {
    ...

    mmc->slots[0].name = hc_name;
            mmc->nr_slots = 1;
            mmc->slots[0].caps = c->caps;
            mmc->slots[0].pm_caps = c->pm_caps;

    Do we need to update the number of slots supported from 1 to 2 ? Does that help ?

    Any pointers are appreciated ?

    Thanks in Advance!

    -Srikanth

  • Srikanth,

    You must not change this if condition - you only must add MMC3 configuration below the comment 

             * For MMC3 the pins need to be muxed in the board-*.c files

    if (controller_nr == 2) {
                /* MMC3 */
                omap_mux_init_signal("sdmmc3_clk",
                    OMAP_PIN_INPUT_PULLUP);
                omap_mux_init_signal("sdmmc3_cmd",
                    OMAP_PIN_INPUT_PULLUP);
                omap_mux_init_signal("sdmmc3_dat0",
                    OMAP_PIN_INPUT_PULLUP);

                /*
                 * For 8 wire configurations, Lines DAT4, 5, 6 and 7
                 * need to be muxed in the board-*.c files  - in your case dra7-evm.dts
                 */
                if (mmc_controller->slots[0].caps &
                    (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
                    omap_mux_init_signal("sdmmc3_dat1",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc3_dat2",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc3_dat3",
                        OMAP_PIN_INPUT_PULLUP);
                }
                if (mmc_controller->slots[0].caps &
                                MMC_CAP_8_BIT_DATA) {
                    omap_mux_init_signal("sdmmc3_dat4.sdmmc3_dat4",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc3_dat5.sdmmc3_dat5",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc3_dat6.sdmmc3_dat6",
                        OMAP_PIN_INPUT_PULLUP);
                    omap_mux_init_signal("sdmmc3_dat7.sdmmc3_dat7",
                        OMAP_PIN_INPUT_PULLUP);
                }
            }

    You only must enable MMC3 module in dra7-evm.dts

    &mmc3 {
        bus-width = <8>;
        ti,non-removable;
        status = "disabled";
    };

    Best regards,

    Yanko

  • Hello Yanko,

    This is what i have prepared a patch, before your comment, but it still didn't work. Without regulator changes it always throws message "missing regulator".

    diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
    index f2a0b15..3102856 100755
    --- a/arch/arm/boot/dts/dra7-evm.dts
    +++ b/arch/arm/boot/dts/dra7-evm.dts
    @@ -37,6 +37,13 @@
                    regulator-max-microvolt = <3000000>;
            };
     
    +       vmmc3_fixed: fixedregulator-mmc3 {
    +               compatible = "regulator-fixed";
    +               regulator-name = "vmmc3_fixed";
    +               regulator-min-microvolt = <1800000>;
    +               regulator-max-microvolt = <1800000>;
    +       };
    +
            vmmcwl_fixed: fixedregulator-mmcwl {
                    compatible = "regulator-fixed";
                    regulator-name = "vmmcwl_fixed";
    @@ -538,6 +545,16 @@
                            0x026C   0x0004000E     /* GPIO6_27: MODE14 | INPUTENABLE */
                    >;
            };
    +       mmc3_pins: pinmux_mmc3_pins {
    +               pinctrl-single,pins = <
    +                       0x37C 0x60000    /* MMC3_CLK:  MODE0 */
    +                       0x380 0x60003    /* MMC3_CMD: MODE0 */
    +                       0x384 0x60003    /* MMC3_DAT0: MODE0 */
    +                       0x388 0x60003    /* MMC3_DAT1: MODE0 */
    +                       0x38C 0x60003    /* MMC3_DAT2: MODE0 */
    +                       0x390 0x60003    /* MMC3_DAT3: MODE0 */
    +               >;
    +       };
     
     };
     
    @@ -997,9 +1014,10 @@
     };
     
     &mmc3 {
    +       vmmc-supply = <&vmmc3_fixed>;
            bus-width = <8>;
            ti,non-removable;
    -       status = "disabled";
    +       status = "okay";
     };
     
     &mmc4 {
    diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
    index 4a96433..48f89b6 100644
    --- a/arch/arm/mach-omap2/hsmmc.c
    +++ b/arch/arm/mach-omap2/hsmmc.c
    @@ -291,6 +291,40 @@ static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
                    /*
                     * For MMC3 the pins need to be muxed in the board-*.c files
                     */
    +               if (controller_nr == 2) {
    +                       /* MMC3 */
    +                       omap_mux_init_signal("sdmmc3_clk",
    +                               OMAP_PIN_INPUT_PULLUP);
    +                       omap_mux_init_signal("sdmmc3_cmd",
    +                               OMAP_PIN_INPUT_PULLUP);
    +                       omap_mux_init_signal("sdmmc3_dat0",
    +                               OMAP_PIN_INPUT_PULLUP);
    +
    +                       /*
    +                        * For 8 wire configurations, Lines DAT4, 5, 6 and 7
    +                        * need to be muxed in the board-*.c files
    +                        */
    +                       if (mmc_controller->slots[0].caps &
    +                               (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
    +                               omap_mux_init_signal("sdmmc3_dat1",
    +                                       OMAP_PIN_INPUT_PULLUP);
    +                               omap_mux_init_signal("sdmmc3_dat2",
    +                                       OMAP_PIN_INPUT_PULLUP);
    +                               omap_mux_init_signal("sdmmc3_dat3",
    +                                       OMAP_PIN_INPUT_PULLUP);
    +                       }
    +                       if (mmc_controller->slots[0].caps &
    +                                                       MMC_CAP_8_BIT_DATA) {
    +                               omap_mux_init_signal("sdmmc3_dat4.sdmmc3_dat4",
    +                                       OMAP_PIN_INPUT_PULLUP);
    +                               omap_mux_init_signal("sdmmc3_dat5.sdmmc3_dat5",
    +                                       OMAP_PIN_INPUT_PULLUP);
    +                               omap_mux_init_signal("sdmmc3_dat6.sdmmc3_dat6",
    +                                       OMAP_PIN_INPUT_PULLUP);
    +                               omap_mux_init_signal("sdmmc3_dat7.sdmmc3_dat7",
    +                                       OMAP_PIN_INPUT_PULLUP);
    +                       }
    +               }
            }
     }
     
    diff --git a/arch/arm/mach-omap2/mmc.h b/arch/arm/mach-omap2/mmc.h
    index 0cd4b08..e3cafd4 100644
    --- a/arch/arm/mach-omap2/mmc.h
    +++ b/arch/arm/mach-omap2/mmc.h
    @@ -4,6 +4,7 @@
     #define OMAP24XX_NR_MMC                2
     #define OMAP2420_MMC_SIZE      OMAP1_MMC_SIZE
     #define OMAP2_MMC1_BASE                0x4809c000
    +#define OMAP2_MMC3_BASE         0x480AD000
     
     #define OMAP4_MMC_REG_OFFSET   0x100
     
    diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    index 9dae2ab..672eff5 100644
    --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    @@ -2117,8 +2117,8 @@ static struct omap_hwmod_irq_info dra7xx_mmc3_irqs[] = {
     };
     
     static struct omap_hwmod_dma_info dra7xx_mmc3_sdma_reqs[] = {
    -       { .name = "77", .dma_req = 76 + DRA7XX_DMA_REQ_START },
    -       { .name = "78", .dma_req = 77 + DRA7XX_DMA_REQ_START },
    +       { .name = "tx", .dma_req = 76 + DRA7XX_DMA_REQ_START },
    +       { .name = "rx", .dma_req = 77 + DRA7XX_DMA_REQ_START },
            { .dma_req = -1 }
     };
     
    Does it still looks valid ?

    Thanks for your patience.

    -Srikanth

  • Hi Yanko,

    With all above changes in kernel, the output looks like this:

    root@dra7xx-evm:~# dmesg | grep -i mmc
    [    0.354278] vmmc2_fixed: 3000 mV
    [    0.354583] vmmcwl_fixed: 1800 mV
    [    2.369659] (stk) : st_kim_start<4>[    2.373474] omap_hsmmc 4809c000.mmc: pins are not configured from the driver
    [    2.437805] omap_hsmmc 480b4000.mmc: pins are not configured from the driver
    [    2.507019] omap_hsmmc 480ad000.mmc: vmmc regulator missing
    [    2.542205] mmc0: host does not support reading read-only switch. assuming write-enable.
    [    2.546661] mmc0: new high speed SD card at address e624
    [    2.557342] omap_hsmmc 480d1000.mmc: pins are not configured from the driver
    [    2.564819] mmcblk0: mmc0:e624 SU02G 1.84 GiB
    [    2.571105]  mmcblk0: p1 p2
    [    2.622528] mmc1: BKOPS_EN bit is not set
    [    2.630065] mmc1: new high speed DDR MMC card at address 0001
    [    2.636566] mmcblk1: mmc1:0001 MMC08G 7.25 GiB
    [    2.641510] mmcblk1boot0: mmc1:0001 MMC08G partition 1 8.00 MiB
    [    2.647949] mmcblk1boot1: mmc1:0001 MMC08G partition 2 8.00 MiB
    [    2.654876]  mmcblk1: unknown partition table
    [    2.660644]  mmcblk1boot1: unknown partition table
    [    2.666625]  mmcblk1boot0: unknown partition table
    [    8.639801] EXT4-fs (mmcblk0p2): recovery complete
    [    8.647857] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    root@dra7xx-evm:~#

    There is no trace of mmc3 in the kernel logs.

    Thanks,

    Srikanth

  • Hello Srikanth,

    The applied changes in your driver for configuring MMC3 modules seems OK. However, I think that the problem with vmmc regulator is due to MMC3 does not use the internal mmc power regulator.

    I found a patch, which concerns this part. Apply the following changes in omap_hsmmc.c

    *    304
        305    »    * If we don't see a Vcc regulator, assume it's a fixed    »    * If we don't see a Vcc regulator, assume it's a fixed
        306    »    * voltage always-on regulator.    »    * voltage always-on regulator.    306
        307    »    */    »    */    307
        308    »    if (!host->vcc)    »    if (!host->vcc)    308
        309    »    »    return 0;    »    »    return 0;    309
        310            310
                »    /*    311
                »    * With DT, never turn OFF the regulator. This is because    312
                »    * the pbias cell programming support is still missing when    313
                »    * booting with Device tree    314
                »    * To support slots which are not affected by the above missing    315
                »    * functionally, power down if MMC_CAP_POWER_OFF_CARD is set.    316
                »    */    317
                »    if (dev->of_node && !vdd_iopower &&    318
                »    »    »    !(host->mmc->caps & MMC_CAP_POWER_OFF_CARD))    319
                »    »    return 0;    320

    Refer to the patch: http://review.omapzoom.org/#/c/35295/3/drivers/mmc/host/omap_hsmmc.c

    Best regards,

    Yanko

  • Hello Yanko,

    I am using GLSDK-6.04.00.02, and I see the patch change is already integrated :

            /*
             * With DT, never turn OFF the regulator. This is because
             * the pbias cell programming support is still missing when
             * booting with Device tree
             * To support slots which are not affected by the above missing
             * functionally, power down if MMC_CAP_POWER_OFF_CARD is set.
             */
            if (dev->of_node && !vdd && !(host->mmc->caps & MMC_CAP_POWER_OFF_CARD))
                    return 0;

    Do we something else ?

    Thanks & Regards,

    Srikanth

  • Hello Yanko,

    If I make the following changes to file:

     static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
    -                                  int vdd)
    +                                  int vdd_iopower)
     {
            struct omap_hsmmc_host *host =
                    platform_get_drvdata(to_platform_device(dev));
    @@ -261,11 +261,11 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
             * To support slots which are not affected by the above missing
             * functionally, power down if MMC_CAP_POWER_OFF_CARD is set.
             */
    -       if (dev->of_node && !vdd && !(host->mmc->caps & MMC_CAP_POWER_OFF_CARD))
    +       if (dev->of_node && ! vdd_iopower && !(host->mmc->caps & MMC_CAP_POWER_OFF_CARD))
                    return 0;
     
            if (mmc_slot(host).before_set_reg)
    -               mmc_slot(host).before_set_reg(dev, slot, power_on, vdd);
    +               mmc_slot(host).before_set_reg(dev, slot, power_on, vdd_iopower);
     
            /*
             * Assume Vcc regulator is used only to power the card ... OMAP
    @@ -281,7 +281,7 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
             * chips/cards need an interface voltage rail too.
             */
            if (power_on) {
    -               ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd);
    +               ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd_iopower);
                    /* Enable interface voltage rail, if needed */
                    if (ret == 0 && host->vcc_aux) {
                            ret = regulator_enable(host->vcc_aux);
    @@ -301,7 +301,7 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
            }
     
            if (mmc_slot(host).after_set_reg)
    -               mmc_slot(host).after_set_reg(dev, slot, power_on, vdd);
    +               mmc_slot(host).after_set_reg(dev, slot, power_on, vdd_iopower);

    I see the following at the kernel boot :

    root@dra7xx-evm:~# dmesg | grep mmc
    [    0.353271] vmmc2_fixed: 3000 mV
    [    0.354248] vmmcwl_fixed: 1800 mV
    [    2.364593] (stk) : st_kim_start<4>[    2.368469] omap_hsmmc 4809c000.mmc: pins are not configured from the driver
    [    2.437774] omap_hsmmc 480b4000.mmc: pins are not configured from the driver
    [    2.506958] omap_hsmmc 480ad000.mmc: pins are not configured from the driver
    [    2.534240] mmc0: host does not support reading read-only switch. assuming write-enable.
    [    2.547271] mmc0: new high speed SD card at address e624
    [    2.553283] mmcblk0: mmc0:e624 SU02G 1.84 GiB
    [    2.559448]  mmcblk0: p1 p2
    [    2.606811] mmc1: BKOPS_EN bit is not set
    [    2.614349] mmc1: new high speed DDR MMC card at address 0001
    [    2.620788] mmcblk1: mmc1:0001 MMC08G 7.25 GiB
    [    2.624572] omap_hsmmc 480d1000.mmc: pins are not configured from the driver
    [    2.648437] mmcblk1boot0: mmc1:0001 MMC08G partition 1 8.00 MiB
    [    2.654815] mmcblk1boot1: mmc1:0001 MMC08G partition 2 8.00 MiB
    [    2.661773]  mmcblk1: unknown partition table
    [    2.667327]  mmcblk1boot1: unknown partition table
    [    2.697692]  mmcblk1boot0: unknown partition table
    [    8.802520] EXT4-fs (mmcblk0p2): recovery complete
    [    8.807830] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    root@dra7xx-evm:~#

    But mmc3 never comes up.

    There is certainly something else, that we are missing.

    Regards,

    Srikanth

  • Srikanth,

    I suggest to apply following change:

     &mmc3 {
    +       vmmc-supply = <&vmmc3_fixed>;
            bus-width = <8>;
            ti,non-removable;
    -       status = "disabled";
    +       status = "okay";
             pinctrl-names = "default";
             pinctrl-0 = <&pinmux_mmc3_pins>;
     };

    Regards,
    Yanko
  • Hello Yanko,

    Added the following change to dra7-evm.dts:

    &mmc3 {
            bus-width = <8>;
    +       pinctrl-names = "default";
    +       pinctrl-0 = <&mmc3_pins>;
            ti,non-removable;
            status = "okay";
    };

    There seems to be some impact with this change :

    root@dra7xx-evm:~# dmesg | grep -i ad000
    [    2.523162] omap_hsmmc 480ad000.mmc: vmmc regulator missing

    Not sure how it requests for regulator, since without pintctrl addition to mmc3 it was saying pins are not configured from driver.

    Regards,

    Srikanth

  • Hello Yanko,

    To test further with trail method, I added vmmcwl_fixed with removing gpio changes:

    +++ b/arch/arm/boot/dts/dra7-evm.dts
    @@ -42,7 +42,6 @@
                    regulator-name = "vmmcwl_fixed";
                    regulator-min-microvolt = <1800000>;
                    regulator-max-microvolt = <1800000>;
    -               gpio = <&gpio5 8 0>;    /* gpio5_8 */
                    startup-delay-us = <70000>;
                    enable-active-high;
            };
    @@ -1007,6 +1006,7 @@
     };
     
     &mmc3 {
    +       vmmc-supply = <&vmmcwl_fixed>;
            pinctrl-names = "default";

    The message seems to be more interesting :

    root@dra7xx-evm:~# dmesg | grep ad000
    [    2.514892] pinctrl-single 4a003400.pinmux: request pin 223 (4a00377c) for 480ad000.mmc
    [    2.514923] pinctrl-single 4a003400.pinmux: pin 4a00377c already requested by 489b0000.vip; cannot claim for 480ad000.mmc
    [    2.540618] pinctrl-single 4a003400.pinmux: pin-223 (480ad000.mmc) status -22
    [    2.564880] omap_hsmmc 480ad000.mmc: pins are not configured from the driver
    root@dra7xx-evm:~#

    I think we need to fix the pinctrl changes.

    Thanks,

    Srikanth

  • Hello Yanko,

    After trying to forcefully enable in dra7-evm.dts:

                    &bt_uart3_pins
                    &wl_pins
                    &wlirq_pins
                    &radio_pins
         +          &mmc3_pins
            >;

    I see lot more messages:

    root@dra7xx-evm:~# dmesg | grep -i mmc3
    [    0.290100] pinctrl-single 4a003400.pinmux: found group selector 13 for pinmux_mmc3_pins
    [    0.291229] pinctrl-single 4a003400.pinmux: enabling pinmux_mmc3_pins function13
    [    2.530303] pinctrl-single 4a003400.pinmux: found group selector 13 for pinmux_mmc3_pins
    [    2.530426] pinctrl-single 4a003400.pinmux: enabling pinmux_mmc3_pins function13
    root@dra7xx-evm:~# dmesg | grep -i ad000
    [    2.530334] pinctrl-single 4a003400.pinmux: request pin 223 (4a00377c) for 480ad000.mmc
    [    2.530334] pinctrl-single 4a003400.pinmux: request pin 224 (4a003780) for 480ad000.mmc
    [    2.530334] pinctrl-single 4a003400.pinmux: request pin 225 (4a003784) for 480ad000.mmc
    [    2.530364] pinctrl-single 4a003400.pinmux: request pin 226 (4a003788) for 480ad000.mmc
    [    2.530364] pinctrl-single 4a003400.pinmux: request pin 227 (4a00378c) for 480ad000.mmc
    [    2.530426] pinctrl-single 4a003400.pinmux: request pin 228 (4a003790) for 480ad000.mmc
    root@dra7xx-evm:~#

    Is it going in right direction ??

    Although, I still see one conflict  with pin 228:

    [    0.289398] pinctrl core: registered pin 228 (4a003790) on pinctrl-single
    [    0.291198] pinctrl-single 4a003400.pinmux: request pin 228 (4a003790) for 4a003400.pinmux
    [    0.322845] gpiochip_add: registered GPIOs 496 to 511 on device: pcf8575
    [    0.322875] pcf857x 0-0020: probed
    [    0.601348] pinctrl-single 4a003400.pinmux: request pin 228 (4a003790) for 489b0000.vip
    [    0.601379] pinctrl-single 4a003400.pinmux: pin-228 (489b0000.vip) status -22
    [    0.601379] pinctrl-single 4a003400.pinmux: could not request pin 228 on device pinctrl-single
    [    2.530426] pinctrl-single 4a003400.pinmux: request pin 228 (4a003790) for 480ad000.mmc

    Regards,

    Srikanth

  • Hello Srikanth,


    Do you use OMAPCONF tool - https://github.com/omapconf/omapconf/wiki

    I suggest you to check PRCM registers for MMC3 module:

    CM_L4PER_MMC3_CLKCTRL[1:0] MODULEMODE - 0x2: Module is explicitly enabled.
    CM_L4PER_CLKSTCTRL[1:0] CLKTRCTRL - 0x2: SW_WKUP
    CM_L4PER_CLKSTCTRL[22] CLKACTIVITY_MMC3_GFCLK - This field indicates the state of the MMC3_GFCLK clock

    If these registers are not configured appropriately, the MMC3 module not be active.

    As I already noticed you, it is mandatory to configure the muxmode options for MMC3 pads:

    CTRL_CORE_PAD_MMC3_CLK[3:0] MMC3_CLK_MUXMODE  - 0x0: mmc3_clk  - MMC3
                                                                                                                          0x3: usb3_ulpi_d5
                                                                                                                          0x4: vin2b_d7 
                                                                                                                          0x9: vin5a_d7 - disable vin5a in dra7-evm.dts
                                                                                                                          0xA: ehrpwm2_tripzone_input
                                                                                                                          0xE: gpio6_29
                                                                                                                          0xF: Driver off

    CTRL_CORE_PAD_MMC3_CMD[3:0] MMC3_CMD_MUXMODE - 0x0: mmc3_cmd
                                                                                                                            0x1: spi3_sclk
                                                                                                                            0x3: usb3_ulpi_d4
                                                                                                                            0x4: vin2b_d6
                                                                                                                            0x9: vin5a_d6 - disable vin5a in dra7-evm.dts
                                                                                                                            0xA: eCAP2_in_PWM2_out
                                                                                                                            0xE: gpio6_30
                                                                                                                            0xF: Driver off
    Apply these changes for all MMC3 pad configuration registers.

    Best regards,

    Yanko

  • Hello Yanko,

    I tried running this tool :

    root@dra7xx-evm:~# omapconf --cpuinfo
    cpu_is_omap(): CONFIG_SOC_BUS not enabled in kernel!
    Assuming cpu is OMAP(legacy kernel)
    OMAPCONF (rev v1.69-39-g104a397 built Wed Aug 13 20:40:03 IST 2014)

    HW Platform:
      Jacinto6 evm board
      DRA75X ES1.1 GP Device (STANDARD performance (1.0GHz))
        DIE ID: 66320121-3FBA0201-0146D750-1001200C
      TPS659038  ES2.0

    omapconf: powerdm_deinit(): cpu not supported!!!
    omapconf: clockdm_deinit(): cpu not supported!!!
    root@dra7xx-evm:~#

    Is there any other method of applying the changes you mentioned ? I mean in dts file ?

    Thanks,

    Srikanth

  • Hello Yanko,

    here is the PRCM for MMC3:

    root@dra7xx-evm:~# omapconf dump prcm | grep -i MMC3
    cpu_is_omap(): CONFIG_SOC_BUS not enabled in kernel!
    Assuming cpu is OMAP(legacy kernel)
    | PM_L4PER_MMC3_WKDEP         | 0x4AE07520   | 0x00000000 |
    | RM_L4PER_MMC3_CONTEXT       | 0x4AE07524   | 0x00000000 |
    | CM_L4PER_MMC3_CLKCTRL       | 0x4A009820   | 0x00030000 |
    omapconf: powerdm_deinit(): cpu not supported!!!
    omapconf: clockdm_deinit(): cpu not supported!!!
    root@dra7xx-evm:~#

    -Srikanth

  • Hello Yanko,

    Where do you read these changes from :

    CTRL_CORE_PAD_MMC3_CLK[3:0] MMC3_CLK_MUXMODE  - 0x0: mmc3_clk  - MMC3
                                                                                                                          0x3: usb3_ulpi_d5
                                                                                                                          0x4: vin2b_d7 
                                                                                                                          0x9: vin5a_d7 - disable vin5a in dra7-evm.dts
                                                                                                                          0xA: ehrpwm2_tripzone_input
                                                                                                                          0xE: gpio6_29
                                                                                                                          0xF: Driver off

    CTRL_CORE_PAD_MMC3_CMD[3:0] MMC3_CMD_MUXMODE - 0x0: mmc3_cmd
                                                                                                                            0x1: spi3_sclk
                                                                                                                            0x3: usb3_ulpi_d4
                                                                                                                            0x4: vin2b_d6
                                                                                                                            0x9: vin5a_d6 - disable vin5a in dra7-evm.dts
                                                                                                                            0xA: eCAP2_in_PWM2_out
                                                                                                                            0xE: gpio6_30
                                                                                                                            0xF: Driver off

    I tried disabling vin5 from dra7-evm.dts and found this :

    root@dra7xx-evm:~# dmesg | grep -i mmc
    [    0.289703] pinctrl-single 4a003400.pinmux: found group selector 13 for pinmux_mmc3_pins
    [    0.290802] pinctrl-single 4a003400.pinmux: enabling pinmux_mmc3_pins function13
    [    0.354797] vmmc2_fixed: 3000 mV
    [    0.355102] vmmcwl_fixed: 1800 mV
    [    2.356323] omap_hsmmc 4809c000.mmc: pins are not configured from the driver
    [    2.422027] omap_hsmmc 480b4000.mmc: pins are not configured from the driver
    [    2.491302] pinctrl-single 4a003400.pinmux: found group selector 13 for pinmux_mmc3_pins
    [    2.491333] pinctrl-single 4a003400.pinmux: request pin 223 (4a00377c) for 480ad000.mmc
    [    2.491333] pinctrl-single 4a003400.pinmux: pin 4a00377c already requested by 4a003400.pinmux; cannot claim for 480ad000.mmc
    [    2.503204] pinctrl-single 4a003400.pinmux: pin-223 (480ad000.mmc) status -22
    [    2.519866] pinctrl-single 4a003400.pinmux: ignoring disable for pinmux_mmc3_pins function13
    [    2.519866] omap_hsmmc 480ad000.mmc: pins are not configured from the driver
    [    2.526397] mmc0: host does not support reading read-only switch. assuming write-enable.
    [    2.530853] mmc0: new high speed SD card at address e624
    [    2.541717] mmcblk0: mmc0:e624 SU02G 1.84 GiB
    [    2.547912]  mmcblk0: p1 p2
    [    2.598907] mmc1: BKOPS_EN bit is not set
    [    2.606445] mmc1: new high speed DDR MMC card at address 0001
    [    2.612915] mmcblk1: mmc1:0001 MMC08G 7.25 GiB
    [    2.617858] mmcblk1boot0: mmc1:0001 MMC08G partition 1 8.00 MiB
    [    2.624298] mmcblk1boot1: mmc1:0001 MMC08G partition 2 8.00 MiB
    [    2.631256]  mmcblk1: unknown partition table
    [    2.636993]  mmcblk1boot1: unknown partition table
    [    2.642974]  mmcblk1boot0: unknown partition table
    [    2.670989] omap_hsmmc 480d1000.mmc: pins are not configured from the driver
    [    8.751159] EXT4-fs (mmcblk0p2): recovery complete
    [    8.756195] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    root@dra7xx-evm:~#

    Regards,

    Srikanth

  • Hello Yanko,

    I tried enabling MMC Debug to see If it ever reaches till mmc3 & here is what I see:

    root@dra7-evm$ dmesg | grep -i ad000 
    [    2.562988] omap_hsmmc 480ad000.mmc: context was not lost
    [    2.563018] omap_hsmmc 480ad000.mmc: enabled
    [    2.578704] pinctrl-single 4a003400.pinmux: request pin 223 (4a00377c) for 480ad000.mmc
    [    2.578704] pinctrl-single 4a003400.pinmux: request pin 224 (4a003780) for 480ad000.mmc
    [    2.578704] pinctrl-single 4a003400.pinmux: request pin 225 (4a003784) for 480ad000.mmc
    [    2.578735] pinctrl-single 4a003400.pinmux: request pin 226 (4a003788) for 480ad000.mmc
    [    2.578735] pinctrl-single 4a003400.pinmux: request pin 227 (4a00378c) for 480ad000.mmc
    [    2.578765] pinctrl-single 4a003400.pinmux: request pin 228 (4a003790) for 480ad000.mmc
    [    2.626892] omap_hsmmc 480ad000.mmc: disabled
    [    2.773468] omap_hsmmc 480ad000.mmc: context was not lost
    [    2.773468] omap_hsmmc 480ad000.mmc: enabled
    [    2.950347] omap_hsmmc 480ad000.mmc: disabled


    root@dra7-evm$ dmesg | grep -i mmc3   
    [    0.290435] pinctrl-single 4a003400.pinmux: found group selector 13 for pinmux_mmc3_pins
    [    0.291534] pinctrl-single 4a003400.pinmux: enabling pinmux_mmc3_pins function13
    [    2.578674] pinctrl-single 4a003400.pinmux: found group selector 13 for pinmux_mmc3_pins
    [    2.578765] pinctrl-single 4a003400.pinmux: enabling pinmux_mmc3_pins function13
    [    2.657775] mmc3: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 7 width 0 timing 0
    [    2.766967] mmc3: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 0 timing 0
    [    2.795898] mmc3: mmc_rescan_try_freq: trying to init card at 400000 Hz
    [    2.809326] mmc3: starting CMD52 arg 00000c00 flags 00000195
    [    2.809692] mmc3: req done (CMD52): -110: 00000000 00000000 00000000 00000000
    [    2.809722] mmc3: starting CMD52 arg 80000c08 flags 00000195
    [    2.828247] mmc3: req done (CMD52): -110: 00000000 00000000 00000000 00000000
    [    2.828277] mmc3: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 7 width 0 timing 0
    [    2.829315] mmc3: starting CMD0 arg 00000000 flags 000000c0
    [    2.829498] mmc3: req done (CMD0): 0: 00000000 00000000 00000000 00000000
    [    2.830505] mmc3: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 0 timing 0
    [    2.831512] mmc3: starting CMD8 arg 000000aa flags 000002f5
    [    2.834259] mmc3: req done (CMD8): -110: 00000000 00000000 00000000 00000000
    [    2.834289] mmc3: starting CMD5 arg 00000000 flags 000002e1
    [    2.843841] mmc3: req failed (CMD5): -110, retrying...
    [    2.929351] mmc3: req failed (CMD5): -110, retrying...
    [    2.929718] mmc3: req failed (CMD5): -110, retrying...
    [    2.930084] mmc3: req done (CMD5): -110: 00000000 00000000 00000000 00000000
    [    2.930114] mmc3: starting CMD55 arg 00000000 flags 000000f5
    [    2.930480] mmc3: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    [    2.930511] mmc3: starting CMD55 arg 00000000 flags 000000f5
    [    2.930877] mmc3: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    [    2.930908] mmc3: starting CMD55 arg 00000000 flags 000000f5
    [    2.931243] mmc3: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    [    2.931274] mmc3: starting CMD55 arg 00000000 flags 000000f5
    [    2.940734] mmc3: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    [    2.940765] mmc3: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 7 width 0 timing 0
    [    2.940795] mmc3: starting CMD1 arg 00000000 flags 000000e1
    [    2.941162] mmc3: req done (CMD1): -110: 00000000 00000000 00000000 00000000
    [    2.941192] mmc3: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0

    Regards,

    Srikanth

  • Hello Srikanth,

    It seems that your PRCM configuration for MMC3 is not set. Please check in J6 TRM for settings of registers related with clock and power configuration.

    I suggest you to look in these links: https://groups.google.com/forum/#!msg/rowboat/407u0MYogA0/d7OPb4ROSMIJ

    http://linux.omap.com/pipermail/linux-omap-open-source/2006-June/007447.html

    Best regards,

    Yanko

  • Hello Srikanth,

    Are there any updates about your issue with MMC3?


    Best regards,

    Yanko

  • Hello Yanko,

    I tried adding MMC3 to "struct omap2_hsmmc_info mmc", but didn't observe any change in behavior.  I still debugging the low level hsmmc code.

    Any suggestion would be helpful.

    Thanks,

    Srikanth

  • Hello Srikanth,

    I have the same question with you now, did you solve the problem? If you have done it,could you share the final solutaion with me?

    Thanks a lot!

    Jinglun