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.

Linux/WL1831MOD: AM335x - not polling wifi module on boot

Part Number: WL1831MOD

Tool/software: Linux

Hi
I am working on a project where the board is closely based on a beaglebone black.
I have recently got my hands on a new revision of our board (fixing connections to the wifi module) and I am looking to get the Wl1831MOD up and running.

I am trying to follow the instructions in
- processors.wiki.ti.com/.../WL18xx_Platform_Integration_Guide
- processors.wiki.ti.com/.../WiLink8_Linux_Getting_Started_Guide
but not having much success.

I cannot see any attempt to talk to the module at startup, or when I try and start wpa_supplicant
- there is no activity on the line I am using for the WLAN_ENABLE (GPIO1_25 - BALL U16)

I am using the pre-built binary for the kernel that shipped with the dev kit I am using.
The kernel it contains is:

root@am335x-evm:~# uname -a
Linux am335x-evm 4.4.19-gdb0b54cdad #1 PREEMPT Mon Oct 3 17:43:46 EDT 2016 armv7l GNU/Linux

I have modified our device tree based on the examples given and our schematics.

The entries I have put in my device-tree are:

wlan_en_reg: fixedregulator@2 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&wlan_reg_gpio>;
regulator-name = "wlan-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <700000>;

gpio = <&gpio1 25 GPIO_ACTIVE_HIGH>;
enable-active-high;
};

