How to integrate AW-CM276MA-PUR on Linux 5.5 based board

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

How to integrate AW-CM276MA-PUR on Linux 5.5 based board

644 Views
NealZhang
Contributor III

I am integrating an AW-CM276MA-PUR module into a board based on the i.MX 8M Plus, running Linux kernel version 5.5. Could you please provide guidance on how to add the btnxpuart driver to my Yocto image to enable Bluetooth connectivity?

By the way, I can use this module on the same board with demo yocto image of imx-image-multimedia. However this demo image is linux 6.6.3

@Rita_Wang 

0 Kudos
Reply
6 Replies

632 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

I strongly recommend you update your kernel version to the latest release, since it includes several bug fixes and improvements.

To use btnxpuart, it is recommended to use Linux 6.1.x or later.

You should be able to bring up the bleutooth using hciattach.

Kernel versions 5.x and older are having compatibility issues when using btnxpuart due to some APIs not being present

Regards,

Daniel.

 

0 Kudos
Reply

613 Views
NealZhang
Contributor III
I refer to UM11483 to setup AW-CM276MA, But i got an error of uart timeout as below:
root@csr-sgc-atp:~/WIFI-BT-AR_5_10_Y-IMX8--MXM5X17292.p4-MGPL/uartfwloader_src/linux# hciattach /dev/ttymxc0 any 115200 flow
Setting TTY to N_HCI line discipline
Device setup complete
root@csr-sgc-atp:~/WIFI-BT-AR_5_10_Y-IMX8--MXM5X17292.p4-MGPL/uartfwloader_src/linux# hciconfig
hci0: Type: Primary Bus: UART
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN INIT RUNNING
RX bytes:47104 acl:0 sco:0 events:0 errors:0
TX bytes:8 acl:0 sco:0 commands:2 errors:0

root@csr-sgc-atp:~/WIFI-BT-AR_5_10_Y-IMX8--MXM5X17292.p4-MGPL/uartfwloader_src/linux# hciconfig hcio up
Can't init device hci0: Connection timed out (110)
0 Kudos
Reply

594 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

I just tested this on my side using NXP i.MX Linux BSP 5.4.70.
Please let me know if you notice any difference in my logs.

root@imx8mpevk:~# uname -r
5.4.70-2.3.0+g4f2631b022d8
root@imx8mpevk:~# modprobe moal mod_para=nxp/wifi_mod_para.conf
[   29.275496] wlan: Loading MWLAN driver
[   29.279808] wlan_pcie 0000:01:00.0: enabling device (0000 -> 0002)
[   29.286118] Attach moal handle ops, card interface type: 0x204
[   29.292474] PCIE8997: init module param from usr cfg
[   29.297488] card_type: PCIE8997, config block: 0
[   29.302137] cfg80211_wext=0xf
[   29.305105] wfd_name=p2p
[   29.307659] max_vir_bss=1
[   29.310294] cal_data_cfg=none
[   29.313260] drv_mode = 7
[   29.315807] ps_mode = 2
[   29.318267] auto_ds = 2
[   29.320713] fw_name=nxp/pcieuart8997_combo_v4.bin
[   29.325451] rx_work=1 cpu_num=4
[   29.328623] Attach mlan adapter operations.card_type is 0x204.
[   29.338096] Request firmware: nxp/pcieuart8997_combo_v4.bin
[   30.181883] FW download over, size 551108 bytes
[   31.050098] WLAN FW is active
[   31.053073] on_time is 31051009375
[   31.085072] fw_cap_info=0x181c3fa3, dev_cap_mask=0xffffffff
[   31.090680] max_p2p_conn = 8, max_sta_conn = 8
[   31.108982] wlan: version = PCIE8997-16.92.10.p118-MXM5X16210-GPL-(FP92)
[   31.116074] wlan: Driver loaded successfully
root@imx8mpevk:~# [   33.758106] can1-stby: disabling
[   33.761343] can2-stby: disabling
[   33.764597] VSD_3V3: disabling

root@imx8mpevk:~# hciattach /dev/ttymxc0 any 115200 flow
Setting TTY to N_HCI line discipline
Device setup complete
root@imx8mpevk:~# hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: CC:47:40:33:61:76  ACL MTU: 1016:5  SCO MTU: 120:6
        DOWN
        RX bytes:691 acl:0 sco:0 events:38 errors:0
        TX bytes:438 acl:0 sco:0 commands:38 errors:0

root@imx8mpevk:~# hciconfig hci0 up
root@imx8mpevk:~# hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: CC:47:40:33:61:76  ACL MTU: 1016:5  SCO MTU: 120:6
        UP RUNNING
        RX bytes:1424 acl:0 sco:0 events:82 errors:0
        TX bytes:1218 acl:0 sco:0 commands:82 errors:0

