88W8987, SD8987 + PAN9028 drivers... support needed

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

88W8987, SD8987 + PAN9028 drivers... support needed

跳至解决方案
1,304 次查看
jaredwheeler
Contributor III

I’m attempting to bringup a PAN9028 radio on a custom PCB with an SDIO connection to an iMX8M processor running the mainline Linux kernel.  I want to use both the WiFi and Bluetooth capability.

 

I’m VERY confused by the state of the documentation for this stack and could REALLY use some help.  

 

Here are my questions:

  1. If I want to use both the WiFi and Bluetooth functionality on the 88W8987 radio, do I need to load individual wifi and bluetooth drivers?  If so, are sections 6+7 of the Panasonic doc: [Wi-Fi Dual Band 2.4 GHz/5 GHz and Bluetooth® Module Software Guide Rev. 1.0] still correct?
  2. The Panasonic doc [Wi-Fi Dual Band 2.4 GHz/5 GHz and Bluetooth® Module Software Guide Rev. 1.0 ] says I need to contact NXP to download the drivers — Is this still true?  If so, how do I do this?
  3. The NXP PDF [UM11675 How to Download and Build NXP Wi-Fi Drivers] directs one to download the drivers directly from git [https://github.com/NXP/imx-firmware] — Is [UM11675] applicable to the 88W8987/SD8987/PAN9028 part? Are these the same WiFi/Bluetooth drivers I would get If I contacted NXP as directed in question 1?  (The driver packages on GitHub do not seem to contain any bluetooth-specific software.)
  4. Are there drivers in the mainline Linux kernel which support the WiFi and Bluetooth function of the sd8987 device?  The mainline mwifiex_sdio driver brings up the WiFi radio and it successfully completes an [iwlist scanning] command — just need to know how to bring up the BT stack.

Thanks!

0 项奖励
回复
1 解答
1,210 次查看
jaredwheeler
Contributor III

Okay, @ocourson.  Thanks again for the clarity and quick response.

Here's my understanding so far:

  1. Owing to the unique way in which this PAN9028 unit is funded, there is no definitive Product Reference Manual available to help me figure out what I'm doing wrong here.
  2. Current documentation supports bringing this device up against an NXP EVK only. [UM11483] [UM11490] [UM11675]
  3. In my specific custom PCB bringup case,
    1. The out-of-tree mwifiex driver believes the firmware has successfully downloaded (Wlan: FW download over, firmwarelen=612584 downloaded 612584)
    2. The out-of-tree mwifiex driver doesn't believe the device resets itself after the FW download (Fail to poll firmware status: firmwarestat=0xf00b)
    3. If the error is happening down at the firmware level, there's no debugging workflow beyond, "have you tried using the GPIO to turn it off and back on again?"

Is there an NXP doc somewhere for defeating the sunk cost fallacy?  I'd happily sign the NDA to see it.

Seriously though, I think my time with this PAN9028 module has reached an end.  I'll do a little more homework before selecting the next part.

Solution: Use something else.

 

在原帖中查看解决方案

4 回复数
1,240 次查看
ocourson
NXP TechSupport
NXP TechSupport

Dear @jaredwheeler 

 

We understand your confusion as there are different software release channels, and some documents might be outdated.

 

1/ User can either load WiFi+Bluetooth combo firmware at once (serial download, easiest solution):

 

modprobe moal fw_name=nxp/sdiouart8987_combo_v0.bin cfg80211_wext=0xf

 

Or load WiFi and Bluetooth firmwares individually (parallel download)

 

modprobe fw_name=nxp/sd8987_wlan.bin cfg80211_wext=0xf fw_serial=0
fw_loader /dev/ttymxcX 115200 0 /lib/firmware/nxp/uartuart8987_bt.bin

 

(parallel download is only required if independent WiFi/BT firmware reset is needed).

Please refer to UM11483 && UM11490 NXP user guides

 

2/ NXP now release generic driver and firmwares using github:

You can get NXP WiFi/BT driver from:

 

git clone http://github.com/nxp-imx/mwifiex.git
git checkout lf-6.1.36-2.1.0

 

This single driver is supporting all the recent NXP chipsets


And NXP WiFi/BT firmware:

 

git clone https://github.com/NXP/imx-firmware
git checkout lf-6.1.36-2.1.0

 

You will find chipset specific firmwares (like nxp/FwImage_8987/sdiouart8987_combo_v0.bin for 88W8987 WiFi+BT combo firmware)

 

3/ Indeed, UM11675 indeed explains customers how get NXP driver and firmware from github (see 2/).

Let us try to clarify the different NXP releases:

- NXP releases generic driver and firmwares on github. These generic software releases are accessible to any customers. They include all the WiFi/BT generic features. They are also integrated in the NXP i.MX Linux BSP releases, widely tested, and even WiFi pre-certified.

- NXP also release restricted access software on nxp.com. These releases are not available to all customers. On top of the generic WiFi/BT features, they include very specific features which are not used by most of the customers.

 

4/ As of today, NXP does not support the mainline Linux kernel driver and firmwares. The mainline Linux contains old & outdated driver and firmwares, and does not even support recent chipsets (like IW416, 88W9098, etc).

We are working to upstream our driver/firmwares to the kernel mainline, but this will not be available on short notice.

 

Do not hesitate to come back to us if something is still not clear.

 

Regards,

Olivier

0 项奖励
回复
1,231 次查看
jaredwheeler
Contributor III

Thanks for much @ocourson for the quick response.  This context is helpful in sorting out issues with my bringup.  

Followup question in your response to #1:

What does this line do?

 

 

fw_loader /dev/ttymxcX 115200 0 /lib/firmware/nxp/uartuart8987_bt.bin

 

 

Is there an fw_loader binary somewhere I may need?  I'm building the kernel/rootfs directly from source, not from the imx Yocto pile.  Is that fw_loader built somewhere in the Yocto stack?

My module loading is also a bit different than your code as I have to use insmod:

 

 

insmod /lib64/modules/6.0.9+/kernel/drivers/net/wireless/imx/mlan.ko
insmod /lib64/modules/6.0.9+/kernel/drivers/net/wireless/imx/moal.ko fw_name=nxp/sdiouart8987_combo_v0.bin cfg80211_wext=0xf

 

 

And finally, when I run the above commands, I get the following output to dmesg:

 

 

mlan: loading out-of-tree module taints kernel.
wlan: Loading MWLAN driver
wlan: Register to Bus Driver...
vendor=0x02DF device=0x9149 class=0 function=1
Attach moal handle ops, card interface type: 0x105
rps set to 0 from module param
No module param cfg file specified
SDIO: max_segs=128 max_seg_size=65535
rx_work=1 cpu_num=4
Attach mlan adapter operations.card_type is 0x105.
wlan: Enable TX SG mode
wlan: Enable RX SG mode
Request firmware: nxp/sdiouart8987_combo_v0.bin
Wlan: FW download over, firmwarelen=612584 downloaded 612584
Fail to poll firmware status: firmwarestat=0xf00b
FW failed to be active in time!
wlan_dnld_fw fail ret=0xffffffff
WLAN: Fail download FW with nowwait: 0
SDIO Func0 (0x0-0x9): 43 03 02 02 03 00 00 02 03 00 
SDIO Func1 (0x10-0x17): 00 00 00 00 00 00 00 00 
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 
SDIO Func1 (0xe8-0xf2): 0b f0 00 00 00 00 00 00 24 14 70 
SDIO Func1 (0xe8-0xf2): 0b f0 00 00 00 00 00 00 24 14 70 
woal_request_fw failed
Firmware Init Failed
Free module params
woal_add_card failed
wlan_sdio: probe of mmc1:0001:1 failed with error -1
wlan: Register to Bus Driver Done
wlan: Driver loaded successfully

 

 

Note that if, instead, I just modprobe the mwifiex_sdio module from the mainline kernel, the WiFi comes up without issue (though the BT stack isn't stood up -- I assume that's to be expected from the in-tree mwifiex_sdio module).  I've confirmed that the in-tree mwifiex_sdio module IS loading the sdiouart8987_combo_v0.bin firmware.  So it's doesn't seem to be an issue with the SDIO i/f, could it be a problem with my UART i/f?

 

0 项奖励
回复
1,218 次查看
ocourson
NXP TechSupport
NXP TechSupport

Dear @jaredwheeler 

As explained previously, below line

 

fw_loader /dev/ttymxcX 115200 0 /lib/firmware/nxp/uartuart8987_bt.bin

 

Is used to download the Bluetooth firmware using UART firmware loader.

It is only required if you download WiFi and Bluetooth firmwares separately, meaning using the WiFi only firmware:

 

modprobe moal fw_name=nxp/sd8987_wlan.bin cfg80211_wext=0xf fw_serial=0

 

 

 But it shall not be used if you use a WiFi+BT combo firmware

modprobe moal fw_name=nxp/sdiouart8987_combo_v0.bin cfg80211_wext=0xf

 

fw_loader is provided in the restricted access NXP software releases.

 

It seems that SDIO is working in your side, because you are able to download the firmware using SDIO, but for some reason, the firmware does not start. Maybe you could try to reset the module using dedicated GPIO.

 

Let me also remind that NXP does not support (for now) the driver included in the kernel mainline.

 

Regards,

Olivier

0 项奖励
回复
1,211 次查看
jaredwheeler
Contributor III

Okay, @ocourson.  Thanks again for the clarity and quick response.

Here's my understanding so far:

  1. Owing to the unique way in which this PAN9028 unit is funded, there is no definitive Product Reference Manual available to help me figure out what I'm doing wrong here.
  2. Current documentation supports bringing this device up against an NXP EVK only. [UM11483] [UM11490] [UM11675]
  3. In my specific custom PCB bringup case,
    1. The out-of-tree mwifiex driver believes the firmware has successfully downloaded (Wlan: FW download over, firmwarelen=612584 downloaded 612584)
    2. The out-of-tree mwifiex driver doesn't believe the device resets itself after the FW download (Fail to poll firmware status: firmwarestat=0xf00b)
    3. If the error is happening down at the firmware level, there's no debugging workflow beyond, "have you tried using the GPIO to turn it off and back on again?"

Is there an NXP doc somewhere for defeating the sunk cost fallacy?  I'd happily sign the NDA to see it.

Seriously though, I think my time with this PAN9028 module has reached an end.  I'll do a little more homework before selecting the next part.

Solution: Use something else.