Wake on Wireless

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Wake on Wireless

4,373 次查看
frank8888
Contributor II

Hi Sir,

We are using  MTK 6890 with the  wifi chip  AzureWave module(the model is AW-XM458).

We are implementing WOW functions (wake up the host if Wifi module receive data).

In our board, we use the GPIO 0 to wake up the host, and config with the following command:

mlanutl uap0 hscfg 0x4f 0 200

But the host can't be wake up. We tried to connect with wifi and  measure GPIO 0 with the oscilloscope in the mean time, but the gpio output does not change.

How do we config or enable the WOW with GPIO?

Thank you.

标记 (1)
0 项奖励
回复
13 回复数

4,353 次查看
frank8888
Contributor II

BTW, our device FW is FP68.

Thanks.

0 项奖励
回复

4,353 次查看
frank8888
Contributor II

Hi Weidong,

Thanks for the reply.

So we can user GPIO 0 (and others GPIO) as the wake up pin?

I have tried the command ./uaputl.exe uap0 hscfg 0x4f 0 200 but sitll cannot wake up the host.

My test procedure is:

1- config Host sleep parameters with command /uaputl.exe uap0 hscfg 0x4f 0 200

2- Let the device enters into suspend mode.

3- Scan wifi SSID and try to connect

We measure GPIO 0 with the oscilloscope in the mean time, but the gpio output does not change.

Please help us to clarify this problem.

Thanks.

--

Sorry for typo, the command is ./uaputl.exe uap0 hscfg 0x4f 0 200

0 项奖励
回复

4,342 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @frank8888 ,

 

I checked AW-XM458 LGA module, see below, please!

weidong_sun_0-1642469369091.png

It's wakeup host pin is pin27, didn't you use the pin?

 

Regards,

weidong

0 项奖励
回复

4,339 次查看
frank8888
Contributor II

Hi Weidong,

So you mean that we have use the GPIO that is the PCIE WAKE# pin?

We should use the command "./uaputl.exe uap0 hscfg 0x4f 27 200"? Is it right?

 

Thank you.

0 项奖励
回复

4,333 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hi @frank8888 ,

 

The pin has been defined as wakeup host, so you don't need to redefine it.

 

Regards,

weidong

0 项奖励
回复

4,330 次查看
frank8888
Contributor II

Hi Weidong,

So please let me confirm,  we use PCIE WAKE# pin to wake up host,

and we need to use "./uaputl.exe uap0 hscfg 0x4f 0xff 200"

or 

"./uaputl.exe uap0 hscfg 0x4f 27 200"?

Thank you. 

0 项奖励
回复

4,313 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hi @frank8888 ,

 

Our i.MX8MP-EVK board supports AW-XM458MA(M.2 KEY-E), the function of PCIE wakeup host, below is the device tree:

&pcie{
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcie>;
disable-gpio = <&gpio2 6 GPIO_ACTIVE_LOW>;
reset-gpio = <&gpio2 7 GPIO_ACTIVE_LOW>;
ext_osc = <1>;
clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
<&clk IMX8MP_CLK_PCIE_AUX>,
<&clk IMX8MP_CLK_HSIO_AXI>,
<&clk IMX8MP_CLK_PCIE_ROOT>;
clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
<&clk IMX8MP_CLK_PCIE_AUX>;
assigned-clock-rates = <500000000>, <10000000>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>,
<&clk IMX8MP_SYS_PLL2_50M>;
l1ss-disabled;
status = "okay";

wifi_wake_host {
compatible = "nxp,wifi-wake-host";
interrupt-parent = <&gpio5>;
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "host-wake";
};
};

this means that firmware has already supported 'wakeup host' on pin27 of AW-XM458, so you don't need to reconfigure WiFi side.

You just have your host support wake up.

 

Regards,

weidong

0 项奖励
回复

4,306 次查看
frank8888
Contributor II

Hi Weidong,

We are using MTK 6890 as host and it supports PCIE wake up. But I cannot find the code you mentioned. Can you tell me in which directory and file is located below code?

