From: Alexandru Gagniuc <mr.nuke.me@gmail.com>
To: andersson@kernel.org, mathieu.poirier@linaro.org, krzk+dt@kernel.org
Cc: Alexandru Gagniuc <mr.nuke.me@gmail.com>,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 7/9] remoteproc: qcom_q6v5_wcss: support m3 firmware
Date: Thu, 18 Dec 2025 22:34:15 -0600 [thread overview]
Message-ID: <20251219043425.888585-7-mr.nuke.me@gmail.com> (raw)
In-Reply-To: <20251219043425.888585-1-mr.nuke.me@gmail.com>
IPQ8074, IPQ6018, and IPQ9574 support an m3 firmware image in addtion
to the q6 firmware. The firmware releases from qcom provide both q6
and m3 firmware for these SoCs. Support loading the m3 firmware image.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
---
drivers/remoteproc/qcom_q6v5_wcss.c | 44 +++++++++++++++++++++++++----
1 file changed, 39 insertions(+), 5 deletions(-)
diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
index b62e97c92d058..265010c5c82cb 100644
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -101,7 +101,8 @@ enum {
};
struct wcss_data {
- const char *firmware_name;
+ const char *q6_firmware_name;
+ const char *m3_firmware_name;
unsigned int crash_reason_smem;
u32 version;
bool aon_reset_required;
@@ -161,6 +162,7 @@ struct q6v5_wcss {
unsigned int crash_reason_smem;
u32 version;
bool requires_force_stop;
+ const char *m3_firmware_name;
struct qcom_rproc_glink glink_subdev;
struct qcom_rproc_pdm pdm_subdev;
@@ -922,11 +924,40 @@ static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *i
return wcss->mem_region + offset;
}
+static int q6v5_wcss_load_aux(struct q6v5_wcss *wcss, const char *fw_name)
+{
+ const struct firmware *extra_fw;
+ int ret;
+
+ dev_info(wcss->dev, "loading additional firmware image %s\n", fw_name);
+
+ ret = request_firmware(&extra_fw, fw_name, wcss->dev);
+ if (ret)
+ return 0;
+
+ ret = qcom_mdt_load_no_init(wcss->dev, extra_fw, fw_name,
+ wcss->mem_region, wcss->mem_phys,
+ wcss->mem_size, &wcss->mem_reloc);
+
+ release_firmware(extra_fw);
+
+ if (ret)
+ dev_err(wcss->dev, "can't load %s\n", fw_name);
+
+ return ret;
+}
+
static int q6v5_wcss_load(struct rproc *rproc, const struct firmware *fw)
{
struct q6v5_wcss *wcss = rproc->priv;
int ret;
+ if (wcss->m3_firmware_name) {
+ ret = q6v5_wcss_load_aux(wcss, wcss->m3_firmware_name);
+ if (ret)
+ return ret;
+ }
+
ret = qcom_mdt_load_no_init(wcss->dev, fw, rproc->firmware,
wcss->mem_region, wcss->mem_phys,
wcss->mem_size, &wcss->mem_reloc);
@@ -1187,7 +1218,7 @@ static int q6v5_wcss_probe(struct platform_device *pdev)
return -EINVAL;
rproc = devm_rproc_alloc(&pdev->dev, pdev->name, desc->ops,
- desc->firmware_name, sizeof(*wcss));
+ desc->q6_firmware_name, sizeof(*wcss));
if (!rproc) {
dev_err(&pdev->dev, "failed to allocate rproc\n");
return -ENOMEM;
@@ -1198,6 +1229,7 @@ static int q6v5_wcss_probe(struct platform_device *pdev)
wcss->version = desc->version;
wcss->requires_force_stop = desc->requires_force_stop;
+ wcss->m3_firmware_name = desc->m3_firmware_name;
ret = q6v5_wcss_init_mmio(wcss, pdev);
if (ret)
@@ -1275,7 +1307,8 @@ static void q6v5_wcss_remove(struct platform_device *pdev)
}
static const struct wcss_data wcss_ipq8074_res_init = {
- .firmware_name = "IPQ8074/q6_fw.mdt",
+ .q6_firmware_name = "IPQ8074/q6_fw.mdt",
+ .m3_firmware_name = "IPQ8074/m3_fw.mdt",
.crash_reason_smem = WCSS_CRASH_REASON,
.aon_reset_required = true,
.wcss_q6_reset_required = true,
@@ -1284,7 +1317,8 @@ static const struct wcss_data wcss_ipq8074_res_init = {
};
static const struct wcss_data wcss_ipq9574_res_init = {
- .firmware_name = "IPQ9574/q6_fw.mdt",
+ .q6_firmware_name = "IPQ9574/q6_fw.mdt",
+ .m3_firmware_name = "IPQ9574/m3_fw.mdt",
.version = WCSS_IPQ9574,
.crash_reason_smem = WCSS_CRASH_REASON,
.aon_reset_required = true,
@@ -1295,7 +1329,7 @@ static const struct wcss_data wcss_ipq9574_res_init = {
static const struct wcss_data wcss_qcs404_res_init = {
.crash_reason_smem = WCSS_CRASH_REASON,
- .firmware_name = "wcnss.mdt",
+ .q6_firmware_name = "wcnss.mdt",
.version = WCSS_QCS404,
.aon_reset_required = false,
.wcss_q6_reset_required = false,
--
2.45.1
next prev parent reply other threads:[~2025-12-19 4:34 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 4:34 [PATCH 1/9] dt-bindings: remoteproc: qcom,ipq8074-wcss-pil: convert to DT schema Alexandru Gagniuc
2025-12-19 4:34 ` [PATCH 2/9] dt-bindings: remoteproc: qcom: add IPQ9574 image loader Alexandru Gagniuc
2025-12-19 5:37 ` Rob Herring (Arm)
2025-12-19 14:44 ` Rob Herring
2025-12-20 8:54 ` Krzysztof Kozlowski
2025-12-23 19:45 ` Alex G.
2025-12-20 8:56 ` Krzysztof Kozlowski
2025-12-19 4:34 ` [PATCH 6/9] remoteproc: qcom_q6v5_wcss: support IPQ9574 Alexandru Gagniuc
2025-12-19 13:20 ` Konrad Dybcio
2025-12-23 20:21 ` Alex G.
2025-12-24 9:44 ` Vignesh Viswanathan
2025-12-24 17:36 ` Alex G.
2025-12-29 12:35 ` Konrad Dybcio
2026-01-05 16:09 ` mr.nuke.me
2026-01-05 17:57 ` Vignesh Viswanathan
2026-01-07 13:26 ` Konrad Dybcio
2026-01-07 18:25 ` Vignesh Viswanathan
2025-12-19 4:34 ` Alexandru Gagniuc [this message]
2025-12-19 13:29 ` [PATCH 7/9] remoteproc: qcom_q6v5_wcss: support m3 firmware Konrad Dybcio
2025-12-23 20:35 ` Alex G.
2025-12-29 12:37 ` Konrad Dybcio
2026-01-05 15:23 ` mr.nuke.me
2026-01-05 18:00 ` Vignesh Viswanathan
2026-01-07 11:55 ` Konrad Dybcio
2025-12-19 4:34 ` [PATCH 8/9] remoteproc: qcom_q6v5_wcss: drop unused clocks from q6v5 struct Alexandru Gagniuc
2025-12-19 13:31 ` Konrad Dybcio
2025-12-19 4:34 ` [PATCH 9/9] remoteproc: qcom_q6v5_wcss: use bulk clk API for q6 clocks in QCS404 Alexandru Gagniuc
2025-12-19 14:52 ` [PATCH 1/9] dt-bindings: remoteproc: qcom,ipq8074-wcss-pil: convert to DT schema Krzysztof Kozlowski
2025-12-20 18:40 ` Alex G.
2025-12-19 16:49 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251219043425.888585-7-mr.nuke.me@gmail.com \
--to=mr.nuke.me@gmail.com \
--cc=andersson@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox