We are currently using NXP’s 6.1.55_2.5.0 based on Yocto Mickledore on a custom IMX8mp board which has a Wifi/Bluetooth module drive as a PCIE8997.
We are just getting Bluetooth to work on this board. In general we have this working with audio recording and playback. However we get occasional issues where the Bluetooth is not available after system boot with a kernel oops message given below.
I think we have an issue with the order of kernel module loading, device initialisation. We are unsure on how this is supposed to work. I think the issue may be due to the order of the moal and btnxpuart module loading.
We have a systemd service that is started, that basically does:
insmod /usr/dsmc/drivers/mlan.ko
insmod /usr/dsmc/drivers/moal.ko mod_para=nxp/wifi_mod_para.conf
wpa_supplicant -B -i uap0 -c /usr/dsmc/etc/wpa_supplicant_ap.conf
wpa_supplicant -B -i mlan0 -c /usr/dsmc/etc/wpa_supplicant.conf
# Bluetooth startup
# hciconfig hci0 down
# rmmod btnxpuart; modprobe btnxpuart
# hciconfig hci0 up
We found we needed the "rmmod btnxpuart; modprobe btnxpuart" to get the Bluetooth to operate to some extent (apart from the odd kernel oops). So how is this supposed to work ?
I would have expected we would need to have the following order:
insmod /usr/dsmc/drivers/mlan.ko
insmod /usr/dsmc/drivers/moal.ko mod_para=nxp/wifi_mod_para.conf
modprobe btnxpuart
systemctl start bluetooth
However without our systemd service we note that btnxpuart is being loaded by something, before moal is loaded. Is that to be expected ?