PCIE Wi-Fi loading issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PCIE Wi-Fi loading issue

4,574 Views
Tanushree
Contributor III

Hello team,

We are using the JODY-W3 module via PCIe and are attempting to reduce current consumption in our product by deinitializing the Wi-Fi and turning off the 3.3V and 1.8V switches which is connected to the Wi-Fi module. However, when we try to reinitialize the Wi-Fi after turning the switches back on, it fails to fully initialize.

Below are the prints after reinitializing the module.
root@imx8dxl-iwg46m:~# insmod moal.ko mod_para=nxp/wifi_mod_para.conf
[  250.890247] wlan: Loading MWLAN driver
[  250.894581] wlan: Register to Bus Driver...
[  250.899214] wlan_pcie 0000:01:00.0: enabling device (0000 -> 0002)
[  250.905656] PCI memory map Virt0: 00000000c9946438 PCI memory map Virt2: 000000001a5d1377
[  250.913975] Attach moal handle ops, card interface type: 0x206
[  250.920376] rps set to 0 from module param
[  250.925009] PCIE9098: init module param from usr cfg
[  250.930165] card_type: PCIE9098, config block: 0
[  250.934878] cfg80211_wext=0xf
[  250.937957] max_vir_bss=1
[  250.940599] cal_data_cfg=none
[  250.943662] ps_mode = 1
[  250.946182] auto_ds = 1
[  250.948653] host_mlme=enable
[  250.951652] fw_name=nxp/pcieuart9098_combo_v1.bin
[  250.956473] rx_work=1 cpu_num=2
[  250.959718] Enable moal_recv_amsdu_packet
[  250.963879] Attach mlan adapter operations.card_type is 0x206.
[  250.981129] Request firmware: nxp/pcieuart9098_combo_v1.bin
[  250.987736] WLAN read winner status failed!
[  250.992274] Read host int status register failed
[  250.997050] wlan_dnld_fw fail ret=0xffffffff
[  251.001383] WLAN: Fail download FW with nowwait: 0
[  251.006224] Config Space Registers:
[  251.009763] reg:0x00 value=0x2b431b4b
[  251.013462] reg:0x04 value=0x00100406
[  251.017205] reg:0x10 value=0x0000000c
[  251.020922] reg:0x18 value=0x0000000c
[  251.024598] reg:0x2c value=0x2b431b4b
[  251.028313] reg:0x3c value=0x00000177
[  251.032036] reg:0x44 value=0x00000008
[  251.035737] reg:0x80 value=0x10110000
[  251.039482] reg:0x98 value=0x00000000
[  251.043224] reg:0x170 value=0x0001001e
[  251.047023] FW in debug mode (0xff)
[  251.050549] FW Scrach Registers:
[  251.053809] reg:0x1c90 value=0xffffffff
[  251.057677] reg:0x1c98 value=0xffffffff
[  251.061555] reg:0x1c9c value=0xffffffff
[  251.167523] reg:0x1c98 value=0xffffffff
[  251.171419] reg:0x1c9c value=0xffffffff
[  251.277217] Interface registers dump from offset 0x1c98 to 0x1c9f
[  251.283377] PCIE registers from offset 0x1c20 to 0x1c9c:
[  251.288723] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.296530] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.304336] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.312118] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.319906]
[  251.321429] ADMA Tx/Rx/Event/Cmd/CmdResp registers:
[  251.326347] ADMA registers dump from offset 0x10000 to 0x10068
[  251.332235] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.340039] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.347833] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.355628] ffffffff ffffffff ffffffff
[  251.359501] ADMA registers dump from offset 0x10800 to 0x10868
[  251.365391] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.373175] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.380979] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.388768] ffffffff ffffffff ffffffff
[  251.392611] ADMA registers dump from offset 0x10880 to 0x108e8
[  251.398499] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.406322] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.414112] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.421905] ffffffff ffffffff ffffffff
[  251.425786] ADMA registers dump from offset 0x11000 to 0x11068
[  251.431668] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.439469] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.447250] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.455044] ffffffff ffffffff ffffffff
[  251.458907] ADMA registers dump from offset 0x11080 to 0x110e8
[  251.464807] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.472613] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.480410] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.488193] ffffffff ffffffff ffffffff
[  251.492204] woal_request_fw failed
[  251.495644] Firmware Init Failed
[  251.501600] Free module params
[  251.504828] woal_pcie_probe: failed
[  251.508336] wlan_pcie: probe of 0000:01:00.0 failed with error -14
[  251.514817] wlan_pcie 0000:01:00.1: enabling device (0000 -> 0002)
[  251.521192] PCI memory map Virt0: 00000000e4619763 PCI memory map Virt2: 00000000e90a6bb4
[  251.529462] Attach moal handle ops, card interface type: 0x206
[  251.535350] rps set to 0 from module param
[  251.539650] PCIE9098: init module param from usr cfg
[  251.544724] card_type: PCIE9098, config block: 0
[  251.549395] cfg80211_wext=0xf
[  251.552372] max_vir_bss=1
[  251.555021] cal_data_cfg=none
[  251.558026] ps_mode = 1
[  251.560479] auto_ds = 1
[  251.562963] host_mlme=enable
[  251.565883] fw_name=nxp/pcieuart9098_combo_v1.bin
[  251.570660] rx_work=1 cpu_num=2
[  251.573845] Enable moal_recv_amsdu_packet
[  251.577922] Attach mlan adapter operations.card_type is 0x206.
[  251.589163] Request firmware: nxp/pcieuart9098_combo_v1.bin
[  251.595964] WLAN read winner status failed!
[  251.600496] Read host int status register failed
[  251.605205] wlan_dnld_fw fail ret=0xffffffff
[  251.609572] WLAN: Fail download FW with nowwait: 0
[  251.614404] Config Space Registers:
[  251.617952] reg:0x00 value=0x2b441b4b
[  251.621659] reg:0x04 value=0x00100406
[  251.625375] reg:0x10 value=0x0000000c
[  251.629075] reg:0x18 value=0x00000004
[  251.632749] reg:0x2c value=0x2b441b4b
[  251.636506] reg:0x3c value=0x0000027c
[  251.640222] reg:0x44 value=0x00000008
[  251.643949] reg:0x80 value=0x10110000
[  251.647650] reg:0x98 value=0x00000000
[  251.651366] reg:0x170 value=0x0001001e
[  251.655166] FW in debug mode (0xff)
[  251.658685] FW Scrach Registers:
[  251.661944] reg:0x1c90 value=0xffffffff
[  251.665824] reg:0x1c98 value=0xffffffff
[  251.669698] reg:0x1c9c value=0xffffffff
[  251.775650] reg:0x1c98 value=0xffffffff
[  251.779542] reg:0x1c9c value=0xffffffff
[  251.885473] Interface registers dump from offset 0x1c98 to 0x1c9f
[  251.891626] PCIE registers from offset 0x1c20 to 0x1c9c:
[  251.896978] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.904795] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.912605] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.920390] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.928178]
[  251.929702] ADMA Tx/Rx/Event/Cmd/CmdResp registers:
[  251.934613] ADMA registers dump from offset 0x10000 to 0x10068
[  251.940535] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.948359] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.956170] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.963974] ffffffff ffffffff ffffffff
[  251.967838] ADMA registers dump from offset 0x10800 to 0x10868
[  251.973721] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.981512] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.989307] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  251.997086] ffffffff ffffffff ffffffff
[  252.000961] ADMA registers dump from offset 0x10880 to 0x108e8
[  252.006841] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  252.014649] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  252.022438] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  252.030226] ffffffff ffffffff ffffffff
[  252.034102] ADMA registers dump from offset 0x11000 to 0x11068
[  252.039983] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  252.047786] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  252.055578] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  252.063371] ffffffff ffffffff ffffffff
[  252.067260] ADMA registers dump from offset 0x11080 to 0x110e8
[  252.073171] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  252.080963] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  252.088795] ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  252.096584] ffffffff ffffffff ffffffff
[  252.100595] woal_request_fw failed
[  252.104056] Firmware Init Failed
[  252.109603] Free module params
[  252.112832] woal_pcie_probe: failed
[  252.116330] wlan_pcie: probe of 0000:01:00.1 failed with error -14
[  252.122704] wlan: Register to Bus Driver Done
[  252.127140] wlan: Driver loaded successfully

 

