Prior to 6.1.22_2.0.0 BSP release, Bluetooth interface are based on the tty line discipline framework, so we need to use hciattach tool to enable it in the user space.
From 6.1.22_2.0.0 BSP, the nxp bluetooth driver no longer needs the help of the userspace hciattach tool, and the tty port bound by bluetooth also won't be exported to the user space, so you cannot find the corresponding tty device anymore. So, you won't see the (/dev/ttymxcX), for the Bluetooth interface. All jobs has been done in the new NXP Bluetooth driver.
The new NXP Bluetooth UART Driver is based on a server driver for the NXP BT serial protocol, which can enable the built-in Bluetooth device inside an NXP BT chip.
This driver has a Power Save feature that will put the chip into a sleep state whenever there is no activity for 2000ms and will be woken up when any activity is to be initiated over UART.
The new BT framework requires adding a "bluetooth" sub node with a device compatibility string to the attached UART node in the dts file
&uart1 {
bluetooth {
compatibility = "nxp,88w8987-bt";
fw-init-baudrate = <3000000>; #Optional. Default is considered 115200 if this parameter not defined.
};
};
Need to load wifi driver first, then load the BT driver, otherwise, BT driver suspend/resume test will fail.
This is a HW limitation, since NXP wifi and BT module use the same power control pin(W_DISABLE1#), if we don't load the wifi driver, SDIO bus will power down the wifi chip during suspend resume, which may cause the BT chip also been powered down and cannot work after resume back. So we need to load the wifi driver to make sure SDIO bus won't power down the BT chip to make sure BT functions can work during suspend resume.
modprobe moal mod_para=nxp/wifi_mod_para.conf
modprobe btnxpuart
or
insmod mlan.ko
insmod moal.ko mod_para=nxp/wifi_mod_para.conf
insmod btnxpuart
Make sure run hciconfig hci0 up or hciconfig hci0 reset or bluetootctl power on before unload btnxpuart driver.
If we don't open hci0 interface, the driver cannot send change to 115200 baud rate command to BT chip, which causes the host and BT chip baud rate mismatch, the host still uses 115200bps talk to the BT chip which now use 3Mbps, it cannot work anymore.
So we need to make sure open the hci0 interface before unload btnxpuart driver.
mod_para=nxp/wifi_mod_para.conf
modprobe btnxpuart
sleep 3
hciconfig hci0 up #Note: Need to up hci interface before unload the BT module
hcitool -i hci0 cmd 3F 23 02 00 00
modprobe -r btnxpuart
modprobe -r moal
sleep 3
For better reference:
Bluetooth Deep Sleep Feature App Note AN13920, Chapter 6 Load NXP UART driver module
NOTE: Please do not run the power save feature for Murata IW612 2EL Module
Regards,
Mario
How to do on 8MPlus-EVK BB with Linux 5.15
In this version, there is support for the hciattach.
So, you could use this driver insted of the btnxpuart.
Mario