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.

AM4376: MMC device not mountable in linux

Other Parts Discussed in Thread: AM4376, AM4372

Hello,

I have a sitara processor am4376 with a linux OS 4.4.1. I´m using the "MMC Block device driver" together with the "TI OMAP High Speed Multimedia Card Interface support " in the Kernel-config menu. 

My device-tree entries are (am4372.dtsi):

mmc1: mmc@48060000 {
compatible = "ti,omap4-hsmmc";
reg = <0x48060000 0x1000>;
ti,hwmods = "mmc1";
ti,dual-volt;
ti,needs-special-reset;
dmas = <&edma 24
&edma 25>;
dma-names = "tx", "rx";
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};

....

my_mmc_1_pins_default: my_mmc_1_pins_default {
pinctrl-single,pins = <
0x100 ( PIN_INPUT | MUX_MODE0 ) /* (D1) mmc0_clk.mmc0_clk */
0x104 ( PIN_OUTPUT | MUX_MODE0 ) /* (D2) mmc0_cmd.mmc0_cmd */
0xfc ( PIN_INPUT | MUX_MODE0 ) /* (C1) mmc0_dat0.mmc0_dat0 */
0xf8 ( PIN_INPUT | MUX_MODE0 ) /* (C2) mmc0_dat1.mmc0_dat1 */
0xf4 ( PIN_INPUT | MUX_MODE0 ) /* (B2) mmc0_dat2.mmc0_dat2 */
0xf0 ( PIN_INPUT | MUX_MODE0 ) /* (B1) mmc0_dat3.mmc0_dat3 */
0x190 ( PIN_INPUT | MUX_MODE4 ) /* (N24) mcasp0_aclkx.mmc0_sdcd */
0x1a0 ( PIN_OUTPUT | MUX_MODE4 ) /* (L23) mcasp0_aclkr.mmc0_sdwp */
0x160 ( PIN_OUTPUT_PULLDOWN | MUX_MODE3 ) /* (R25) spi0_cs1.mmc0_pow */
>;
};

vmmcsd_fixed: fixedregulator@0 {
compatible = "regulator-fixed";
regulator-name = "vmmcsd_fixed";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};

....

&mmc1 {
status = "okay";
vmmc-supply = <&vmmcsd_fixed>;
voltage-ranges = < 3300 3300 >;
bus-width = <4>;
pinctrl-names = "default";
pinctrl-0 = <&my_mmc_1_pins_default>;
};

But during the kernel startup, the init-function "omap_hsmmc_driver_init" says:

omap_hsmmc 48060000.mmc: could not find pctldev for node /ocp/pinmux@4a003400/my_mmc_1_pins_default, deferring probe

With my hardware-debugger I can see, that the registers of the mmc-card are changing and showing me the correct status, if I plug and unplug the mmc-card.

What is the use of the node "pctldev"? And how can I correctly mount this device in linux and run the initialization of the mmc-driver?

