I am trying to reboot the 8987 module in android 10 using the PDn pin on the iMX8MPlus
# unload modules
$ rmmod -f moal
$ rmmod -f mlan
[ 987.206583] wlan: Unloading MWLAN driver
[ 987.211780] wlan: Driver unloaded
#unbind MMC controller
$ echo "30b50000.mmc" > /sys/bus/platform/drivers/sdhci-esdhc-imx/unbind
[ 988.124586] mmc1: card 0001 removed
# set PDn to LOW
$ echo "30b50000.mmc" > /sys/bus/platform/drivers/sdhci-esdhc-imx/bind
[ 998.119429] mmc1: SDHCI controller on 30b50000.mmc [30b50000.mmc] using ADMA
# set PDn to HIGH
[ 1010.224255] mmc1: new ultra high speed SDR104 SDIO card at address 0001
# Load modules
$ insmod /vendor/lib/modules/mlan.ko
$ insmod /vendor/lib/modules/moal.ko mod_para=wifi_mod_para.conf
[ 1027.098443] wlan: Loading MWLAN driver
[ 1027.103256] wlan: Register to Bus Driver...
[ 1027.120295] vendor=0x02DF device=0x9149 class=0 function=1
[ 1027.126578] Attach moal handle ops, card interface type: 0x105
[ 1027.133282] SD8987: init module param from usr cfg
[ 1027.138829] card_type: SD8987, config block: 0
[ 1027.143989] cfg80211_wext=0xf
[ 1027.147669] sta_name=wlan
[ 1027.151001] uap_name=wlan
[ 1027.154341] wfd_name=p2p
[ 1027.157589] max_vir_bss=1
[ 1027.160926] cal_data_cfg=none
[ 1027.164611] ps_mode = 2
[ 1027.167844] auto_ds = 2
[ 1027.171028] host_mlme=enable
[ 1027.174629] fw_name=sdiouart8987_combo_v0.bin
[ 1027.179833] SDIO: max_segs=128 max_seg_size=65472
[ 1027.185353] rx_work=1 cpu_num=4
[ 1027.189296] Attach mlan adapter operations.card_type is 0x105.
[ 1027.204869] wlan: Enable TX SG mode
[ 1027.209100] wlan: Enable RX SG mode
[ 1027.216328] Request firmware: sdiouart8987_combo_v0.bin
[ 1028.066187] Wlan: FW download over, firmwarelen=603832 downloaded 603832
[ 1030.080214] Fail to poll firmware status: firmwarestat=0xf005
[ 1030.086693] FW failed to be active in time!
[ 1030.091600] wlan_dnld_fw fail ret=0xffffffff
[ 1030.096656] WLAN: Fail download FW with nowwait: 0
[ 1030.102459] SDIO Func0 (0x0-0x9): 43 03 02 02 03 00 00 02 03 00
[ 1030.109401] SDIO Func1 (0x10-0x17): 00 00 00 00 00 00 00 00
[ 1030.116157] SDIO Func1: (0x8) 00 (0x58) 00 (0x5c) 0d (0x5d) 00 (0x60) 01 (0x61) 00 (0x62) 00 (0x64) 10 (0x65) 01 (0x66) 00 (0x68) 00 (0x69) 00 (0x6a) 00
[ 1030.130949] SDIO Func1 (0xe8-0xf2): 05 f0 00 00 00 00 00 00 24 14 70
[ 1030.241168] SDIO Func1 (0xe8-0xf2): 05 f0 00 00 00 00 00 00 24 14 70
[ 1030.248445] woal_request_fw failed
[ 1030.252557] Firmware Init Failed
[ 1030.260510] Free module params
[ 1030.264292] woal_add_card failed
[ 1030.268383] wlan_sdio: probe of mmc1:0001:1 failed with error -1
[ 1030.275567] wlan: Register to Bus Driver Done
[ 1030.280673] wlan: Driver loaded successfully
# cat /sys/kernel/debug/mmc1/ios
clock: 208000000 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: 6 (sd uhs SDR104)
signal voltage: 1 (1.80 V)
driver type: 0 (driver type B)
wifi 8987 + imx8m plus
&usdhc2 {
assigned-clocks = <&clk IMX8MP_CLK_USDHC2>;
assigned-clock-rates = <400000000>;
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc2>;
pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
bus-width = <4>;
pm-ignore-notify;
keep-power-in-suspend;
fsl,sdio-async-interrupt-enabled;
status = "okay";
};
Hello,
The following hardware conditions will cause the error code in your log, please take a look in each point.
1. SDIO communication is abnormal
2. The 32.768K clock of the Wi-Fi chip is not used
3. The power supply current of the Wi-Fi chip is not enough (when downloading FW, the peak current requirement is relatively large, and the total power supply current of 3.3V must be greater than 1.5A).
Best regards.