Bluetooth: btnxpuart: Add support for HCI coredump feature
authorNeeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Thu, 27 Feb 2025 18:26:20 +0000 (23:56 +0530)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 25 Mar 2025 16:45:21 +0000 (12:45 -0400)
commit998e447f443f138c90faa6ff3845082af419070e
tree16bd07d413952828ec43203c37ca0e15692046ac
parent6fca6781d19dfadbc3d96b3c10daf1f2e1239092
Bluetooth: btnxpuart: Add support for HCI coredump feature

This adds support for Bluetooth Coredump feature to BTNXPUART driver to
collect FW dumps on demand, or in case FW goes in a bad state.

To trigger manual FW dump, following command can be used:
echo 1 > /sys/class/bluetooth/hci0/device/coredump

Once FW dump is complete, it can be written to a file:
cat /sys/class/bluetooth/hci0/devcoredump/data > fw_dump

While FW dump is in progress, any HCI command will return -EBUSY.

After FW dump is complete, driver will give HCI_NXP_IND_RESET command
which soft-resets the chip, allowing FW re-download.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btnxpuart.c