Thanks a lot for every answer!

  • Hello R Fritz,

    Could you pinmux the mmc0_cmd as INPUT, then check if this has an effect.

    0x104 ( PIN_INPUT | MUX_MODE0 ) /* (D2) mmc0_cmd.mmc0_cmd */

    Best regards,
    Kemal

  • Hello,

    this change has no effect. I inserted this mmc0_cmd and had to change the absolute hardware addresses to 0x44E10800. Because the relative address of the pin mmc0_cmd is 0x104, but the absolute hardware address of this pin should be 0x44E10904 (0x44E10800 + 0x104). This is why I had to add this node into the device-tree:

    / {

    compatible = "ti,am4372", "ti,am43";

    interrupt-parent = <&wakeupgen>;

    ......

    mmc0_regs: mmc0_regs@44E10800 {

    compatible = "pinctrl-single";

    #address-cells = <1>;

    #size-cells = <0>;

    reg = <0x44E10800 0x200>;

    pinctrl-single,register-width = <32>;

    };

    ......

    };

    &mmc0_regs {
    mmc1_pins: pinmux_mmc1_pins {

    pinctrl-single,pins = <

    0x100 ( PIN_INPUT | MUX_MODE0 ) /* (D1) mmc0_clk.mmc0_clk */

    0x104 ( PIN_INPUT | MUX_MODE0 ) /* (D2) mmc0_cmd.mmc0_cmd */

    0xfc ( PIN_INPUT | MUX_MODE0 ) /* (C1) mmc0_dat0.mmc0_dat0 */

    0xf8 ( PIN_INPUT | MUX_MODE0 ) /* (C2) mmc0_dat1.mmc0_dat1 */

    0xf4 ( PIN_INPUT | MUX_MODE0 ) /* (B2) mmc0_dat2.mmc0_dat2 */

    0xf0 ( PIN_INPUT | MUX_MODE0 ) /* (B1) mmc0_dat3.mmc0_dat3 */

    0x190 ( PIN_INPUT | MUX_MODE4 ) /* (N24) mcasp0_aclkx.mmc0_sdcd */

    0x1a0 ( PIN_OUTPUT | MUX_MODE4 ) /* (L23) mcasp0_aclkr.mmc0_sdwp */

    0x160 ( PIN_OUTPUT_PULLDOWN | MUX_MODE3 ) /* (R25) spi0_cs1.mmc0_pow */

    >;

    };

    };

    &mmc1 {
    status = "okay";

    vmmc-supply = <&vmmcsd_fixed>;

    bus-width = <4>;

    pinctrl-names = "default";

    pinctrl-0 = <&mmc1_pins>;

    //cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;

    };

    but still the kernel says:

    omap_hsmmc 48060000.mmc: could not find pctldev for node /mmc0_regs@44E10800/pinmux_mmc1_pins, deferring probe

    somehow, the shell shows me with the "cat proc/devices" - command this:

    ...

    Block devices:

    1 ramdisk

    259 blkext

    7 loop

    31 mtdblock

    179 mmc




    I also created some device-nodes with this command:

    mknod /dev/mmcblk0 b 179 0
    mknod /dev/mmcblk0p1 b 179 1
    mknod /dev/mmcblk0p2 b 179 2



    but when I use the command "ls sys/dev/block", I just see this:

    1:0 1:11 1:14 1:3 1:6 1:9 31:10 31:13 31:4 31:7 7:0 7:3 7:6
    1:1 1:12 1:15 1:4 1:7 31:0 31:11 31:2 31:5 31:8 7:1 7:4 7:7
    1:10 1:13 1:2 1:5 1:8 31:1 31:12 31:3 31:6 31:9 7:2 7:5

    there is no "179:0" or "179:1"...

    when I want to mount the device with "mount -t /dev/mmcblk0p1 /mnt/ram/tmp/mmcflash", it says:

    mount: mounting /dev/mmcblk0p1 on /mnt/ram/tmp/mmcflash failed: No such device or address



    I think the problem is still in the device-tree, that the kernel can´t run the init-function of the mmc.

    thanks for every help!!
  • Hello,

    I think we fixed the problem with the pinctrl-device. The driver adopt correctly all the configuration, which was made in the device-tree. I also can see some reactions in Linux, when I insert the SD-card and when I take it out. Now the problem is, that there cannot be established a request to the sd-card. I got some traces. The traces are identical, when I insert and erase the sd-card. I also attached my kernel-configuration. I think we have to handout the the correct setup of our pins (the correct address, if it´s input/output and which mulitiplexing mode).

    Traces:

    [    1.113000] libphy: Fixed MDIO Bus: probed
    [    1.154000] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [    1.155000] libphy: 4a101000.mdio: probed
    [    1.157000] mdio_bus 4a101000.mdio: phy registered!
    [    1.158000] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Marvell 88E1510
    [    1.161000] cpsw 4a100000.ethernet: Detected MACID = c4:be:84:cb:59:7f
    [    1.164000] cpsw 4a100000.ethernet: cpsw: Random MACID = ce:33:62:f4:87:08
    [    1.168000] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
    [    1.170000] CSLIP: code copyright 1989 Regents of the University of California.
    [    1.171000] hdlc: HDLC support module revision 1.22
    [    1.172000] DLCI driver v0.35, 4 Jan 1997, mike.mclagan@linux.org.
    [    1.173000] usbcore: registered new interface driver cdc_ether
    [    1.175000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    1.176000] ehci-omap: OMAP-EHCI Host Controller driver
    [    1.178000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [    1.180000] usbcore: registered new interface driver cdc_acm
    [    1.181000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [    1.184000] i2c /dev entries driver
    [    1.189000] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    1.191000] sdhci: Secure Digital Host Controller Interface driver
    [    1.192000] sdhci: Copyright(c) Pierre Ossman
    [    1.195000] Synopsys Designware Multimedia Card Interface Driver
    [    1.197000] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.201000] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.202000] NET: Registered protocol family 26
    [    1.203000] Netfilter messages via NETLINK v0.30.
    [    1.205000] nf_conntrack version 0.5.0 (7986 buckets, 31944 max)
    [    1.208000] ctnetlink v0.93: registering with nfnetlink.
    [    1.214000] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    1.215000] ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
    [    1.216000] arp_tables: (C) 2002 David S. Miller
    [    1.218000] Initializing XFRM netlink socket
    [    1.221000] NET: Registered protocol family 10
    [    1.226000] mip6: Mobile IPv6
    [    1.227000] ip6_tables: (C) 2000-2006 Netfilter Core Team
    [    1.229000] NET: Registered protocol family 17
    [    1.230000] NET: Registered protocol family 15
    [    1.231000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
    [    1.232000] Bridge firewalling registered
    [    1.233000] Ebtables v2.0 registered
    [    1.235000] Distributed Switch Architecture driver version 0.1
    [    1.237000] cpsw 4a100000.ethernet eth1: [0]: detected a Marvell 88E6071 switch
    [    1.851000] libphy: dsa slave smi: probed
    [    1.859000] 8021q: 802.1Q VLAN Support v1.8
    [    1.861000] omap_voltage_late_init: Voltage driver support not added
    [    1.870000] OMAP GPIO hardware version 0.1
    [    1.875000] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.876000] omap_hsmmc 48060000.mmc: Got WP GPIO
    [    1.900000] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
    mkfs.ext2: can't open '/dev/mmcblk0p1': No such device or address
    mount: mounting /dev/mmcblk0p1 on /mnt/ram/tmp/mmcflash failed: No such device
    [    1.875000] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.876000] omap_hsmmc 48060000.mmc: Got WP GPIO
    [    1.900000] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
    mkfs.ext2: can't open '/dev/mmcblk0p1': No such device or address
    mount: mounting /dev/mmcblk0p1 on /mnt/ram/tmp/mmcflash failed: No such device
    [    1.902000] hctosys: unable to open rtc device (rtc0)
    [    1.914000] net eth1: initializing cpsw version 1.15 (0)
    [    1.918000] cpsw 4a100000.ethernet eth1: Link is Up - 100Mbps/Full - flow control off
    [    1.919000] net eth1: phy found : id is : 0x1410d1d
    [    1.924000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [    1.925000] 8021q: adding VLAN 0 to HW filter on device eth1
    [    1.927000] net eth0: initializing cpsw version 1.15 (0)
    [    1.929000] net eth0: phy found : id is : 0x1410dd1
    [    1.933000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [    1.934000] 8021q: adding VLAN 0 to HW filter on device eth0
    [    6.931000] cpsw 4a100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
    [    6.936000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [    6.949000] IP-Config: Complete:
    [    6.950000]      device=eth0, hwaddr=c4:be:84:cb:59:7f, ipaddr=140.80.0.99, mask=255.255.255.0, gw=255.255.255.255
    [    6.951000]      host=140.80.0.99, domain=, nis-domain=(none)
    [    6.952000]      bootserver=140.80.0.97, rootserver=140.80.0.97, rootpath=
    [    6.954000] evm_v3_3d: disabling
    [    6.956000] RAMDISK: squashfs filesystem found at block 0
    [    6.957000] RAMDISK: Loading 14765KiB [1 disk] into ram disk... done.
    [    7.781000] VFS: Mounted root (squashfs filesystem) readonly on device 1:0.
    [    7.783000] devtmpfs: mounted
    [    7.784000] Freeing unused kernel memory: 220K (c069d000 - c06d4000)
    [    8.262000]  boardex driver is installed
    /bin/sh: can't access tty; job control turned off
    / # forkwrapper V02.01.09.00 Copyright (c) 2015 SIEMENS AG
    configuring arp tables... done.
    outdated or empty binary config data detected, cleaning up... done.
    restoring predefined initial config from saved binary data... creating predefined netfilter chains... done.
    setting builtin netfilter rules........ done.
    done.
    enabling initial neighbour discovery........ setting default policies............... done.
    saving predefined netfilter chains to binary data... done.
    [   14.885000] cpsw 4a100000.ethernet raw0: renamed from eth0
    [   14.901000] net raw0: initializing cpsw version 1.15 (0)
    [   14.902000] net raw0: phy found : id is : 0x1410dd1
    [   14.905000] IPv6: ADDRCONF(NETDEV_UP): raw0: link is not ready
    [   14.907000] 8021q: adding VLAN 0 to HW filter on device raw0
    [   14.933000] eth0: renamed from br0
    RTNETLINK answers: No such file or directory
    RTNETLINK answers: Operation not supported
    We have an error talking to the kernel
    RTNETLINK answers: Operation not supported
    We have an error talking to the kernel
    RTNETLINK answers: Operation not supported
    We have an error talking to the kernel
    RTNETLINK answers: Operation not supported
    We have an error talking to the kernel
    [   15.919000] device raw0 entered promiscuous mode
    [   15.947000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   16.018000] net eth1: promiscuity not disabled as the other interface is still in promiscuity mode
    [   16.022000] net eth1: promiscuity not disabled as the other interface is still in promiscuity mode
    [   16.025000] net eth1: promiscuity not disabled as the other interface is still in promiscuity mode
    [   16.027000] net eth1: promiscuity not disabled as the other interface is still in promiscuity mode
    [   16.030000] IPv6: ADDRCONF(NETDEV_UP): port0: link is not ready
    [   16.043000] net eth1: promiscuity not disabled as the other interface is still in promiscuity mode
    [   16.046000] net eth1: promiscuity not disabled as the other interface is still in promiscuity mode
    [   16.049000] net eth1: promiscuity not disabled as the other interface is still in promiscuity mode
    [   16.052000] net eth1: promiscuity not disabled as the other interface is still in promiscuity mode
    [   16.055000] IPv6: ADDRCONF(NETDEV_UP): port1: link is not ready
    [   16.190000] device eth1 entered promiscuous mode
    [   16.221000] ether0: renamed from eth0
    [   16.237000] IPv6: ADDRCONF(NETDEV_UP): ether0: link is not ready
    [   16.266000] dsa 44000000.ocp:dsa@0 ether1: renamed from port0
    [   16.283000] IPv6: ADDRCONF(NETDEV_UP): ether1: link is not ready
    [   16.296000] device eth1 left promiscuous mode
    [   16.297000] net eth1: promiscuity not disabled as the other interface is still in promiscuity mode
    [   16.317000] dsa 44000000.ocp:dsa@0 ether2: renamed from port1
    [   16.334000] device eth1 entered promiscuous mode
    [   16.336000] IPv6: ADDRCONF(NETDEV_UP): ether2: link is not ready
    [   16.377000] dsa 44000000.ocp:dsa@0 raw1: renamed from ether1
    [   16.394000] IPv6: ADDRCONF(NETDEV_UP): raw1: link is not ready
    [   16.422000] ether1: renamed from br1
    [   16.463000] device raw1 entered promiscuous mode
    [   16.493000] dsa 44000000.ocp:dsa@0 raw2: renamed from ether2
    [   16.511000] IPv6: ADDRCONF(NETDEV_UP): raw2: link is not ready
    [   16.539000] ether2: renamed from br2
    [   16.581000] device raw2 entered promiscuous mode
    [   16.594000] IPv6: ADDRCONF(NETDEV_UP): ether1: link is not ready
    [   16.607000] IPv6: ADDRCONF(NETDEV_UP): ether2: link is not ready3

    traces if I insert and erase the sd-card:

    [ 1000.950000] omap_hsmmc 48060000.mmc: enabled
    [ 1000.950000] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
    [ 1000.951000] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 0 timing 0
    [ 1000.951000] omap_hsmmc 48060000.mmc: Initial signal voltage of 3.3v
    [ 1000.962000] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
    [ 1000.973000] mmc0: starting CMD52 arg 00000c00 flags 00000195
    [ 1000.973000] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
    [ 1000.973000] mmc0: starting CMD52 arg 80000c08 flags 00000195
    [ 1000.973000] mmc0: req done (CMD52): -110: 00000000 00000000 00000000 00000000
    [ 1000.973000] mmc0: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 0 timing 0
    [ 1000.975000] mmc0: starting CMD0 arg 00000000 flags 000000c0
    [ 1000.975000] mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
    [ 1000.977000] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
    [ 1000.979000] mmc0: starting CMD8 arg 000001aa flags 000002f5
    [ 1000.979000] mmc0: req done (CMD8): -110: 00000000 00000000 00000000 00000000
    [ 1000.979000] mmc0: starting CMD5 arg 00000000 flags 000002e1
    [ 1000.979000] mmc0: req failed (CMD5): -110, retrying...
    [ 1000.980000] mmc0: req failed (CMD5): -110, retrying...
    [ 1000.980000] mmc0: req failed (CMD5): -110, retrying...
    [ 1000.981000] mmc0: req done (CMD5): -110: 00000000 00000000 00000000 00000000
    [ 1000.981000] mmc0: starting CMD55 arg 00000000 flags 000000f5
    [ 1000.981000] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    [ 1000.981000] mmc0: starting CMD55 arg 00000000 flags 000000f5
    [ 1000.981000] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    [ 1000.982000] mmc0: starting CMD55 arg 00000000 flags 000000f5
    [ 1000.982000] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    [ 1000.982000] mmc0: starting CMD55 arg 00000000 flags 000000f5
    [ 1000.982000] mmc0: req done (CMD55): -110: 00000000 00000000 00000000 00000000
    [ 1000.982000] mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
    [ 1000.983000] mmc0: starting CMD1 arg 00000000 flags 000000e1
    [ 1000.983000] mmc0: req done (CMD1): -110: 00000000 00000000 00000000 00000000
    [ 1000.983000] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 0 timing 0
    [ 1001.950000] omap_hsmmc 48060000.mmc: disabled

    Thanks al lot!

  • Hello R Fritz,

    You can refer to the AM437x board's schematic. Check the pinmux settings and examine the card detect pin. For the error please read this thread.

    Best regards,
    Kemal

  • Hello,

    yes, my device-tree is similar to the am437x now. the mmc-device is included like this:

    &am43xx_pinmux {

    mmc1_pins: pinmux_mmc1_pins {
    pinctrl-single,pins = <
    0x100 ( PIN_INPUT | MUX_MODE0 ) /* (D1) mmc0_clk.mmc0_clk */
    0x104 ( PIN_INPUT | MUX_MODE0 ) /* (D2) mmc0_cmd.mmc0_cmd */
    0xfc ( PIN_INPUT | MUX_MODE0 ) /* (C1) mmc0_dat0.mmc0_dat0 */
    0xf8 ( PIN_INPUT | MUX_MODE0 ) /* (C2) mmc0_dat1.mmc0_dat1 */
    0xf4 ( PIN_INPUT | MUX_MODE0 ) /* (B2) mmc0_dat2.mmc0_dat2 */
    0xf0 ( PIN_INPUT | MUX_MODE0 ) /* (B1) mmc0_dat3.mmc0_dat3 */
    >;
    };

    gpio_0_pins_default: gpio_0_pins_default {
    pinctrl-single,pins = <
    0x108 ( PIN_OUTPUT | MUX_MODE9 ) /* (D16) mii1_col.gpio0[0] */
    0x150 ( PIN_INPUT | MUX_MODE7 ) /* (P23) spi0_sclk.gpio0[2] */
    0x154 ( PIN_INPUT | MUX_MODE7 ) /* (T22) spi0_d0.gpio0[3] */
    0x15c ( PIN_INPUT | MUX_MODE7 ) /* (T20) spi0_cs0.gpio0[5] */
    0x160 ( PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (R25) spi0_cs1.gpio0[6], POW for MMC */
    0x180 ( PIN_INPUT | MUX_MODE7 ) /* (K21) uart1_rxd.gpio0[14] */
    0x184 ( PIN_INPUT | MUX_MODE7 ) /* (L21) uart1_txd.gpio0[15] */
    0x1a4 ( PIN_INPUT | MUX_MODE9 ) /* (K23) mcasp0_fsr.gpio0[19] */
    0x264 ( PIN_INPUT | MUX_MODE9 ) /* (P22) spi2_d0.gpio0[20] */
    0x268 ( PIN_INPUT | MUX_MODE9 ) /* (P20) spi2_d1.gpio0[21] */
    0x260 ( PIN_INPUT | MUX_MODE9 ) /* (N20) spi2_sclk.gpio0[22] */
    0x26c ( PIN_INPUT | MUX_MODE9 ) /* (T23) spi2_cs0.gpio0[23] */
    0x2c4 ( PIN_INPUT | MUX_MODE9 ) /* (F25) USB1_DRVVBUS.gpio0[25] */
    >;
    };

    gpio_3_pins_default: gpio_3_pins_default {
    pinctrl-single,pins = <
    0x110 ( PIN_INPUT | MUX_MODE7 ) /* (B13) mii1_rx_er.gpio3[2] */
    0x190 ( PIN_INPUT_PULLUP | MUX_MODE7 ) /* (N24) mcasp0_aclkx.gpio3[14], Card-detection MMC */
    0x1a0 ( PIN_INPUT | MUX_MODE7 ) /* (L23) mcasp0_aclkr.gpio3[18], Write-protection MMC */
    >;
    };


    };

    ...

    &mmc1 {
    vmmc-supply = <&evm_v3_3d>;
    bus-width = <4>;
    pinctrl-names = "default";
    pinctrl-0 = <&mmc1_pins>;
    keep-power-in-suspend;
    enable-sdio-wakeup;
    cd-gpios = <&gpio3 14 GPIO_ACTIVE_LOW>;
    wp-gpios = <&gpio3 18 GPIO_ACTIVE_LOW>;
    status = "okay";
    };

    ...

    the card-detection pin is setup correct. the kernel prints out the message:

    mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz

    when I insert or remove the sd-card. But the SD-card is not answering to the mmc-controller. I also can see through a packet analyzer that the controller sends out 13 messages (messagetypes: 2-times CMD52, 1-time CMD0, 1-time CMD8, 4-times CMD5, 4-times CMD55, 1-time CMD1) on the CMD-line. I also measured the sd-card voltage, which was 3,3V. 

    Do you know, why this could happen?

  • here some pictures of an signal analyzer. the host is sending, but there is no response. the clock is still running a certain time after the host was sending his message, but because there is no response of the sd-card, the clock is shutting down.

    here are the pictures of message 1 and 4:

    maybe somebody knows why the sd-card is not answering...? thanks a lot!

  • Hi Fritz,

    From what I understand you have AM437x custom board. Is this board based on AM437x TI EVM or SK or else? Do you use MMCSD0/0x48060000 on your custom board to connect the external MMC card?

    Are you using PROCESSOR-SDK-LINUX-AM437X 03_01_00_06?

    Note that mmc0_pow and mmc0_sdwp pins are not used in AM437x TI EVM.

    See also if the below wiki pages will be in help:

    processors.wiki.ti.com/.../SD_User's_Guide

    processors.wiki.ti.com/.../AM437x_Schematic_Checklist

    Regards,
    Pavel
  • Hello,

     

    thanks a lot for your response. We figured out, that we switched the signals of the cmd- and clock line. So this is why the sd-card couldn´t understand anything of the messages. We fixed the problem and the card is recognized from linux. My last question is, if my procedure, to use the mmc-device is proper:

    1. First I add some device-nodes with:

    mknod /dev/mmcblk0 b 179 0

    mknod /dev/mmcblk0p1 b 179 1

     

    1. Then I want to create a path where I can mount the mmc-device:

    mkdir mnt/ram/tmp/mmcflash

     

    1. Then I add a file-system to the device:

    mkfs.ext2 /dev/mmcblk0p1                  (is ext2 the correct file-system? I just want to simply read/write from/to it)

     

    1. At last I mount the device to my system:

    mount /dev/mmcblk0p1 /mnt                (alternatively, I can write “mount –o ext4…” or “mount –t vfat…”, but I´m not sure if it´s necessary)

     

    is this a normal procedure?

    thank you in advance for your great help!

  • Fritz,

    We have special script (create-sdcard.sh) to handle the SD card set up:

    ti-processor-sdk-linux-am437x-evm-x/bin/create-sdcard.sh

    Please refer to this script and also see the below wiki pages:

    processors.wiki.ti.com/.../Processor_SDK_Linux_Training:_Introduction_to_Device_Driver_Development

    processors.wiki.ti.com/.../Processor_SDK_Linux_create_SD_card_script

    processors.wiki.ti.com/.../Sitara_Linux_SDK_Creating_a_SD_Card_with_Linux

    Regards,
    Pavel