Skip to content

Commit 6a1f105

Browse files
committed
Revert "qualcommax: ipq50xx: remove ipq5018 and qcn6122 wifi m3 fw"
This reverts commit 423cda9. It appears that this broke remoteproc on some devices, so revert for now. Signed-off-by: Robert Marko <[email protected]>
1 parent a6eb3d9 commit 6a1f105

File tree

7 files changed

+115
-6
lines changed

7 files changed

+115
-6
lines changed

target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-ax6000.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@
572572
};
573573

574574
&q6v5_wcss {
575-
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt";
575+
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt",
576+
"ath11k/IPQ5018/hw1.0/m3_fw.mdt";
576577
};
577578

578579
&wifi {

target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-ax850.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,8 @@
399399
};
400400

401401
&q6v5_wcss {
402-
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt";
402+
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt",
403+
"ath11k/IPQ5018/hw1.0/m3_fw.mdt";
403404
};
404405

405406
&wifi {

target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-mr5500.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@
326326
};
327327

328328
&q6v5_wcss {
329-
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt";
329+
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt",
330+
"ath11k/IPQ5018/hw1.0/m3_fw.mdt";
330331
};
331332

332333
&wifi {

target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-mx5500.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@
173173
};
174174

175175
&q6v5_wcss {
176-
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt";
176+
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt",
177+
"ath11k/IPQ5018/hw1.0/m3_fw.mdt";
177178
};
178179

179180
&wifi {

target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-qcn6122.dtsi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
&q6v5_wcss {
1313
compatible = "qcom,ipq5018-q6-mpd";
1414

15-
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt";
15+
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt",
16+
"ath11k/IPQ5018/hw1.0/m3_fw.mdt",
17+
"ath11k/QCN6122/hw1.0/m3_fw.mdt";
1618

1719
// IPQ5018
1820
q6_wcss_pd1: pd-1 {

target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq5018-spnmx56.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@
184184
};
185185

186186
&q6v5_wcss {
187-
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt";
187+
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt",
188+
"ath11k/IPQ5018/hw1.0/m3_fw.mdt";
188189
};
189190

190191
&wifi {
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
From: George Moussalem <[email protected]>
2+
Date: Tue, 21 Oct 2025 15:26:31 +0400
3+
Subject: [PATCH] remoteproc: qcom: wcss-sec: add split firmware support
4+
5+
The driver currently expects only one firmware file to be loaded as part
6+
of bringing up WCSS. For IPQ5018 and QCN6122, multiple firmware files are
7+
required, both the q6 and m3 firmware files. As such, add support for
8+
loading up to 3 firmware files.
9+
10+
Signed-off-by: George Moussalem <[email protected]>
11+
---
12+
--- a/drivers/remoteproc/qcom_q6v5_wcss_sec.c
13+
+++ b/drivers/remoteproc/qcom_q6v5_wcss_sec.c
14+
@@ -25,6 +25,8 @@
15+
16+
#define Q6_WAIT_TIMEOUT (5 * HZ)
17+
18+
+#define MAX_FIRMWARE 3
19+
+
20+
struct wcss_sec {
21+
struct device *dev;
22+
struct qcom_rproc_glink glink_subdev;
23+
@@ -35,6 +37,7 @@ struct wcss_sec {
24+
void *mem_region;
25+
size_t mem_size;
26+
const struct wcss_data *desc;
27+
+ const char **firmware;
28+
29+
struct mbox_client mbox_client;
30+
struct mbox_chan *mbox_chan;
31+
@@ -137,7 +140,8 @@ static int wcss_sec_load(struct rproc *r
32+
{
33+
struct wcss_sec *wcss = rproc->priv;
34+
struct device *dev = wcss->dev;
35+
- int ret;
36+
+ const struct firmware *fw_hdl;
37+
+ int i, ret;
38+
39+
if (wcss->desc->use_tmelcom) {
40+
wcss->metadata = qcom_mdt_read_metadata(fw, &wcss->metadata_len,
41+
@@ -161,6 +165,28 @@ static int wcss_sec_load(struct rproc *r
42+
wcss->mem_phys, wcss->mem_size, &wcss->mem_reloc);
43+
if (ret)
44+
return ret;
45+
+
46+
+ for (i = 1; i < MAX_FIRMWARE; i++) {
47+
+ if (!wcss->firmware[i])
48+
+ continue;
49+
+
50+
+ ret = request_firmware(&fw_hdl, wcss->firmware[i], dev);
51+
+
52+
+ if (ret)
53+
+ continue;
54+
+
55+
+ ret = qcom_mdt_load_no_init(dev, fw_hdl, wcss->firmware[i], 0,
56+
+ wcss->mem_region, wcss->mem_phys,
57+
+ wcss->mem_size, &wcss->mem_reloc);
58+
+
59+
+ release_firmware(fw_hdl);
60+
+
61+
+ if (ret) {
62+
+ dev_err(dev, "error %d loading firmware %s\n",
63+
+ ret, wcss->firmware[i]);
64+
+ return ret;
65+
+ }
66+
+ }
67+
}
68+
69+
qcom_pil_info_store("wcss", wcss->mem_phys, wcss->mem_size);
70+
@@ -291,17 +317,20 @@ static int wcss_sec_probe(struct platfor
71+
struct wcss_sec *wcss;
72+
struct clk *sleep_clk;
73+
struct clk *int_clk;
74+
- const char *fw_name = NULL;
75+
+ const char **firmware = NULL;
76+
const struct wcss_data *desc = of_device_get_match_data(&pdev->dev);
77+
int ret;
78+
79+
- ret = of_property_read_string(pdev->dev.of_node, "firmware-name",
80+
- &fw_name);
81+
+ firmware = devm_kcalloc(&pdev->dev, MAX_FIRMWARE,
82+
+ sizeof(*firmware), GFP_KERNEL);
83+
+
84+
+ ret = of_property_read_string_array(pdev->dev.of_node, "firmware-name",
85+
+ firmware, MAX_FIRMWARE);
86+
if (ret < 0)
87+
return ret;
88+
89+
rproc = devm_rproc_alloc(&pdev->dev, desc->ss_name, &wcss_sec_ops,
90+
- fw_name, sizeof(*wcss));
91+
+ firmware[0], sizeof(*wcss));
92+
if (!rproc) {
93+
dev_err(&pdev->dev, "failed to allocate rproc\n");
94+
return -ENOMEM;
95+
@@ -310,6 +339,7 @@ static int wcss_sec_probe(struct platfor
96+
wcss = rproc->priv;
97+
wcss->dev = &pdev->dev;
98+
wcss->desc = desc;
99+
+ wcss->firmware = firmware;
100+
101+
ret = wcss_sec_alloc_memory_region(wcss);
102+
if (ret)

0 commit comments

Comments
 (0)