&am33xx_pinmux {
wifi_mmc_pins_default: wifi_mmc_pins_default {
pinctrl-single,pins = <
0x80 ( PIN_INPUT_PULLUP | MUX_MODE2 ) /* (U9) gpmc_csn1.mmc1_clk */
0x84 ( PIN_INPUT_PULLUP | MUX_MODE2 ) /* (V9) gpmc_csn2.mmc1_cmd */
0x0 ( PIN_INPUT_PULLUP | MUX_MODE1 ) /* (U7) gpmc_ad0.mmc1_dat0 */
0x4 ( PIN_INPUT_PULLUP | MUX_MODE1 ) /* (V7) gpmc_ad1.mmc1_dat1 */
0x8 ( PIN_INPUT_PULLUP | MUX_MODE1 ) /* (R8) gpmc_ad2.mmc1_dat2 */
0xc ( PIN_INPUT_PULLUP | MUX_MODE1 ) /* (T8) gpmc_ad3.mmc1_dat3 */
>;
};

wifi_mmc_pins_sleep: wifi_mmc_pins_sleep {
pinctrl-single,pins = <
0x80 ( PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (U9) gpmc_csn1.mmc1_clk */
0x84 ( PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V9) gpmc_csn2.mmc1_cmd */
0x0 ( PIN_INPUT_PULLDOWN | MUX_MODE7) /* (U7) gpmc_ad0.mmc1_dat0 */
0x4 ( PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V7) gpmc_ad1.mmc1_dat1 */
0x8 ( PIN_INPUT_PULLDOWN | MUX_MODE7) /* (R8) gpmc_ad2.mmc1_dat2 */
0xc ( PIN_INPUT_PULLDOWN | MUX_MODE7) /* (T8) gpmc_ad3.mmc1_dat3 */
>;
};

/* wl12xx/wl18xx card enable/irq GPIOs. */
wlan_pins_default: wlan_pins_default {
pinctrl-single,pins = <
0x64 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a9.rgmii2_rd2 */
0x68 (PIN_INPUT | MUX_MODE7) /* gpmc_a10.rgmii2_rd1 */ 
>;
};

wlan_pins_sleep: wlan_pins_sleep {
pinctrl-single,pins = <
0x64 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a9.rgmii2_rd2 */
0x68 (PIN_INPUT | MUX_MODE7) /* gpmc_a10.rgmii2_rd1 */
>;
};
wlan_reg_gpio: wlan_reg_gpio {
pinctrl-single,pins = <
0x64 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a9.rgmii2_rd2 */
>;
};
};
&mmc2 {
status = "okay";
vmmc-supply = <&wlan_en_reg>;
bus-width = <4>;
pinctrl-names = "default";
pinctrl-0 = <&wifi_mmc_pins_default &wlan_pins_default>;

ti,non-removable;
ti,needs-special-hs-handling;
cap-power-off-card;
keep-power-in-suspend;

#address-cells = <1>;
#size-cells = <0>;
wlcore: wlcore@0 {
compatible = "ti,wl1831";
reg = <2>;
interrupt-parent = <&gpio1>;
interrupts = <26 IRQ_TYPE_EDGE_RISING>; 
};
};

( I have also experimented with removing the pulls on the mmc1 pinmuxes without any success)

I have attached a copy of a startup log. 

full_dmesg.txt
root@am335x-evm:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.19-gdb0b54cdad (gtbldadm@ubuntu-16) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #1 PREEMPT Mon Oct 3 17:43:46 EDT 2016
[    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: Compumedics Argo
[    0.000000] cma: Reserved 24 MiB at 0x8d000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 65536
[    0.000000] free_area_init_node: node 0, pgdat c09546d4, node_mem_map cfdad000
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    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: 64960
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=1eb3b9b3-02 rw rootfstype=ext4 rootwait
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 224976K/262144K available (6551K kernel code, 314K rwdata, 2396K rodata, 264K init, 265K bss, 12592K reserved, 24576K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
                   lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0xc0008000 - 0xc08c5004   (8949 kB)
                     .init : 0xc08c6000 - 0xc0908000   ( 264 kB)
                     .data : 0xc0908000 - 0xc0956b10   ( 315 kB)
                      .bss : 0xc0956b10 - 0xc0999258   ( 266 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 25000000 Hz
[    0.000020] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.000052] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.000067] OMAP clocksource: timer1 at 25000000 Hz
[    0.000289] clocksource_probe: no matching clocksources found
[    0.000523] Console: colour dummy device 80x30
[    0.000558] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.000567] This ensures that you still see kernel messages. Please
[    0.000574] update your kernel commandline.
[    0.000598] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
[    0.118784] pid_max: default: 32768 minimum: 301
[    0.118953] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.118969] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.119877] Initializing cgroup subsys io
[    0.119920] Initializing cgroup subsys memory
[    0.119970] Initializing cgroup subsys devices
[    0.119990] Initializing cgroup subsys freezer
[    0.120009] Initializing cgroup subsys perf_event
[    0.120026] Initializing cgroup subsys pids
[    0.120062] CPU: Testing write buffer coherency: ok
[    0.120589] Setting up static identity map for 0x80008200 - 0x80008258
[    0.123472] devtmpfs: initialized
[    0.139797] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.158910] omap_hwmod: debugss: _wait_target_disable failed
[    0.216239] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.219174] pinctrl core: initialized pinctrl subsystem
[    0.220863] NET: Registered protocol family 16
[    0.223661] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.248794] cpuidle: using governor ladder
[    0.278780] cpuidle: using governor menu
[    0.284387] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
[    0.284807] OMAP GPIO hardware version 0.1
[    0.285802] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
[    0.286844] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
[    0.287850] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
[    0.298899] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.340107] edma 49000000.edma: TI EDMA DMA engine driver
[    0.340603] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@0[0]'
[    0.341094] of_get_named_gpiod_flags: parsed 'gpio' property of node '/fixedregulator@2[0]' - status (0)
[    0.345413] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.345604] media: Linux media interface: v0.10
[    0.345684] Linux video capture interface: v2.00
[    0.345762] pps_core: LinuxPPS API ver. 1 registered
[    0.345773] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.345812] PTP clock support registered
[    0.345881] EDAC MC: Ver: 3.0.0
[    0.347430] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.347858] Advanced Linux Sound Architecture Driver Initialized.
[    0.349562] clocksource: Switched to clocksource timer1
[    0.364182] NET: Registered protocol family 2
[    0.365229] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.365279] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.365316] TCP: Hash tables configured (established 2048 bind 2048)
[    0.365418] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.365444] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.365647] NET: Registered protocol family 1
[    0.366176] RPC: Registered named UNIX socket transport module.
[    0.366197] RPC: Registered udp transport module.
[    0.366206] RPC: Registered tcp transport module.
[    0.366215] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.366247] PCI: CLS 0 bytes, default 64
[    0.367452] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.370301] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.381394] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.382620] NFS: Registering the id_resolver key type
[    0.382717] Key type id_resolver registered
[    0.382729] Key type id_legacy registered
[    0.382836] ntfs: driver 2.1.32 [Flags: R/O].
[    0.387632] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.387677] io scheduler noop registered
[    0.387698] io scheduler deadline registered
[    0.387915] io scheduler cfq registered (default)
[    0.389968] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.474623] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[    0.480292] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[    1.073908] console [ttyS0] enabled
[    1.079112] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
[    1.089672] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 160, base_baud = 3000000) is a 8250
[    1.099993] [drm] Initialized drm 1.1.0 20060810
[    1.106104] panel panel: GPIO lookup for consumer enable
[    1.106123] panel panel: using device tree for GPIO lookup
[    1.106141] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/panel[0]'
[    1.106156] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/panel[0]'
[    1.106169] panel panel: using lookup tables for GPIO lookup
[    1.106183] panel panel: lookup for GPIO enable failed
[    1.115347] loop: module loaded
[    1.124656] libphy: Fixed MDIO Bus: probed
[    1.189661] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.195814] davinci_mdio 4a101000.mdio: no live phy, scanning all
[    1.202359] davinci_mdio: probe of 4a101000.mdio failed with error -5
[    1.223637] cpsw 4a100000.ethernet: Detected MACID = 98:5d:ad:4e:d2:5e
[    1.246493] mousedev: PS/2 mouse device common for all mice
[    1.253171] i2c /dev entries driver
[    1.258050] cpuidle: enable-method property 'ti,am3352' found operations
[    1.266012] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
[    1.266037] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[    1.266078] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@48060000[0]' - status (0)
[    1.266179] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.270963] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
[    1.270980] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[    1.270997] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
[    1.271011] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
[    1.271025] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[    1.271040] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
[    1.310475] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer cd
[    1.310504] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
[    1.310522] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@481d8000[0]'
[    1.310537] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@481d8000[0]'
[    1.310550] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
[    1.310565] omap_hsmmc 481d8000.mmc: lookup for GPIO cd failed
[    1.310582] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer wp
[    1.310594] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
[    1.310607] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@481d8000[0]'
[    1.310620] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@481d8000[0]'
[    1.310633] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
[    1.310645] omap_hsmmc 481d8000.mmc: lookup for GPIO wp failed
[    1.346969] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.357094] mmc0: new high speed SDHC card at address 59b4
[    1.363510] mmcblk0: mmc0:59b4       1.84 GiB 
[    1.369962]  mmcblk0: p1 p2
[    1.430476] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@2[0]' - status (0)
[    1.430821] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@3[0]' - status (0)
[    1.431019] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@4[0]' - status (0)
[    1.431202] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@5[0]' - status (0)
[    1.431851] ledtrig-cpu: registered to indicate activity on CPUs
[    1.452174] NET: Registered protocol family 10
[    1.470751] sit: IPv6 over IPv4 tunneling driver
[    1.476495] NET: Registered protocol family 17
[    1.489983] Key type dns_resolver registered
[    1.494507] omap_voltage_late_init: Voltage driver support not added
[    1.547669] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    1.559936] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    1.566890] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.591994] hctosys: unable to open rtc device (rtc0)
[    1.612048] ALSA device list:
[    1.615071]   No soundcards found.
[    1.670631] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.678888] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.707888] devtmpfs: mounted
[    1.720054] Freeing unused kernel memory: 264K (c08c6000 - c0908000)
[    1.726439] This architecture does not have kernel memory protection.
[    2.022458] systemd[1]: System time before build time, advancing clock.
[    2.107648] random: systemd: uninitialized urandom read (16 bytes read, 13 bits of entropy available)
[    2.136851] random: systemd: uninitialized urandom read (16 bytes read, 13 bits of entropy available)
[    2.183694] systemd[1]: systemd 229 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT +GNUTLS +ACL +
XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
[    2.230555] systemd[1]: Detected architecture arm.
[    2.261482] systemd[1]: Set hostname to <am335x-evm>.
[    2.386996] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 16 bits of entropy available)
[    2.439065] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 16 bits of entropy available)
[    2.478635] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 17 bits of entropy available)
[    2.499714] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 17 bits of entropy available)
[    2.529135] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 18 bits of entropy available)
[    2.660404] random: systemd: uninitialized urandom read (16 bytes read, 22 bits of entropy available)
[    2.680355] random: systemd: uninitialized urandom read (16 bytes read, 22 bits of entropy available)
[    2.701633] random: systemd: uninitialized urandom read (16 bytes read, 22 bits of entropy available)
[    3.020458] systemd[1]: [/etc/systemd/system/gadget-init.service:15] Unknown lvalue 'ExecStopPre' in section 'Service'
[    3.435451] systemd[1]: sysinit.target: Found ordering cycle on sysinit.target/start
[    3.443481] systemd[1]: sysinit.target: Found dependency on alignment.service/start
[    3.451335] systemd[1]: sysinit.target: Found dependency on basic.target/start
[    3.458617] systemd[1]: sysinit.target: Found dependency on sockets.target/start
[    3.466098] systemd[1]: sysinit.target: Found dependency on avahi-daemon.socket/start
[    3.474005] systemd[1]: sysinit.target: Found dependency on sysinit.target/start
[    3.481475] systemd[1]: sysinit.target: Breaking ordering cycle by deleting job alignment.service/start
[    3.490955] systemd[1]: alignment.service: Job alignment.service/start deleted to break ordering cycle starting with sysinit.target/start
[    3.540974] systemd[1]: Created slice System Slice.
[    3.572056] systemd[1]: Created slice system-getty.slice.
[    3.601965] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    3.630191] systemd[1]: Reached target Remote File Systems.
[    3.660888] systemd[1]: Listening on Network Service Netlink Socket.
[    3.690482] systemd[1]: Listening on udev Control Socket.
[    3.721697] systemd[1]: Created slice User and Session Slice.
[    3.750086] systemd[1]: Reached target Slices.
[    3.770484] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    3.800646] systemd[1]: Listening on Journal Socket.
[    3.835825] systemd[1]: Starting Remount Root and Kernel File Systems...
[    3.897707] systemd[1]: Starting Setup Virtual Console...
[    3.928005] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    4.016441] systemd[1]: Starting Load Kernel Modules...
[    4.065687] cryptodev: driver 1.8 loaded.
[    4.076713] systemd[1]: Mounting POSIX Message Queue File System...
[    4.140802] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    4.170425] systemd[1]: Listening on Syslog Socket.
[    4.217643] systemd[1]: Listening on Journal Socket (/dev/log).
[    4.257009] systemd[1]: Mounting Temporary Directory...
[    4.296063] systemd[1]: Mounting Debug File System...
[    4.366697] systemd[1]: Starting Journal Service...
[    4.400345] systemd[1]: Reached target Swap.
[    4.430652] systemd[1]: Reached target Paths.
[    4.476713] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[    4.560622] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    4.600716] systemd[1]: Listening on udev Kernel Socket.
[    4.674052] systemd[1]: Mounted POSIX Message Queue File System.
[    4.700442] systemd[1]: Mounted Debug File System.
[    4.730290] systemd[1]: Mounted Temporary Directory.
[    4.761069] systemd[1]: Started Journal Service.
[    6.968418] systemd-journald[96]: Received request to flush runtime journal from PID 1
[    9.037363] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
[    9.037409] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
[    9.037437] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[    9.037453] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[    9.037468] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
[    9.037483] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
[    9.037500] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
[    9.037512] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
[    9.037526] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[    9.037540] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[    9.037553] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
[    9.037567] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
[    9.037657] 47401300.usb-phy supply vcc not found, using dummy regulator
[    9.239270] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    9.322866] rtc rtc0: 44e3e000.rtc: dev (254:0)
[    9.322934] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
[    9.821462] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[   10.353805] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[   10.626145]  remoteproc0: wkup_m3 is available
[   10.698768]  remoteproc0: Note: remoteproc is still under development and considered experimental.
[   10.789133]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[   11.149815]  remoteproc0: powering up wkup_m3
[   11.155842]  remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[   11.279106] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[   11.285585]  remoteproc0: remote processor wkup_m3 is now up
[   11.285612] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x191
[   11.707872] omap_hwmod: pruss: _wait_target_ready failed: -16
[   11.803420] ti-pruss 4a300000.pruss: couldn't enable pruss
[   11.809106] ti-pruss: probe of 4a300000.pruss failed with error -16
[   11.957815] omap_hwmod: gfx: failed to hardreset
[   12.151582] pvrsrvkm 56000000.sgx: Unable to reset SGX!
[   12.232214] omap_hwmod: gfx: _wait_target_ready failed: -16
[   12.283693] PVR_K:(Error): EnableSGXClocks: pm_runtime_get_sync failed (16)
[   12.352684] PVR_K:(Error): SysInitialise: Failed to Enable system clocks (175)
[   12.572015] PM: bootloader does not support rtc-only!
[   13.717434] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   16.526393] usbcore: registered new interface driver usbfs
[   16.624338] usbcore: registered new interface driver hub
[   16.681407] usbcore: registered new device driver usb
[   16.824580] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[   16.824624] musb-hdrc: MHDRC RTL version 2.0 
[   16.824638] musb-hdrc: setup fifo_mode 4
[   16.824666] musb-hdrc: 28/31 max ep, 16384/16384 memory
[   16.824884] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[   16.871339] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
[   16.931679] hub 1-0:1.0: USB hub found
[   16.951210] hub 1-0:1.0: 1 port detected
[   19.037453] net eth0: initializing cpsw version 1.12 (0)
[   19.101316] net eth0: initialized cpsw ale version 1.4
[   19.106513] net eth0: ALE Table size 1024
[   19.253425] libphy: PHY 4a101000.mdio:00 not found
[   19.340858] net eth0: phy "4a101000.mdio:00" not found on slave 0, err -19
[   19.432536] libphy: PHY 4a101000.mdio:01 not found
[   19.520814] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19
[   19.608129] Bluetooth: Core ver 2.21
[   19.666628] NET: Registered protocol family 31
[   19.688898] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   19.724037] using random self ethernet address
[   19.728547] using random host ethernet address
[   19.735278] Bluetooth: HCI device and connection manager initialized
[   19.790569] using host ethernet address: 98:5D:AD:4E:D2:60
[   19.797418] Bluetooth: HCI socket layer initialized
[   19.834327] using random self ethernet address
[   19.838840] using random host ethernet address
[   19.844344] Bluetooth: L2CAP socket layer initialized
[   19.850802] random: nonblocking pool is initialized
[   19.876519] Bluetooth: SCO socket layer initialized
[   19.916176] using host ethernet address: 98:5D:AD:4E:D2:60
[   19.956607] NET: Registered protocol family 15
[   19.983016] usb0: HOST MAC 98:5d:ad:4e:d2:60
[   20.052708] usb0: MAC 7e:63:da:cc:21:96
[   20.165094] Mass Storage Function, version: 2009/09/11
[   20.191889] LUN: removable file: (no medium)
[   20.196669] LUN: removable read only file: /dev/mmcblk0p1
[   20.281035] Number of LUNs=1
[   20.318838] g_multi gadget: Multifunction Composite Gadget
[   20.367169] g_multi gadget: g_multi ready
[   20.622445] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[   20.672176] g_multi gadget: high-speed config #1: Multifunction with RNDIS
[   20.681092] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
[   21.150188] Initializing XFRM netlink socket
[   45.011902] cfg80211: World regulatory domain updated:
[   45.017161] cfg80211:  DFS Master region: unset
[   45.028247] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   45.048136] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   45.066611] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   45.075764] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   45.089999] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   45.107075] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   45.122411] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   45.137091] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   45.149770] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)

