Other Parts Discussed in Thread: WL1837MOD, WL1837, WL1271
Tool/software: Linux
We have a custom board with an AM4378 processor and a WL1837MOD WiFi module. We have confirmed that the VIO, VBAT, and Ext Clk lines into the WL1837MOD are in fact stable before the enable line is pulled high, much sooner than is required. We are using processor-sdk-linux-02.00.02 with build-root. The WiFi is randomly operational after boot. When operational, the enable line going to the WL1837MOD can be toggled and we can also scan for available WiFi SSID's using connmanctl. For all operational and non-operational boots, we see the kernel toggle the enable pin 2-3 times. On a boot where the WiFi is working, the enable line ends in a high state, as it should per our dts file. When the WiFi is not operational, the kernel boot takes longer and the WiFi enable line remains in a low state. Following a boot where the enable pin did not come up, asking connmanctl to enable the WiFi results in a message of "WiFi already enabled". Asking connmanctl to then disable the WiFi reports "WiFi disabled". Following this with a request to enable the WiFi results in "WiFi enabled", but the enable pin still remains low. Essentially, on some boots, the enable pin is not controllable.
These are our settings in the device tree file in regards to the WiFi:
/* Not actually a power supply but convenient to treat as one */ vmmcwl: fixedregulator-mmcwl { compatible = "regulator-fixed"; regulator-name = "vmmcwl"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; startup-delay-us = <70000>; /* (D14) mii1_tx_clk.gpio0_8 WIFI-EN_1V8 (gpio3_9 0x7, gpio0_8 0x9) */ gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>; enable-active-high; }; /* WIFI-MMC */ mmc3_pins_default: pinmux_mmc3_pins_default { pinctrl-single,pins = < 0x13C (PIN_INPUT | MUX_MODE6) /* (B16) mii1_rxd1.mmc2_clk WL_SDIO_CLK */ 0x114 (PIN_INPUT | MUX_MODE6) /* (A13) mii1_txen.mmc2_cmd WL_SDIO_CMD */ 0x118 (PIN_INPUT_PULLUP | MUX_MODE5 | INPUT_EN) /* (A15) mii1_rxdv.mmc2_dat0 WL_SDIO_D0 */ 0x11C (PIN_INPUT_PULLUP | MUX_MODE5 | INPUT_EN) /* (C16) mii1_txd3.mmc2_dat1 WL_SDIO_D1 */ 0x120 (PIN_INPUT_PULLUP | MUX_MODE5 | INPUT_EN) /* (C13) mii1_txd2.mmc2_dat2 WL_SDIO_D2 */ 0x108 (PIN_INPUT_PULLUP | MUX_MODE5 | INPUT_EN) /* (D16) mii1_col.mmc2_dat3 WL_SDIO_D3 */ >; }; /* WIFI-MMC sleep */ mmc3_pins_sleep: pinmux_mmc3_pins_sleep { pinctrl-single,pins = < 0x13C (PIN_INPUT | MUX_MODE6 | INPUT_EN) /* (B16) mii1_rxd1.gpio2_20 WL_SDIO_CLK */ 0x114 (PIN_INPUT | MUX_MODE6 | INPUT_EN) /* (A13) mii1_txen.gpio3_3 WL_SDIO_CMD */ 0x118 (PIN_INPUT_PULLUP | MUX_MODE5 | INPUT_EN) /* (A15) mii1_rxdv.gpio3_4 WL_SDIO_D0 */ 0x11C (PIN_INPUT_PULLUP | MUX_MODE5 | INPUT_EN) /* (C16) mii1_txd3.gpio0_16 WL_SDIO_D1 */ 0x120 (PIN_INPUT_PULLUP | MUX_MODE5 | INPUT_EN) /* (C13) mii1_txd2.gpio0_17 WL_SDIO_D2 */ 0x108 (PIN_INPUT_PULLUP | MUX_MODE5 | INPUT_EN) /* (D16) mii1_col.gpio3_0 WL_SDIO_D3 */ >; }; /* WIFI-EN, WIFI-IRQ, BT-EN */ wlan_pins_default: pinmux_wlan_pins_default { pinctrl-single,pins = < 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (B15) mii1_txd0.gpio0_28 BT-EN_1V8 */ 0x12C (PIN_OUTPUT_PULLDOWN | MUX_MODE9) /* (D14) mii1_tx_clk.gpio0_8 WIFI-EN_1V8 (gpio3_9 0x7, gpio0_8 0x9)*/ 0x138 (PIN_INPUT | WAKEUP_ENABLE | MUX_MODE9) /* (E16) mii1_rxd2.gpio0_11 WIFI-IRQ_1V8 (gpio2_19 0x7, gpio0_11 0x9)*/ >; }; /* WIFI-EN, WIFI-IRQ, BT-EN sleep */ wlan_pins_sleep: pinmux_wlan_pins_sleep { pinctrl-single,pins = < 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (B15) mii1_txd0.gpio0_28 BT-EN_1V8 */ 0x12C (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (D14) mii1_tx_clk.gpio3_9 WIFI-EN_1V8 */ 0x138 (PIN_INPUT | WAKEUP_ENABLE | MUX_MODE7) /* (E16) mii1_rxd2.gpio2_19 WIFI-IRQ_1V8 */ >; }; &mmc3 { status = "okay"; vmmc-supply = <&vmmcwl>; bus-width = <4>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&mmc3_pins_default &wlan_pins_default>; pinctrl-1 = <&mmc3_pins_sleep &wlan_pins_sleep>; ti,non-removable; /* non-removable slot; assume always present */ /* ti,needs-special-hs-handling; HSMMC IP needs special setting for handling High Speed */ cap-power-off-card; /* powering off the card is safe */ keep-power-in-suspend; /* preserve card power during a suspend/resume cycle */ /* These DMAs are normally assigned within the dtsi file (am4372.dtsi), but are missing for mmc3) */ dmas = <&edma_xbar 30 0 1>, <&edma_xbar 31 0 2>; dma-names = "tx", "rx"; #address-cells = <1>; #size-cells = <0>; wlcore: wlcore@0 { compatible = "ti,wl1837"; reg = <2>; interrupt-parent = <&gpio0>; interrupts = <11 IRQ_TYPE_EDGE_RISING>; }; };