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.

AM3352: MMC2 is not initialized

Part Number: AM3352
Other Parts Discussed in Thread: WL1835, WL1271

Hi all,

I am using a custom board based on AM3352 and having Wi-Fi chip on mmc2 interface. I am using TI  processor-sdk-04.00.00.04 for my development.

ISSUE:

I have configured my device tree properly to support WL1835 on mmc2. I can see the WL_EN function as expected upon kernel boot.

The issue is, kernel does not detect the mmc2 interface what-so-ever at boot. I don't see any logs of mmc2 initialization. Below is my device tree info for WL1835 chip on mmc2:

wlan_en_reg: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "wlan_en_reg";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;

/* WLAN_EN GPIO for this board - Bank3, pin4 */
gpio = <&gpio3 4 0>;

/* WLAN card specific delay */
startup-delay-us = <70000>;
enable-active-high;
};

mmc3_pins: pinmux_mmc3_pins {
pinctrl-single,pins = <
0x30 (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad12.mmc2_dat0, INPUT_PULLUP | MODE3 */
0x34 (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad13.mmc2_dat1, INPUT_PULLUP | MODE3 */
0x38 (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad14.mmc2_dat2, INPUT_PULLUP | MODE3 */
0x3c (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad15.mmc2_dat3, INPUT_PULLUP | MODE3 */
0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_csn3.mmc2_cmd, INPUT_PULLUP | MODE3 */
0x8C (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_clk.mmc2_clk, INPUT_PULLUP | MODE3 */
>;
};

wlan_pins: pinmux_wlan_pins {
pinctrl-single,pins = <
0x118 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gmii1_rxdv.gpio3_4 WL_EN */
0x98 (PIN_INPUT | MUX_MODE7) /* gpmc_wen.gpio2_4 WL_IRQ */
>;
};

&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 = <&wlan_en_reg>;
bus-width = <4>;
pinctrl-names = "default";
pinctrl-0 = <&mmc3_pins &wlan_pins>;
ti,non-removable;
ti,needs-special-hs-handling;
cap-power-off-card;
keep-power-in-suspend;

#address-cells = <1>;
#size-cells = <0>;
wlcore: wlcore@2 {
compatible = "ti,wl1835";
reg = <2>;
interrupt-parent = <&gpio2>;
interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
};
};

I have tried modifying the delay above, yet there is no success. 

One more finding is, if I keep the wlan_en_reg in enable-active-low state or if I give mmc3 and fixed "vmmc-supply", kernel can detect the mmc2 interface, of course WL1835 won't function but I can see the kernel try to probe wlcore.

Please suggest me where I am wrong.

Thanks and Regards,

Divyeshkumar M

  • The software team have been notified. They will respond here.
  • Hi Divyeshkumar,

    Are you follow WL18xx Platform Integration Guide which can be found at:
    processors.wiki.ti.com/.../WL18xx_Platform_Integration_Guide
    If not go through all steps.

    BR
    Tsvetolin Shulev
  • Hi,

    Can you show me the dmesg log with:
    "wlan_en_reg in enable-active-low state or if I give mmc3 and fixed "vmmc-supply""

    Thanks,
    Yordan
  • Hi Yordan,

    Here's the dmesg log when I give mmc3 a fixed vmmc-supply of "vmmcsd_fixed"

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.9.28-geed43d1050 (dmaisuria@USNYGRPCLNX09855) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 PREEMPT Fri Oct 6 09:42:51 EDT 2017
    [    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] OF: fdt:Machine model: The Raymond Corporation rFleet
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x9d000000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] On node 0 totalpages: 131072
    [    0.000000] free_area_init_node: node 0, pgdat c0c43c48, node_mem_map dcb61000
    [    0.000000]   Normal zone: 1152 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 131072 pages, LIFO batch:31
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon)
    [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [    0.000000] pcpu-alloc: [0] 0 
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    [    0.000000] Kernel command line: earlyprintk console=ttyO0,115200n8 root=/dev/mmcblk0p2 rootwait ro rootfstype=ext4
    [    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: 458008K/524288K available (7168K kernel code, 280K rwdata, 2436K rodata, 1024K init, 272K bss, 17128K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
                       vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                       fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                       vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
                       lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
                       pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                       modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                         .text : 0xc0008000 - 0xc0800000   (8160 kB)
                         .init : 0xc0b00000 - 0xc0c00000   (1024 kB)
                         .data : 0xc0c00000 - 0xc0c46190   ( 281 kB)
                          .bss : 0xc0c46190 - 0xc0c8a434   ( 273 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    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.000032] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000081] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000108] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000441] clocksource_probe: no matching clocksources found
    [    0.000770] Console: colour dummy device 80x30
    [    0.000823] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000841] This ensures that you still see kernel messages. Please
    [    0.000855] update your kernel commandline.
    [    0.000900] Calibrating delay loop... 298.59 BogoMIPS (lpj=1492992)
    [    0.067873] pid_max: default: 32768 minimum: 301
    [    0.068174] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.068204] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.069874] CPU: Testing write buffer coherency: ok
    [    0.070539] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.072468] EFI services will not be available.
    [    0.075852] devtmpfs: initialized
    [    0.100912] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.101685] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.101739] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.108885] pinctrl core: initialized pinctrl subsystem
    [    0.111560] NET: Registered protocol family 16
    [    0.116177] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.141266] omap_hwmod: tptc0 using broken dt data from edma
    [    0.141616] omap_hwmod: tptc1 using broken dt data from edma
    [    0.141938] omap_hwmod: tptc2 using broken dt data from edma
    [    0.149315] omap_hwmod: debugss: _wait_target_disable failed
    [    0.237958] cpuidle: using governor ladder
    [    0.267942] cpuidle: using governor menu
    [    0.274465] gpio gpiochip0: (gpio): added GPIO chardev (254:0)
    [    0.275227] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (gpio)
    [    0.278896] OMAP GPIO hardware version 0.1
    [    0.280484] gpio gpiochip1: (gpio): added GPIO chardev (254:1)
    [    0.281197] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (gpio)
    [    0.286084] gpio gpiochip2: (gpio): added GPIO chardev (254:2)
    [    0.286969] gpiochip_setup_dev: registered GPIOs 64 to 95 on device: gpiochip2 (gpio)
    [    0.292310] gpio gpiochip3: (gpio): added GPIO chardev (254:3)
    [    0.292999] gpiochip_setup_dev: registered GPIOs 96 to 127 on device: gpiochip3 (gpio)
    [    0.318436] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.363051] edma 49000000.edma: Legacy memcpy is enabled, things might not work
    [    0.378376] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.379040] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@0[0]'
    [    0.379712] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@1[0]'
    [    0.380324] of_get_named_gpiod_flags: parsed 'gpio' property of node '/fixedregulator@2[0]' - status (0)
    [    0.386929] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [    0.387048] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe
    [    0.387342] media: Linux media interface: v0.10
    [    0.387490] Linux video capture interface: v2.00
    [    0.387598] pps_core: LinuxPPS API ver. 1 registered
    [    0.387623] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.387683] PTP clock support registered
    [    0.387779] EDAC MC: Ver: 3.0.0
    [    0.389812] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.390561] Advanced Linux Sound Architecture Driver Initialized.
    [    0.393276] clocksource: Switched to clocksource timer1
    [    0.419966] NET: Registered protocol family 2
    [    0.421617] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.421754] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.421877] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.422047] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.422097] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.422414] NET: Registered protocol family 1
    [    0.423250] RPC: Registered named UNIX socket transport module.
    [    0.423483] RPC: Registered udp transport module.
    [    0.423504] RPC: Registered tcp transport module.
    [    0.423522] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.423553] PCI: CLS 0 bytes, default 64
    [    0.425332] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.430867] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [    0.452017] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.454393] NFS: Registering the id_resolver key type
    [    0.454471] Key type id_resolver registered
    [    0.454493] Key type id_legacy registered
    [    0.454602] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.458827] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    [    0.458869] io scheduler noop registered
    [    0.458889] io scheduler deadline registered
    [    0.459283] io scheduler cfq registered (default)
    [    0.461330] pinctrl-single 44e10800.pinmux: please update dts to use #pinctrl-cells = <1>
    [    0.462379] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.627206] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.636413] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 154, base_baud = 3000000) is a 8250
    [    1.264871] console [ttyS0] enabled
    [    1.270880] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 155, base_baud = 3000000) is a 8250
    [    1.282160] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 156, base_baud = 3000000) is a 8250
    [    1.294940] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    1.301846] [drm] Initialized
    [    1.308181] tilcdc 4830e000.lcdc: no encoders/connectors found
    [    1.346343] brd: module loaded
    [    1.365704] loop: module loaded
    [    1.379285] libphy: Fixed MDIO Bus: probed
    [    1.388995] mousedev: PS/2 mouse device common for all mice
    [    1.395797] i2c /dev entries driver
    [    1.402365] cpu cpu0: OPP-v2 not supported, cpufreq-dt will attempt to use legacy tables.
    [    1.413056] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
    [    1.413080] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.413135] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@48060000[0]' - status (0)
    [    1.413446] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.418131] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
    [    1.418146] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.418168] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
    [    1.418186] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
    [    1.418201] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    1.418220] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
    [    1.474522] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer cd
    [    1.474546] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
    [    1.474567] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@481d8000[0]'
    [    1.475694] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@481d8000[0]'
    [    1.475711] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
    [    1.475729] omap_hsmmc 481d8000.mmc: lookup for GPIO cd failed
    [    1.475751] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer wp
    [    1.475764] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
    [    1.475781] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@481d8000[0]'
    [    1.475796] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@481d8000[0]'
    [    1.475834] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
    [    1.475851] omap_hsmmc 481d8000.mmc: lookup for GPIO wp failed
    [    1.521554] mmc0: host does not support reading read-only switch, assuming write-enable
    [    1.531934] 
     ############### HELLO! From Kernel! ############
                   
    [    1.538735] omap_hsmmc 47810000.mmc: GPIO lookup for consumer cd
    [    1.538749] omap_hsmmc 47810000.mmc: using device tree for GPIO lookup
    [    1.538770] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@47810000[0]'
    [    1.538786] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@47810000[0]'
    [    1.538799] omap_hsmmc 47810000.mmc: using lookup tables for GPIO lookup
    [    1.538813] omap_hsmmc 47810000.mmc: lookup for GPIO cd failed
    [    1.538834] omap_hsmmc 47810000.mmc: GPIO lookup for consumer wp
    [    1.538846] omap_hsmmc 47810000.mmc: using device tree for GPIO lookup
    [    1.538861] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@47810000[0]'
    [    1.538875] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@47810000[0]'
    [    1.538887] omap_hsmmc 47810000.mmc: using lookup tables for GPIO lookup
    [    1.538900] omap_hsmmc 47810000.mmc: lookup for GPIO wp failed
    [    1.540075] mmc0: new high speed SDHC card at address 0007
    [    1.547212] mmcblk0: mmc0:0007 SD4GB 3.71 GiB 
    [    1.554629]  mmcblk0: p1 p2 p3 p4
    [    1.594540] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.601419] spi1.0 supply vdd not found, using dummy regulator
    [    1.607727] spi1.0 supply vddio not found, using dummy regulator
    [    1.614249] iio iio:device0: lsm330dlc_gyro: WhoAmI mismatch (0xff).
    [    1.624425] st-gyro-spi: probe of spi1.0 failed with error -22
    [    1.630818] omap_hsmmc 47810000.mmc: card claims to support voltages below defined range
    [    1.645745] 
     ############### HELLO! From Kernel! ############
                   
    [    1.651916] mmc1: new high speed MMC card at address 0001
    [    1.657638] NET: Registered protocol family 10
    [    1.660382] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.662597] NET: Registered protocol family 17
    [    1.663240] Key type dns_resolver registered
    [    1.664083] omap_voltage_late_init: Voltage driver support not added
    [    1.664535] random: fast init done
    [    1.678126] 
     ############### HELLO! From Kernel! ############
                   
    [    1.678130] mmc2: new high speed SDIO card at address 0001
    [    1.729255] mmcblk1: mmc1:0001 P1XXXX 7.20 GiB 
    [    1.737010] mmcblk1boot0: mmc1:0001 P1XXXX partition 1 16.0 MiB
    [    1.743696] mmcblk1boot1: mmc1:0001 P1XXXX partition 2 16.0 MiB
    [    1.789847] tps65217 0-0024: TPS65217 ID 0xe version 1.2
    [    1.795980] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 100 kHz
    [    1.803960] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
    [    1.812494] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 300000 KHz
    [    1.820227] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 500000 KHz
    [    1.829758] hctosys: unable to open rtc device (rtc0)
    [    1.835917] lis3_reg: disabling
    [    1.839188] wlan_en_reg: disabling
    [    1.842655] ALSA device list:
    [    1.845780]   No soundcards found.
    [    1.867292] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    1.875636] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
    [    1.892895] devtmpfs: mounted
    [    1.897564] Freeing unused kernel memory: 1024K (c0b00000 - c0c00000)
    [    2.304207] systemd[1]: System time before build time, advancing clock.
    [    2.429284] systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID)
    [    2.449032] systemd[1]: Detected architecture arm.
    [    2.484847] systemd[1]: Set hostname to <raymond-rfleet>.
    [    2.838209] systemd[1]: [/lib/systemd/system/gadget-init.service:15] Unknown lvalue 'ExecStopPre' in section 'Service'
    [    3.138204] systemd[1]: sysinit.target: Found ordering cycle on sysinit.target/start
    [    3.146217] systemd[1]: sysinit.target: Found dependency on alignment.service/start
    [    3.154070] systemd[1]: sysinit.target: Found dependency on basic.target/start
    [    3.161350] systemd[1]: sysinit.target: Found dependency on sockets.target/start
    [    3.168829] systemd[1]: sysinit.target: Found dependency on dbus.socket/start
    [    3.176038] systemd[1]: sysinit.target: Found dependency on sysinit.target/start
    [    4.126177] cryptodev: loading out-of-tree module taints kernel.
    [    4.146538] cryptodev: driver 1.8 loaded.
    [    8.648000] random: crng init done
    [   11.489725] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [   11.874129] systemd-journald[102]: Received request to flush runtime journal from PID 1
    [   13.733861] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [   13.921846] bq32k 0-0068: Oscillator Failure. Check RTC battery.
    [   13.974276] rtc rtc1: 44e3e000.rtc: dev (253:1)
    [   13.974292] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc1
    [   14.101978] rtc rtc0: read_time: fail to read: -22
    [   14.102376] rtc rtc0: bq32k: dev (253:0)
    [   14.102408] bq32k 0-0068: rtc core: registered bq32k as rtc0
    [   14.595365] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [   14.776581] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [   14.853891] omap-aes 53500000.aes: will run requests pump with realtime priority
    [   15.329957] PM: Cannot get wkup_m3_ipc handle
    [   16.886078] Bluetooth: Core ver 2.22
    [   16.889784] NET: Registered protocol family 31
    [   17.043457] Bluetooth: HCI device and connection manager initialized
    [   17.049938] Bluetooth: HCI socket layer initialized
    [   17.331414] Bluetooth: L2CAP socket layer initialized
    [   17.443560] Bluetooth: SCO socket layer initialized
    [   19.870166] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: (null)
    [   19.967008] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
    [   20.083631] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [   21.172318] NET: Registered protocol family 15
    [   22.484624] Initializing XFRM netlink socket
    [   22.972098] udc-core: couldn't find an available UDC - added [g_multi] to list of pending drivers
    [   26.106273] PM: Cannot get wkup_m3_ipc handle
    [   26.197695] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
    [   26.197716] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   26.197729] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   26.197738] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   26.197746] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   26.197754] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
    [   26.197763] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
    [   26.197769] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   26.197777] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   26.197784] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   26.197790] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   26.197797] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
    [   26.197864] 47401300.usb-phy supply vcc not found, using dummy regulator
    [   26.302013] usbcore: registered new interface driver usbfs
    [   26.354243] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer reset
    [   26.354253] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [   26.354267] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   26.354275] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   26.354282] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [   26.354289] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO reset failed
    [   26.354298] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer vbus-detect
    [   26.354303] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [   26.354310] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   26.354316] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   26.354321] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [   26.354327] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO vbus-detect failed
    [   26.354395] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [   26.354880] PM: Cannot get wkup_m3_ipc handle
    [   26.395211] PM: Cannot get wkup_m3_ipc handle
    [   26.570933] usbcore: registered new interface driver hub
    [   26.627606] usbcore: registered new device driver usb
    [   26.854903] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [   26.918607] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [   27.015855] hub 1-0:1.0: USB hub found
    [   27.062814] hub 1-0:1.0: 1 port detected
    [   27.115845] PM: Cannot get wkup_m3_ipc handle
    [   27.144507] PM: Cannot get wkup_m3_ipc handle
    [   27.242084] using random self ethernet address
    [   27.275237] using random host ethernet address
    [   27.279737] using host ethernet address: 98:5D:AD:4B:47:65
    [   27.379718] using random self ethernet address
    [   27.435151] using random host ethernet address
    [   27.439657] using host ethernet address: 98:5D:AD:4B:47:65
    [   27.537290] usb0: HOST MAC 98:5d:ad:4b:47:65
    [   27.607365] usb0: MAC 22:3c:df:97:48:e1
    [   27.616116] wl18xx_driver wl18xx.0.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
    [   27.730821] PM: Cannot get wkup_m3_ipc handle
    [   27.937690] Mass Storage Function, version: 2009/09/11
    [   27.942886] LUN: removable file: (no medium)
    [   27.994533] LUN: removable read only file: /dev/mmcblk0p1
    [   28.033452] Number of LUNs=1
    [   28.049096] g_multi gadget: Multifunction Composite Gadget
    [   28.076503] g_multi gadget: g_multi ready
    [   28.114840] PM: Cannot get wkup_m3_ipc handle
    [   28.144568] PM: Cannot get wkup_m3_ipc handle
    [   28.175157] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [   28.175198] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [   28.195222] hub 2-0:1.0: USB hub found
    [   28.195283] hub 2-0:1.0: 1 port detected
    [   28.291550] PM: Cannot get wkup_m3_ipc handle
    [   28.790499] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
    [   29.421707] ------------[ cut here ]------------
    [   29.433270] WARNING: CPU: 0 PID: 64 at /media/dmaisuria/Storage/rayBuild/tisdk/build/arago-tmp-external-linaro-toolchain/work-shared/raymond-rfleet/kernel-source/drivers/net/wirele]
    [   29.593422] Modules linked in: usb_f_acm u_serial wl18xx wlcore mac80211 usb_f_ecm cfg80211 musb_dsps musb_hdrc phy_am335x usbcore phy_generic phy_am335x_control sha512_generic sha)
    [   29.908320] CPU: 0 PID: 64 Comm: kworker/0:2 Tainted: G           O    4.9.28-geed43d1050 #1
    [   29.983642] Hardware name: Generic AM33XX (Flattened Device Tree)
    [   29.989821] Workqueue: events request_firmware_work_func
    [   30.055998] Backtrace: 
    [   30.058512] [<c010b790>] (dump_backtrace) from [<c010ba4c>] (show_stack+0x18/0x1c)
    [   30.122988]  r7:00000009 r6:00000000 r5:bf0370b0 r4:00000000
    [   30.161876] [<c010ba34>] (show_stack) from [<c03bd930>] (dump_stack+0x24/0x28)
    [   30.205995] [<c03bd90c>] (dump_stack) from [<c012b0c0>] (__warn+0xe8/0x100)
    [   30.213022] [<c012afd8>] (__warn) from [<c012b190>] (warn_slowpath_null+0x28/0x30)
    [   30.303606]  r9:00000000 r8:00000004 r7:d7c6b700 r6:dc653610 r5:0001ffc4 r4:dc54f000
    [   30.311460] [<c012b168>] (warn_slowpath_null) from [<bf036274>] (wl12xx_sdio_raw_write+0xb8/0x144 [wlcore_sdio])
    [   30.413662] [<bf0361bc>] (wl12xx_sdio_raw_write [wlcore_sdio]) from [<bf323e28>] (wlcore_set_partition+0xd4/0x4fc [wlcore])
    [   30.473786]  r9:d8fbfb00 r8:bf339c40 r7:dc653600 r6:bf0361bc r5:bf35c0fc r4:d78c6ce0
    [   30.481891] [<bf323d54>] (wlcore_set_partition [wlcore]) from [<bf3199c0>] (wl12xx_set_power_on+0x90/0x16c [wlcore])
    [   30.557673]  r6:00000000 r5:00000000 r4:d78c6ce0
    [   30.562635] [<bf319930>] (wl12xx_set_power_on [wlcore]) from [<bf31e564>] (wlcore_nvs_cb+0x11c/0xa5c [wlcore])
    [   30.633419]  r5:bf338f84 r4:d78c6ce0
    [   30.637280] [<bf31e448>] (wlcore_nvs_cb [wlcore]) from [<c052d858>] (request_firmware_work_func+0x44/0x6c)
    [   30.687601]  r10:dc4bc300 r9:00000000 r8:c0c0e6e4 r7:dcb3f500 r6:00000000 r5:dc4bc300
    [   30.733428]  r4:d7c6ba40
    [   30.736030] [<c052d814>] (request_firmware_work_func) from [<c0141f68>] (process_one_work+0x1f8/0x424)
    [   30.790385]  r4:d7c6ba40
    [   30.792984] [<c0141d70>] (process_one_work) from [<c0142200>] (worker_thread+0x6c/0x618)
    [   30.837553]  r10:dc4bc300 r9:00000008 r8:c0c0e6f8 r7:c0c13d80 r6:dc4bc318 r5:dc4e4000
    [   30.869029]  r4:c0c0e6e4
    [   30.871631] [<c0142194>] (worker_thread) from [<c0147e18>] (kthread+0xf8/0x110)
    [   30.903419]  r10:00000000 r9:00000000 r8:c0142194 r7:dc4bc300 r6:dc4e4000 r5:dc4bbf40
    [   30.911307]  r4:00000000
    [   30.943841] [<c0147d20>] (kthread) from [<c0107d38>] (ret_from_fork+0x14/0x3c)
    [   30.951126]  r8:00000000 r7:00000000 r6:00000000 r5:c0147d20 r4:dc4bbf40
    [   30.997639] ---[ end trace 4f765dff2275409f ]---
    [   31.002320] wl1271_sdio mmc2:0001:2: sdio write failed (-110)
     
    

    As seen from the log, kernel detected the mmc2 interface, but since I am giving a stable vmmc supply, WL185 won't power on and it won't be able to communicate through the SDIO driver.

    Hi Shulev,

    Yes, I have already gone through the integration guide you shared.

    Thanks,

    Divyeshkumar M

  • Hi Yordan,

    Have you checked the dmesg log?

    Thanks,
    Divyeshkumar M
  • Hi,

    I was OoO. I will look at this today.

    Best Regards,
    Yordan
  • Hi,

    See how the wlan_en_reg is defined in am335x-evm.dts:
    wlan_en_reg: fixedregulator2 {
    compatible = "regulator-fixed";
    regulator-name = "wlan-en-regulator";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;

    /* WLAN_EN GPIO for this board - Bank1, pin16 */
    gpio = <&gpio1 16 0>;

    /* WLAN card specific delay */
    startup-delay-us = <70000>;
    enable-active-high;
    };


    The situation is similar in am335x-evmsk.dts:
    wl12xx_vmmc: fixedregulator2 {
    pinctrl-names = "default";
    pinctrl-0 = <&wl12xx_gpio>;
    compatible = "regulator-fixed";
    regulator-name = "vwl1271";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    gpio = <&gpio1 29 0>;
    startup-delay-us = <70000>;
    enable-active-high;
    };

    As you can see it is a fixed regulator. Can you revisit your vmmc_fixed definition?

    Best Regards,
    Yordan
  • Hi Yordan,

    I am using the same technique to let the driver control the voltage regulation (I have pasted my dts in thread que.). I used fixed vmmc_fixed as below:

    vmmcsd_fixed: fixedregulator@0 {

    compatible = "regulator-fixed";

    regulator-name = "vmmcsd_fixed";

    regulator-min-microvolt = <3300000>;

    regulator-max-microvolt = <3300000>;

    };

    ANYWAYS,

    I made a lot progress to this issue, below are the details:

    Since we're using an inverter for WL EN pin, I had to  keep wlan_en_reg in active low state, which is now giving me expected toggling of the WL EN. Driver can toggle it fine and Kernel detects the mmc2. I also checked the SDIO data pins and find out that those pins are not transferring any data at all (Pin mux is clean, I don't know the reason). I changed the pin mux and have some movement on sdio pins.

    ISSUE:

    Now I have another issue, I could not read from the WL1835 chip and kernel breaks the driver with below errors (I enabled the MMC_DEBUG):

    [ 42.189315] mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
    [ 42.189328] mmc2: 4 bytes transferred: 0
    [ 42.189388] mmc2: starting CMD53 arg a7ffb004 flags 000001b5
    [ 42.189405] mmc2: blksz 4 blocks 1 flags 00000100 tsac 1000 ms nsac 0
    [ 42.189792] mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
    [ 42.189807] mmc2: 4 bytes transferred: 0
    [ 42.189878] mmc2: starting CMD52 arg 83fff801 flags 00000195
    [ 42.190151] mmc2: req done (CMD52): 0: 00001001 00000000 00000000 00000000
    [ 42.190225] mmc2: starting CMD53 arg 266e7004 flags 000001b5
    [ 42.190242] mmc2: blksz 4 blocks 1 flags 00000200 tsac 1000 ms nsac 0
    [ 43.239106] mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
    [ 43.239138] mmc2: 0 bytes transferred: -110
    [ 43.288214] wl1271_sdio mmc2:0001:2: sdio read failed (-110)
    [ 43.288245] SDIO: Disabling device mmc2:0001:2...
    [ 43.288266] mmc2: starting CMD52 arg 00000400 flags 00000195
    [ 43.319294] mmc2: req done (CMD52): 0: 00002001 00000000 00000000 00000000
    [ 43.319485] mmc2: starting CMD52 arg 80000401 flags 00000195
    [ 43.319766] mmc2: req done (CMD52): 0: 00002001 00000000 00000000 00000000
    [ 43.319813] SDIO: Disabled device mmc2:0001:2
    [ 43.319833] mmc2: mmc_power_save_host: powering down
    [ 43.319856] mmc2: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0

    What could be the possible cause of this? I think it is somewhere at the HW level, as if I change the mmc2 interface to work with 1 SDIO pin, I can have the WL drivers loaded OK and can have the wlan0 interface up and running OK. Though the speed it pretty slow, I can get associated to a base station and can ping from there.

    Please suggest the possible cause of the later issue.

    Thanks & Regards,

    Divyeshkumar M

  • Hi,

    (Pin mux is clean, I don't know the reason). I changed the pin mux and have some movement on sdio pins.

    What do you mean pinmux is clean??? Are you saying the the dts pinmux settings did not apply?

    Have you tried adding the mmc2 pinmux settings in u-boot as well? Did you verify that those pins are NOT configured anywhere else in your system?

    Best Regards,
    Yordan
  • Hi Yordan,

    By the term pinmux is clean, I mean there is no issue or cross-muxing in the pinmux. And Yes I am using the same device tree in the u-boot is well.

    I have not added the pinmux for mmc2 in u-boot's mux.c file, I have only added that to u-boot's dts. Do I really need to add those pin mux in mux.c?

    I have checked the pins, the only possible location for pinmux is mux.c file of u-boot, device tree of u-boot and device tree of kernel. Are there any other possible location for pin mux?

    Thanks,
    Divyeshkumar
  • No, there aren't any other pinmux configurations in the SDK.

    Best Regards,
    Yordan
  • Then, Yes all the pins are configured properly. What do you think from here? Do you have clue why I am getting:

    wl1271_sdio mmc2:0001:2: sdio read failed (-110)

    wl1271: ERROR couldn't get hw info


    Thanks,
    Divyeshkumar

  • Is it possible to verify this:
    e2e.ti.com/.../264939

    Best Regards,
    Yordan
  • HI Yordan,

    I have already checked that thread and our WL EN is 1.8V. As I have mentioned, If I change the SDIO bus width from 4 to 1, Wlcore drivers load fine. I can even connect to a Wi-Fi base station and have ping to it. The speed of the communication is much slower in this cases. This means that, my WL1835 chip is ON and responsive, but there is some issue with the SDIO data lines.

    Thanks,
    Divyeshkumar
  • Ok, I'll need some time to dig in the sources and try to find the root cause of this issue.

    Best Regards,
    Yordan
  • OK Yordan,

    Really appreciate your help.

    Thanks,
    Divyeshkumar
  • Hi,

    The errors you see come from:
    drivers/net/wireless/ti/wlcore/main.c: wl12xx_get_hw_info
    code breaks either at ret = wlcore_read_reg(wl, REG_CHIP_ID_B, &wl->chip.id);, or at ret = wl->ops->get_pg_ver(wl, &wl->hw_pg_ver);This is regarding the "wl1271: ERROR couldn't get hw info" message. The "wl1271_sdio mmc2:0001:2: sdio read failed (-110)" message come from drivers/net/wireless/ti/wlcore/sdio.c: wl12xx_sdio_raw_read() fucntion.
    It would be good if you could check weather you have clock signal going to your wifi module.

    Best Regards,
    Yordan
  • HI Yordan,

    Clock to the WiFI chip is OK.

    Thanks,
    Divyeshkumar
  • Hi,

    This is a long shot, but can you try switching to:
    compatible = "ti,am33xx-hsmmc"
    or even
    .compatible = "ti,dra7-hsmmc" if the amm33xx-hsmmc does not work.

    Best Regards,
    Yordan
  • Hi Yordan,

    The issue is solved now. We had rework for mmc2_dat3 which wasn't configured properly. The slow response of the ping was due to a H/W issue on RF Antenna side.

    Really appreciate your help towards solving the issue.

    Thanks and Regards,
    Divyeshkumar