I can see mention of the fixedregulator

[ 0.341094] of_get_named_gpiod_flags: parsed 'gpio' property of node '/fixedregulator@2[0]' - status (0)

However the only mentions of mmc2 in the logs are indirect:

[ 1.310436] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer cd
[ 1.310464] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
[ 1.310484] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@481d8000[0]'
[ 1.310499] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@481d8000[0]'
[ 1.310512] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
[ 1.310525] omap_hsmmc 481d8000.mmc: lookup for GPIO cd failed
[ 1.310543] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer wp
[ 1.310555] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
[ 1.310568] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@481d8000[0]'
[ 1.310581] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@481d8000[0]'
[ 1.311674] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
[ 1.311690] omap_hsmmc 481d8000.mmc: lookup for GPIO wp failed

if I try and bring up the wifi using

wpa_supplicant -Dnl80211 -iwlan0 -cwpa_supplicant.conf

I get

Successfully initialized wpa_supplicant
Could not read interface wlan0 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Could not read interface wlan0 flags: No such device
wlan0: Failed to initialize driver interface
root@am335x-evm:~# [ 45.725153] cfg80211: World regulatory domain updated:
[ 45.730603] cfg80211: DFS Master region: unset
[ 45.735083] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 45.752698] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 45.770200] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 45.778290] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 45.805108] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 45.826734] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 45.836554] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 45.849775] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 45.857868] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)

