How to configure Yocto to enable WiFi/BT on the i.MX8 Mini EVK

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

How to configure Yocto to enable WiFi/BT on the i.MX8 Mini EVK

跳至解决方案
13,225 次查看
pclass_sensonix
Contributor II

I am starting to work with the i.MX8 Mini EVK ( 8MMINILPD4-EVKB ). I can build an image for the device and flash it's eMMC with the uuu tool. I use the latest meta-imx with linux-imx version 5.10.52-lts and Yocto hardknott branch. The MACHINE target in Yocto is 'imx8mmevk' and the image is based on 'core-image-full-cmdline'.

The datasheet  says that this EVK contains the following radio:

  • SDIO Wi-Fi/Bluetooth: AW-CM358SM (NXP 88W8987), Wi-Fi5 (802.11ac) 1x1 Dual-Band (2.4/5 GHz) and Bluetooth 5.1

The Linux User's Guide claims that this radio is supported in linux-imx by the moal driver. 

 

 

root@device:~# modprobe moal mod_para=nxp/wifi_mod_para.conf

 

 

However, when I run menuconfig for the kernel, there is no radio driver by that name.

I have included the 'linux-firmware' bitbake target and my device has the following files on the root file system:

 

 

root@device:/lib/firmware/nxp# ls -lrt
total 2780
-rw-r--r-- 1 root root   4261 Mar  9  2018 wifi_mod_para.conf
-rw-r--r-- 1 root root  28376 Mar  9  2018 txpwrlimit_cfg_9098.conf
-rw-r--r-- 1 root root  25516 Mar  9  2018 txpwrlimit_cfg_8997.conf
-rw-r--r-- 1 root root  20963 Mar  9  2018 txpwrlimit_cfg_8987.conf
-rw-r--r-- 1 root root 481712 Mar  9  2018 sdiouartiw416_combo_v0.bin
-rw-r--r-- 1 root root 548308 Mar  9  2018 sdiouart8997_combo_v4.bin
-rw-r--r-- 1 root root 530240 Mar  9  2018 sdiouart8987_combo_v0.bin
-rw-r--r-- 1 root root 620764 Mar  9  2018 pcieuart9098_combo_v1.bin
-rw-r--r-- 1 root root 554644 Mar  9  2018 pcieuart8997_combo_v4.bin
-rw-r--r-- 1 root root   1049 Mar  9  2018 ed_mac_ctrl_V3_909x.conf
-rw-r--r-- 1 root root   1058 Mar  9  2018 ed_mac_ctrl_V3_8997.conf
-rw-r--r-- 1 root root   1058 Mar  9  2018 ed_mac_ctrl_V3_8987.conf

 

 

I tried enabling the 'mwifiex' driver in the Linux menuconfig, since it claims to support this radio, but the driver fails to use the provided firmware:

 

CONFIG_MWIFIEX=m
CONFIG_MWIFIEX_SDIO=m

 

 

 

root@device:/permanent-storage# dmesg
[   78.704225] mwifiex_sdio mmc0:0001:1: info: FW download over, size 623240 bytes
[   94.912462] mwifiex_sdio mmc0:0001:1: FW failed to be active in time
[   94.912480] mwifiex_sdio mmc0:0001:1: info: _mwifiex_fw_dpc: unregister device
[  123.876607] imx-sdma 302b0000.dma-controller: external firmware not found, using ROM firmware

 

 

 How do I configure Yocto to support this radio so that I get a 'wlan0' device? Is the driver I should use called 'moal' or 'mwifiex'? If it is 'moal', how do I build that driver?

Thank you.

0 项奖励
回复
1 解答
13,212 次查看
alberto_alvarez
NXP Employee
NXP Employee

Hi,

I'm not sure if your problem could be related to the image you are generating (core-image-full-cmdline). You can try with the ones provided by Table 1 in IMXLXYOCTOUG, page 8/22: i.MX Yocto Project User's Guide (nxp.com). I suggest you try imx-image-full

 

I just posted this article, you may find it helpful: How to use Bluetooth on i.MX8M boards - NXP Community 

在原帖中查看解决方案

0 项奖励
回复
4 回复数
13,213 次查看
alberto_alvarez
NXP Employee
NXP Employee

Hi,

I'm not sure if your problem could be related to the image you are generating (core-image-full-cmdline). You can try with the ones provided by Table 1 in IMXLXYOCTOUG, page 8/22: i.MX Yocto Project User's Guide (nxp.com). I suggest you try imx-image-full

 

I just posted this article, you may find it helpful: How to use Bluetooth on i.MX8M boards - NXP Community 

0 项奖励
回复
13,176 次查看
pclass_sensonix
Contributor II

Thank you, I tracked down the requirements in meta-freescale. If I enable the following packages, then wifi works:

# Add WiFi/Bluetooth kernel modules
IMAGE_INSTALL += "\
    nxp-wlan-sdk \
    kernel-module-nxp89xx \
"
13,190 次查看
igorpadykov
NXP Employee
NXP Employee
13,164 次查看
pclass_sensonix
Contributor II

Thanks for the support. I looked through the meta-freescale and found these:

  • nxp-wlan-sdk
  • kernel-module-nxp89xx

I enabled them in my image and now I have the device!

root@device:/lib/modules/5.10.52-lts-5.10.y+ga11753a89ec6/extra# modprobe moal mod_para=nxp/wifi_mod_para.conf
[  165.897233] wlan: Loading MWLAN driver
[  165.902739] vendor=0x02DF device=0x9149 class=0 function=1
[  165.908602] Attach moal handle ops, card interface type: 0x105
[  165.916088] SD8987: init module param from usr cfg
[  165.920942] card_type: SD8987, config block: 0
[  165.925422] cfg80211_wext=0xf
[  165.928420] wfd_name=p2p
[  165.930963] max_vir_bss=1
[  165.933625] cal_data_cfg=none
[  165.936635] drv_mode = 7
[  165.939176] ps_mode = 2
[  165.941663] auto_ds = 2
[  165.944136] fw_name=nxp/sdiouart8987_combo_v0.bin
[  165.948900] SDIO: max_segs=128 max_seg_size=65535
[  165.953642] rx_work=1 cpu_num=4
[  165.960074] Request firmware: nxp/sdiouart8987_combo_v0.bin
[  167.364415] WLAN FW is active
[  167.367397] on_time is 167363436500
[  167.423278] wlan: version = SD8987----16.92.10.p210.1-MM5X16266.p4-GPL-(FP92) 
[  167.432713] wlan: Driver loaded successfully