DTS file:

&pcieb {
compatible = "fsl,imx8qxp-pcie","snps,dw-pcie";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcieb>;
clkreq-gpio = <&lsio_gpio4 1 GPIO_ACTIVE_HIGH>;
reset-gpio = <&lsio_gpio4 0 GPIO_ACTIVE_HIGH>;
ext_osc = <0>;
epdev_on-supply = <&reg_3p3v>;
aspm-quirks = <0>;
aspm-enable;
status = "okay";
};

pinctrl_pcieb: pcieagrp {
fsl,pins = <
IMX8DXL_PCIE_CTRL0_PERST_B_LSIO_GPIO4_IO00 0x06000021
IMX8DXL_PCIE_CTRL0_CLKREQ_B_LSIO_GPIO4_IO01 0x26000020
IMX8DXL_PCIE_CTRL0_WAKE_B_LSIO_GPIO4_IO02 0x06000021
>;
};

Additionally we followed the poweron and off sequence mentioned in the jody-w3 datasheet. but still we have facing the issue 

0 Kudos
Reply
17 Replies

4,534 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

Please confirm the following:

- Are you using a custom design?

- What Linux version are you using?

- What wi-fi driver and fw version are you using? 

- Can you share some steps to replicate this on an EVK?

- Do you have a company mail?

