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.
Hi,
I am configuring a custom board with am3358 with linux kernel 4.4.5 in it. I am using mmc3 interface (as counting from 1, if counting from 0 mmc2) to connect to wlan wl1831mod. Here is the dts entry changes I am making
/ {
wlan_en_reg: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "wlan-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
/* WL_EN */
gpio = <&gpio0 21 0>;
enable-active-high;
};
kim {
compatible = "kim";
nshutdown_gpio = <115>; /* Bank3, pin19 */
dev_name = "/dev/ttyO1";
flow_cntrl = <1>;
baud_rate = <3000000>;
};
btwilink {
compatible = "btwilink";
};
};
&am33xx_pinmux {
bt_pins: pinmux_bt_pins {
pinctrl-single,pins = <
0x1A4 (PIN_OUTPUT | MUX_MODE7) /*(C13) mcapsp0.gpio3_19 BT_EN*/
>;
};
bt_pins_sleep: pinmux_bt_pins_sleep {
pinctrl-single,pins = <
0x1A4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /*(C13) mcapsp0.gpio3_19 BT_EN*/
>;
};
mmc3_pins: pinmux_mmc3_pins {
pinctrl-single,pins = <
0x13C (PIN_INPUT_PULLUP | MUX_MODE6) /* (L15) mii1_col.mmc3_clk */
0x114 (PIN_INPUT_PULLUP | MUX_MODE6) /* (J16) mii1_tx_en.mmc3_cmd */
0x118 (PIN_INPUT_PULLUP | MUX_MODE5) /* (J17) mii1_rx_dv.mmc3_dat0 */
0x11C (PIN_INPUT_PULLUP | MUX_MODE5) /* (J18) mii1_txd3.mmc3_dat1 */
0x120 (PIN_INPUT_PULLUP | MUX_MODE5) /* (K15) mii1_txd2.mmc3_dat2 */
0x108 (PIN_INPUT_PULLUP | MUX_MODE5) /* (H16) mii1_col.mmc3_dat3 */
>;
>;
};
mmc3_pins_sleep: pinmux_mmc3_pins_sleep {
pinctrl-single,pins = <
0x13C (PIN_INPUT_PULLDOWN | MUX_MODE6) /* mii1_col.mmc3_clk */
0x114 (PIN_INPUT_PULLDOWN | MUX_MODE6) /* mii1_tx_en.mmc3_cmd */
0x118 (PIN_INPUT_PULLDOWN | MUX_MODE5) /* mii1_rx_dv.mmc3_dat0 */
0x11C (PIN_INPUT_PULLDOWN | MUX_MODE5) /* mii1_txd3.mmc3_dat1 */
0x120 (PIN_INPUT_PULLDOWN | MUX_MODE5) /* mii1_txd2.mmc3_dat2 */
0x108 (PIN_INPUT_PULLDOWN | MUX_MODE5) /* mii1_col.mmc3_dat3 */
>;
};
/* wl18xx card enable/irq GPIOs. */
wlan_pins: pinmux_wlan_pins {
pinctrl-single,pins = <
0x124 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* (K16) mii1_txd1.gpio0_21 WL_EN*/
0x3C (PIN_INPUT_PULLUP | MUX_MODE7) /* (U13) gpmc_ad15.gpio1_15 WL_IRQ*/
>;
};
/* wl18xx card enable/irq GPIOs. */
wlan_pins_sleep: pinmux_wlan_pins_sleep {
pinctrl-single,pins = <
0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mii1_txd1.gpio0_21 WL_EN*/
0x3C (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_ad15.gpio1_15 WL_IRQ*/
>;
};
uart1_pins_default: pinmux_uart1_pins_default {
pinctrl-single,pins = <
0x178 (PIN_INPUT | MUX_MODE0) /* (D18) uart1_ctsn.uart1_cts */
0x17C (PIN_OUTPUT | MUX_MODE0) /* (D17) uart1_rtsn.uart1_rts */
0x180 (PIN_INPUT | MUX_MODE0) /* (D16) uart1_rxd.uart1_rxd */
0x184 (PIN_OUTPUT | MUX_MODE0) /* (D15) uart1_txd.uart1_txd */
>;
};
uart1_pins_sleep: pinmux_uart1_pins_sleep {
pinctrl-single,pins = <
0x178 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_ctsn .uart4_cts */
0x17C (PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn.uart4_rts */
0x180 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_rxd.uart4_rxd */
0x184 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart1_txd.uart4_txd */
>;
};
};
&mmc3 {
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;
keep-power-in-suspend;
#address-cells = <1>;
#size-cells = <0>;
wlcore: wlcore@0 {
compatible = "ti,wl1831";
reg = <2>;
interrupt-parent = <&gpio1>;
interrupts = <15 IRQ_TYPE_LEVEL_HIGH>;
};
};
&uart1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&uart1_pins_default &bt_pins>;
pinctrl-1 = <&uart1_pins_sleep &bt_pins_sleep>;
status = "okay";
};
I am using GPIO1_15( Ball: U13) as WLAN_IRQ , GPIO0_21 (Ball: K16) for WLAN_EN.. And for cmd and data lines as I have configured above.In comment I have mentioned which ball I am using. I am pretty sure that used pins are not conflicting with other pins.
As mmc3 interface no dma channels are configured by default I have edited in am33xx.dtsi mm3 section like shown below
mmc3: mmc@47810000 {
compatible = "ti,omap4-hsmmc";
ti,hwmods = "mmc3";
ti,needs-special-reset;
dmas = <&edma 12
&edma 13>;
dma-names = "tx", "rx";
interrupts = <29>;
interrupt-parent = <&intc>;
reg = <0x47810000 0x1000>;
status = "disabled";
};
and am335x-bone-common.dtsi I have added like below
&edma {
ti,edma-xbar-event-map = <1 12>, /* gpevt1 -> 12 */
<2 13>; /* xdma_event_intr2 -> 13 */
};
As I am using linux kernel 4.4.5 in it I believe no need of back porting any drivers since it is supported from 4.1 onwards. I am manually insmod ing the following ko's in the below format
insmod cfg80211.ko
insmod mac80211.ko
insmod wlcore.ko
/usr/bin/wlconf/wlconf -o /lib/firmware/ti-connectivity/wl18xx-conf.bin -I official_inis/WL8_System_parameters.ini
Hi,
In your log above I see that the following modules were built:
root@iceg_stlg:/lib/modules/wl18xx_4.4# ls
cfg80211.ko mac80211.ko wl12xx.ko wlcore.ko wlcore_sdio.ko
where is wl18xx.ko?
In addition, the modules should load automatically when the system boot and the module is enumerated on the sdio bus.
Please run:
depmod -a
and then reboot the board.
When it boots, they should all be seen when you type:
lsmod
Best Regards,
Eyal