2024-04-10 08:11:25

by Neeraj Sanjay Kale

[permalink] [raw]
Subject: [PATCH v3 0/2] Bluetooth: btnxpuart: Update firmware names

This patch series updates the BT firmware file names in BTNXPUART
driver, and adds a new optional firmware-name device tree property to
override the firmware file names hardcoded in the driver. This will
allow user to continue using the older firmware files.

This change is necessary as newer firmware releases will have
standardized naming convention aligned across all newer and legacy
chipsets.

Signed-off-by: Neeraj Sanjay Kale <[email protected]>

Neeraj Sanjay Kale (2):
dt-bindings: net: bluetooth: nxp: Add firmware-name property
Bluetooth: btnxpuart: Update firmware names

.../net/bluetooth/nxp,88w8987-bt.yaml | 4 +++
drivers/bluetooth/btnxpuart.c | 28 +++++++++++--------
2 files changed, 21 insertions(+), 11 deletions(-)

--
2.34.1



2024-04-10 08:11:47

by Neeraj Sanjay Kale

[permalink] [raw]
Subject: [PATCH v3 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property

This adds a new optional device tree property called firware-name.

Signed-off-by: Neeraj Sanjay Kale <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
v2: Add maxItems, simplify description, remove "nxp/". (Krzysztof)
v3: Corrected subject. Dropped description. (Krzysztof)
---
.../devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
index f01a3988538c..37a65badb448 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
@@ -31,6 +31,9 @@ properties:
This property depends on the module vendor's
configuration.

+ firmware-name:
+ maxItems: 1
+
required:
- compatible

@@ -42,5 +45,6 @@ examples:
bluetooth {
compatible = "nxp,88w8987-bt";
fw-init-baudrate = <3000000>;
+ firmware-name = "uartuart8987_bt_v0.bin";
};
};
--
2.34.1


2024-04-10 08:12:07

by Neeraj Sanjay Kale

[permalink] [raw]
Subject: [PATCH v3 2/2] Bluetooth: btnxpuart: Update firmware names

This updates the firmware names of 3 chipsets: w8987, w8997, w9098.
These changes are been done to standardize chip specific firmware
file names.
To allow user to use older firmware file names, a new device tree
property has been introduced called firmware-name, which will override
the hardcoded firmware names in the driver.

Signed-off-by: Neeraj Sanjay Kale <[email protected]>
---
v2: Remove "nxp/" from all firmware name definitions to be inline with
firware file name read from device tree file. (Krzysztof)
---
drivers/bluetooth/btnxpuart.c | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 0b93c2ff29e4..4442d911eba8 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -33,16 +33,16 @@
/* NXP HW err codes */
#define BTNXPUART_IR_HW_ERR 0xb0

-#define FIRMWARE_W8987 "nxp/uartuart8987_bt.bin"
-#define FIRMWARE_W8997 "nxp/uartuart8997_bt_v4.bin"
-#define FIRMWARE_W9098 "nxp/uartuart9098_bt_v1.bin"
-#define FIRMWARE_IW416 "nxp/uartiw416_bt_v0.bin"
-#define FIRMWARE_IW612 "nxp/uartspi_n61x_v1.bin.se"
-#define FIRMWARE_IW624 "nxp/uartiw624_bt.bin"
-#define FIRMWARE_SECURE_IW624 "nxp/uartiw624_bt.bin.se"
-#define FIRMWARE_AW693 "nxp/uartaw693_bt.bin"
-#define FIRMWARE_SECURE_AW693 "nxp/uartaw693_bt.bin.se"
-#define FIRMWARE_HELPER "nxp/helper_uart_3000000.bin"
+#define FIRMWARE_W8987 "uart8987_bt_v0.bin"
+#define FIRMWARE_W8997 "uart8997_bt_v4.bin"
+#define FIRMWARE_W9098 "uart9098_bt_v1.bin"
+#define FIRMWARE_IW416 "uartiw416_bt_v0.bin"
+#define FIRMWARE_IW612 "uartspi_n61x_v1.bin.se"
+#define FIRMWARE_IW624 "uartiw624_bt.bin"
+#define FIRMWARE_SECURE_IW624 "uartiw624_bt.bin.se"
+#define FIRMWARE_AW693 "uartaw693_bt.bin"
+#define FIRMWARE_SECURE_AW693 "uartaw693_bt.bin.se"
+#define FIRMWARE_HELPER "helper_uart_3000000.bin"

#define CHIP_ID_W9098 0x5c03
#define CHIP_ID_IW416 0x7201
@@ -685,13 +685,19 @@ static bool process_boot_signature(struct btnxpuart_dev *nxpdev)
static int nxp_request_firmware(struct hci_dev *hdev, const char *fw_name)
{
struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
+ const char *fw_name_dt;
int err = 0;

if (!fw_name)
return -ENOENT;

if (!strlen(nxpdev->fw_name)) {
- snprintf(nxpdev->fw_name, MAX_FW_FILE_NAME_LEN, "%s", fw_name);
+ if (strcmp(fw_name, FIRMWARE_HELPER) &&
+ !device_property_read_string(&nxpdev->serdev->dev,
+ "firmware-name",
+ &fw_name_dt))
+ fw_name = fw_name_dt;
+ snprintf(nxpdev->fw_name, MAX_FW_FILE_NAME_LEN, "nxp/%s", fw_name);

bt_dev_dbg(hdev, "Request Firmware: %s", nxpdev->fw_name);
err = request_firmware(&nxpdev->fw, nxpdev->fw_name, &hdev->dev);
--
2.34.1


2024-04-10 08:37:04

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: btnxpuart: Update firmware names

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=843127

---Test result---

Test Summary:
CheckPatch PASS 1.22 seconds
GitLint PASS 0.59 seconds
SubjectPrefix FAIL 0.52 seconds
BuildKernel PASS 31.12 seconds
CheckAllWarning PASS 34.48 seconds
CheckSparse PASS 39.04 seconds
CheckSmatch FAIL 35.21 seconds
BuildKernel32 PASS 29.19 seconds
TestRunnerSetup PASS 522.79 seconds
TestRunner_l2cap-tester PASS 22.22 seconds
TestRunner_iso-tester PASS 31.00 seconds
TestRunner_bnep-tester PASS 4.69 seconds
TestRunner_mgmt-tester PASS 110.71 seconds
TestRunner_rfcomm-tester PASS 7.28 seconds
TestRunner_sco-tester PASS 14.99 seconds
TestRunner_ioctl-tester PASS 7.66 seconds
TestRunner_mesh-tester PASS 5.74 seconds
TestRunner_smp-tester PASS 10.07 seconds
TestRunner_userchan-tester PASS 4.91 seconds
IncrementalBuild PASS 32.43 seconds

Details
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2


---
Regards,
Linux Bluetooth