Regards,

Daniel.

0 Kudos
Reply

4,484 Views
Tanushree
Contributor III
  • We are using the iMX8DXL processor.
  •  Linux version is 6.1.22.
  •  88W8987 driver connected via pcie.
  •  Below is the procedure
    1. Turn off the main 3v3 and 1v8 switch connected to the wifi module.
    2.  Put the device into sleep
    3. After wakeup turn on the both regulators and tried to load the wifi driver
  • tanushree.chandrashekar@iwave-global.com
             
Tags (1)
0 Kudos
Reply

4,458 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

 

Are you using 88W8987?

I looked at the JODY-W3 series, and the available chipsets are AW690 or 9098.

In your logs I see the following “pcieuart9098_combo_v1.bin”.

 

Could you please confirm what module and chipset are you using?

 

Regards,

Daniel.

0 Kudos
Reply

4,437 Views
Tanushree
Contributor III

Hello @DanielRuvalcaba,

Sorry for the confusion. we are using 

NXP 88W9098

JODY-W377-00B-00 part number

 

Regards,
Tanushree

Tags (1)
0 Kudos
Reply

4,385 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

I don't have a JODY-W377-00B, but I tested it with an AW-XM458 on an i.MX8DXL-EVK and I was able to reproduce this by unloading the drivers and disconnecting and re-connecting the module.

I am checking this.

May I know why do you need this procedure (turning off the module)?

Regards,

Daniel.

0 Kudos
Reply

4,368 Views
Tanushree
Contributor III

Hello @DanielRuvalcaba 

Thank you for the reply

This procedure aims to reduce current consumption in sleep mode by turning off the power switches to all modules that do not require interruptions for waking up from sleep mode. Below is the command we are using for sleep mode:
echo mem > /sys/power/state

Additionally, please suggest what should be disabled in the processor to minimize current consumption in sleep mode. We only require wakeup through interrupts for the accelerometer and ignition, while all other functionalities should be disabled.

Regards,
Tanushree

Regards,
Tanushree

Tags (1)
0 Kudos
Reply

4,325 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

Looks like the M.2 PCIe interface is initialized at u-boot level. You can verify this on your side with the following command in u-boot.

With the module connected (power on)

=> pci
imx_pcie pcie@0x5f010000: -2 unable to get disable-gpio.
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x1957     0x0000     Bridge device           0x04
01.00.00   0x1b4b     0x2b43     Network controller      0x00
01.00.01   0x1b4b     0x2b44     Network controller      0x00

 

 With the module disconnected (power off):

=> pci
imx_pcie pcie@0x5f010000: -2 unable to get disable-gpio.
PCI:   pcie phy link never came up
=>

 

If you connect the module after booting, you won't be able to bring up the module. This is the output you'll get:

[   42.772610] mlan: loading out-of-tree module taints kernel.
[   42.818455] wlan: Loading MWLAN driver
[   42.819951] wlan: Register to Bus Driver...
[   42.820186] wlan: Register to Bus Driver Done
[   42.820195] wlan: Driver loaded successfully

 

Something similar happens if you power on the module after turning it off and you unloading the drivers. Looks like it won't make the link or initialization, and it will fail.

[   55.758303] woal_pcie_probe: failed
[   55.758315] wlan_pcie: probe of 0000:01:00.1 failed with error -14

 

Regarding the processor low power query, I strongly recommend you open a new case, ticket or thread about this specific topic so it can be addressed to the i.MX processor support team. They should be able to help you.

Regards,

Daniel.

0 Kudos
Reply

4,280 Views
Tanushree
Contributor III

Hello @DanielRuvalcaba 

Yes, The PCIe is initialized at the U-Boot level. Then, I attempted to initialize it in the kernel by disabling it in U-Boot, powering off the system, and turning it back on. After the reset GPIO was toggled manually and used the below pcie reset command. 
echo 1 > /sys/bus/pci/rescan

Procedure to replicate :

1. Disabled PCIe in U-Boot:
2. Turned off and on the module power.
3. Manually toggled the PCIe reset GPIO
4. Rescan the pcie(echo 1 > /sys/bus/pci/rescan)

Then it is initialized correctly.

But after the system goes into sleep and wakes up, following the same procedure does not work as expected.

Could you assist us in resolving this issue which is causing in the sleep wakeup?

 

Regards,
Tanushree

 

Tags (1)
0 Kudos
Reply

4,252 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Let me double check this deeper next week.

