We are in the process of porting the TI wl1837MOD drivers into our kernel(3.12.44) using the TI provided guide (Backport Methodology) .
Board: Custom Board with Am335x.
Linux version : 3.12.44
Root filesystem: Ram rootfs
/* Power control for wlan */
wlan_en_reg: fixedregulator@1 {
compatible = "regulator-fixed";
regulator-name = "wlan-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
startup-delay-us = <70000>;
gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
mmc3_pins: mmc3_pinmux { /* WL1837MODGI */
pinctrl-single,pins = <
0x0030 (PIN_INPUT_PULLUP | MUX_MODE3) /* GPMC_AD12, MMC2_DAT0_MUX1 MMC2_DAT0 (WL SDIO D0) */
0x0034 (PIN_INPUT_PULLUP | MUX_MODE3) /* GPMC_AD13, MMC2_DAT1_MUX1 MMC2_DAT1 (WL SDIO D1) */
0x0038 (PIN_INPUT_PULLUP | MUX_MODE3) /* GPMC_AD14, MMC2_DAT2_MUX1 MMC2_DAT2 (WL SDIO D2) */
0x003C (PIN_INPUT_PULLUP | MUX_MODE3) /* GPMC_AD15, MMC2_DAT3_MUX1 MMC2_DAT3 (WL SDIO D3) */
0x0088 (PIN_INPUT_PULLUP | MUX_MODE3) /* GPMC_CSN3, MMC2_CMD_MUX0 MMC2_CMD (WL SDIO CMD) */
0x008C (PIN_INPUT_PULLUP | MUX_MODE3) /* GPMC_CLK, MMC2_CLK_MUX0 MMC2_CLK (WL SDIO CLK) */
>;
};
mmc3_pins_sleep: mmc3_pinmux_sleep { /* WL1837MODGI */
pinctrl-single,pins = <
0x0030 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* GPMC_AD12, MMC2_DAT0_MUX1 MMC2_DAT0 (WL SDIO D0) */
0x0034 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* GPMC_AD13, MMC2_DAT1_MUX1 MMC2_DAT1 (WL SDIO D1) */
0x0038 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* GPMC_AD14, MMC2_DAT2_MUX1 MMC2_DAT2 (WL SDIO D2) */
0x003C (PIN_INPUT_PULLDOWN | MUX_MODE7) /* GPMC_AD15, MMC2_DAT3_MUX1 MMC2_DAT3 (WL SDIO D3) */
0x0088 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* GPMC_CSN3, MMC2_CMD_MUX0 MMC2_CMD (WL SDIO CMD) */
0x008C (PIN_INPUT_PULLDOWN | MUX_MODE7) /* GPMC_CLK, MMC2_CLK_MUX0 MMC2_CLK (WL SDIO CLK) */
>;
};
wlan_pins: wlan_pinmux { /* WL1837MODGI */
pinctrl-single,pins = <
0x0020 (PIN_INPUT | MUX_MODE7) /* GPMC_AD8, GPIO0[22] MMC2_DAT4 (WLAN IRQn) (Interrupt) (Act. LOW) */
0x0028 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* GPMC_AD10, GPIO0[26] MMC2_DAT6 (WLAN EN SOC) */
>;
};
wlan_pins_sleep: wlan_pinmux_sleep { /* WL1837MODGI */
pinctrl-single,pins = <
0x0020 (PIN_INPUT | MUX_MODE7) /* GPMC_AD8, GPIO0[22] MMC2_DAT4 (WLAN IRQn) (Interrupt) (Act. LOW) */
0x0028 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* GPMC_AD10, GPIO0[26] MMC2_DAT6 (WLAN EN SOC) */
>;
};
&mmc3 { /* WL1837MODGI */
dmas = <&edma 12
&edma 13>;
dma-names = "tx", "rx";
status = "okay";
vmmc-supply = <&wlan_en_reg>;
bus-width = <4>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mmc3_pins &wlan_pins>;
pinctrl-1 = <&mmc3_pins_sleep &wlan_pins_sleep>;
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,wl1835";
reg = <2>;
interrupt-parent = <&gpio0>;
interrupts = <22 IRQ_TYPE_EDGE_RISING>;
};
};
Device tree changes : see attached
1: Can we use the TI provided build_utilities to port the necessary drivers on to our existing kernel(3.12.44)? Guide says supported kernel versions are >3.12
2: We tried the build_scripts with R8.7_SP1( WiLink™ software driver), the build failed with compilation errors in the backport4.4.c(TI provided code). We fixed the compilation errors by adding couple of includes and were able to get the build completed successfully. Upon booting the board with modified rfs, we got the following error .
[ 7.030352] wl1271_sdio: probe of mmc2:0001:2 failed with error -61
3: Again we did an update of build_scripts with R8.6_SP1(older version). We were able to get the build successfully but, and upon booting the board we got the following error.
task kworker/0:1:15 blocked more than 3 seconds.
Upon doing a top, it looked like 'rmmod wlcore' process was dead and we were getting the above message periodically.