Hello everyone,
I am working on imx6q sabre-AI board on Android 7.1 with Linux4.1.15. Now I am porting TI wl18xx wifi SDIO module to usdhc2 SD slot. But I cannot control the GPIO pin as wifi enable pin to enable/disable the wifi module.
Below is my dts configuration about wifi and usdhc:
wlan_en_reg: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "wlan-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
/* WLAN_EN GPIO for this board – Bank2, pin7 */
gpio = <&gpio2 7 GPIO_ACTIVE_HIGH>; //MX6QDL_PAD_NANDF_D7__GPIO2_IO07 --> WL_REG_ON/WL_EN
/* WLAN card specific delay */
startup-delay-us = <70000>;
enable-active-high;
regulator-boot-on;
};
&usdhc2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2_wifi>;
bus-width = <4>;
// no-1-8-v; //justin@20170606 Mornco target board will remove this
wifi-host;
pm-ignore-notify;
keep-power-in-suspend;
enable-sdio-wakeup;
//ty:1234
vmmc-supply = <®_3p3v>;
vqmmc-supply = <&wlan_en_reg>;
//ocr-limit = <0x80>;
#power-off-card;
#no-1-8-v;
non-removable;
enable-sdio-wakeup;
status = "okay";
wlcore: wlcore@0 {
pinctrl-names = "default";
compatible = "ti,wl1835";
reg = <2>;
interrupt-parent = <&gpio2>;
interrupts = <5 IRQ_TYPE_EDGE_RISING>; //MX6QDL_PAD_NANDF_D5__GPIO2_IO05 --> WL_IRQ
// platform-quirks = <1>;
board-ref-clock = <4>; /* BOARD reference clock, See /include/linux/wl12xx.h for more info*/
};
};
pinctrl_usdhc2_wifi: usdhc2wifigrp {
fsl,pins = <
MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17069
MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10069
MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17069
MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17069
MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17069
MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17069
MX6QDL_PAD_NANDF_D5__GPIO2_IO05 0x17069 //0x13059 // this is for WL_IRQ which driver will configure as an input with a pull down
MX6QDL_PAD_NANDF_D7__GPIO2_IO07 0x13059 // WL_REG_ON/WL_EN
>;
};
But when I connected GPIO2_IO07(wlan_en pin) to the module, I can't control that pin by using
ifconfig wlan0 up & ifconfig wlan0 down
When I probe that pin, it always at high once boot up the board and never goes to low. That pin is located in J32, #26pins

I can't even control this pin using sysfs entry as GPIO by below way:
echo 39 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio39/direction
echo 1 > /sys/class/gpio/gpio39/value
echo 0 > /sys/class/gpio/gpio39/value
It always remain high(3.3V) and never goes to low when I echo 0 to the value.
Can anyone help me how to control the high/low of this pin as GPIO in J32?
BR,
Wayne