Bluetooth on i.MX8M Mini with 88W9098 module

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

Bluetooth on i.MX8M Mini with 88W9098 module

Jump to solution
4,297 Views
dpog
Contributor IV

After getting WLAN up and running on a EAR00411 module with 88W9098 via SDIO, the bluetooth won't work.

The device tree for the UART looks as follows:

&uart2 { /* UART B */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
status = "okay";
assigned-clocks = <&clk IMX8MM_CLK_UART2>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
cts-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
rts-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>;
fsl,uart-has-rtscts;
};
 
pinctrl_uart2: uart2grp {
fsl,pins = <
MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x140
MX8MM_IOMUXC_UART4_RXD_UART2_DCE_CTS_B 0x140
MX8MM_IOMUXC_UART4_TXD_UART2_DCE_RTS_B 0x140
>;
};
 
modprobe moal mod_para=nxp/wifi_mod_para.conf:
 
[ 77.845357] mlan: loading out-of-tree module taints kernel.
[ 77.870830] wlan: Loading MWLAN driver
[ 77.875234] wlan: Register to Bus Driver...
[ 77.880062] vendor=0x02DF device=0x914D class=0 function=1
[ 77.885628] Attach moal handle ops, card interface type: 0x106
[ 77.892507] SD9098: init module param from usr cfg
[ 77.897359] card_type: SD9098, config block: 0
[ 77.901835] cfg80211_wext=0xf
[ 77.904814] max_vir_bss=1
[ 77.907442] cal_data_cfg=none
[ 77.910407] ps_mode = 1
[ 77.912868] auto_ds = 1
[ 77.915325] host_mlme=enable
[ 77.918204] fw_name=nxp/sdiouart9098_combo_v1.bin
[ 77.922937] SDIO: max_segs=128 max_seg_size=65535
[ 77.927649] rx_work=1 cpu_num=4
[ 77.930818] Attach mlan adapter operations.card_type is 0x106.
[ 77.936951] wlan: Enable TX SG mode
[ 77.940458] wlan: Enable RX SG mode
[ 77.946668] Request firmware: nxp/sdiouart9098_combo_v1.bin
[ 78.273532] Wlan: FW download over, firmwarelen=867156 downloaded 700380
[ 78.539048] WLAN FW is active
[ 78.542024] on_time is 78539436625
[ 78.559195] VDLL image: len=166776
[ 78.562830] fw_cap_info=0xc8fcefa3, dev_cap_mask=0xffffffff
[ 78.568431] max_p2p_conn = 8, max_sta_conn = 64
[ 78.575959] wlan: mlan0 set max_mtu 2000
[ 78.612552] wlan: uap0 set max_mtu 2000
[ 78.621857] wlan: wfd0 set max_mtu 2000
[ 78.648299] wlan: version = SD9098----17.92.1.p136.13-MM5X17344.p3-GPL-(FP92)
[ 78.663741] vendor=0x02DF device=0x914E class=0 function=2
[ 78.669484] Attach moal handle ops, card interface type: 0x106
[ 78.675598] SD9098: init module param from usr cfg
[ 78.680720] card_type: SD9098, config block: 1
[ 78.685239] cfg80211_wext=0xf
[ 78.688314] max_vir_bss=1
[ 78.690992] cal_data_cfg=none
[ 78.693981] ps_mode = 1
[ 78.696503] auto_ds = 1
[ 78.698999] host_mlme=enable
[ 78.701899] fw_name=nxp/sdiouart9098_combo_v1.bin
[ 78.706690] SDIO: max_segs=128 max_seg_size=65535
[ 78.711492] rx_work=1 cpu_num=4
[ 78.714714] Attach mlan adapter operations.card_type is 0x106.
[ 78.721111] wlan: Enable TX SG mode
[ 78.724718] wlan: Enable RX SG mode
[ 78.734741] Request firmware: nxp/sdiouart9098_combo_v1.bin
[ 78.741598] WLAN FW already running! Skip FW download
[ 78.746773] WLAN FW is active
[ 78.749748] on_time is 78747161000
[ 78.753607] VDLL image: len=166776
[ 78.757327] fw_cap_info=0x68fcefa3, dev_cap_mask=0xffffffff
[ 78.763040] max_p2p_conn = 8, max_sta_conn = 64
[ 78.771019] wlan: mmlan0 set max_mtu 2000
[ 78.781927] wlan: muap0 set max_mtu 2000
[ 78.790333] wlan: mwfd0 set max_mtu 2000
[ 78.796929] wlan: version = SD9098----17.92.1.p136.13-MM5X17344.p3-GPL-(FP92)
[ 78.811693] wlan: Register to Bus Driver Done
[ 78.816172] wlan: Driver loaded successfully
 
