* RE: Expand firmware-name property to load specific
2024-12-05 10:22 [PATCH v3 1/3] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
@ 2024-12-05 10:46 ` bluez.test.bot
0 siblings, 0 replies; 9+ messages in thread
From: bluez.test.bot @ 2024-12-05 10:46 UTC (permalink / raw)
To: linux-bluetooth, quic_chejiang
[-- Attachment #1: Type: text/plain, Size: 586 bytes --]
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi:857
error: arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Expand firmware-name property to load specific
2024-12-10 15:16 [PATCH v4 1/4] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
@ 2024-12-10 15:45 ` bluez.test.bot
0 siblings, 0 replies; 9+ messages in thread
From: bluez.test.bot @ 2024-12-10 15:45 UTC (permalink / raw)
To: linux-bluetooth, quic_chejiang
[-- Attachment #1: Type: text/plain, Size: 586 bytes --]
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi:857
error: arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Expand firmware-name property to load specific
2024-12-12 15:02 [PATCH v5 1/4] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
@ 2024-12-12 15:17 ` bluez.test.bot
0 siblings, 0 replies; 9+ messages in thread
From: bluez.test.bot @ 2024-12-12 15:17 UTC (permalink / raw)
To: linux-bluetooth, quic_chejiang
[-- Attachment #1: Type: text/plain, Size: 586 bytes --]
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi:857
error: arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v6 0/3] Expand firmware-name property to load specific
@ 2024-12-17 14:24 Cheng Jiang
2024-12-17 14:24 ` [PATCH v6 1/3] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Cheng Jiang @ 2024-12-17 14:24 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao
Cc: linux-bluetooth, devicetree, linux-kernel, quic_chejiang,
quic_jiaymao, quic_shuaz, quic_zijuhu, quic_mohamull
Expand the firmware-name property to specify the names of NVM and
rampatch firmware to load.
This update will support loading specific firmware (nvm and rampatch)
for certain chips, like the QCA6698 Bluetooth chip, which shares the
same IP core as the WCN6855 but has different RF components and RAM
sizes, requiring new firmware files.
Different connectivity boards may be attached to the same platform. For
example, QCA6698-based boards can support either a two-antenna or
three-antenna solution, both of which work on the sa8775p-ride platform.
Due to differences in connectivity boards and variations in RF
performance from different foundries, different NVM configurations are
used based on the board ID.
So In firmware-name, if the NVM file has an extension, the NVM file will
be used. Otherwise, the system will first try the .bNN (board ID) file,
and if that fails, it will fall back to the .bin file.
Possible configurations:
firmware-name = "QCA6698/hpnv21.bin", "QCA6698/hpbtfw21.tlv";
firmware-name = "QCA6698/hpnv21", "QCA6698/hpbtfw21.tlv";
firmware-name = "QCA6698/hpnv21.bin";
---
v6:
- Pick up Acked-by Krzysztof Kozlowski for dt-bindings
- Fix type error in btqca.c
- Optimize the have-suffix function
- Seperate the sa8775p-ride.dtsi change to another patch
- Link to v5: https://lore.kernel.org/all/20241212150232.3823088-1-quic_chejiang@quicinc.com/
v5:
- Update the dt-bindings decription.
- Extract the have-suffix check code to a helper function.
- Merge three generate nvm name functions to a signle function.
- Link to v4: https://lore.kernel.org/all/20241210151636.2474809-1-quic_chejiang@quicinc.com/
v4:
- Split nvm and rampatch changes to 2 commits.
- Fix the dt_binding_check error.
- Change the qca_get_alt_nvm_path return type from int to bool.
- Fix the nvm name suffix check error when path has '.'.
- Optimize the nvm file name generation function.
- Link to v3: https://lore.kernel.org/all/20241205102213.1281865-1-quic_chejiang@quicinc.com/
v3:
- Expand firmware-name property to specify the nvm and rampatch to
load.
- Change the driver to support two items in firmware-name and choose
the NVM file according to board id if there is no extension in NVM
file.
- Update the dts file to idendify the firmware for QCA6698.
---
Cheng Jiang (3):
dt-bindings: net: bluetooth: qca: Expand firmware-name property
Bluetooth: qca: Update firmware-name to support board specific nvm
Bluetooth: qca: Expand firmware-name to load specific rampatch
.../net/bluetooth/qualcomm-bluetooth.yaml | 5 +-
drivers/bluetooth/btqca.c | 195 ++++++++++++------
drivers/bluetooth/btqca.h | 5 +-
drivers/bluetooth/hci_qca.c | 22 +-
4 files changed, 152 insertions(+), 75 deletions(-)
base-commit: fdb298fa865b0136f7be842e6c2e6310dede421a
--
2.34.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v6 1/3] dt-bindings: net: bluetooth: qca: Expand firmware-name property
2024-12-17 14:24 [PATCH v6 0/3] Expand firmware-name property to load specific Cheng Jiang
@ 2024-12-17 14:24 ` Cheng Jiang
2024-12-17 15:00 ` Expand firmware-name property to load specific bluez.test.bot
2024-12-17 14:24 ` [PATCH v6 2/3] Bluetooth: qca: Update firmware-name to support board specific nvm Cheng Jiang
2024-12-17 14:24 ` [PATCH v6 3/3] Bluetooth: qca: Expand firmware-name to load specific rampatch Cheng Jiang
2 siblings, 1 reply; 9+ messages in thread
From: Cheng Jiang @ 2024-12-17 14:24 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao
Cc: linux-bluetooth, devicetree, linux-kernel, quic_chejiang,
quic_jiaymao, quic_shuaz, quic_zijuhu, quic_mohamull,
Krzysztof Kozlowski
Expand the firmware-name property to specify the names of NVM and
rampatch firmware to load. This update will support loading specific
firmware (nvm and rampatch) for certain chips, like the QCA6698
Bluetooth chip, which shares the same IP core as the WCN6855 but has
different RF components and RAM sizes, requiring new firmware files.
We might use different connectivity boards on the same platform. For
example, QCA6698-based boards can support either a two-antenna or
three-antenna solution, both of which work on the sa8775p-ride platform.
Due to differences in connectivity boards and variations in RF
performance from different foundries, different NVM configurations are
used based on the board ID.
So In firmware-name, if the NVM file has an extension, the NVM file will
be used. Otherwise, the system will first try the .bNN (board ID) file,
and if that fails, it will fall back to the .bin file.
Possible configurations:
firmware-name = "QCA6698/hpnv21.bin", "QCA6698/hpbtfw21.tlv";
firmware-name = "QCA6698/hpnv21", "QCA6698/hpbtfw21.tlv";
firmware-name = "QCA6698/hpnv21.bin";
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Cheng Jiang <quic_chejiang@quicinc.com>
---
.../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
index 7bb68311c..a6bc0b18b 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml
@@ -101,7 +101,10 @@ properties:
max-speed: true
firmware-name:
- description: specify the name of nvm firmware to load
+ minItems: 1
+ items:
+ - description: specify the name of nvm firmware to load
+ - description: specify the name of rampatch firmware to load
local-bd-address: true
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v6 2/3] Bluetooth: qca: Update firmware-name to support board specific nvm
2024-12-17 14:24 [PATCH v6 0/3] Expand firmware-name property to load specific Cheng Jiang
2024-12-17 14:24 ` [PATCH v6 1/3] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
@ 2024-12-17 14:24 ` Cheng Jiang
2024-12-17 14:24 ` [PATCH v6 3/3] Bluetooth: qca: Expand firmware-name to load specific rampatch Cheng Jiang
2 siblings, 0 replies; 9+ messages in thread
From: Cheng Jiang @ 2024-12-17 14:24 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao
Cc: linux-bluetooth, devicetree, linux-kernel, quic_chejiang,
quic_jiaymao, quic_shuaz, quic_zijuhu, quic_mohamull
Different connectivity boards may be attached to the same platform. For
example, QCA6698-based boards can support either a two-antenna or
three-antenna solution, both of which work on the sa8775p-ride platform.
Due to differences in connectivity boards and variations in RF
performance from different foundries, different NVM configurations are
used based on the board ID.
Therefore, in the firmware-name property, if the NVM file has an
extension, the NVM file will be used. Otherwise, the system will first
try the .bNN (board ID) file, and if that fails, it will fall back to
the .bin file.
Possible configurations:
firmware-name = "QCA6698/hpnv21";
firmware-name = "QCA6698/hpnv21.bin";
Signed-off-by: Cheng Jiang <quic_chejiang@quicinc.com>
---
drivers/bluetooth/btqca.c | 113 ++++++++++++++++++++++++++++----------
1 file changed, 85 insertions(+), 28 deletions(-)
diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index dfbbac922..5cb1fd1a0 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -272,6 +272,39 @@ int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
}
EXPORT_SYMBOL_GPL(qca_send_pre_shutdown_cmd);
+static bool qca_filename_has_extension(const char *filename)
+{
+ const char *suffix = strrchr(filename, '.');
+
+ /* File extensions require a dot, but not as the first or last character */
+ if (!suffix || suffix == filename || *(suffix + 1) == '\0')
+ return 0;
+
+ /* Avoid matching directories with names that look like files with extensions */
+ return !strchr(suffix, '/');
+}
+
+static bool qca_get_alt_nvm_file(char *filename, size_t max_size)
+{
+ char fwname[64];
+ const char *suffix;
+
+ /* nvm file name has an extension, replace with .bin */
+ if (qca_filename_has_extension(filename)) {
+ suffix = strrchr(filename, '.');
+ strscpy(fwname, filename, suffix - filename + 1);
+ snprintf(fwname + (suffix - filename),
+ sizeof(fwname) - (suffix - filename), ".bin");
+ /* If nvm file is already the default one, return false to skip the retry. */
+ if (strcmp(fwname, filename) == 0)
+ return false;
+
+ snprintf(filename, max_size, "%s", fwname);
+ return true;
+ }
+ return false;
+}
+
static int qca_tlv_check_data(struct hci_dev *hdev,
struct qca_fw_config *config,
u8 *fw_data, size_t fw_size,
@@ -564,6 +597,19 @@ static int qca_download_firmware(struct hci_dev *hdev,
config->fwname, ret);
return ret;
}
+ }
+ /* If the board-specific file is missing, try loading the default
+ * one, unless that was attempted already.
+ */
+ else if (config->type == TLV_TYPE_NVM &&
+ qca_get_alt_nvm_file(config->fwname, sizeof(config->fwname))) {
+ bt_dev_info(hdev, "QCA Downloading %s", config->fwname);
+ ret = request_firmware(&fw, config->fwname, &hdev->dev);
+ if (ret) {
+ bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
+ config->fwname, ret);
+ return ret;
+ }
} else {
bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
config->fwname, ret);
@@ -700,34 +746,38 @@ static int qca_check_bdaddr(struct hci_dev *hdev, const struct qca_fw_config *co
return 0;
}
-static void qca_generate_hsp_nvm_name(char *fwname, size_t max_size,
+static void qca_get_nvm_name_by_board(char *fwname, size_t max_size,
+ const char *stem, enum qca_btsoc_type soc_type,
struct qca_btsoc_version ver, u8 rom_ver, u16 bid)
{
const char *variant;
+ const char *prefix;
- /* hsp gf chip */
- if ((le32_to_cpu(ver.soc_id) & QCA_HSP_GF_SOC_MASK) == QCA_HSP_GF_SOC_ID)
- variant = "g";
- else
- variant = "";
+ /* Set the default value to variant and prefix */
+ variant = "";
+ prefix = "b";
- if (bid == 0x0)
- snprintf(fwname, max_size, "qca/hpnv%02x%s.bin", rom_ver, variant);
- else
- snprintf(fwname, max_size, "qca/hpnv%02x%s.%x", rom_ver, variant, bid);
-}
+ if (soc_type == QCA_QCA2066)
+ prefix = "";
-static inline void qca_get_nvm_name_generic(struct qca_fw_config *cfg,
- const char *stem, u8 rom_ver, u16 bid)
-{
- if (bid == 0x0)
- snprintf(cfg->fwname, sizeof(cfg->fwname), "qca/%snv%02x.bin", stem, rom_ver);
- else if (bid & 0xff00)
- snprintf(cfg->fwname, sizeof(cfg->fwname),
- "qca/%snv%02x.b%x", stem, rom_ver, bid);
- else
- snprintf(cfg->fwname, sizeof(cfg->fwname),
- "qca/%snv%02x.b%02x", stem, rom_ver, bid);
+ if (soc_type == QCA_WCN6855 || soc_type == QCA_QCA2066) {
+ /* If the chip is manufactured by GlobalFoundries */
+ if ((le32_to_cpu(ver.soc_id) & QCA_HSP_GF_SOC_MASK) == QCA_HSP_GF_SOC_ID)
+ variant = "g";
+ }
+
+ if (rom_ver != 0) {
+ if (bid == 0x0 || bid == 0xffff)
+ snprintf(fwname, max_size, "qca/%s%02x%s.bin", stem, rom_ver, variant);
+ else
+ snprintf(fwname, max_size, "qca/%s%02x%s.%s%02x", stem, rom_ver,
+ variant, prefix, bid);
+ } else {
+ if (bid == 0x0 || bid == 0xffff)
+ snprintf(fwname, max_size, "qca/%s%s.bin", stem, variant);
+ else
+ snprintf(fwname, max_size, "qca/%s%s.%s%02x", stem, variant, prefix, bid);
+ }
}
int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
@@ -816,8 +866,14 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
/* Download NVM configuration */
config.type = TLV_TYPE_NVM;
if (firmware_name) {
- snprintf(config.fwname, sizeof(config.fwname),
- "qca/%s", firmware_name);
+ /* The firmware name has an extension, use it directly */
+ if (qca_filename_has_extension(firmware_name)) {
+ snprintf(config.fwname, sizeof(config.fwname), "qca/%s", firmware_name);
+ } else {
+ qca_read_fw_board_id(hdev, &boardid);
+ qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
+ firmware_name, soc_type, ver, 0, boardid);
+ }
} else {
switch (soc_type) {
case QCA_WCN3990:
@@ -836,8 +892,9 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
"qca/apnv%02x.bin", rom_ver);
break;
case QCA_QCA2066:
- qca_generate_hsp_nvm_name(config.fwname,
- sizeof(config.fwname), ver, rom_ver, boardid);
+ qca_get_nvm_name_by_board(config.fwname,
+ sizeof(config.fwname), "hpnv", soc_type, ver,
+ rom_ver, boardid);
break;
case QCA_QCA6390:
snprintf(config.fwname, sizeof(config.fwname),
@@ -852,9 +909,9 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
"qca/hpnv%02x.bin", rom_ver);
break;
case QCA_WCN7850:
- qca_get_nvm_name_generic(&config, "hmt", rom_ver, boardid);
+ qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
+ "hmtnv", soc_type, ver, rom_ver, boardid);
break;
-
default:
snprintf(config.fwname, sizeof(config.fwname),
"qca/nvm_%08x.bin", soc_ver);
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v6 3/3] Bluetooth: qca: Expand firmware-name to load specific rampatch
2024-12-17 14:24 [PATCH v6 0/3] Expand firmware-name property to load specific Cheng Jiang
2024-12-17 14:24 ` [PATCH v6 1/3] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
2024-12-17 14:24 ` [PATCH v6 2/3] Bluetooth: qca: Update firmware-name to support board specific nvm Cheng Jiang
@ 2024-12-17 14:24 ` Cheng Jiang
2 siblings, 0 replies; 9+ messages in thread
From: Cheng Jiang @ 2024-12-17 14:24 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Balakrishna Godavarthi,
Rocky Liao
Cc: linux-bluetooth, devicetree, linux-kernel, quic_chejiang,
quic_jiaymao, quic_shuaz, quic_zijuhu, quic_mohamull
The firmware-name property has been expanded to specify the names of NVM
and rampatch firmware for certain chips, such as the QCA6698 Bluetooth
chip. Although it shares the same IP core as the WCN6855, the QCA6698
has different RF components and RAM sizes, necessitating new firmware
files. This change allows for the configuration of NVM and rampatch in
DT.
Possible configurations:
firmware-name = QCA6698/hpnv21.bin, QCA6698/hpbtfw21.tlv;
firmware-name = QCA6698/hpnv21, QCA6698/hpbtfw21.tlv;
Signed-off-by: Cheng Jiang <quic_chejiang@quicinc.com>
---
drivers/bluetooth/btqca.c | 82 +++++++++++++++++++------------------
drivers/bluetooth/btqca.h | 5 ++-
drivers/bluetooth/hci_qca.c | 22 +++++++---
3 files changed, 63 insertions(+), 46 deletions(-)
diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index 5cb1fd1a0..a6b53d1f2 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -782,7 +782,7 @@ static void qca_get_nvm_name_by_board(char *fwname, size_t max_size,
int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
enum qca_btsoc_type soc_type, struct qca_btsoc_version ver,
- const char *firmware_name)
+ const char *firmware_name, const char *rampatch_name)
{
struct qca_fw_config config = {};
int err;
@@ -811,44 +811,48 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
/* Download rampatch file */
config.type = TLV_TYPE_PATCH;
- switch (soc_type) {
- case QCA_WCN3990:
- case QCA_WCN3991:
- case QCA_WCN3998:
- snprintf(config.fwname, sizeof(config.fwname),
- "qca/crbtfw%02x.tlv", rom_ver);
- break;
- case QCA_WCN3988:
- snprintf(config.fwname, sizeof(config.fwname),
- "qca/apbtfw%02x.tlv", rom_ver);
- break;
- case QCA_QCA2066:
- snprintf(config.fwname, sizeof(config.fwname),
- "qca/hpbtfw%02x.tlv", rom_ver);
- break;
- case QCA_QCA6390:
- snprintf(config.fwname, sizeof(config.fwname),
- "qca/htbtfw%02x.tlv", rom_ver);
- break;
- case QCA_WCN6750:
- /* Choose mbn file by default.If mbn file is not found
- * then choose tlv file
- */
- config.type = ELF_TYPE_PATCH;
- snprintf(config.fwname, sizeof(config.fwname),
- "qca/msbtfw%02x.mbn", rom_ver);
- break;
- case QCA_WCN6855:
- snprintf(config.fwname, sizeof(config.fwname),
- "qca/hpbtfw%02x.tlv", rom_ver);
- break;
- case QCA_WCN7850:
- snprintf(config.fwname, sizeof(config.fwname),
- "qca/hmtbtfw%02x.tlv", rom_ver);
- break;
- default:
- snprintf(config.fwname, sizeof(config.fwname),
- "qca/rampatch_%08x.bin", soc_ver);
+ if (rampatch_name) {
+ snprintf(config.fwname, sizeof(config.fwname), "qca/%s", rampatch_name);
+ } else {
+ switch (soc_type) {
+ case QCA_WCN3990:
+ case QCA_WCN3991:
+ case QCA_WCN3998:
+ snprintf(config.fwname, sizeof(config.fwname),
+ "qca/crbtfw%02x.tlv", rom_ver);
+ break;
+ case QCA_WCN3988:
+ snprintf(config.fwname, sizeof(config.fwname),
+ "qca/apbtfw%02x.tlv", rom_ver);
+ break;
+ case QCA_QCA2066:
+ snprintf(config.fwname, sizeof(config.fwname),
+ "qca/hpbtfw%02x.tlv", rom_ver);
+ break;
+ case QCA_QCA6390:
+ snprintf(config.fwname, sizeof(config.fwname),
+ "qca/htbtfw%02x.tlv", rom_ver);
+ break;
+ case QCA_WCN6750:
+ /* Choose mbn file by default.If mbn file is not found
+ * then choose tlv file
+ */
+ config.type = ELF_TYPE_PATCH;
+ snprintf(config.fwname, sizeof(config.fwname),
+ "qca/msbtfw%02x.mbn", rom_ver);
+ break;
+ case QCA_WCN6855:
+ snprintf(config.fwname, sizeof(config.fwname),
+ "qca/hpbtfw%02x.tlv", rom_ver);
+ break;
+ case QCA_WCN7850:
+ snprintf(config.fwname, sizeof(config.fwname),
+ "qca/hmtbtfw%02x.tlv", rom_ver);
+ break;
+ default:
+ snprintf(config.fwname, sizeof(config.fwname),
+ "qca/rampatch_%08x.bin", soc_ver);
+ }
}
err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h
index bb5207d7a..9d28c8800 100644
--- a/drivers/bluetooth/btqca.h
+++ b/drivers/bluetooth/btqca.h
@@ -161,7 +161,7 @@ enum qca_btsoc_type {
int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr);
int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
enum qca_btsoc_type soc_type, struct qca_btsoc_version ver,
- const char *firmware_name);
+ const char *firmware_name, const char *rampatch_name);
int qca_read_soc_version(struct hci_dev *hdev, struct qca_btsoc_version *ver,
enum qca_btsoc_type);
int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
@@ -176,7 +176,8 @@ static inline int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdad
static inline int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
enum qca_btsoc_type soc_type,
struct qca_btsoc_version ver,
- const char *firmware_name)
+ const char *firmware_name,
+ const char *rampatch_name)
{
return -EOPNOTSUPP;
}
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 37129e6cb..5d75087cc 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -228,7 +228,7 @@ struct qca_serdev {
u32 init_speed;
u32 oper_speed;
bool bdaddr_property_broken;
- const char *firmware_name;
+ const char *firmware_name[2];
};
static int qca_regulator_enable(struct qca_serdev *qcadev);
@@ -258,7 +258,18 @@ static const char *qca_get_firmware_name(struct hci_uart *hu)
if (hu->serdev) {
struct qca_serdev *qsd = serdev_device_get_drvdata(hu->serdev);
- return qsd->firmware_name;
+ return qsd->firmware_name[0];
+ } else {
+ return NULL;
+ }
+}
+
+static const char *qca_get_rampatch_name(struct hci_uart *hu)
+{
+ if (hu->serdev) {
+ struct qca_serdev *qsd = serdev_device_get_drvdata(hu->serdev);
+
+ return qsd->firmware_name[1];
} else {
return NULL;
}
@@ -1855,6 +1866,7 @@ static int qca_setup(struct hci_uart *hu)
unsigned int retries = 0;
enum qca_btsoc_type soc_type = qca_soc_type(hu);
const char *firmware_name = qca_get_firmware_name(hu);
+ const char *rampatch_name = qca_get_rampatch_name(hu);
int ret;
struct qca_btsoc_version ver;
struct qca_serdev *qcadev;
@@ -1963,7 +1975,7 @@ static int qca_setup(struct hci_uart *hu)
/* Setup patch / NVM configurations */
ret = qca_uart_setup(hdev, qca_baudrate, soc_type, ver,
- firmware_name);
+ firmware_name, rampatch_name);
if (!ret) {
clear_bit(QCA_IBS_DISABLED, &qca->flags);
qca_debugfs_init(hdev);
@@ -2309,8 +2321,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
qcadev->serdev_hu.serdev = serdev;
data = device_get_match_data(&serdev->dev);
serdev_device_set_drvdata(serdev, qcadev);
- device_property_read_string(&serdev->dev, "firmware-name",
- &qcadev->firmware_name);
+ device_property_read_string_array(&serdev->dev, "firmware-name",
+ qcadev->firmware_name, ARRAY_SIZE(qcadev->firmware_name));
device_property_read_u32(&serdev->dev, "max-speed",
&qcadev->oper_speed);
if (!qcadev->oper_speed)
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: Expand firmware-name property to load specific
2024-12-17 14:24 ` [PATCH v6 1/3] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
@ 2024-12-17 15:00 ` bluez.test.bot
0 siblings, 0 replies; 9+ messages in thread
From: bluez.test.bot @ 2024-12-17 15:00 UTC (permalink / raw)
To: linux-bluetooth, quic_chejiang
[-- Attachment #1: Type: text/plain, Size: 2460 bytes --]
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=918708
---Test result---
Test Summary:
CheckPatch PENDING 0.24 seconds
GitLint PENDING 0.24 seconds
SubjectPrefix FAIL 0.60 seconds
BuildKernel PASS 24.81 seconds
CheckAllWarning PASS 27.29 seconds
CheckSparse PASS 30.85 seconds
BuildKernel32 PASS 24.89 seconds
TestRunnerSetup PASS 435.80 seconds
TestRunner_l2cap-tester PASS 20.49 seconds
TestRunner_iso-tester PASS 32.72 seconds
TestRunner_bnep-tester PASS 7.83 seconds
TestRunner_mgmt-tester FAIL 119.87 seconds
TestRunner_rfcomm-tester PASS 7.65 seconds
TestRunner_sco-tester PASS 9.40 seconds
TestRunner_ioctl-tester PASS 8.19 seconds
TestRunner_mesh-tester FAIL 6.81 seconds
TestRunner_smp-tester PASS 7.05 seconds
TestRunner_userchan-tester PASS 5.03 seconds
IncrementalBuild PENDING 0.57 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 484 (98.8%), Failed: 2, Not Run: 4
Failed Test Cases
LL Privacy - Add Device 3 (AL is full) Failed 0.185 seconds
LL Privacy - Set Flags 1 (Add to RL) Failed 0.143 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 9 (90.0%), Failed: 1, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 2 Failed 0.110 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Expand firmware-name property to load specific
2025-01-07 9:26 [PATCH v6 RESEND 1/3] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
@ 2025-01-07 9:56 ` bluez.test.bot
0 siblings, 0 replies; 9+ messages in thread
From: bluez.test.bot @ 2025-01-07 9:56 UTC (permalink / raw)
To: linux-bluetooth, quic_chejiang
[-- Attachment #1: Type: text/plain, Size: 2364 bytes --]
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=922834
---Test result---
Test Summary:
CheckPatch PENDING 0.29 seconds
GitLint PENDING 0.21 seconds
SubjectPrefix FAIL 0.57 seconds
BuildKernel PASS 25.76 seconds
CheckAllWarning PASS 27.54 seconds
CheckSparse PASS 31.11 seconds
BuildKernel32 PASS 24.84 seconds
TestRunnerSetup PASS 435.99 seconds
TestRunner_l2cap-tester PASS 22.59 seconds
TestRunner_iso-tester PASS 36.10 seconds
TestRunner_bnep-tester PASS 4.81 seconds
TestRunner_mgmt-tester FAIL 121.09 seconds
TestRunner_rfcomm-tester PASS 7.53 seconds
TestRunner_sco-tester PASS 9.35 seconds
TestRunner_ioctl-tester PASS 8.12 seconds
TestRunner_mesh-tester PASS 6.07 seconds
TestRunner_smp-tester FAIL 9.27 seconds
TestRunner_userchan-tester PASS 5.08 seconds
IncrementalBuild PENDING 0.44 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
LL Privacy - Add Device 2 (2 Devices to AL) Failed 0.183 seconds
##############################
Test: TestRunner_smp-tester - FAIL
Desc: Run smp-tester with test-runner
Output:
WARNING: CPU: 0 PID: 42 at net/bluetooth/hci_conn.c:567 hci_conn_timeout+0x14e/0x190
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-01-07 9:56 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-17 14:24 [PATCH v6 0/3] Expand firmware-name property to load specific Cheng Jiang
2024-12-17 14:24 ` [PATCH v6 1/3] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
2024-12-17 15:00 ` Expand firmware-name property to load specific bluez.test.bot
2024-12-17 14:24 ` [PATCH v6 2/3] Bluetooth: qca: Update firmware-name to support board specific nvm Cheng Jiang
2024-12-17 14:24 ` [PATCH v6 3/3] Bluetooth: qca: Expand firmware-name to load specific rampatch Cheng Jiang
-- strict thread matches above, loose matches on Subject: below --
2025-01-07 9:26 [PATCH v6 RESEND 1/3] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
2025-01-07 9:56 ` Expand firmware-name property to load specific bluez.test.bot
2024-12-12 15:02 [PATCH v5 1/4] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
2024-12-12 15:17 ` Expand firmware-name property to load specific bluez.test.bot
2024-12-10 15:16 [PATCH v4 1/4] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
2024-12-10 15:45 ` Expand firmware-name property to load specific bluez.test.bot
2024-12-05 10:22 [PATCH v3 1/3] dt-bindings: net: bluetooth: qca: Expand firmware-name property Cheng Jiang
2024-12-05 10:46 ` Expand firmware-name property to load specific bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).