Introduction
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.
New Method
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.
Device Tree support
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.
};
};
- Note: The parameter ‘compatibility = “nxp,88w8987-bt”’ will use for 88W8987, IW416, 88Q9098, IW612 chipsets and need to change for 88W8997 with parameter ‘compatibility = “nxp,88w8997-bt”’.
- Note: ’fw-init-baudrate’ parameter depends on the module vendor. The Murata and Azuere wifi modules support in BSP release uses the default value -- 115200. We strongly recommend looking at the module vendor-specific baud rate parameter.
- Note: For the old 88Q9098 Murata 1XL module that uses the 3Mbps by default, please add the fw-init-baudrate = <3000000> property in dts files to make it work.
Enable Guide
Use wifi interface to load combo (wifi & bt) firmware and enable BT
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

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.