systemctl status bluetooth:
 

* bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-04-28 17:52:25 UTC; 1s ago
Docs: man:bluetoothd(8)
Main PID: 611 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 1128)
Memory: 1.7M
CGroup: /system.slice/bluetooth.service
`- 611 /usr/libexec/bluetooth/bluetoothd

Apr 28 17:52:24 iesy-imx8mm-eva-mi systemd[1]: Starting Bluetooth service...
Apr 28 17:52:24 iesy-imx8mm-eva-mi systemd[611]: ConfigurationDirectory 'bluetooth' already exists but the mode is different. (File system: 755 ConfigurationDirectoryMode: 555)
Apr 28 17:52:25 iesy-imx8mm-eva-mi bluetoothd[611]: Bluetooth daemon 5.65
Apr 28 17:52:25 iesy-imx8mm-eva-mi systemd[1]: Started Bluetooth service.
Apr 28 17:52:25 iesy-imx8mm-eva-mi bluetoothd[611]: Starting SDP server
Apr 28 17:52:25 iesy-imx8mm-eva-mi bluetoothd[611]: ../bluez-5.65/profiles/network/bnep.c:bnep_init() kernel lacks bnep-protocol support
Apr 28 17:52:25 iesy-imx8mm-eva-mi bluetoothd[611]: ../bluez-5.65/src/plugin.c:plugin_init() System does not support network plugin
Apr 28 17:52:25 iesy-imx8mm-eva-mi bluetoothd[611]: Bluetooth management interface 1.21 initialized

hciattach ttymxc1 any 3000000 flow:

[ 691.862820] Bluetooth: HCI UART driver ver 2.3
[ 691.867293] Bluetooth: HCI UART protocol H4 registered
[ 691.872512] Bluetooth: HCI UART protocol BCSP registered
[ 691.877933] Bluetooth: HCI UART protocol LL registered
[ 691.883288] Bluetooth: HCI UART protocol ATH3K registered
[ 691.888778] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 691.895425] Bluetooth: HCI UART protocol Broadcom registered
[ 691.901190] Bluetooth: HCI UART protocol QCA registered
Device setup complete 
[ 693.922990] Bluetooth: hci0: command 0x1003 tx timeout
[ 695.938970] Bluetooth: hci0: command 0x1001 tx timeout
[ 697.954987] Bluetooth: hci0: command 0x1009 tx timeout

 

I also tried Baudrates 115200 and 4000000, as it was mentioned by murata that the Module would run at 4MBaud. But the results stay the same. 

In another thread I found informations about a incorrect mac address, but I could'nt use the approach, because hcitool could not open the device to change it.

Labels (1)
0 Kudos
Reply
1 Solution
3,931 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

Sounds great!

Thanks for your sharing information and your effort. It is very valuable for me as future reference.

Then may I close this thread right now?

 

Best regards,

Christine.

View solution in original post

Tags (1)
0 Kudos
Reply
20 Replies
4,278 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

Can you please help to check whether ttymxc1 is the UART dial device? 

Do you have other /dev/ttymxc0 or /dev/ttymxc2? If yes, can you please have a try with other tty devices?

 

Best regards,

Christine.

Tags (1)
0 Kudos
Reply
4,270 Views
dpog
Contributor IV

Hi @Christine_Li,

Yes, ttymxc1 is the correct dial device, I checked with our schematics of the board. Just to be sure I also tried it on ttymxc0, this just produces an extra error: Bluetooth: hci1: Frame reassembly failed (-84)

ttymxc2 is our console, so there is no need to test this port.

 

Best regards,

Dominik

0 Kudos
Reply
4,261 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

Are you using Linux platform?

What's you Linux kernel version?

Can Wi-Fi work well on your board?

 

Best regards,

Christine.

Tags (1)
0 Kudos
Reply
4,258 Views
dpog
Contributor IV
Hi @Christine_Li
I'm using linux-fslc-imx 5.15.87, the WiFi works as expected.

Best regards,
Dominik
0 Kudos
Reply
4,256 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

Can you please help to use UART3 to have a try?

I saw the I.MX8MM schematic, there is no CTS and RTS for UART2 in default. Even you have give CTS and RTS in your device tree, I am not sure it can work well or not, because of you are using MX8MM_IOMUXC_UART4_RXD_UART2_DCE_CTS_B. 

So, try with UART3, please.

Best  regards,

Christine.

Tags (1)
0 Kudos
Reply
4,255 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

You can also try to edit: 

pinctrl_uart2uart2grp {
fsl,pins = <
MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x140
MX8MM_IOMUXC_UART4_RXD_UART2_DCE_CTS_B 0x140
MX8MM_IOMUXC_UART4_TXD_UART2_DCE_RTS_B 0x140
>;
};
 
To :
pinctrl_uart2uart2grp {
fsl,pins = <
MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x40
MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x40
MX8MM_IOMUXC_UART4_RXD_UART2_DCE_CTS_B 0x40
MX8MM_IOMUXC_UART4_TXD_UART2_DCE_RTS_B 0x40
>;
};
 
If still failed, please help to try with UART3.
 

For uart3, please see below for reference.


&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
assigned-clocks = <&clk IMX8MM_CLK_UART3>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
fsl,uart-has-rtscts;
status = "okay";
};


pinctrl_uart3: uart3grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI1_SCLK_UART3_DCE_RX 0x40
MX8MM_IOMUXC_ECSPI1_MOSI_UART3_DCE_TX 0x40
MX8MM_IOMUXC_ECSPI1_SS0_UART3_DCE_RTS_B 0x40
MX8MM_IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B 0x40
>;
};

And please also check your hardware side connection, make sure connect to correct port.

Best regards,

Christine.

Tags (1)
0 Kudos
Reply
4,252 Views
dpog
Contributor IV
Hi @Christine_Li
thank you for the suggestion on the pinconfig, but sadly it didnt work.

Also it is not possible to use Uart3 for this, as the interface is not routed to the M.2 connector. I will also try another board (same design) to rule out some hardware errors

Best regards,
Dominik
0 Kudos
Reply
4,231 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

Thanks for your quick reply.

Yes, please help to check the hardware side related to UART and also the voltage.

Today, I tried I.MX8MNano with IW416 EVK (SDIO + UART), it worked fine with 3.3V and with UART3(As I shared last Friday pinctl config), and 115200 baud rate.  I.MX8MMini is similar with I.MX8MNano. And I don't have 88W9098 M.2 SDIO module, so I tried with IW416 EVK with SDIO and UART. For 88W9098,3000000 baud rate is suggested to use. 

You can reference this.

If you still have problem on this thread, please let me know.

 

Best regards,

Christine.

0 Kudos
Reply
4,215 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

Have find anything wrong in your HW connections? Especially VIO? For UART, should be 3.3V. So check your VIO please.

Do you still need my further support on this case?

I just tested on my local side with I.MX8MMini(Kernel 5.15.52 + UART3) and 88W9098 EVK, it works fine. I don't have EAR00411 module, so I tested with 88W9098 EVK.

Please see my HW connection and test results for your reference. 

If still need my further support, please share your HW connections to me. 

 

Best regards,

Christine.

0 Kudos
Reply
4,207 Views
dpog
Contributor IV

Hi @Christine_Li 

the HW connections are correct, we are using a SoM according to the OSM, so it UART-IO is at 1.8V. That might be the problem. 

Best regards,

Dominik

0 Kudos
Reply
4,201 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

Yes, you are right. The 1.8V voltage should be the problem.

Please help to change UART-IO from 1.8V to 3.3V to have a try and let me know whether it works well.

 

Best regards,

Christine.

Tags (1)
0 Kudos
Reply
4,199 Views
dpog
Contributor IV
Hi @Christine_Li
I rechecked the specs for the EAR00411, the UART Interface operates on 1.8V, so I think they take care for 3.3V on the Module itself.

Best regards,
Dominik
0 Kudos
Reply
4,168 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

Are you using our .MX8MMini-EVK board? Or your own design board with I.MX8MMini chip?

I checked our I.MX8MMini-EVK board schematics, its M.2 interface doesn't support SDIO and UART. I don't know how the Wi-Fi works fine with SDIO on M.2 in your side(if using our I.MX8MMini).

If you are using your own design board, can you please help to share your board schematics? So that I can check further for you.

I also checked the UART-IO on EAR00411 Datasheet, yes, you are right. It is 1.8V. 

https://www.mouser.cn/datasheet/2/131/1XL_2XS_M2_Datasheet-3079719.pdf

So, I suggest you check and make sure the UART-IO  on I.MX8MMini side is 1.8V. Then they can communicate with each other.

 

Best regards,

Christine. 

 

 

 

0 Kudos
Reply
4,132 Views
dpog
Contributor IV

Hi @Christine_Li 

sorry for my delayed reply, I was occupied by other subjects in the project.

We are using a custom made SoM on a custom Baseboard, I attached the schematics used by the UART and M2. The M.2 connector is an E-Key, thats how we support SDIO and UART

I also rechecked the UART voltage, NVCC_UART is indeed connected to 1.8V

Best regards,

Dominik

0 Kudos
Reply
4,127 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

Thanks for sharing.

Can you please exchange TXD and RXD, CTS and RTS to have a try?

Sometimes, these two pairs signals are very easily to be confused.

So please try these 4 combinations to do cross verification.

Christine_Li_0-1698304572605.png

 

Best regards,

Christine.

Tags (1)
0 Kudos
Reply
4,059 Views
dpog
Contributor IV
Hi @Christine_Li
I tried all combos, additional I tried all with the changed Pinconfig you mentioned earlier.
Still the same results. I will consult our hardware dep. next week to further debug this and rule out hardware failures.
Thanks for your help so far,
Best regards,
Dominik
0 Kudos
Reply
3,986 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

It it my pleasure to provide support.

As I tested on I.MX8MNano with 88W9098 on UART3, it works fine and I don't have such a board which can support UART2 on M.2, I could not do further test locally.

So please help to check further with your hardware team and try to figure out the issue.

And I will also discuss this case with our internal team, so that we can see what we can provide to you.

 

Best regards,

Christine.

0 Kudos
Reply
3,953 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

I double checked your schematics.

You are connecting in below way, right?

SoM_CPU---SoM_OSM----EVK_OSM----EVK_M2----88W9098

If my understanding is not correct, please help to point out.

Christine_Li_0-1698739079894.png

 

I think your connection is no problem.

Christine_Li_2-1698741879320.png

Can you please help to ask your HW team to test the UART signals with a Logic Analyzer?

Best regards,

Christine.

Tags (1)
0 Kudos
Reply
3,947 Views
dpog
Contributor IV

Hi @Christine_Li,
correct, thats our connection.
Quick update from my side: I got it working by removing the hardware flow from the DT and inititalizing with hciattach ...... noflow

With the Logic Analyzer I was able to isolate the problem purely to the hardware flow.

While gathering some more test results for my answer, I also got it working with Hardwareflow enabled,

&uart2 { /* UART B */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
status = "okay";
cts-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
rts-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>;
};
 
pinctrl_uart2: uart2grp {
fsl,pins = <
MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x140
MX8MM_IOMUXC_UART4_RXD_GPIO5_IO28 0x140
MX8MM_IOMUXC_UART4_TXD_GPIO5_IO29 0x140
>;
};
 
Thanks for your effort!
 
Best regards,
Dominik
0 Kudos
Reply
3,932 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @dpog 

Sounds great!

Thanks for your sharing information and your effort. It is very valuable for me as future reference.

Then may I close this thread right now?

 

Best regards,

Christine.

Tags (1)
0 Kudos
Reply