&pcie{
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcie>;
disable-gpio = <&gpio2 6 GPIO_ACTIVE_LOW>;
reset-gpio = <&gpio2 7 GPIO_ACTIVE_LOW>;
ext_osc = <1>;
clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
<&clk IMX8MP_CLK_PCIE_AUX>,
<&clk IMX8MP_CLK_HSIO_AXI>,
<&clk IMX8MP_CLK_PCIE_ROOT>;
clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
<&clk IMX8MP_CLK_PCIE_AUX>;
assigned-clock-rates = <500000000>, <10000000>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>,
<&clk IMX8MP_SYS_PLL2_50M>;
l1ss-disabled;
status = "okay";

wifi_wake_host {
compatible = "nxp,wifi-wake-host";
interrupt-parent = <&gpio5>;
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
interrupt-names = "host-wake";
};
};

Thanks you.

标记 (1)
0 项奖励
回复

4,297 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @frank8888 ,

 

Below is test steps on our platform, for your reference.

--------------------------

1. insmod mlan.ko
2. insmod moal.ko ps_mode=1 auto_ds=1 cfg80211_wext=0xf cal_data_cfg=none fw_name=nxp/pcieuart8997_combo_v4.bin host_mlme=1 drvdbg=0x20037
3. wpa_supplicant -i mlan0 -Dnl80211 -c /etc/wpa_supplicant.conf &
4. ifconfig mlan0 <IP_Address>
5. iw phy#0 wowlan enable any
6 ./mlanutl mlan0 hssetpara 2 0xff 0xc8 3 400
7. Connect a test laptop to same AP with same local network
8.Check connectivity to DUT from test laptop, and vice versa
9. echo mem > /sys/power/state
10. Ping to DUT from test laptop to wakeup IMX

-----------------------------------------

Try it, please!

Have a good day!

Regards,

weidong

0 项奖励
回复

4,281 次查看
frank8888
Contributor II

Hi Weidong,

Thanks. We can assert PCIE WAKE# by pull low, but the output of WAKE# keeps low,

the correct behavior should be that after the HOST resumes, re-apply power and clock to the device and then assert PERST#, is it correct?

Is there any logs so we can check at WIFI side when the host is at suspend state?

Thanks.

0 项奖励
回复

4,269 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @frank8888 ,

 

>> re-apply power and clock to the device and then assert PERST#, is it correct?

No, it is not.

what you want to do is  wifi wakeup host, not host wakeup wifi. WHY re-apply power and clock to wifi card?  you know, wifi is not in sleep mode now. 

--what PERST?

The function of the PIN is used to RESET wifi card. when system is running, if your CPU PCIe doesn't support Hotplug, and RESET operation is done, unpredictable errors will be caused.

SO if linux system is running , don't do the operation. 

 

In additon, below is mass market driver, you can get 'wifi-wake-host' in source code, for your platform, refter it, please!

weidong@ubuntu:~/wifi-drivers/mwifiex/mxm_wifiex/wlan_src$ grep -r -n 'wifi-wake-host' ./
./mlinux/moal_main.c:8769: node = of_find_compatible_node(NULL, NULL, "nxp,wifi-wake-host");
weidong@ubuntu:~/wifi-drivers/mwifiex/mxm_wifiex/wlan_src$

--driver
#git clone http://source.codeaurora.org/external/imx/mwifiex.git
#cd mwifiex
#git tag
#git checkout lf-5.10.y-1.0.0

--firmware
https://github.com/NXP/imx-firmware/tree/lf-5.10.y_1.0.0/nxp

 

Have a good day!

Regards,

weidong

 

0 项奖励
回复

4,324 次查看
frank8888
Contributor II

Hi Weidong,

I have tried both commands:

"./uaputl.exe uap0 hscfg 0x4f 0xff 200" and 

"./uaputl.exe uap0 hscfg 0x4f 27 200", both cannot wake up the host.

Any suggestions?

BTW, can you please tell me which fuction pulls low the PCIE #WAKE pin to wake up the host?

Thank you.

0 项奖励
回复

4,363 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @frank8888 ,

Try the command:

# ./uaputl.exe uap0 hscfg 0x4f 0 200

and tell me your firmware version , FP68 or FP92.

 

Regards,

weidong

0 项奖励
回复