I found mention in a previous post of checking the mmc clock control; it looks as though the value I have in this register is the default.

root@am335x-evm:~# devmem2 0x44E000F4 w
/dev/mem opened.
Memory mapped at address 0xb6f11000.
Read at address 0x44E000F4 (0xb6f110f4): 0x00030000

would this be preventing the probe of the module?

where should I be setting this? does it need done explicitly in u-boot? - or should it be done as part of the probe?

I notice from the other wlcore capable DTS in the code that there are differences between how the fixed regulators are defined with respect to having a pinctrl-0 element.
Should this be present?

Thanks for any help that anyone can provide: I suspect there is something obvious I have missed.

In the meantime I'll keep digging.

All the best,
Richard

  • I suppose, the wlcore, wl18xx drivers are built as modules.. You can, try to uninstall and install the modules.
    # cd /usr/share/wl18xx
    #./unload_wlcore.sh
    #./load_wlcore.sh

    Do, a lsmod and see, if the modules are loaded..
  • Hi Hari

    Thanks for the advice.

    I've tried as you suggest; here's what I see. (I've not worked though the significance of these results yet)

    It appears as though the drivers are not loaded at boot.

    calling the load script I see:

    root@am335x-evm:/usr/share/wl18xx# ./load_wlcore.sh 
    root@am335x-evm:/usr/share/wl18xx# [  134.111508] cfg80211: World regulatory domain updated:
    [  134.116741] cfg80211:  DFS Master region: unset
    [  134.147531] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    [  134.179820] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
    [  134.187939] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
    [  134.229845] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
    [  134.237963] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
    [  134.286510] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
    [  134.321927] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
    [  134.356387] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
    [  134.388376] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)

    after which the list of modules reported by lsmod has changed

    Before After

    root@am335x-evm:~# lsmod
    Module Size Used by
    sha512_generic 9903 0
    sha512_arm 12079 0
    drbg 13425 1
    des_generic 17736 0
    cbc 2324 0
    xfrm_user 22606 2
    xfrm4_tunnel 2040 0
    ipcomp 2257 0
    xfrm_ipcomp 4311 1 ipcomp
    esp4 6466 0
    ah4 5627 0
    bluetooth 327425 2
    af_key 26406 0
    xfrm_algo 6970 5 ah4,esp4,af_key,xfrm_user,xfrm_ipcomp
    usb_f_acm 5404 1
    u_serial 11555 3 usb_f_acm
    usb_f_ecm 6620 1
    g_multi 6330 0
    usb_f_mass_storage 37916 2 g_multi
    usb_f_rndis 15406 2 g_multi
    u_ether 13577 3 usb_f_ecm,usb_f_rndis,g_multi
    libcomposite 44392 5 usb_f_acm,usb_f_ecm,usb_f_rndis,g_multi,usb_f_mass_storage
    configfs 26917 6 usb_f_acm,usb_f_ecm,usb_f_rndis,libcomposite,usb_f_mass_storage
    musb_dsps 8235 0
    musb_hdrc 71550 1 musb_dsps
    udc_core 12063 2 musb_hdrc,libcomposite
    usbcore 195125 1 musb_hdrc
    pm33xx 5577 0
    pru_rproc 11582 0
    pruss_intc 7163 1 pru_rproc
    ecb 1909 0
    wkup_m3_ipc 7715 1 pm33xx
    sha256_generic 9503 1
    hmac 2735 1
    wkup_m3_rproc 3669 1
    ti_emif_sram 6242 1 pm33xx
    md5 1897 0
    sha1_generic 2621 0
    sha1_arm_neon 6261 0
    sha1_arm 3862 1 sha1_arm_neon
    pvrsrvkm 406903 0
    pruss 10892 1 pru_rproc
    omap_aes_driver 19430 0
    remoteproc 26901 4 pruss,wkup_m3_rproc,pru_rproc,wkup_m3_ipc
    omap_sham 21513 0
    virtio 7742 1 remoteproc
    virtio_ring 12035 1 remoteproc
    omap_rng 4482 0
    rng_core 7794 1 omap_rng
    musb_am335x 1426 0
    rtc_omap 8272 1
    omap_wdt 4634 0
    sch_fq_codel 8289 3
    cryptodev 38007 1

    root@am335x-evm:/usr/share/wl18xx# lsmod
    Module Size Used by
    wlcore_sdio 6771 0
    wl18xx 85364 0
    wlcore 183907 1 wl18xx
    mac80211 359061 2 wl18xx,wlcore
    cfg80211 221299 3 mac80211,wl18xx,wlcore
    sha512_generic 9903 0
    sha512_arm 12079 0
    drbg 13425 1
    des_generic 17736 0
    cbc 2324 0
    xfrm_user 22606 2
    xfrm4_tunnel 2040 0
    ipcomp 2257 0
    xfrm_ipcomp 4311 1 ipcomp
    esp4 6466 0
    usb_f_acm 5404 1
    u_serial 11555 3 usb_f_acm
    ah4 5627 0
    bluetooth 327425 2
    af_key 26406 0
    xfrm_algo 6970 5 ah4,esp4,af_key,xfrm_user,xfrm_ipcomp
    usb_f_ecm 6620 1
    g_multi 6330 0
    usb_f_mass_storage 37916 2 g_multi
    usb_f_rndis 15406 2 g_multi
    u_ether 13577 3 usb_f_ecm,usb_f_rndis,g_multi
    libcomposite 44392 5 usb_f_acm,usb_f_ecm,usb_f_rndis,g_multi,usb_f_mass_storage
    configfs 26917 6 usb_f_acm,usb_f_ecm,usb_f_rndis,libcomposite,usb_f_mass_storage
    musb_dsps 8235 0
    musb_hdrc 71550 1 musb_dsps
    udc_core 12063 2 musb_hdrc,libcomposite
    usbcore 195125 1 musb_hdrc
    pm33xx 5577 0
    pru_rproc 11582 0
    pruss_intc 7163 1 pru_rproc
    ecb 1909 0
    ti_emif_sram 6242 1 pm33xx
    wkup_m3_ipc 7715 1 pm33xx
    sha256_generic 9503 1
    hmac 2735 1
    md5 1897 0
    wkup_m3_rproc 3669 1
    sha1_generic 2621 0
    sha1_arm_neon 6261 0
    sha1_arm 3862 1 sha1_arm_neon
    pvrsrvkm 406903 0
    pruss 10892 1 pru_rproc
    omap_aes_driver 19430 0
    omap_sham 21513 0
    remoteproc 26901 4 pruss,wkup_m3_rproc,pru_rproc,wkup_m3_ipc
    virtio 7742 1 remoteproc
    virtio_ring 12035 1 remoteproc
    omap_rng 4482 0
    rng_core 7794 1 omap_rng
    musb_am335x 1426 0
    rtc_omap 8272 1
    omap_wdt 4634 0
    sch_fq_codel 8289 3
    cryptodev 38007 1

    however there is still no wlan0 after running this

    root@am335x-evm:/usr/share/wl18xx# ip link show
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
        link/ether 98:5d:ad:4e:d2:5e brd ff:ff:ff:ff:ff:ff
    3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1
        link/sit 0.0.0.0 brd 0.0.0.0
    4: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
        link/ether b2:50:8d:0b:1f:46 brd ff:ff:ff:ff:ff:ff

    and I do not see the WLAN_ENABLE line throw that I expected the fixed regulator to control

    Trying to start wpa_supplicant gives the same issue seen previously

    root@am335x-evm:~# wpa_supplicant -Dnl80211 -iwlan0 -c/usr/share/wl18xx/wpa_supplicant.conf
    Successfully initialized wpa_supplicant
    Could not read interface wlan0 flags: No such device
    nl80211: Driver does not support authentication/association or connect commands
    nl80211: deinit ifname=wlan0 disabled_11b_rates=0
    Could not read interface wlan0 flags: No such device
    wlan0: Failed to initialize driver interface

    calling the unload shell script complains about two missing drivers: 

    root@am335x-evm:~# /usr/share/wl18xx/unload_wlcore.sh 
    rmmod: ERROR: Module wl12xx is not currently loaded
    rmmod: ERROR: Module compat is not currently loaded
    killall: wpa_supplicant: no process killed
    killall: hostapd: no process killed

    I imaging that the wl12xx might not matter if I have wl18xx loaded?
    However a missing compat driver might be significant?

    From the documentation I have found on the TI wiki I expected that this wifi module should work with the pre-built binaries and filesystem:
     - do you know why it appears to require this compat driver which is not there?

    Thanks for your help; I'll keep digging

    All the best

    Richard

     

  • Hi Richard,

    Are you using a custom made am335x board which is based on the am335x-evm.
    You need to make sure that during kernel boot you see a message indicating that the wl18xx was detected on the sdio bus.
    You didn't include a full kernel boot log but I guess this is not the case here.

    The module is probably not probed during boot (I wlan_enable pin turning on?) so the module are not probed automatically as they should.

    In addition, What is:
    wlan_reg_gpio: wlan_reg_gpio {
    pinctrl-single,pins = <
    0x64 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a9.rgmii2_rd2 */

    Seems like you already have it as part of:
    wlan_pins_default: wlan_pins_default {
    ..

    Doesn't seem like it is needed.

    Best Regards,
    Eyal
  • Hi Eyal

    yes you are right our custom board has taken influences from both the beagle bone black and the EVM.

    I thought I had attached a boot log file to my original post. 
    I will attach another here as I have recompiled the kernel with dynamic debug and there is quite a lot more information.

    I removed the reference to the pinmux in the fixedregulator that you mentioned: i noticed that there was a complaint by the kernel when unflattening the tree

    You are correct that I cannot at present see the wl18xx  being detected at boot (or at anypoint after e.g. when loading the modules)

    The most salient clue I think I have found from my digging thus far is:

    [   15.678840] mmc1: error -16 whilst initialising SDIO card

    which would appear to indicate that it is busy - why I am not yet sure

    The current kernel boot log should be attached here >>

    of_debug_kernel_init.txt

    I would be grateful for any insight that might give.

    I will try and dig further - probably concentrating on the mmc module logging

    Thanks for any advice.

    All the best,

    Richard

  • Hi Eyal

    I tried to reply with a boot log attached - it was probably sufficiently large to run foul of moderation?
    I will be more brief here!
    you are right, our custom board has taken influences from both the beagle bone black and the EVM.

    There was a log attached to my original post (e2e.ti.com/.../full_5F00_dmesg.txt) that might show something

    Since then I have removed the reference to the pinmux in the fixedregulator that you mentioned: (i noticed that there was a complaint by the kernel when unflattening the tree)

    You are correct that I cannot at present see the wl18xx being detected at boot (or at anypoint after e.g. when loading the modules)

    The most salient clue I think I have found from my digging thus far is:

    [ 15.678840] mmc1: error -16 whilst initialising SDIO card

    I will concentrate on enabling the logging in this area to see what I can find: hopefully my delayed post will turn up shortly with a link to the verbose start up, this might show something.

    All the best,
    Richard
  • Hi Richard,

    [ 15.678840] mmc1: error -16 whilst initialising SDIO card

    I suggest trying to start with a slow sdio clock (1Mhz) and see is the issue is related to the sdio bus hardware setup.
    Add:
    max-frequency = <1000000>;

    to the mmc node in your .dts file and see if it helps.

    best regards,
    eyal
  • Hi  Eyal

    I will try that as soon as I am next with the hardware.

    Would that would be preventing the Enable line (as configured in the fixedregulator gpio property) from throwing? 

    I can imagine having the bus too fast causing errors but given I do not see an attempt to enable the module I thought the problem might be more fundamental than that (though I am the first to admit I am new to this stack)

    Thanks for the suggestion - I will report back as soon as I can

    Best regards,

    Richard

  • Hi Richard,

    It seems like wlan_enable was high as it started probing.
    Something went wring during the probe and you got the " mmc1: error -16 whilst initialising SDIO card" error and it stopped probing.

    Let's see if lowering the bus speed helps here or not.

    BR,
    Eyal
  • Thanks Eyal

    I've added the frequency cap.

    I can see the enable line throw
    I can see activity on both the CLK and CMD lines; on both sides of the level translator we are using (a TXB0108DQS with awkwardly small pitch for probing!) .

    The error on boot is the same: 

    [ 3.935631] mmc1: error -16 whilst initialising SDIO card

    I will try and dig in the code as to why this is being reported

    The mmc node on the device tree at present looks like:

    root@am335x-evm:/proc/device-tree/ocp/mmc@481d8000# find . -type f -print -exec hexdump -C {} \;
    ./reg
    00000000  48 1d 80 00 00 00 10 00                           |H.......|
    00000008
    ./dmas
    00000000  00 00 00 2d 00 00 00 02  00 00 00 00 00 00 00 2d  |...-...........-|
    00000010  00 00 00 03 00 00 00 00                           |........|
    00000018
    ./name
    00000000  6d 6d 63 00                                       |mmc.|
    00000004
    ./interrupts
    00000000  00 00 00 1c                                       |....|
    00000004
    ./vmmc-supply
    00000000  00 00 00 3b                                       |...;|
    00000004
    ./pinctrl-0
    00000000  00 00 00 3c 00 00 00 3d                           |...<...=|
    00000008
    ./compatible
    00000000  74 69 2c 6f 6d 61 70 34  2d 68 73 6d 6d 63 00     |ti,omap4-hsmmc.|
    0000000f
    ./ti,non-removable
    ./clock-frequency
    00000000  01 c9 c3 80                                       |....|
    00000004
    ./bus-width
    00000000  00 00 00 04                                       |....|
    00000004
    ./ti,needs-special-hs-handling
    ./status
    00000000  6f 6b 61 79 00                                    |okay.|
    00000005
    ./cap-power-off-card
    ./max-frequency
    00000000  00 0f 42 40                                       |..B@|
    00000004
    ./#address-cells
    00000000  00 00 00 01                                       |....|
    00000004
    ./keep-power-in-suspend
    ./ti,hwmods
    00000000  6d 6d 63 32 00                                    |mmc2.|
    00000005
    ./#size-cells
    00000000  00 00 00 00                                       |....|
    00000004
    ./wlcore@0/reg
    00000000  00 00 00 02                                       |....|
    00000004
    ./wlcore@0/name
    00000000  77 6c 63 6f 72 65 00                              |wlcore.|
    00000007
    ./wlcore@0/interrupts
    00000000  00 00 00 1a 00 00 00 01                           |........|
    00000008
    ./wlcore@0/compatible
    00000000  74 69 2c 77 6c 31 38 33  31 00                    |ti,wl1831.|
    0000000a
    ./wlcore@0/interrupt-parent
    00000000  00 00 00 3e                                       |...>|
    00000004
    ./dma-names
    00000000  74 78 00 72 78 00                                 |tx.rx.|
    00000006
    ./pinctrl-names
    00000000  64 65 66 61 75 6c 74 00                           |default.|
    00000008
    ./ti,needs-special-reset
    ./interrupt-parent
    00000000  00 00 00 01                                       |....|
    00000004
    root@am335x-evm:/proc/device-tree/ocp/mmc@481d8000# 
    

    I'll keep on digging; thanks for any suggestions

    Best regards,

    Richard

  • I am surprised by what I see for mmc1 under the debugfs

    mmc0 mmc1

    root@am335x-evm:/sys/kernel/debug/mmc0# find -type f -print -exec cat {} \; 
    ./mmc0:59b4/status
    00000900
    ./mmc0:59b4/state
    0x00000005
    ./regs
    mmc0:
    sdio irq mode polling
    ctx_loss: 1

    regs:
    CON: 0x00000600
    PSTATE: 0x01f20000
    HCTL: 0x00000d06
    SYSCTL: 0x000e0087
    IE: 0x00000000
    ISE: 0x00000000
    CAPA: 0x06e10080
    ./clock
    50000000
    ./ios
    clock: 50000000 Hz
    vdd: 21 (3.3 ~ 3.4 V)
    bus mode: 2 (push-pull)
    chip select: 0 (don't care)
    power mode: 2 (on)
    bus width: 2 (4 bits)
    timing spec: 2 (sd high-speed)
    signal voltage: 0 (3.30 V)
    driver type: 0 (driver type B)

    root@am335x-evm:/sys/kernel/debug/mmc1# find -type f -print -exec cat {} \;
    ./regs
    mmc1:
    sdio irq mode polling
    ctx_loss: 1

    regs:
    CON: 0x00000600
    PSTATE: 0x01070000
    HCTL: 0x00000b00
    SYSCTL: 0x000e0007
    IE: 0x00000000
    ISE: 0x00000000
    CAPA: 0x04e10080
    ./clock
    0
    ./ios
    clock: 0 Hz
    vdd: 0 (invalid)
    bus mode: 2 (push-pull)
    chip select: 0 (don't care)
    power mode: 0 (off)
    bus width: 0 (1 bits)
    timing spec: 0 (legacy)
    signal voltage: 0 (1.80 V)
    driver type: 0 (driver type B)
    root@am335x-evm:/sys/kernel/debug/mmc1#

    I'm guess that the contents of mmc1 here have reverted after the probing at boot? as they do not match the values in the device tree under /proc

    Best regards

    - Richard

  • hi Richard,

    You can't get any meaningful data from this proc entry as when the initialization stops the mmc interface is turned off...

    Best Regards,

    Eyal

  • Thanks Eyal

    that's pretty much what i suspected

    I can see that the error is being thrown in __mmc_start_request as host->ops->card_busy(host) is always true
    - just need to work out why

    All the best,
    - Richard
  • Hi 

    I have managed to find the module at boot by modifying the node as below

    &mmc2 {
    status = "okay";
    vmmc-supply = <&wlan_en_reg>;
    bus-width = <4>;
    pinctrl-names = "default";//,"sleep";
    pinctrl-0 = <&wifi_mmc_pins_default &wlan_pins_default>;
    //pinctrl-1 = <&wifi_mmc_pins_sleep &wlan_pins_sleep>;
    ti,non-removable;
    //ti,needs-special-hs-handling;
    cap-power-off-card;
    keep-power-in-suspend;
    max-frequency = <1000000>;
    
    #address-cells = <1>;
    #size-cells = <0>;
    
    wlcore: wlcore@2 {
    compatible = "ti,wl1831";
    reg = <2>;
    interrupt-parent = <&gpio1>;
    interrupts = <26 IRQ_TYPE_EDGE_RISING>; 
    };
    };
    
    

    - as far as I can see it is really only the ti,needs-special-hs-handling; parameter that has changed

    I had lifted this from the definition in the am335x-evm.dts

    When would this be required?

    Thanks for the help.

    Best regards

    Richard