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.

BeagleBone Black + MMC2

Other Parts Discussed in Thread: WL1271, TPS65217

Trying to configure MMC2 for SDIO comminucation using device tree. Getting logs as mmc1 detected. Is this correct. Also offset for mm2_cmd is wrong i think, can you please suggest the correct offset.

    mmc2_pins: pinmux_mmc2_pins {
        pinctrl-single,pins = <
            0x3C (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat3 */        P8_15
            0x38 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat2 */         P8_16
            0x34 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat1 */         P8_11
            0x30 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat0 */         P8_12
            0x8c (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_clk */            P8_18
            0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_cmd */              ?       -----> we have connected to P9_15 (T13(mmc2_cmd) & R13 are connected      together)
        >;
    };

&mmc2 {
    status = "okay";
    vmmc-supply = <&wl12xx_vmmc>;
    ti,non-removable;
    bus-width = <4>;
    cap-power-off-card;
    pinctrl-names = "default";
    pinctrl-0 = <&mmc2_pins>;

    #address-cells = <1>;
    #size-cells = <0>;
    wlcore: wlcore@2 {
        compatible = "ti,wl1271";
        reg = <2>;
        interrupt-parent = <&gpio0>;
        interrupts = <26 0x4>; /* gpio 31 */
        ref-clock-frequency = <38400000>;
    };
};

dmesg log:

[    5.041921] mmc1: MAN_BKOPS_EN bit is not set
[    5.050108] mmc1: new high speed MMC card at address 0001
[    5.056351] mmcblk0: mmc1:0001 MMC04G 3.65 GiB
[    5.061023] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    5.067148] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    5.073719] mmcblk0boot0: mmc1:0001 MMC04G partition 1 1.00 MiB
[    5.080324] davinci_mdio: dt: updated phy_id[0] from phy_mask[fffffffe]
[    5.087002] davinci_mdio: dt: updated phy_id[1] from phy_mask[fffffffe]
[    5.093787] mmcblk0boot1: mmc1:0001 MMC04G partition 2 1.00 MiB
[    5.102195] libphy: 4a101000.mdio: probed
[    5.106251] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    5.115705]  mmcblk0: p1 p2
[    5.122237] cpsw 4a100000.ethernet: Detected MACID = 54:4a:16:fb:d4:80
[    5.130939] omap_rtc 44e3e000.rtc: setting system clock to 2015-08-19 16:19:37 UTC (1440001177)
[    5.139858] of_cfs_init
[    5.142378] of_cfs_init: OK
[    5.152131] net eth0: initializing cpsw version 1.12 (0)
[    5.160059] net eth0: phy found : id is : 0x7c0f1
[    5.164888] libphy: PHY 4a101000.mdio:01 not found

  • Dileep D R said:
     0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_cmd */              ?       -----> we have connected to P9_15 (T13(mmc2_cmd) & R13 are connected      together)

    Processor pin T13 is the MMC2_CMD signal in mode 3.  You should either remove R160 or ensure that pin R13 is configured as GPIO input with no pullup or pulldown enabled.

  • Thanks Biser,

    I have removed R160, but what should be the offset to be mentioned for mmc2_cmd in Device tree?

    Regards,
    Dileep
  • Hi Dileep,

    If you use ball T13 (pad: gpmc_csn3), then the offset 0x88 is correct.
    The setting should be:
    0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_csn3.mmc2_cmd */
    Best Regards,
    Yordan
  • Hi Yordan,

    Below are my pin configurations. But still mmc2 communication is not up.

    mmc3_pins: pinmux_mmc3_pins {
    pinctrl-single,pins = <
    0x3C (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat3 */
    0x38 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat2 */
    0x34 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat1 */
    0x30 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat0 */
    0x8c (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_clk */
    0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_cmd */
    >;
    };

    &mmc3 {
    /* these are on the crossbar and are outlined in the
    xbar-event-map element */
    dmas = <&edma 12 &edma 13>;
    dma-names = "tx", "rx";

    status = "okay";
    vmmc-supply = <&wl12xx_vmmc>;
    ti,non-removable;
    bus-width = <4>;
    cap-power-off-card;
    pinctrl-names = "default";
    pinctrl-0 = <&mmc3_pins>;

    #address-cells = <1>;
    #size-cells = <0>;
    wlcore: wlcore@2 {
    compatible = "ti,wl1271";
    reg = <2>;
    interrupt-parent = <&gpio0>;
    interrupts = <26 0x4>;
    ref-clock-frequency = <38400000>;
    };
    };

    &edma {
    ti,edma-xbar-event-map = /bits/ 16 <1 12 2 13>;
    };
  • One other thing that you should check is whether the MMC2 functional clock is enabled. This clock is disabled by default. See section 8.1.12.1.45 from the AM335X TRM Rev. L for details.

  • wl12xx_vmmc: fixedregulator@2 {
    pinctrl-names = "default";
    pinctrl-0 = <&wl12xx_gpio>;
    compatible = "regulator-fixed";
    regulator-name = "vwl1271";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    gpio = <&gpio0 27 0>;
    startup-delay-us = <70000>;
    enable-active-high;
    };

    dmesg log shows:

    [ 4.259093] omap_hsmmc 47810000.mmc: unable to get vmmc regulator -517
  • Try using devmem2 to read the register value at address 0x44E000F8. This is the MMC2 clock control register I mentioned above.
  • Biser,

    I read register address 0x44E000F8.

    root@arm:~# ./devmem2 0x44E000F8 b l
    /dev/mem opened.
    Memory mapped at address 0xb6fcf000.
    Value at address 0x44E000F8 (0xb6fcf0f8): 0x0
    Written 0x0; readback 0x0
  • root@arm:~# ./devmem2 0x44E000F8 w
    /dev/mem opened.
    Memory mapped at address 0xb6f94000.
    Value at address 0x44E000F8 (0xb6f940f8): 0x30000
  • 0x30000 is the default reset value of this register. Clock is disabled as I expected. I will ask the SW team to comment where you should enable it. I think this is done in u-boot, but don't know where exactly.
  • Hi,

    In u-boot you can enable the corresponding mmc controller using
    omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio, int wp_gpio)

    You should do that in the board.c file.

    In kernel adding &mmcX dts node with status="okay" should enable the module.

    Also as I see you want to connect a wlan module to the MMC2 controller (aliased as mmc3 in your dts node), right? But you enable only the MMC pins, you should considered adding:
    /* wl12xx/wl18xx card enable/irq GPIOs. */
    wlan_pins_default: pinmux_wlan_pins_default {
            pinctrl-single,pins = <
                         0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a0.gpio1_16 */
                         0x19C (PIN_INPUT | MUX_MODE7) /* mcasp0_ahclkr.gpio3_17 */
                         0x1AC (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mcasp0_ahclkx.gpio3_21 */
            >;

    }

    You can either add the corresponding pins in pinmux_mmc3_pins, OR use a separate wlan_pins_default node & add:
    pinctrl-0 = <&mmc3_pins &wlan_pins_default>;
    This is needed for enabling the WLAN module & requesting activity on the MMC2 controller, which in terms should enable mmc2.

    Best Regards,
    Yordan

  • Hi Yordan,

    I modifed uboot code as below.

    File: board.c
    Function : cpu_mmc_init
    Added : omap_mmc_init(2, 0, 0, -1, -1);

    File: mmc_host_def.h
    Added : #define OMAP_HSMMC3_BASE 0x47810100

    File: clock_am33xx.c
    Function : enable_basic_clocks
    Added : &cmper->mmc2clkctrl, ---> u32 *const clk_modules_explicit_en[];

    when booted i am getting:

    U-Boot 2015.10-rc2-00179-g79c884d-dirty (Aug 29 2015 - 09:26:57 +0000)

    Watchdog enabled
    I2C: ready
    DRAM: 512 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1, OMAP SD/MMC: 2
    Card did not respond to voltage select!
    MMC init failedNet: <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot: 0
  • Hi Yordan,

    I modifed uboot code as below.

    File: board.c
    Function : cpu_mmc_init
    Added : omap_mmc_init(2, 0, 0, -1, -1);

    File: mmc_host_def.h
    Added : #define OMAP_HSMMC3_BASE 0x47810100

    File: clock_am33xx.c
    Function : enable_basic_clocks
    Added : &cmper->mmc2clkctrl, ---> u32 *const clk_modules_explicit_en[];

    when booted i am getting:

    U-Boot 2015.10-rc2-00179-g79c884d-dirty (Aug 29 2015 - 09:26:57 +0000)

    Watchdog enabled
    I2C: ready
    DRAM: 512 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1, OMAP SD/MMC: 2
    Card did not respond to voltage select!
    MMC init failedNet: <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot: 0
  • Hi,

    The omap_mmc_init() function in fact configures MMC2:
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1, OMAP SD/MMC: 2

    However you get some errors when u-boot tries to detect if there is a card connected to MMC2 controller:
    Card did not respond to voltage select!
    See mmc_start_init() function in mmc.c.

    However, you should be able to boot the kernel on your device. What is the case there? Does the kernel succeeds in detecting the wi fi chip connected to MMC2?

    Best Regards,
    Yordan
  • Hi Yordan,

    I booted the kernel, but still not able to detect wifi chip. I could not find any mmc2 set as sdio communication in the below log

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Initializing cgroup subsys cpuset
    [ 0.000000] Initializing cgroup subsys cpu
    [ 0.000000] Initializing cgroup subsys cpuacct
    [ 0.000000] Linux version 4.1.3+ (dileep@ubuntu) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #4 SMP PREEMPT Mon Aug 24 13:32:33 IST 2015
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine model: TI AM335x BeagleBone Black
    [ 0.000000] cma: Reserved 24 MiB at 0x9e000000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] On node 0 totalpages: 130560
    [ 0.000000] free_area_init_node: node 0, pgdat c0f4c700, node_mem_map df96d000
    [ 0.000000] Normal zone: 1152 pages used for memmap
    [ 0.000000] Normal zone: 0 pages reserved
    [ 0.000000] Normal zone: 130560 pages, LIFO batch:31
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (sgx neon )
    [ 0.000000] PERCPU: Embedded 13 pages/cpu @df926000 s22336 r8192 d22720 u53248
    [ 0.000000] pcpu-alloc: s22336 r8192 d22720 u53248 alloc=13*4096
    [ 0.000000] pcpu-alloc: [0] 0
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129408
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/nfs rw nfsroot=192.168.0.102:/home/dileep/BeagleBone/rootfs_debian ip=192.168.0.105:::::eth0
    [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Memory: 475584K/522240K available (10502K kernel code, 881K rwdata, 3680K rodata, 672K init, 901K bss, 22080K reserved, 24576K cma-reserved, 0K highmem)
    [ 0.000000] Virtual kernel memory layout:
    vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
    lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
    pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    .text : 0xc0008000 - 0xc0de1d40 (14184 kB)
    .init : 0xc0de2000 - 0xc0e8a000 ( 672 kB)
    .data : 0xc0e8a000 - 0xc0f6666c ( 882 kB)
    .bss : 0xc0f69000 - 0xc104a648 ( 902 kB)
    [ 0.000000] Preemptible hierarchical RCU implementation.
    [ 0.000000] RCU dyntick-idle grace-period acceleration is enabled.
    [ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
    [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [ 0.000040] clocksource timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [ 0.000054] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.000436] Console: colour dummy device 80x30
    [ 0.000465] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [ 0.000474] This ensures that you still see kernel messages. Please
    [ 0.000482] update your kernel commandline.
    [ 0.000505] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
    [ 0.088676] pid_max: default: 32768 minimum: 301
    [ 0.088836] Security Framework initialized
    [ 0.088921] AppArmor: AppArmor disabled by boot time parameter
    [ 0.088932] Yama: becoming mindful.
    [ 0.089150] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.089166] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.090100] Initializing cgroup subsys blkio
    [ 0.090128] Initializing cgroup subsys memory
    [ 0.090176] Initializing cgroup subsys devices
    [ 0.090196] Initializing cgroup subsys freezer
    [ 0.090224] Initializing cgroup subsys net_cls
    [ 0.090242] Initializing cgroup subsys perf_event
    [ 0.090260] Initializing cgroup subsys net_prio
    [ 0.090320] CPU: Testing write buffer coherency: ok
    [ 0.090384] ftrace: allocating 34337 entries in 101 pages
    [ 0.185591] CPU0: thread -1, cpu 0, socket -1, mpidr 0
    [ 0.185726] Setting up static identity map for 0x80008280 - 0x800082d8
    [ 0.238759] Brought up 1 CPUs
    [ 0.238784] SMP: Total of 1 processors activated (996.14 BogoMIPS).
    [ 0.238794] CPU: All CPU(s) started in SVC mode.
    [ 0.239723] devtmpfs: initialized
    [ 0.258278] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.279808] omap_hwmod: tptc0 using broken dt data from edma
    [ 0.280052] omap_hwmod: tptc1 using broken dt data from edma
    [ 0.280269] omap_hwmod: tptc2 using broken dt data from edma
    [ 0.286289] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.341157] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [ 0.343387] xor: measuring software checksum speed
    [ 0.438774] arm4regs : 1218.400 MB/sec
    [ 0.538703] 8regs : 1090.800 MB/sec
    [ 0.638700] 32regs : 807.600 MB/sec
    [ 0.738701] neon : 1662.000 MB/sec
    [ 0.738711] xor: using function: neon (1662.000 MB/sec)
    [ 0.738874] pinctrl core: initialized pinctrl subsystem
    [ 0.740960] NET: Registered protocol family 16
    [ 0.743627] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.749867] OMAP GPIO hardware version 0.1
    [ 0.761850] No ATAGs?
    [ 0.761886] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.763897] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [ 0.763918] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [ 0.968964] raid6: int32x1 gen() 205 MB/s
    [ 1.138760] raid6: int32x1 xor() 165 MB/s
    [ 1.308759] raid6: int32x2 gen() 241 MB/s
    [ 1.478764] raid6: int32x2 xor() 188 MB/s
    [ 1.648860] raid6: int32x4 gen() 234 MB/s
    [ 1.818720] raid6: int32x4 xor() 162 MB/s
    [ 1.989002] raid6: int32x8 gen() 183 MB/s
    [ 2.158820] raid6: int32x8 xor() 117 MB/s
    [ 2.328724] raid6: neonx1 gen() 1450 MB/s
    [ 2.498713] raid6: neonx2 gen() 1863 MB/s
    [ 2.668775] raid6: neonx4 gen() 785 MB/s
    [ 2.838727] raid6: neonx8 gen() 321 MB/s
    [ 2.838737] raid6: using algorithm neonx2 gen() 1863 MB/s
    [ 2.838745] raid6: using intx1 recovery algorithm
    [ 2.848525] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
    [ 2.849171] reg-fixed-voltage fixedregulator@0: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_wl12xx_gpio, deferring probe
    [ 2.851769] vgaarb: loaded
    [ 2.852555] SCSI subsystem initialized
    [ 2.852968] libata version 3.00 loaded.
    [ 2.853346] usbcore: registered new interface driver usbfs
    [ 2.853438] usbcore: registered new interface driver hub
    [ 2.853555] usbcore: registered new device driver usb
    [ 2.854229] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [ 2.854290] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe
    [ 2.854331] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
    [ 2.854481] pps_core: LinuxPPS API ver. 1 registered
    [ 2.854490] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 2.854524] PTP clock support registered
    [ 2.854779]
    ********** sdio_register_bus ************
    [ 2.855358] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [ 2.856122] Advanced Linux Sound Architecture Driver Initialized.
    [ 2.857018] NetLabel: Initializing
    [ 2.857032] NetLabel: domain hash size = 128
    [ 2.857039] NetLabel: protocols = UNLABELED CIPSOv4
    [ 2.857109] NetLabel: unlabeled traffic allowed by default
    [ 2.857401] Switched to clocksource timer1
    [ 2.980217] NET: Registered protocol family 2
    [ 2.981213] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [ 2.981270] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
    [ 2.981331] TCP: Hash tables configured (established 4096 bind 4096)
    [ 2.981424] UDP hash table entries: 256 (order: 1, 8192 bytes)
    [ 2.981448] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
    [ 2.981776] NET: Registered protocol family 1
    [ 2.982397] RPC: Registered named UNIX socket transport module.
    [ 2.982414] RPC: Registered udp transport module.
    [ 2.982422] RPC: Registered tcp transport module.
    [ 2.982429] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 2.982463] PCI: CLS 0 bytes, default 64
    [ 2.983428] CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
    [ 2.983493] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [ 2.986240] futex hash table entries: 256 (order: 2, 16384 bytes)
    [ 2.986368] audit: initializing netlink subsys (disabled)
    [ 2.986466] audit: type=2000 audit(2.920:1): initialized
    [ 2.988259] zpool: loaded
    [ 2.988682] VFS: Disk quotas dquot_6.6.0
    [ 2.988770] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 2.989522] NFS: Registering the id_resolver key type
    [ 2.989602] Key type id_resolver registered
    [ 2.989611] Key type id_legacy registered
    [ 2.989640] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [ 2.990048] fuse init (API version 7.23)
    [ 2.990357] SGI XFS with ACLs, security attributes, realtime, no debug enabled
    [ 2.993772] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
    [ 2.994032] io scheduler noop registered
    [ 2.994049] io scheduler deadline registered
    [ 2.994091] io scheduler cfq registered (default)
    [ 2.995651] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 2.998321] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
    [ 2.999663] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
    [ 3.003094] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 155, base_baud = 3000000) is a 8250
    [ 3.892666] console [ttyS0] enabled
    [ 3.898107] [drm] Initialized drm 1.1.0 20060810
    [ 3.902868] usbcore: registered new interface driver udl
    [ 3.912693] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 3.919393] ehci-pci: EHCI PCI platform driver
    [ 3.923940] ehci-platform: EHCI generic platform driver
    [ 3.929425] ehci-omap: OMAP-EHCI Host Controller driver
    [ 3.936448] 47401300.usb-phy supply vcc not found, using dummy regulator
    [ 3.959746] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [ 3.959766] musb-hdrc: MHDRC RTL version 2.0
    [ 3.959776] musb-hdrc: setup fifo_mode 4
    [ 3.959797] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [ 3.961219] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [ 4.039649] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [ 4.039671] musb-hdrc: MHDRC RTL version 2.0
    [ 4.039680] musb-hdrc: setup fifo_mode 4
    [ 4.039697] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [ 4.039849] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [ 4.046011] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
    [ 4.054272] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 4.061142] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 4.068422] usb usb1: Product: MUSB HDRC host driver
    [ 4.073410] usb usb1: Manufacturer: Linux 4.1.3+ musb-hcd
    [ 4.078853] usb usb1: SerialNumber: musb-hdrc.1.auto
    [ 4.084751] hub 1-0:1.0: USB hub found
    [ 4.088679] hub 1-0:1.0: 1 port detected
    [ 4.127672] using random self ethernet address
    [ 4.132161] using random host ethernet address
    [ 4.137484] usb0: HOST MAC f6:09:ad:12:81:ff
    [ 4.141948] usb0: MAC fa:c1:f4:27:9f:5b
    [ 4.145866] using random self ethernet address
    [ 4.150375] using random host ethernet address
    [ 4.154925] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
    [ 4.161666] g_ether gadget: g_ether ready
    [ 4.166671] mousedev: PS/2 mouse device common for all mice
    [ 4.173388] omap_rtc 44e3e000.rtc: already running
    [ 4.178858] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [ 4.186788] i2c /dev entries driver
    [ 4.192533] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 4.200579] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 4.213277] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
    [ 4.268305] omap_hsmmc 47810000.mmc: unable to get vmmc regulator -517
    [ 4.359012] ledtrig-cpu: registered to indicate activity on CPUs
    [ 4.365388] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [ 4.373272] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [ 4.380859] hidraw: raw HID events driver (C) Jiri Kosina
    [ 4.387826] usbcore: registered new interface driver usbhid
    [ 4.393431] usbhid: USB HID core driver
    [ 4.397725] ashmem: initialized
    [ 4.401784] remoteproc0: wkup_m3 is available
    [ 4.406258] remoteproc0: Note: remoteproc is still under development and considered experimental.
    [ 4.415525] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [ 4.429588] oprofile: using arm/armv7
    [ 4.433717] NET: Registered protocol family 10
    [ 4.439766] mip6: Mobile IPv6
    [ 4.442782] NET: Registered protocol family 17
    [ 4.447555] Key type dns_resolver registered
    [ 4.451860] mpls_gso: MPLS GSO support
    [ 4.455863] omap_voltage_late_init: Voltage driver support not added
    [ 4.462847] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [ 4.471673] cpu cpu0: cpu0 clock notifier not ready, retry
    [ 4.477488] ThumbEE CPU extension supported.
    [ 4.481803] Registering SWP/SWPB emulation handler
    [ 4.488027] registered taskstats version 1
    [ 4.493295] Btrfs loaded
    [ 4.498538] Key type encrypted registered
    [ 4.525467] tps65217 0-0024: TPS65217 ID 0xe version 1.2
    [ 4.531681] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [ 4.538767] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 4.545819] i2c i2c-1: of_i2c: modalias failure on /ocp/i2c@4802a000/tps1@24
    [ 4.553579] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [ 4.560650] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz
    [ 4.568165] at24 2-0054: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [ 4.575506] at24 2-0055: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [ 4.582928] at24 2-0056: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [ 4.590291] at24 2-0057: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [ 4.597670] at24 2-005d: 8192 byte 24c64 EEPROM, writable, 32 bytes/write
    [ 4.620520] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
    [ 4.627644] remoteproc0: powering up wkup_m3
    [ 4.632084] remoteproc0: Booting fw image am335x-pm-firmware.elf, size 219663
    [ 4.639669] remoteproc0: remote processor wkup_m3 is now up
    [ 4.645370] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version 190 not supported
    [ 4.657075] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,000C,2215BBBK0603'
    [ 4.664448] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
    [ 4.727424] bone_capemgr bone_capemgr: slot #0: No cape found
    [ 4.757268] bone_capemgr bone_capemgr: Invalid signature 'd484c1cb' at slot 1
    [ 4.764469] bone_capemgr bone_capemgr: slot #1: No cape found
    [ 4.827414] bone_capemgr bone_capemgr: slot #2: No cape found
    [ 4.887415] bone_capemgr bone_capemgr: slot #3: No cape found
    [ 4.893305] bone_capemgr bone_capemgr: initialized OK.
    [ 4.899237] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 5.106030] omap_hsmmc 48060000.mmc: no support for card's volts
    [ 5.112157] mmc0: error -22 whilst initialising SD card
    [ 5.138143] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltage latency[950000<->1325000]:-22
    [ 5.149724] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltage latency[950000<->1325000]:-22
    [ 5.217495] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [ 5.223635] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [ 5.230231] davinci_mdio: dt: updated phy_id[0] from phy_mask[fffffffe]
    [ 5.236906] davinci_mdio: dt: updated phy_id[1] from phy_mask[fffffffe]
    [ 5.245005] libphy: 4a101000.mdio: probed
    [ 5.249230] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
    [ 5.259490] cpsw 4a100000.ethernet: Detected MACID = 54:4a:16:fb:d4:80
    [ 5.268117] omap_rtc 44e3e000.rtc: setting system clock to 2015-08-27 14:40:58 UTC (1440686458)
    [ 5.276880] of_cfs_init
    [ 5.279601] of_cfs_init: OK
    [ 5.289338] net eth0: initializing cpsw version 1.12 (0)
    [ 5.297071] net eth0: phy found : id is : 0x7c0f1
    [ 5.302044] libphy: PHY 4a101000.mdio:01 not found
    [ 5.306865] net eth0: phy 4a101000.mdio:01 not found on slave 1
    [ 5.314638] net eth0: BQL enabled
    [ 5.322241] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ 8.368089] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    [ 8.387463] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [ 8.407615] IP-Config: Guessing netmask 255.255.255.0
    [ 8.412956] IP-Config: Complete:
    [ 8.416208] device=eth0, hwaddr=54:4a:16:fb:d4:80, ipaddr=192.168.0.105, mask=255.255.255.0, gw=255.255.255.255
    [ 8.426887] host=192.168.0.105, domain=, nis-domain=(none)
    [ 8.432900] bootserver=255.255.255.255, rootserver=192.168.0.102, rootpath=
    [ 8.440550] PM: Hibernation image not present or could not be loaded.
    [ 8.440589] vwl1271: disabling
    [ 8.443797] ALSA device list:
    [ 8.446778] No soundcards found.
    [ 8.459943] VFS: Mounted root (nfs filesystem) on device 0:16.
    [ 8.466474] devtmpfs: mounted
    [ 8.470375] Freeing unused kernel memory: 672K (c0de2000 - c0e8a000)
    [ 8.910990] random: systemd urandom read with 75 bits of entropy available
    [ 8.927091] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
    [ 8.941278] systemd[1]: Detected architecture 'arm'.
    [ 8.981202] systemd[1]: Set hostname to <arm>.
    [ 9.704472] random: nonblocking pool is initialized
    [ 9.924727] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
    [ 9.942876] systemd[1]: Expecting device dev-ttyS0.device...
    [ 9.967692] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
    [ 9.975826] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [ 9.983690] systemd[1]: Starting Remote File Systems (Pre).
    [ 10.007574] systemd[1]: Reached target Remote File Systems (Pre).
    [ 10.013993] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
    [ 10.047615] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
    [ 10.057267] systemd[1]: Starting Dispatch Password Requests to Console Directory Watch.
    [ 10.065836] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [ 10.073989] systemd[1]: Starting Paths.
    [ 10.097779] systemd[1]: Reached target Paths.
    [ 10.102270] systemd[1]: Starting Encrypted Volumes.
    [ 10.127585] systemd[1]: Reached target Encrypted Volumes.
    [ 10.133130] systemd[1]: Starting Swap.
    [ 10.147589] systemd[1]: Reached target Swap.
    [ 10.151972] systemd[1]: Starting Root Slice.
    [ 10.167583] systemd[1]: Created slice Root Slice.
    [ 10.172413] systemd[1]: Starting Delayed Shutdown Socket.
    [ 10.197586] systemd[1]: Listening on Delayed Shutdown Socket.
    [ 10.203460] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
    [ 10.227596] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [ 10.234690] systemd[1]: Starting Journal Socket (/dev/log).
    [ 10.257601] systemd[1]: Listening on Journal Socket (/dev/log).
    [ 10.263660] systemd[1]: Starting User and Session Slice.
    [ 10.287620] systemd[1]: Created slice User and Session Slice.
    [ 10.293584] systemd[1]: Starting udev Control Socket.
    [ 10.317612] systemd[1]: Listening on udev Control Socket.
    [ 10.323202] systemd[1]: Starting udev Kernel Socket.
    [ 10.347630] systemd[1]: Listening on udev Kernel Socket.
    [ 10.353128] systemd[1]: Starting Journal Socket.
    [ 10.377608] systemd[1]: Listening on Journal Socket.
    [ 10.382831] systemd[1]: Starting System Slice.
    [ 10.407621] systemd[1]: Created slice System Slice.
    [ 10.412847] systemd[1]: Starting Increase datagram queue length...
    [ 10.441886] systemd[1]: Mounting Debug File System...
    [ 10.471718] systemd[1]: Mounted Huge Pages File System.
    [ 10.529156] systemd[1]: Started Set Up Additional Binary Formats.
    [ 10.551713] systemd[1]: Starting udev Coldplug all Devices...
    [ 10.671085] systemd[1]: Starting Load Kernel Modules...
    [ 10.759208] systemd[1]: Starting Create list of required static device nodes for the current kernel...
    [ 10.852022] systemd[1]: Mounting POSIX Message Queue File System...
    [ 10.903492] systemd[1]: Starting system-getty.slice.
    [ 10.948011] systemd[1]: Created slice system-getty.slice.
    [ 10.953623] systemd[1]: Starting system-serial\x2dgetty.slice.
    [ 10.977805] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [ 10.984316] systemd[1]: Starting Slices.
    [ 11.007647] systemd[1]: Reached target Slices.
    [ 11.012312] systemd[1]: Starting Remount Root and Kernel File Systems...
    [ 11.067797] systemd[1]: Mounted POSIX Message Queue File System.
    [ 11.087920] systemd[1]: Mounted Debug File System.
    [ 11.107680] systemd[1]: Started Increase datagram queue length.
    [ 11.147850] systemd[1]: Started Load Kernel Modules.
    [ 11.167933] systemd[1]: Started Create list of required static device nodes for the current kernel.
    [ 11.227857] systemd[1]: Started Remount Root and Kernel File Systems.
    [ 11.297853] systemd[1]: Started udev Coldplug all Devices.
    [ 11.397842] systemd[1]: Started Various fixups to make systemd work better on Debian.
    [ 11.405872] systemd[1]: Starting Load/Save Random Seed...
    [ 11.432382] systemd[1]: Starting Create Static Device Nodes in /dev...
    [ 11.462567] systemd[1]: Mounting Configuration File System...
    [ 11.501572] systemd[1]: Mounting FUSE Control File System...
    [ 11.531766] systemd[1]: Starting Apply Kernel Variables...
    [ 11.572007] systemd[1]: Starting Syslog Socket.
    [ 11.607810] systemd[1]: Listening on Syslog Socket.
    [ 11.612927] systemd[1]: Starting Journal Service...
    [ 11.648376] systemd[1]: Started Journal Service.
    [ 12.271032] systemd-udevd[127]: starting version 215
    [ 12.631987] systemd-journald[123]: Received request to flush runtime journal from PID 1
    [ 17.442764] tilcdc 4830e000.lcdc: no encoders/connectors found
    [ 17.761114] tilcdc 4830e000.lcdc: failed to initialize mode setting
    [ 18.112635] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
  • root@arm:~# ./devmem2 0x44E000F8 w
    /dev/mem opened.
    Memory mapped at address 0xb6f61000.
    Value at address 0x44E000F8 (0xb6f610f8): 0x30000


    Still clock is not enabled for MMC2.
  • Hi,

    It seems that your kernel cannot apply proper configurations for your mmc controllers:

    [ 4.200579] omap_hsmmc 48060000.mmc: Got CD GPIO

    [ 4.213277] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517

    [ 4.268305] omap_hsmmc 47810000.mmc: unable to get vmmc regulator -517

    and later:

    [ 4.899237] omap_hsmmc 48060000.mmc: Got CD GPIO

    [ 5.106030] omap_hsmmc 48060000.mmc: no support for card's volts

    [ 5.112157] mmc0: error -22 whilst initialising SD card

    In my opinion this is an erroneous setting in the dts. Check the vmmc regulator settings. 

    As for u-boot configurations, can you see what is the output of:
      u-boot# md  0x44E000F8 

    Best Regards, 

    Yordan
     

  • => md  0x44E000F8
    44e000f8: 00000002 00030000 00030000 00030000    ................
    44e00108: 00000000 00030000 00030000 00000000    ................
    44e00118: 00000000 0000007a 00000002 00070000    ....z...........
    44e00128: 00030000 00000012 00040002 00030000    ................
    44e00138: 00030000 00030000 00000002 00000012    ................
    44e00148: 00000002 00000002 00000012 00000000    ................
    44e00158: 00000000 00000000 00000000 00000000    ................
    44e00168: 00000000 00000000 00000000 00000000    ................
    44e00178: 00000000 00000000 00000000 00000000    ................
    44e00188: 00000000 00000000 00000000 00000000    ................
    44e00198: 00000000 00000000 00000000 00000000    ................
    44e001a8: 00000000 00000000 00000000 00000000    ................
    44e001b8: 00000000 00000000 00000000 00000000    ................
    44e001c8: 00000000 00000000 00000000 00000000    ................
    44e001d8: 00000000 00000000 00000000 00000000    ................
    44e001e8: 00000000 00000000 00000000 00000000    ................
    =>

    Regards,

    Dileep

  • Hi Dileep,

    As you can see from:
    44e000f8: 00000002

    CM_PER_MMC2_CLKCTRL[1-0]MODULEMODE = 0x2 => 0x2 = ENABLE : Module is explicitly enabled. Interface clock (if not used for functions) may be gated according to the clock domain state. Functional clocks are guarantied to stay present. As long as in this configuration, power domain sleep transition cannot happen.

    So I think in u-boot your MMC2 is initialized.

    Best Regards,
    Yordan
  • I have used following configuration in dts, don't know where exactly i am going wrong.

    wl12xx_vmmc: fixedregulator@3 {
    pinctrl-names = "default";
    pinctrl-0 = <&wl12xx_gpio>;
    compatible = "regulator-fixed";
    regulator-name = "wl12xx_vmmc";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    gpio = <&gpio0 27 0>;
    startup-delay-us = <70000>;
    enable-active-high;
    };

    wlan_pins: pinmux_wlan_pins {
    pinctrl-single,pins = <
    0x28 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpio0_26 WL_IRQ */
    >;
    };

    wl12xx_gpio: pinmux_wl12xx_gpio {
    pinctrl-single,pins = <
    0x2c (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpio0_27 WL_EN */
    >;
    };

    /* ODIN-W160 SDIO pins */
    mmc3_pins: pinmux_mmc3_pins {
    pinctrl-single,pins = <
    0x3C (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat3 */
    0x38 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat2 */
    0x34 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat1 */
    0x30 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat0 */
    0x8c (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_clk */
    0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_cmd */
    >;
    };

    &mmc3 {
    /* these are on the crossbar and are outlined in the
    xbar-event-map element */
    dmas = <&edma 32 &edma 33>;
    dma-names = "tx", "rx";

    status = "okay";
    vmmc-supply = <&wl12xx_vmmc>;
    ti,non-removable;
    bus-width = <4>;
    cap-power-off-card;
    pinctrl-names = "default";
    pinctrl-0 = <&mmc3_pins>;

    #address-cells = <1>;
    #size-cells = <0>;
    wlcore: wlcore@0 {
    compatible = "ti,wl1271";
    reg = <2>;
    interrupt-parent = <&gpio0>;
    interrupts = <26 0x4>;
    ref-clock-frequency = <38400000>;
    };
    };

    &edma {
    ti,edma-xbar-event-map = /bits/ 16 <1 32 2 33>;
    };
  • Hi Yordan,

    I am getting the below message when booted.

    [ 4.476176] mmc1: error -84 whilst initialising SDIO card

    I have tapped all SDIO lines, able to see clk, cmd & wifi_chip enable pins toggling, but no changes on data lines (i can see all are pulled high).

    What may be the error ??
  • Hi,

    The error is caused by one of the following:
    1. Your system cannot support the voltage of the card
    or
    2. It cannot detect & init the card.

    Error is outputted from drivers/mmc/core/sdio.c, mmc_attach_sdio() function, and fails in
    1. mmc_select_voltage()
    or
    2. mmc_sdio_init_card()

    Best Regards,
    Yordan