root@imx8mpevk:~#

 
Regards,

Daniel.

 

0 Kudos
Reply

581 Views
NealZhang
Contributor III
Hi,
Firstly, thanks for your reply.
In my case, if I didn't run "modprobe moal mod_para=nxp/wifi_mod_para.conf" ever, I can attach bluetooth successfully. However, Bluetooth initialize failed if I init wifi driver before. And if i init Bluetooth before, it will fail to init wifi.
 
Spoiler

I init bluetooth before
Fail to init wifi, dmesg is as show below
[ 466.461630] mlan: loading out-of-tree module taints kernel.
[ 466.502222] wlan: Loading MWLAN driver
[ 466.506303] wlan: Register to Bus Driver...
[ 466.510732] wlan_pcie 0000:01:00.0: enabling device (0000 -> 0002)
[ 466.517002] PCI memory map Virt0: 00000000d16b9c47 PCI memory map Virt2: 0000000047fe73f1
[ 466.525218] Attach moal handle ops, card interface type: 0x204
[ 466.531065] rps set to 0 from module param
[ 466.535259] PCIE8997: init module param from usr cfg
[ 466.540290] card_type: PCIE8997, config block: 0
[ 466.544930] cfg80211_wext=0xf
[ 466.547910] max_vir_bss=1
[ 466.550545] cal_data_cfg=none
[ 466.553525] ps_mode = 1
[ 466.555972] auto_ds = 1
[ 466.558432] host_mlme=enable
[ 466.561324] fw_name=nxp/pcieuart8997_combo_v4.bin
[ 466.566057] rx_work=1 cpu_num=4
[ 466.569202] Enable moal_recv_amsdu_packet
[ 466.573241] Attach mlan adapter operations.card_type is 0x204.
[ 466.581434] Request firmware: nxp/pcieuart8997_combo_v4.bin
[ 467.087380] FW download over, size 621276 bytes
[ 473.090928] FW failed to be active in time!
[ 473.095155] wlan_dnld_fw fail ret=0xffffffff
[ 473.099514] WLAN: Fail download FW with nowwait: 0
[ 473.104355] Config Space Registers:
[ 473.107887] reg:0x00 value=0x2b421b4b
[ 473.111590] reg:0x04 value=0x00100406
[ 473.115309] reg:0x10 value=0x1810000c
[ 473.119081] reg:0x18 value=0x1820000c
[ 473.122767] reg:0x2c value=0x00000000
[ 473.126443] reg:0x3c value=0x000001df
[ 473.130111] reg:0x44 value=0x00000008
[ 473.133786] reg:0x80 value=0x10120040
[ 473.137462] reg:0x98 value=0x00000000
[ 473.141136] reg:0x170 value=0x0001001e
[ 473.144897] FW Scrach Registers:
[ 473.148133] reg:0xcf0 value=0xfedcba00
[ 473.151895] reg:0xcf8 value=0x0
[ 473.155064] reg:0xcfc value=0x0
[ 473.260043] reg:0xcf8 value=0x0
[ 473.263210] reg:0xcfc value=0x0
[ 473.368385] Interface registers dump from offset 0xc00 to 0xcfc
[ 473.374334] 00070621 00000000 c0000000 80000000 c085a000 00000000 00000000 00000000
[ 473.382116] 00000000 00000000 ffffffff 00000000 00000000 00000000 00000000 00000000
[ 473.389888] 00000000 00000000 00000472 000000e5 00000000 00000000 00001040 76543210
[ 473.397656] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 473.405418] a5a00420 040d1be0 01070f1a 5d7c0000 031f9121 00000000 000001e1 00000000
[ 473.413181] 00078120 00058110 00000000 00000000 00000000 00000000 00000000 00000000
[ 473.420945] 00010202 00000000 00000000 ffffffff 00800343 c8701424 00000000 00000000
[ 473.428710] 00000000 00000000 00000000 00000000 fedcba00 00000000 00000000 00000000
[ 473.436519] woal_request_fw failed
[ 473.439935] Firmware Init Failed
[ 473.447644] Free module params
[ 473.450767] woal_pcie_probe: failed
[ 473.454260] wlan_pcie: probe of 0000:01:00.0 failed with error -14
[ 473.460570] wlan: Register to Bus Driver Done
[ 473.464982] wlan: Driver loaded successfully
```
 
This is the wifi_mod_para.conf"

NealZhang_0-1730344110647.png

Is any idea for this?

Thanks a lot!

0 Kudos
Reply

563 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

Please share with me the commands you use to bring up the driver.

By any chance, are you able to test this with a NXP Linux BSP?

 

Regards.

Daniel.

0 Kudos
Reply

608 Views
NealZhang
Contributor III

I attached my dts file, Could please help check if any problem?

0 Kudos
Reply