If I don't find anything, I will ask internally.

Regards,

Daniel.

0 Kudos
Reply

3,999 Views
Tanushree
Contributor III

Hello @DanielRuvalcaba ,

Gentle Remainder!

One more point to note is that after powering off the device and performing a sleep-wakeup cycle, the condition does not work when the power is turned back on. However, if I turn it off and on before going to sleep, it works as expected.

Regards,
Tanushree

0 Kudos
Reply

3,944 Views
Tanushree
Contributor III

Gentle Remainder!

0 Kudos
Reply

3,819 Views
Tanushree
Contributor III

Gentle Remainder!

Are there any suggestions or inputs?

Regards,
Tanushree

0 Kudos
Reply

3,756 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

 

Please accept my apologies for the late reply.

I'm afraid you require "Hotplug", but Wi-Fi PCIe doesn't support this feature.

 

Please try the following:

Shut down 9098

     1. Removing 88W9098 driver

    2. Removing host PCIe driver (should be .ko mode)

    3. Power down 9098

Switch on 9098

     4. Power on 9098

     5. Loading host PCIe driver (it will find PCIe device connected to the interface, here is 9098)

     6. Loading 9098 driver.

Regards,

Daniel.

0 Kudos
Reply

3,725 Views
Tanushree
Contributor III

Hello @DanielRuvalcaba 

Thank you for your input. I changed the CONFIG_PHY_FSL_IMX8Q_PCIE setting to module in the defconfig.

After the system sleeps and wakeup also , both PCIe and Wi-Fi initialize properly. However, when I attempt to remove the module, I encounter the following prints and the module fails to be removed:

root@imx8dxl-iwg46m:~# rmmod phy-fsl-imx8q-pcie.ko
rmmod: ERROR: Module phy_fsl_imx8q_pcie is in use
root@imx8dxl-iwg46m:~#
root@imx8dxl-iwg46m:~#
root@imx8dxl-iwg46m:~# rmmod phy-fsl-imx8q-pcie
rmmod: ERROR: Module phy_fsl_imx8q_pcie is builtin.

dts file:
&pcieb {
compatible = "fsl,imx8qxp-pcie","snps,dw-pcie";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcieb>;
clkreq-gpio = <&lsio_gpio4 1 GPIO_ACTIVE_HIGH>;
reset-gpio = <&lsio_gpio4 0 GPIO_ACTIVE_HIGH>;
ext_osc = <0>;
epdev_on-supply = <&reg_3p3v>;
aspm-quirks = <1>;
aspm-enable;
status = "okay";
};
pinctrl_pcieb: pcieagrp {
fsl,pins = <
IMX8DXL_PCIE_CTRL0_PERST_B_LSIO_GPIO4_IO00 0x06000021
IMX8DXL_PCIE_CTRL0_CLKREQ_B_LSIO_GPIO4_IO01 0x26000020
IMX8DXL_PCIE_CTRL0_WAKE_B_LSIO_GPIO4_IO02 0x06000021
>;
};

Are there other configurations that need to be changed to load this as a module?

Regards,
Tanushree

Tags (1)
0 Kudos
Reply

3,671 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Dear @Tanushree ,

 

>>rmmod: ERROR: Module phy_fsl_imx8q_pcie is in use

it  indicates that another module is using the host pcie driver. you can use lsmod to check which one or more modules is using it. then remove others first, remove host pcie driver last.

[Note]

1. About device tree.

Don't need to change dts, original configuration is OK.

2. About your test steps

It is incorrect to power on, power off and load the driver for WiFi while OS is running. This is because such operation is very similar to Hotplug of PCIe device. Although the power is disconnected, the PCIe and other signals are still physically connected to the host PCIe. The host PCIe has power but the WiFi PCIe has no power, so the level of the PCIe bus will change. Conversely, when WiFi is powered on, the WiFi PCIe is reinitialized, and the host PCIe driver uses the rescan command to scan the PCIe WiFi. In theory, it can scan and obtain information such as the WiFi ID, but in this process, the status of the host PCIe controller is inconsistent with the status of the WiFi PCIe.


Based on the above analysis, this is why the host PCIe driver is compiled into a .ko file and removed and re-loaded, which can reinitialize the host PCIe controller.
If the steps we recommend still cannot solve the problem after your test, please stop the test and use the WiFi power saving mode to reduce power consumption.

 

Thanks!

Regards,

weidong

 

0 Kudos
Reply

3,722 Views
Tanushree
Contributor III

Additionally, before remove the PCIe driver, the Wi-Fi driver is removed.

Tags (1)
0 Kudos
Reply

4,540 Views
Tanushree
Contributor III

Is there any ways to reset the PCIE lines??

0 Kudos
Reply