]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Bluetooth: btnxpuart: Add support to set BD address
authorNeeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Mon, 3 Mar 2025 11:27:52 +0000 (16:57 +0530)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 25 Mar 2025 16:45:52 +0000 (12:45 -0400)
commit9148ac0a16d182e565cbd9b43577e5adf271b792
tree50b60d5c7b69f4aa12d72f5ae679b398ce13670c
parentb13b6d669c1c5a31951786a20a452c0cd611ed78
Bluetooth: btnxpuart: Add support to set BD address

This adds support for setting BD address during hci registration. NXP
FW does not allow vendor commands unless it receives a reset command
after FW download and initialization done.

As a workaround, the .set_bdaddr callback function will first send the
HCI reset command, followed by the actual vendor command to set BD
address.

The driver checks for the local-bd-address property in device tree, and
if preset, it sets the HCI_QUIRK_USE_BDADDR_PROPERTY quirk.

With this quirk set, the driver's set_bdaddr callback function is called
after FW download is complete and before HCI initialization, which sends
the hci reset and 3f 22 commands. During initialization, kernel reads
the newly set BD address from the controller.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Johan Korsnes <johan.korsnes@remarkable.no>
Signed-off-by: Kristian Krohn <kristian.krohn@remarkable.no>
Tested-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
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