From f56052f4d87cee246e6dadacac771097343f3eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= Date: Wed, 7 Jan 2026 12:34:01 +0100 Subject: [PATCH 01/35] remoteproc: qcom_q6v5_mss: Introduce need_pas_mem_setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some platforms like MSM8953 and MSM8937 TZ needs to be informed of the modem start address and pas_id. Lets introduce need_pas_mem_setup flag for handle this case. Reviewed-by: Bryan O'Donoghue Signed-off-by: Barnabás Czémán Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260107-mss-v4-1-9f4780345b6f@mainlining.org Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_mss.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index 91940977ca89..3c404118b322 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -162,6 +162,7 @@ struct rproc_hexagon_res { char **proxy_pd_names; int version; bool need_mem_protection; + bool need_pas_mem_setup; bool has_alt_reset; bool has_mba_logs; bool has_spare_reg; @@ -240,6 +241,7 @@ struct q6v5 { struct qcom_sysmon *sysmon; struct platform_device *bam_dmux; bool need_mem_protection; + bool need_pas_mem_setup; bool has_alt_reset; bool has_mba_logs; bool has_spare_reg; @@ -1441,7 +1443,7 @@ static int q6v5_mpss_load(struct q6v5 *qproc) max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K); } - if (qproc->version == MSS_MSM8953) { + if (qproc->need_pas_mem_setup) { ret = qcom_scm_pas_mem_setup(MPSS_PAS_ID, qproc->mpss_phys, qproc->mpss_size); if (ret) { dev_err(qproc->dev, @@ -2224,6 +2226,7 @@ static const struct rproc_hexagon_res sc7180_mss = { NULL }, .need_mem_protection = true, + .need_pas_mem_setup = false, .has_alt_reset = false, .has_mba_logs = true, .has_spare_reg = true, @@ -2253,6 +2256,7 @@ static const struct rproc_hexagon_res sc7280_mss = { NULL }, .need_mem_protection = true, + .need_pas_mem_setup = false, .has_alt_reset = false, .has_mba_logs = true, .has_spare_reg = false, @@ -2285,6 +2289,7 @@ static const struct rproc_hexagon_res sdm660_mss = { NULL }, .need_mem_protection = true, + .need_pas_mem_setup = false, .has_alt_reset = false, .has_mba_logs = false, .has_spare_reg = false, @@ -2321,6 +2326,7 @@ static const struct rproc_hexagon_res sdm845_mss = { NULL }, .need_mem_protection = true, + .need_pas_mem_setup = false, .has_alt_reset = true, .has_mba_logs = false, .has_spare_reg = false, @@ -2353,6 +2359,7 @@ static const struct rproc_hexagon_res msm8998_mss = { NULL }, .need_mem_protection = true, + .need_pas_mem_setup = false, .has_alt_reset = false, .has_mba_logs = false, .has_spare_reg = false, @@ -2392,6 +2399,7 @@ static const struct rproc_hexagon_res msm8996_mss = { NULL }, .need_mem_protection = true, + .need_pas_mem_setup = false, .has_alt_reset = false, .has_mba_logs = false, .has_spare_reg = false, @@ -2427,6 +2435,7 @@ static const struct rproc_hexagon_res msm8909_mss = { NULL }, .need_mem_protection = false, + .need_pas_mem_setup = false, .has_alt_reset = false, .has_mba_logs = false, .has_spare_reg = false, @@ -2473,6 +2482,7 @@ static const struct rproc_hexagon_res msm8916_mss = { NULL }, .need_mem_protection = false, + .need_pas_mem_setup = false, .has_alt_reset = false, .has_mba_logs = false, .has_spare_reg = false, @@ -2509,6 +2519,7 @@ static const struct rproc_hexagon_res msm8953_mss = { NULL }, .need_mem_protection = false, + .need_pas_mem_setup = true, .has_alt_reset = false, .has_mba_logs = false, .has_spare_reg = false, @@ -2562,6 +2573,7 @@ static const struct rproc_hexagon_res msm8974_mss = { NULL }, .need_mem_protection = false, + .need_pas_mem_setup = false, .has_alt_reset = false, .has_mba_logs = false, .has_spare_reg = false, @@ -2600,6 +2612,7 @@ static const struct rproc_hexagon_res msm8226_mss = { NULL }, .need_mem_protection = false, + .need_pas_mem_setup = false, .has_alt_reset = false, .has_mba_logs = false, .has_spare_reg = false, @@ -2646,6 +2659,7 @@ static const struct rproc_hexagon_res msm8926_mss = { NULL }, .need_mem_protection = false, + .need_pas_mem_setup = false, .has_alt_reset = false, .has_mba_logs = false, .has_spare_reg = false, From 1edab01aed302577ebcd88a40675d4c94b11fd91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= Date: Wed, 7 Jan 2026 12:34:02 +0100 Subject: [PATCH 02/35] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MDM9607 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the compatible for MSS as found on the MDM9607 platform. Acked-by: Krzysztof Kozlowski Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20260107-mss-v4-2-9f4780345b6f@mainlining.org Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml index c179b560572b..4e0d2fe0e46c 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml @@ -17,6 +17,7 @@ properties: compatible: oneOf: - enum: + - qcom,mdm9607-mss-pil - qcom,msm8226-mss-pil - qcom,msm8909-mss-pil - qcom,msm8916-mss-pil @@ -226,6 +227,7 @@ allOf: compatible: contains: enum: + - qcom,mdm9607-mss-pil - qcom,msm8909-mss-pil - qcom,msm8916-mss-pil then: From 4fe236a1d0243451e942c197cfd917a3b6e5b82c Mon Sep 17 00:00:00 2001 From: Stephan Gerhold Date: Wed, 7 Jan 2026 12:34:03 +0100 Subject: [PATCH 03/35] remoteproc: qcom_q6v5_mss: Add MDM9607 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for MDM9607 MSS it have different ACC settings and it needs mitigation for inrush current issue. Signed-off-by: Stephan Gerhold [Reword the commit, add necessary flags, rework inrush current mitigation] Signed-off-by: Barnabás Czémán Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260107-mss-v4-3-9f4780345b6f@mainlining.org Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_mss.c | 72 +++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 6 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index 3c404118b322..1b50535add20 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -124,6 +124,7 @@ #define QDSP6v56_CLAMP_QMC_MEM BIT(22) #define QDSP6SS_XO_CBCR 0x0038 #define QDSP6SS_ACC_OVERRIDE_VAL 0x20 +#define QDSP6SS_ACC_OVERRIDE_VAL_9607 0x80800000 #define QDSP6v55_BHS_EN_REST_ACK BIT(0) /* QDSP6v65 parameters */ @@ -256,6 +257,7 @@ struct q6v5 { }; enum { + MSS_MDM9607, MSS_MSM8226, MSS_MSM8909, MSS_MSM8916, @@ -747,15 +749,19 @@ static int q6v5proc_reset(struct q6v5 *qproc) return ret; } goto pbl_wait; - } else if (qproc->version == MSS_MSM8909 || + } else if (qproc->version == MSS_MDM9607 || + qproc->version == MSS_MSM8909 || qproc->version == MSS_MSM8953 || qproc->version == MSS_MSM8996 || qproc->version == MSS_MSM8998 || qproc->version == MSS_SDM660) { - if (qproc->version != MSS_MSM8909 && - qproc->version != MSS_MSM8953) - /* Override the ACC value if required */ + /* Override the ACC value if required */ + if (qproc->version == MSS_MDM9607) + writel(QDSP6SS_ACC_OVERRIDE_VAL_9607, + qproc->reg_base + QDSP6SS_STRAP_ACC); + else if (qproc->version != MSS_MSM8909 && + qproc->version != MSS_MSM8953) writel(QDSP6SS_ACC_OVERRIDE_VAL, qproc->reg_base + QDSP6SS_STRAP_ACC); @@ -801,6 +807,7 @@ static int q6v5proc_reset(struct q6v5 *qproc) if (qproc->version != MSS_MSM8909) { int mem_pwr_ctl; + int reverse; /* Deassert QDSP6 compiler memory clamp */ val = readl(qproc->reg_base + QDSP6SS_PWR_CTL_REG); @@ -816,13 +823,30 @@ static int q6v5proc_reset(struct q6v5 *qproc) qproc->version == MSS_MSM8996) { mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL; i = 19; + reverse = 0; + } else if (qproc->version == MSS_MDM9607) { + mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL; + i = 19; + /* + * Set first 5 bits in reverse to avoid + * "inrush current" issues. + */ + reverse = 6; } else { /* MSS_MSM8998, MSS_SDM660 */ mem_pwr_ctl = QDSP6V6SS_MEM_PWR_CTL; i = 28; + reverse = 0; } + val = readl(qproc->reg_base + mem_pwr_ctl); - for (; i >= 0; i--) { + for (; i >= reverse; i--) { + val |= BIT(i); + writel(val, qproc->reg_base + mem_pwr_ctl); + val = readl(qproc->reg_base + mem_pwr_ctl); + udelay(1); + } + for (i = 0; i < reverse; i++) { val |= BIT(i); writel(val, qproc->reg_base + mem_pwr_ctl); /* @@ -830,7 +854,7 @@ static int q6v5proc_reset(struct q6v5 *qproc) * wait for 1us for both memory peripheral and data * array to turn on. */ - val |= readl(qproc->reg_base + mem_pwr_ctl); + val = readl(qproc->reg_base + mem_pwr_ctl); udelay(1); } } else { @@ -2410,6 +2434,41 @@ static const struct rproc_hexagon_res msm8996_mss = { .version = MSS_MSM8996, }; +static const struct rproc_hexagon_res mdm9607_mss = { + .hexagon_mba_image = "mba.mbn", + .proxy_supply = (struct qcom_mss_reg_res[]) { + { + .supply = "pll", + .uA = 100000, + }, + {} + }, + .proxy_clk_names = (char*[]){ + "xo", + NULL + }, + .active_clk_names = (char*[]){ + "iface", + "bus", + "mem", + NULL + }, + .proxy_pd_names = (char*[]){ + "mx", + "cx", + NULL + }, + .need_mem_protection = false, + .has_alt_reset = false, + .has_mba_logs = false, + .has_spare_reg = false, + .has_qaccept_regs = false, + .has_ext_bhs_reg = false, + .has_ext_cntl_regs = false, + .has_vq6 = false, + .version = MSS_MDM9607, +}; + static const struct rproc_hexagon_res msm8909_mss = { .hexagon_mba_image = "mba.mbn", .proxy_supply = (struct qcom_mss_reg_res[]) { @@ -2672,6 +2731,7 @@ static const struct rproc_hexagon_res msm8926_mss = { static const struct of_device_id q6v5_of_match[] = { { .compatible = "qcom,q6v5-pil", .data = &msm8916_mss}, + { .compatible = "qcom,mdm9607-mss-pil", .data = &mdm9607_mss}, { .compatible = "qcom,msm8226-mss-pil", .data = &msm8226_mss}, { .compatible = "qcom,msm8909-mss-pil", .data = &msm8909_mss}, { .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_mss}, From b83f08e0d228b6b57590d00d719f2b481ed08d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= Date: Wed, 7 Jan 2026 12:34:04 +0100 Subject: [PATCH 04/35] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8917 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the compatible for MSS as found on the MSM8917 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20260107-mss-v4-4-9f4780345b6f@mainlining.org Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml index 4e0d2fe0e46c..74202dd34703 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml @@ -21,6 +21,7 @@ properties: - qcom,msm8226-mss-pil - qcom,msm8909-mss-pil - qcom,msm8916-mss-pil + - qcom,msm8917-mss-pil - qcom,msm8926-mss-pil - qcom,msm8953-mss-pil - qcom,msm8974-mss-pil @@ -90,7 +91,7 @@ properties: description: PLL proxy supply (control handed over after startup) mss-supply: - description: MSS power domain supply (only valid for qcom,msm8974-mss-pil) + description: MSS power domain supply resets: items: @@ -230,6 +231,7 @@ allOf: - qcom,mdm9607-mss-pil - qcom,msm8909-mss-pil - qcom,msm8916-mss-pil + - qcom,msm8917-mss-pil then: properties: power-domains: @@ -273,6 +275,7 @@ allOf: contains: enum: - qcom,msm8926-mss-pil + - qcom,msm8917-mss-pil - qcom,msm8974-mss-pil then: required: From be086d05aa032b50d606c38603c59485cee25137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= Date: Wed, 7 Jan 2026 12:34:05 +0100 Subject: [PATCH 05/35] remoteproc: qcom_q6v5_mss: Add MSM8917 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for MSM8917 MSS it is similar for MDM9607 MSS only difference is the mss supply. Signed-off-by: Barnabás Czémán Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260107-mss-v4-5-9f4780345b6f@mainlining.org Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_mss.c | 53 ++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index 1b50535add20..c17ac84636b9 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -261,6 +261,7 @@ enum { MSS_MSM8226, MSS_MSM8909, MSS_MSM8916, + MSS_MSM8917, MSS_MSM8926, MSS_MSM8953, MSS_MSM8974, @@ -751,13 +752,15 @@ static int q6v5proc_reset(struct q6v5 *qproc) goto pbl_wait; } else if (qproc->version == MSS_MDM9607 || qproc->version == MSS_MSM8909 || + qproc->version == MSS_MSM8917 || qproc->version == MSS_MSM8953 || qproc->version == MSS_MSM8996 || qproc->version == MSS_MSM8998 || qproc->version == MSS_SDM660) { /* Override the ACC value if required */ - if (qproc->version == MSS_MDM9607) + if (qproc->version == MSS_MDM9607 || + qproc->version == MSS_MSM8917) writel(QDSP6SS_ACC_OVERRIDE_VAL_9607, qproc->reg_base + QDSP6SS_STRAP_ACC); else if (qproc->version != MSS_MSM8909 && @@ -824,7 +827,8 @@ static int q6v5proc_reset(struct q6v5 *qproc) mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL; i = 19; reverse = 0; - } else if (qproc->version == MSS_MDM9607) { + } else if (qproc->version == MSS_MDM9607 || + qproc->version == MSS_MSM8917) { mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL; i = 19; /* @@ -2552,6 +2556,50 @@ static const struct rproc_hexagon_res msm8916_mss = { .version = MSS_MSM8916, }; +static const struct rproc_hexagon_res msm8917_mss = { + .hexagon_mba_image = "mba.mbn", + .proxy_supply = (struct qcom_mss_reg_res[]) { + { + .supply = "pll", + .uA = 100000, + }, + {} + }, + .active_supply = (struct qcom_mss_reg_res[]) { + { + .supply = "mss", + .uV = 1050000, + .uA = 100000, + }, + {} + }, + .proxy_clk_names = (char*[]){ + "xo", + NULL + }, + .active_clk_names = (char*[]){ + "iface", + "bus", + "mem", + NULL + }, + .proxy_pd_names = (char*[]) { + "cx", + "mx", + NULL + }, + .need_mem_protection = false, + .need_pas_mem_setup = false, + .has_alt_reset = false, + .has_mba_logs = false, + .has_spare_reg = false, + .has_qaccept_regs = false, + .has_ext_bhs_reg = false, + .has_ext_cntl_regs = false, + .has_vq6 = false, + .version = MSS_MSM8917, +}; + static const struct rproc_hexagon_res msm8953_mss = { .hexagon_mba_image = "mba.mbn", .proxy_supply = (struct qcom_mss_reg_res[]) { @@ -2735,6 +2783,7 @@ static const struct of_device_id q6v5_of_match[] = { { .compatible = "qcom,msm8226-mss-pil", .data = &msm8226_mss}, { .compatible = "qcom,msm8909-mss-pil", .data = &msm8909_mss}, { .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_mss}, + { .compatible = "qcom,msm8917-mss-pil", .data = &msm8917_mss}, { .compatible = "qcom,msm8926-mss-pil", .data = &msm8926_mss}, { .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss}, { .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss}, From aebef677bb6d2b421076a868d3d0f021afbe1170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= Date: Wed, 7 Jan 2026 12:34:06 +0100 Subject: [PATCH 06/35] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8937 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the compatible for MSS as found on the MSM8937 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20260107-mss-v4-6-9f4780345b6f@mainlining.org Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml index 74202dd34703..b4a1b5852896 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml @@ -23,6 +23,7 @@ properties: - qcom,msm8916-mss-pil - qcom,msm8917-mss-pil - qcom,msm8926-mss-pil + - qcom,msm8937-mss-pil - qcom,msm8953-mss-pil - qcom,msm8974-mss-pil @@ -232,6 +233,7 @@ allOf: - qcom,msm8909-mss-pil - qcom,msm8916-mss-pil - qcom,msm8917-mss-pil + - qcom,msm8937-mss-pil then: properties: power-domains: @@ -276,6 +278,7 @@ allOf: enum: - qcom,msm8926-mss-pil - qcom,msm8917-mss-pil + - qcom,msm8937-mss-pil - qcom,msm8974-mss-pil then: required: From 2c4f52dd8baf62f80987c28040c411500a077066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= Date: Wed, 7 Jan 2026 12:34:07 +0100 Subject: [PATCH 07/35] remoteproc: qcom_q6v5_mss: Add MSM8937 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for MSM8937 MSS it is similar to MSM8917 MSS. It differs primarily in that TZ needs to be informed of the modem start address and pas_id. Signed-off-by: Barnabás Czémán Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260107-mss-v4-7-9f4780345b6f@mainlining.org Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_mss.c | 53 ++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index c17ac84636b9..46f287672291 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -263,6 +263,7 @@ enum { MSS_MSM8916, MSS_MSM8917, MSS_MSM8926, + MSS_MSM8937, MSS_MSM8953, MSS_MSM8974, MSS_MSM8996, @@ -753,6 +754,7 @@ static int q6v5proc_reset(struct q6v5 *qproc) } else if (qproc->version == MSS_MDM9607 || qproc->version == MSS_MSM8909 || qproc->version == MSS_MSM8917 || + qproc->version == MSS_MSM8937 || qproc->version == MSS_MSM8953 || qproc->version == MSS_MSM8996 || qproc->version == MSS_MSM8998 || @@ -760,7 +762,8 @@ static int q6v5proc_reset(struct q6v5 *qproc) /* Override the ACC value if required */ if (qproc->version == MSS_MDM9607 || - qproc->version == MSS_MSM8917) + qproc->version == MSS_MSM8917 || + qproc->version == MSS_MSM8937) writel(QDSP6SS_ACC_OVERRIDE_VAL_9607, qproc->reg_base + QDSP6SS_STRAP_ACC); else if (qproc->version != MSS_MSM8909 && @@ -828,7 +831,8 @@ static int q6v5proc_reset(struct q6v5 *qproc) i = 19; reverse = 0; } else if (qproc->version == MSS_MDM9607 || - qproc->version == MSS_MSM8917) { + qproc->version == MSS_MSM8917 || + qproc->version == MSS_MSM8937) { mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL; i = 19; /* @@ -2600,6 +2604,50 @@ static const struct rproc_hexagon_res msm8917_mss = { .version = MSS_MSM8917, }; +static const struct rproc_hexagon_res msm8937_mss = { + .hexagon_mba_image = "mba.mbn", + .proxy_supply = (struct qcom_mss_reg_res[]) { + { + .supply = "pll", + .uA = 100000, + }, + {} + }, + .active_supply = (struct qcom_mss_reg_res[]) { + { + .supply = "mss", + .uV = 1050000, + .uA = 100000, + }, + {} + }, + .proxy_clk_names = (char*[]){ + "xo", + NULL + }, + .active_clk_names = (char*[]){ + "iface", + "bus", + "mem", + NULL + }, + .proxy_pd_names = (char*[]) { + "cx", + "mx", + NULL + }, + .need_mem_protection = false, + .need_pas_mem_setup = true, + .has_alt_reset = false, + .has_mba_logs = false, + .has_spare_reg = false, + .has_qaccept_regs = false, + .has_ext_bhs_reg = false, + .has_ext_cntl_regs = false, + .has_vq6 = false, + .version = MSS_MSM8937, +}; + static const struct rproc_hexagon_res msm8953_mss = { .hexagon_mba_image = "mba.mbn", .proxy_supply = (struct qcom_mss_reg_res[]) { @@ -2785,6 +2833,7 @@ static const struct of_device_id q6v5_of_match[] = { { .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_mss}, { .compatible = "qcom,msm8917-mss-pil", .data = &msm8917_mss}, { .compatible = "qcom,msm8926-mss-pil", .data = &msm8926_mss}, + { .compatible = "qcom,msm8937-mss-pil", .data = &msm8937_mss}, { .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss}, { .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss}, { .compatible = "qcom,msm8996-mss-pil", .data = &msm8996_mss}, From 3c8c90f050e984c21c3b0cc05d8a1843b83b1a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= Date: Wed, 7 Jan 2026 12:34:08 +0100 Subject: [PATCH 08/35] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8940 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the compatible for MSS as found on the MSM8940 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20260107-mss-v4-8-9f4780345b6f@mainlining.org Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml index b4a1b5852896..8c0ff4dfad10 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml @@ -24,6 +24,7 @@ properties: - qcom,msm8917-mss-pil - qcom,msm8926-mss-pil - qcom,msm8937-mss-pil + - qcom,msm8940-mss-pil - qcom,msm8953-mss-pil - qcom,msm8974-mss-pil @@ -234,6 +235,7 @@ allOf: - qcom,msm8916-mss-pil - qcom,msm8917-mss-pil - qcom,msm8937-mss-pil + - qcom,msm8940-mss-pil then: properties: power-domains: @@ -279,6 +281,7 @@ allOf: - qcom,msm8926-mss-pil - qcom,msm8917-mss-pil - qcom,msm8937-mss-pil + - qcom,msm8940-mss-pil - qcom,msm8974-mss-pil then: required: From 68b518773213e6c54542171cc12cc821460615e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= Date: Wed, 7 Jan 2026 12:34:09 +0100 Subject: [PATCH 09/35] remoteproc: qcom_q6v5_mss: Add MSM8940 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for MSM8940 MSS it is similar for MSM8937 MSS without inrush current mitigation. Signed-off-by: Barnabás Czémán Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260107-mss-v4-9-9f4780345b6f@mainlining.org Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_mss.c | 53 ++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index 46f287672291..4e9eb5bd11fa 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -264,6 +264,7 @@ enum { MSS_MSM8917, MSS_MSM8926, MSS_MSM8937, + MSS_MSM8940, MSS_MSM8953, MSS_MSM8974, MSS_MSM8996, @@ -755,6 +756,7 @@ static int q6v5proc_reset(struct q6v5 *qproc) qproc->version == MSS_MSM8909 || qproc->version == MSS_MSM8917 || qproc->version == MSS_MSM8937 || + qproc->version == MSS_MSM8940 || qproc->version == MSS_MSM8953 || qproc->version == MSS_MSM8996 || qproc->version == MSS_MSM8998 || @@ -763,7 +765,8 @@ static int q6v5proc_reset(struct q6v5 *qproc) /* Override the ACC value if required */ if (qproc->version == MSS_MDM9607 || qproc->version == MSS_MSM8917 || - qproc->version == MSS_MSM8937) + qproc->version == MSS_MSM8937 || + qproc->version == MSS_MSM8940) writel(QDSP6SS_ACC_OVERRIDE_VAL_9607, qproc->reg_base + QDSP6SS_STRAP_ACC); else if (qproc->version != MSS_MSM8909 && @@ -825,7 +828,8 @@ static int q6v5proc_reset(struct q6v5 *qproc) writel(val, qproc->reg_base + QDSP6SS_PWR_CTL_REG); /* Turn on L1, L2, ETB and JU memories 1 at a time */ - if (qproc->version == MSS_MSM8953 || + if (qproc->version == MSS_MSM8940 || + qproc->version == MSS_MSM8953 || qproc->version == MSS_MSM8996) { mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL; i = 19; @@ -2648,6 +2652,50 @@ static const struct rproc_hexagon_res msm8937_mss = { .version = MSS_MSM8937, }; +static const struct rproc_hexagon_res msm8940_mss = { + .hexagon_mba_image = "mba.mbn", + .proxy_supply = (struct qcom_mss_reg_res[]) { + { + .supply = "pll", + .uA = 100000, + }, + {} + }, + .active_supply = (struct qcom_mss_reg_res[]) { + { + .supply = "mss", + .uV = 1050000, + .uA = 100000, + }, + {} + }, + .proxy_clk_names = (char*[]){ + "xo", + NULL + }, + .active_clk_names = (char*[]){ + "iface", + "bus", + "mem", + NULL + }, + .proxy_pd_names = (char*[]) { + "cx", + "mx", + NULL + }, + .need_mem_protection = false, + .need_pas_mem_setup = true, + .has_alt_reset = false, + .has_mba_logs = false, + .has_spare_reg = false, + .has_qaccept_regs = false, + .has_ext_bhs_reg = false, + .has_ext_cntl_regs = false, + .has_vq6 = false, + .version = MSS_MSM8940, +}; + static const struct rproc_hexagon_res msm8953_mss = { .hexagon_mba_image = "mba.mbn", .proxy_supply = (struct qcom_mss_reg_res[]) { @@ -2834,6 +2882,7 @@ static const struct of_device_id q6v5_of_match[] = { { .compatible = "qcom,msm8917-mss-pil", .data = &msm8917_mss}, { .compatible = "qcom,msm8926-mss-pil", .data = &msm8926_mss}, { .compatible = "qcom,msm8937-mss-pil", .data = &msm8937_mss}, + { .compatible = "qcom,msm8940-mss-pil", .data = &msm8940_mss}, { .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss}, { .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss}, { .compatible = "qcom,msm8996-mss-pil", .data = &msm8996_mss}, From d116bccf6f1c199b27c9ebdf07cc3cfe868f919c Mon Sep 17 00:00:00 2001 From: Tim Michals Date: Wed, 4 Feb 2026 12:27:30 -0800 Subject: [PATCH 10/35] remoteproc: xlnx: Fix sram property parsing As per sram bindings, "sram" property can be list of phandles. When more than one sram phandles are listed, driver can't parse second phandle's address correctly. Because, phandle index is passed to the API instead of offset of address from reg property which is always 0 as per sram.yaml bindings. Fix it by passing 0 to the API instead of sram phandle index. Fixes: 77fcdf51b8ca ("remoteproc: xlnx: Add sram support") Signed-off-by: Tim Michals Signed-off-by: Tanmay Shah Link: https://lore.kernel.org/r/20260204202730.3729984-1-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/xlnx_r5_remoteproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c index b71ce69afe9f..5a468d959f1e 100644 --- a/drivers/remoteproc/xlnx_r5_remoteproc.c +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c @@ -1005,7 +1005,7 @@ static int zynqmp_r5_get_sram_banks(struct zynqmp_r5_core *r5_core) } /* Get SRAM device address */ - ret = of_property_read_reg(sram_np, i, &abs_addr, &size); + ret = of_property_read_reg(sram_np, 0, &abs_addr, &size); if (ret) { dev_err(dev, "failed to get reg property\n"); goto fail_sram_get; From a48c6676912fb808d2af1b8344d8656815a3e108 Mon Sep 17 00:00:00 2001 From: Chen Ni Date: Mon, 9 Feb 2026 13:14:07 +0800 Subject: [PATCH 11/35] remoteproc: imx_rproc: Check return value of regmap_attach_dev() in imx_rproc_mmio_detect_mode() Add error checking for regmap_attach_dev() call in imx_rproc_mmio_detect_mode() function to ensure proper error propagation. Return the value of regmap_attach_dev() if it fails to prevent proceeding with an incomplete regmap setup. Suggested-by: Peng Fan Signed-off-by: Chen Ni Fixes: e14168bf3493 ("remoteproc: imx_rproc: Simplify IMX_RPROC_MMIO switch case") Link: https://lore.kernel.org/r/20260209051407.1467660-1-nichen@iscas.ac.cn Signed-off-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index f5f916d67905..75baf905988b 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -1007,7 +1007,11 @@ static int imx_rproc_mmio_detect_mode(struct rproc *rproc) } priv->regmap = regmap; - regmap_attach_dev(dev, regmap, &config); + ret = regmap_attach_dev(dev, regmap, &config); + if (ret) { + dev_err(dev, "regmap attach failed\n"); + return ret; + } if (priv->gpr) { ret = regmap_read(priv->gpr, dcfg->gpr_reg, &val); From 0af8802175d2dcff98210cfd32e056dfc6c40267 Mon Sep 17 00:00:00 2001 From: Jingyi Wang Date: Wed, 14 Jan 2026 22:42:55 -0800 Subject: [PATCH 12/35] dt-bindings: remoteproc: qcom,sm8550-pas: Add Kaanapali ADSP Document compatible for Qualcomm Kaanapali SoC ADSP PAS which looks fully compatible with SM8750, which can fallback to SM8550 except for one more interrupt ("shutdown-ack"). Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jingyi Wang Link: https://lore.kernel.org/r/20260114-knp-remoteproc-v4-1-fcf0b04d01af@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml index 11b056d6a480..cf3aaf5a46e4 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml @@ -28,7 +28,9 @@ properties: - qcom,x1e80100-adsp-pas - qcom,x1e80100-cdsp-pas - items: - - const: qcom,sm8750-adsp-pas + - enum: + - qcom,kaanapali-adsp-pas + - qcom,sm8750-adsp-pas - const: qcom,sm8550-adsp-pas - items: - const: qcom,sm8750-cdsp-pas @@ -95,6 +97,7 @@ allOf: compatible: contains: enum: + - qcom,kaanapali-adsp-pas - qcom,sm8750-adsp-pas then: properties: From 390045a24591ac4071ed6fff80b317f685fbdd6f Mon Sep 17 00:00:00 2001 From: Jingyi Wang Date: Wed, 14 Jan 2026 22:42:56 -0800 Subject: [PATCH 13/35] dt-bindings: remoteproc: qcom,sm8550-pas: Add Kaanapali CDSP Add remote processor PAS loader for Kaanapali CDSP processor, compatible with earlier SM8550 with minor difference: one more sixth "shutdown-ack" interrupt. It is not compatible with SM8650 because one memory region "global_sync_mem" is not managed by kernel on Kaanapali so it is removed in the remoteproc cdsp node. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jingyi Wang Link: https://lore.kernel.org/r/20260114-knp-remoteproc-v4-2-fcf0b04d01af@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml index cf3aaf5a46e4..b117c82b057b 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml @@ -32,6 +32,10 @@ properties: - qcom,kaanapali-adsp-pas - qcom,sm8750-adsp-pas - const: qcom,sm8550-adsp-pas + - items: + - enum: + - qcom,kaanapali-cdsp-pas + - const: qcom,sm8550-cdsp-pas - items: - const: qcom,sm8750-cdsp-pas - const: qcom,sm8650-cdsp-pas @@ -98,6 +102,7 @@ allOf: contains: enum: - qcom,kaanapali-adsp-pas + - qcom,kaanapali-cdsp-pas - qcom,sm8750-adsp-pas then: properties: From 665eebebb029690a5b2f92e481020877cc6c8d36 Mon Sep 17 00:00:00 2001 From: Chen Ni Date: Fri, 27 Feb 2026 17:15:46 +0800 Subject: [PATCH 14/35] remoteproc: imx_rproc: Fix NULL vs IS_ERR() bug in imx_rproc_addr_init() The devm_ioremap_resource_wc() function never returns NULL, it returns error pointers. Update the error checking to match. Fixes: 67a7bc7f0358 ("remoteproc: Use of_reserved_mem_region_* functions for "memory-region"") Signed-off-by: Chen Ni Reviewed-by: Peng Fan Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20260227091546.4044246-1-nichen@iscas.ac.cn Signed-off-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 75baf905988b..ef8f7c8fbda8 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -812,7 +812,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, /* Not use resource version, because we might share region */ priv->mem[b].cpu_addr = devm_ioremap_resource_wc(&pdev->dev, &res); - if (!priv->mem[b].cpu_addr) { + if (IS_ERR(priv->mem[b].cpu_addr)) { dev_err(dev, "failed to remap %pr\n", &res); return -ENOMEM; } From 5b1f4b5c72cc40e676293b8609cacef7e1545beb Mon Sep 17 00:00:00 2001 From: Chen Ni Date: Fri, 27 Feb 2026 17:21:10 +0800 Subject: [PATCH 15/35] remoteproc: k3: Fix NULL vs IS_ERR() bug in k3_reserved_mem_init() The devm_ioremap_resource_wc() function never returns NULL, it returns error pointers. Update the error checking to match. Fixes: 67a7bc7f0358 ("remoteproc: Use of_reserved_mem_region_* functions for "memory-region"") Signed-off-by: Chen Ni Reviewed-by: Peng Fan Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20260227092110.4044313-1-nichen@iscas.ac.cn Signed-off-by: Mathieu Poirier --- drivers/remoteproc/ti_k3_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_common.c index 32aa954dc5be..3cb8ae5d72f6 100644 --- a/drivers/remoteproc/ti_k3_common.c +++ b/drivers/remoteproc/ti_k3_common.c @@ -513,7 +513,7 @@ int k3_reserved_mem_init(struct k3_rproc *kproc) kproc->rmem[i].dev_addr = (u32)res.start; kproc->rmem[i].size = resource_size(&res); kproc->rmem[i].cpu_addr = devm_ioremap_resource_wc(dev, &res); - if (!kproc->rmem[i].cpu_addr) { + if (IS_ERR(kproc->rmem[i].cpu_addr)) { dev_err(dev, "failed to map reserved memory#%d at %pR\n", i + 1, &res); return -ENOMEM; From 3bd256e8cd2abec45811d8bcb6f7240f0b122c6a Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Mon, 2 Mar 2026 13:56:14 -0600 Subject: [PATCH 16/35] remoteproc: da8xx: Use dev_err_probe() Simplify the probe() code by using dev_err_probe(). Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20260302195616.312378-1-afd@ti.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/da8xx_remoteproc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c index e418a2bf5d2e..41744f3f0252 100644 --- a/drivers/remoteproc/da8xx_remoteproc.c +++ b/drivers/remoteproc/da8xx_remoteproc.c @@ -306,10 +306,8 @@ static int da8xx_rproc_probe(struct platform_device *pdev) ret = devm_request_threaded_irq(dev, irq, da8xx_rproc_callback, handle_event, 0, "da8xx-remoteproc", rproc); - if (ret) { - dev_err(dev, "devm_request_threaded_irq error: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "devm_request_threaded_irq error\n"); /* * rproc_add() can end up enabling the DSP's clk with the DSP @@ -327,10 +325,8 @@ static int da8xx_rproc_probe(struct platform_device *pdev) drproc->irq = irq; ret = devm_rproc_add(dev, rproc); - if (ret) { - dev_err(dev, "rproc_add failed: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "rproc_add failed\n"); return 0; } From 7d9e37f30cd5f3db650ee19a733252b22b5ce0a4 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Mon, 2 Mar 2026 13:56:15 -0600 Subject: [PATCH 17/35] remoteproc: da8xx: Remove unused local struct data The member irq is never used and ack_fxn is unneeded as it is already a part of another member irq_data. Drop those and their struct docs. While touching the struct docs add one for dsp_reset which was previously missing. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20260302195616.312378-2-afd@ti.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/da8xx_remoteproc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c index 41744f3f0252..f44bee303eb5 100644 --- a/drivers/remoteproc/da8xx_remoteproc.c +++ b/drivers/remoteproc/da8xx_remoteproc.c @@ -57,11 +57,10 @@ struct da8xx_rproc_mem { * @mem: internal memory regions data * @num_mems: number of internal memory regions * @dsp_clk: placeholder for platform's DSP clk - * @ack_fxn: chip-specific ack function for ack'ing irq + * @dsp_reset: control for local reset * @irq_data: ack_fxn function parameter * @chipsig: virt ptr to DSP interrupt registers (CHIPSIG & CHIPSIG_CLR) * @bootreg: virt ptr to DSP boot address register (HOST1CFG) - * @irq: irq # used by this instance */ struct da8xx_rproc { struct rproc *rproc; @@ -69,11 +68,9 @@ struct da8xx_rproc { int num_mems; struct clk *dsp_clk; struct reset_control *dsp_reset; - void (*ack_fxn)(struct irq_data *data); struct irq_data *irq_data; void __iomem *chipsig; void __iomem *bootreg; - int irq; }; /** @@ -122,7 +119,7 @@ static irqreturn_t da8xx_rproc_callback(int irq, void *p) * we need to ack it after taking down the level else we'll * be called again immediately after returning. */ - drproc->ack_fxn(drproc->irq_data); + drproc->irq_data->chip->irq_ack(drproc->irq_data); return IRQ_WAKE_THREAD; } @@ -320,9 +317,7 @@ static int da8xx_rproc_probe(struct platform_device *pdev) drproc->chipsig = chipsig; drproc->bootreg = bootreg; - drproc->ack_fxn = irq_data->chip->irq_ack; drproc->irq_data = irq_data; - drproc->irq = irq; ret = devm_rproc_add(dev, rproc); if (ret) From 41c3f9fa52020c47a9f1143f8428b2798bbd3aa9 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Mon, 2 Mar 2026 13:56:16 -0600 Subject: [PATCH 18/35] remoteproc: da8xx: Reorder resource fetching in probe() Currently several resource are fetched before we allocate our instance data struct. The is unlike most other drivers that fill in the instance data with resources as they are fetched. Move these down which is more natural and also removes the need for several temporarily locals. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20260302195616.312378-3-afd@ti.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/da8xx_remoteproc.c | 76 ++++++++++++--------------- 1 file changed, 33 insertions(+), 43 deletions(-) diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c index f44bee303eb5..23fca7176539 100644 --- a/drivers/remoteproc/da8xx_remoteproc.c +++ b/drivers/remoteproc/da8xx_remoteproc.c @@ -242,45 +242,9 @@ static int da8xx_rproc_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct da8xx_rproc *drproc; struct rproc *rproc; - struct irq_data *irq_data; - struct clk *dsp_clk; - struct reset_control *dsp_reset; - void __iomem *chipsig; - void __iomem *bootreg; int irq; int ret; - irq = platform_get_irq(pdev, 0); - if (irq < 0) - return irq; - - irq_data = irq_get_irq_data(irq); - if (!irq_data) - return dev_err_probe(dev, -EINVAL, "irq_get_irq_data(%d): NULL\n", irq); - - bootreg = devm_platform_ioremap_resource_byname(pdev, "host1cfg"); - if (IS_ERR(bootreg)) - return PTR_ERR(bootreg); - - chipsig = devm_platform_ioremap_resource_byname(pdev, "chipsig"); - if (IS_ERR(chipsig)) - return PTR_ERR(chipsig); - - dsp_clk = devm_clk_get(dev, NULL); - if (IS_ERR(dsp_clk)) - return dev_err_probe(dev, PTR_ERR(dsp_clk), "clk_get error\n"); - - dsp_reset = devm_reset_control_get_exclusive(dev, NULL); - if (IS_ERR(dsp_reset)) - return dev_err_probe(dev, PTR_ERR(dsp_reset), "unable to get reset control\n"); - - if (dev->of_node) { - ret = of_reserved_mem_device_init(dev); - if (ret) - return dev_err_probe(dev, ret, "device does not have specific CMA pool\n"); - devm_add_action_or_reset(&pdev->dev, da8xx_rproc_mem_release, &pdev->dev); - } - rproc = devm_rproc_alloc(dev, "dsp", &da8xx_rproc_ops, da8xx_fw_name, sizeof(*drproc)); if (!rproc) @@ -291,14 +255,44 @@ static int da8xx_rproc_probe(struct platform_device *pdev) drproc = rproc->priv; drproc->rproc = rproc; - drproc->dsp_clk = dsp_clk; - drproc->dsp_reset = dsp_reset; rproc->has_iommu = false; + drproc->dsp_clk = devm_clk_get(dev, NULL); + if (IS_ERR(drproc->dsp_clk)) + return dev_err_probe(dev, PTR_ERR(drproc->dsp_clk), "clk_get error\n"); + + drproc->dsp_reset = devm_reset_control_get_exclusive(dev, NULL); + if (IS_ERR(drproc->dsp_reset)) + return dev_err_probe(dev, PTR_ERR(drproc->dsp_reset), + "unable to get reset control\n"); + + if (dev->of_node) { + ret = of_reserved_mem_device_init(dev); + if (ret) + return dev_err_probe(dev, ret, "device does not have specific CMA pool\n"); + devm_add_action_or_reset(&pdev->dev, da8xx_rproc_mem_release, &pdev->dev); + } + ret = da8xx_rproc_get_internal_memories(pdev, drproc); if (ret) return ret; + irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; + + drproc->irq_data = irq_get_irq_data(irq); + if (!drproc->irq_data) + return dev_err_probe(dev, -EINVAL, "irq_get_irq_data(%d): NULL\n", irq); + + drproc->chipsig = devm_platform_ioremap_resource_byname(pdev, "chipsig"); + if (IS_ERR(drproc->chipsig)) + return PTR_ERR(drproc->chipsig); + + drproc->bootreg = devm_platform_ioremap_resource_byname(pdev, "host1cfg"); + if (IS_ERR(drproc->bootreg)) + return PTR_ERR(drproc->bootreg); + /* everything the ISR needs is now setup, so hook it up */ ret = devm_request_threaded_irq(dev, irq, da8xx_rproc_callback, handle_event, 0, "da8xx-remoteproc", @@ -311,14 +305,10 @@ static int da8xx_rproc_probe(struct platform_device *pdev) * *not* in reset, but da8xx_rproc_start() needs the DSP to be * held in reset at the time it is called. */ - ret = reset_control_assert(dsp_reset); + ret = reset_control_assert(drproc->dsp_reset); if (ret) return ret; - drproc->chipsig = chipsig; - drproc->bootreg = bootreg; - drproc->irq_data = irq_data; - ret = devm_rproc_add(dev, rproc); if (ret) return dev_err_probe(dev, ret, "rproc_add failed\n"); From 8f5dea46d06e306354203bf594129a199943dfc2 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Mon, 2 Mar 2026 14:27:27 -0600 Subject: [PATCH 19/35] remoteproc: pru: Use rproc_of_parse_firmware() to get firmware name There is a helper function to get the firmware name, make use of that. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20260302202728.322073-1-afd@ti.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/pru_rproc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c index 5e3eb7b86a0e..19b107d29242 100644 --- a/drivers/remoteproc/pru_rproc.c +++ b/drivers/remoteproc/pru_rproc.c @@ -1003,11 +1003,9 @@ static int pru_rproc_probe(struct platform_device *pdev) if (!data) return -ENODEV; - ret = of_property_read_string(np, "firmware-name", &fw_name); - if (ret) { - dev_err(dev, "unable to retrieve firmware-name %d\n", ret); - return ret; - } + ret = rproc_of_parse_firmware(dev, 0, &fw_name); + if (ret) + return dev_err_probe(dev, ret, "unable to retrieve firmware-name\n"); rproc = devm_rproc_alloc(dev, pdev->name, &pru_rproc_ops, fw_name, sizeof(*pru)); From d1165ef7e9d2bc86a7efeac386435de104c0ba2f Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Mon, 2 Mar 2026 14:27:28 -0600 Subject: [PATCH 20/35] remoteproc: pru: Remove empty remove callback The .remove() callback only prints out a debug message, remove this otherwise unneeded callback. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20260302202728.322073-2-afd@ti.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/pru_rproc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c index 19b107d29242..a4636c7bc6b7 100644 --- a/drivers/remoteproc/pru_rproc.c +++ b/drivers/remoteproc/pru_rproc.c @@ -1078,14 +1078,6 @@ static int pru_rproc_probe(struct platform_device *pdev) return 0; } -static void pru_rproc_remove(struct platform_device *pdev) -{ - struct device *dev = &pdev->dev; - struct rproc *rproc = platform_get_drvdata(pdev); - - dev_dbg(dev, "%s: removing rproc %s\n", __func__, rproc->name); -} - static const struct pru_private_data pru_data = { .type = PRU_TYPE_PRU, }; @@ -1131,7 +1123,6 @@ static struct platform_driver pru_rproc_driver = { .suppress_bind_attrs = true, }, .probe = pru_rproc_probe, - .remove = pru_rproc_remove, }; module_platform_driver(pru_rproc_driver); From 664b6b3ca5766ce487b80601f356a58d92b483b7 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Mon, 2 Mar 2026 14:17:34 -0600 Subject: [PATCH 21/35] remoteproc: keystone: Request IRQs in probe() IRQs can be registered in probe and only need to be enabled/disabled during remoteproc start/stop. This lets us catch IRQ issues early and simplify remoteproc start/stop. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20260302201734.320747-1-afd@ti.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/keystone_remoteproc.c | 43 +++++++++--------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c index 4d6550b48567..e7fde5509786 100644 --- a/drivers/remoteproc/keystone_remoteproc.c +++ b/drivers/remoteproc/keystone_remoteproc.c @@ -173,35 +173,16 @@ static int keystone_rproc_start(struct rproc *rproc) INIT_WORK(&ksproc->workqueue, handle_event); - ret = request_irq(ksproc->irq_ring, keystone_rproc_vring_interrupt, 0, - dev_name(ksproc->dev), ksproc); - if (ret) { - dev_err(ksproc->dev, "failed to enable vring interrupt, ret = %d\n", - ret); - goto out; - } - - ret = request_irq(ksproc->irq_fault, keystone_rproc_exception_interrupt, - 0, dev_name(ksproc->dev), ksproc); - if (ret) { - dev_err(ksproc->dev, "failed to enable exception interrupt, ret = %d\n", - ret); - goto free_vring_irq; - } + enable_irq(ksproc->irq_ring); + enable_irq(ksproc->irq_fault); ret = keystone_rproc_dsp_boot(ksproc, rproc->bootaddr); - if (ret) - goto free_exc_irq; + if (ret) { + flush_work(&ksproc->workqueue); + return ret; + } return 0; - -free_exc_irq: - free_irq(ksproc->irq_fault, ksproc); -free_vring_irq: - free_irq(ksproc->irq_ring, ksproc); - flush_work(&ksproc->workqueue); -out: - return ret; } /* @@ -215,8 +196,8 @@ static int keystone_rproc_stop(struct rproc *rproc) struct keystone_rproc *ksproc = rproc->priv; keystone_rproc_dsp_reset(ksproc); - free_irq(ksproc->irq_fault, ksproc); - free_irq(ksproc->irq_ring, ksproc); + disable_irq(ksproc->irq_fault); + disable_irq(ksproc->irq_ring); flush_work(&ksproc->workqueue); return 0; @@ -427,10 +408,18 @@ static int keystone_rproc_probe(struct platform_device *pdev) ksproc->irq_ring = platform_get_irq_byname(pdev, "vring"); if (ksproc->irq_ring < 0) return ksproc->irq_ring; + ret = devm_request_irq(dev, ksproc->irq_ring, keystone_rproc_vring_interrupt, + IRQF_NO_AUTOEN, dev_name(dev), ksproc); + if (ret) + return dev_err_probe(dev, ret, "failed to request vring interrupt\n"); ksproc->irq_fault = platform_get_irq_byname(pdev, "exception"); if (ksproc->irq_fault < 0) return ksproc->irq_fault; + ret = devm_request_irq(dev, ksproc->irq_fault, keystone_rproc_exception_interrupt, + IRQF_NO_AUTOEN, dev_name(dev), ksproc); + if (ret) + return dev_err_probe(dev, ret, "failed to enable exception interrupt\n"); ksproc->kick_gpio = devm_gpiod_get(dev, "kick", GPIOD_ASIS); ret = PTR_ERR_OR_ZERO(ksproc->kick_gpio); From d20c27dc8141c90a27927b1343ec2131f864fbb3 Mon Sep 17 00:00:00 2001 From: Tanmay Shah Date: Tue, 3 Mar 2026 15:51:26 -0800 Subject: [PATCH 22/35] remoteproc: xlnx: Avoid mailbox setup Mailbox properties are optional in the remoteproc xlnx bindings. If mailbox properties are not found in device-tree it's not fatal error in the driver. Driver will print warning messages and continue with normal operation. However, these warning messages can be interpreted as error. Check "mboxes" and "mbox-names" properties in the driver and setup mailbox only if they are available in the device-tree. This will avoid any unwanted warning/error messages. Signed-off-by: Tanmay Shah Link: https://lore.kernel.org/r/20260303235127.2317955-2-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/xlnx_r5_remoteproc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c index 5a468d959f1e..148d8c622566 100644 --- a/drivers/remoteproc/xlnx_r5_remoteproc.c +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c @@ -265,6 +265,10 @@ static struct mbox_info *zynqmp_r5_setup_mbox(struct device *cdev) struct mbox_client *mbox_cl; struct mbox_info *ipi; + if (!of_property_present(dev_of_node(cdev), "mboxes") || + !of_property_present(dev_of_node(cdev), "mbox-names")) + return NULL; + ipi = kzalloc_obj(*ipi); if (!ipi) return NULL; From 38dd6ccfdfbbe865569a52fe1ba9fa1478f672e6 Mon Sep 17 00:00:00 2001 From: Ben Levinsky Date: Tue, 3 Mar 2026 15:51:27 -0800 Subject: [PATCH 23/35] remoteproc: xlnx: Only access buffer information if IPI is buffered In the receive callback check if message is NULL to prevent possibility of crash by NULL pointer dereferencing. Signed-off-by: Ben Levinsky Signed-off-by: Tanmay Shah Fixes: 5dfb28c257b7 ("remoteproc: xilinx: Add mailbox channels for rpmsg") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20260303235127.2317955-3-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/xlnx_r5_remoteproc.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c index 148d8c622566..5e92dc51f1c0 100644 --- a/drivers/remoteproc/xlnx_r5_remoteproc.c +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c @@ -232,17 +232,19 @@ static void zynqmp_r5_mb_rx_cb(struct mbox_client *cl, void *msg) ipi = container_of(cl, struct mbox_info, mbox_cl); - /* copy data from ipi buffer to r5_core */ + /* copy data from ipi buffer to r5_core if IPI is buffered. */ ipi_msg = (struct zynqmp_ipi_message *)msg; - buf_msg = (struct zynqmp_ipi_message *)ipi->rx_mc_buf; - len = ipi_msg->len; - if (len > IPI_BUF_LEN_MAX) { - dev_warn(cl->dev, "msg size exceeded than %d\n", - IPI_BUF_LEN_MAX); - len = IPI_BUF_LEN_MAX; + if (ipi_msg) { + buf_msg = (struct zynqmp_ipi_message *)ipi->rx_mc_buf; + len = ipi_msg->len; + if (len > IPI_BUF_LEN_MAX) { + dev_warn(cl->dev, "msg size exceeded than %d\n", + IPI_BUF_LEN_MAX); + len = IPI_BUF_LEN_MAX; + } + buf_msg->len = len; + memcpy(buf_msg->data, ipi_msg->data, len); } - buf_msg->len = len; - memcpy(buf_msg->data, ipi_msg->data, len); /* received and processed interrupt ack */ if (mbox_send_message(ipi->rx_chan, NULL) < 0) From 95b6c029e56e4d75e2957ce7ac795da29415865b Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Tue, 10 Mar 2026 00:03:33 +0100 Subject: [PATCH 24/35] remoteproc: sysmon: Use the unified QMI service ID instead of defining it locally Instead of defining a local macro with a custom name for the QMI service identifier, use the one provided in qmi.h and remove the locally defined macro. Signed-off-by: Daniel Lezcano Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20260309230346.3584252-5-daniel.lezcano@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_sysmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_sysmon.c b/drivers/remoteproc/qcom_sysmon.c index cf10e8ecfb8f..5bd4147f1f37 100644 --- a/drivers/remoteproc/qcom_sysmon.c +++ b/drivers/remoteproc/qcom_sysmon.c @@ -677,7 +677,7 @@ struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc, return ERR_PTR(ret); } - qmi_add_lookup(&sysmon->qmi, 43, 0, 0); + qmi_add_lookup(&sysmon->qmi, QMI_SERVICE_ID_SSCTL, 0, 0); sysmon->subdev.prepare = sysmon_prepare; sysmon->subdev.start = sysmon_start; From 21f2762acb5c082666495ebfee8d4a159f03bb07 Mon Sep 17 00:00:00 2001 From: Tanmay Shah Date: Tue, 3 Mar 2026 15:51:28 -0800 Subject: [PATCH 25/35] remoteproc: xlnx: Release mailbox channels on shutdown Mailbox driver can't introduce shutdown callback, as it might endup closing mbox channels prematurely. By allowing the client driver to manage the shutdown process, it's ensured that mailbox channels are closed only when they are no longer needed. Signed-off-by: Tanmay Shah Link: https://lore.kernel.org/r/20260303235127.2317955-4-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/xlnx_r5_remoteproc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c index 5e92dc51f1c0..50a9974f3202 100644 --- a/drivers/remoteproc/xlnx_r5_remoteproc.c +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c @@ -1490,6 +1490,8 @@ static void zynqmp_r5_remoteproc_shutdown(struct platform_device *pdev) dev_err(cluster->dev, "failed to %s rproc %d\n", rproc_state_str, rproc->index); } + + zynqmp_r5_free_mbox(r5_core->ipi); } } From 217fb074eb108075c26ddf96f3456c47e279fc15 Mon Sep 17 00:00:00 2001 From: Sibi Sankar Date: Fri, 13 Mar 2026 17:38:10 +0530 Subject: [PATCH 26/35] dt-bindings: remoteproc: qcom,sm8550-pas: Add Glymur ADSP Document compatible for Qualcomm Glymur ADSP PAS which is compatible with SM8750, which can fallback to SM8550 except for the one additional interrupt ("shutdown-ack"). Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20260313120814.1312410-2-sibi.sankar@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml index b117c82b057b..fb6e0b4f54e8 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml @@ -29,6 +29,7 @@ properties: - qcom,x1e80100-cdsp-pas - items: - enum: + - qcom,glymur-adsp-pas - qcom,kaanapali-adsp-pas - qcom,sm8750-adsp-pas - const: qcom,sm8550-adsp-pas @@ -101,6 +102,7 @@ allOf: compatible: contains: enum: + - qcom,glymur-adsp-pas - qcom,kaanapali-adsp-pas - qcom,kaanapali-cdsp-pas - qcom,sm8750-adsp-pas From 46fcbcaa72885e814fa0e4cc306f13af41d086e2 Mon Sep 17 00:00:00 2001 From: Sibi Sankar Date: Fri, 13 Mar 2026 17:38:11 +0530 Subject: [PATCH 27/35] dt-bindings: remoteproc: qcom,sm8550-pas: Add Glymur CDSP Document compatible for Qualcomm Glymur CDSP PAS which is compatible with SM8550 SoC except for the one additional interrupt ("shutdown-ack"). Similar to the Qualcomm Kaanapali SoC, "global_sync_mem" is not managed by the kernel so it remains unlisted. Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20260313120814.1312410-3-sibi.sankar@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml index fb6e0b4f54e8..6a29d239ef41 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml @@ -35,6 +35,7 @@ properties: - const: qcom,sm8550-adsp-pas - items: - enum: + - qcom,glymur-cdsp-pas - qcom,kaanapali-cdsp-pas - const: qcom,sm8550-cdsp-pas - items: @@ -103,6 +104,7 @@ allOf: contains: enum: - qcom,glymur-adsp-pas + - qcom,glymur-cdsp-pas - qcom,kaanapali-adsp-pas - qcom,kaanapali-cdsp-pas - qcom,sm8750-adsp-pas From 943cfbca992f44e67a36779d94008d9080ca054f Mon Sep 17 00:00:00 2001 From: Anas Iqbal Date: Sat, 14 Mar 2026 11:01:37 +0000 Subject: [PATCH 28/35] remoteproc: use SIZE_MAX in rproc_u64_fit_in_size_t() Smatch reports: drivers/remoteproc/remoteproc_elf_loader.c:221 warn: always true condition '(val <= -1)' The helper function rproc_u64_fit_in_size_t() compares the value against (size_t)-1, which is equivalent to SIZE_MAX but can confuse static analysis tools and lead to the above warning. Replace (size_t)-1 with SIZE_MAX to make the intent explicit and avoid the Smatch warning without changing the behavior. Signed-off-by: Anas Iqbal Link: https://lore.kernel.org/r/20260314110137.178981-1-mohd.abd.6602@gmail.com Signed-off-by: Mathieu Poirier --- drivers/remoteproc/remoteproc_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index 0cd09e67ac14..0a5e15744b1d 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -218,7 +218,7 @@ bool rproc_u64_fit_in_size_t(u64 val) if (sizeof(size_t) == sizeof(u64)) return true; - return (val <= (size_t) -1); + return val <= SIZE_MAX; } #endif /* REMOTEPROC_INTERNAL_H */ From 91ddd97e1bb26937a5c15fb51ec8f6b65dbe94b8 Mon Sep 17 00:00:00 2001 From: "Markus Schneider-Pargmann (TI)" Date: Wed, 18 Mar 2026 16:13:07 +0100 Subject: [PATCH 29/35] dt-bindings: remoteproc: k3-r5f: Split up memory regions Split up the region reserved for the firmware image in more specific sections to expose the full fixed layout. Especially the LPM metadata section is important for bootloaders as it contains information about how to exit IO+DDR. This is read by the bootloader but is written by the firmware. Signed-off-by: Markus Schneider-Pargmann (TI) Link: https://lore.kernel.org/r/20260318-topic-am62a-ioddr-dt-v6-19-v3-1-c41473cb23c3@baylibre.com Signed-off-by: Mathieu Poirier --- .../bindings/remoteproc/ti,k3-r5f-rproc.yaml | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml index a927551356e6..15e0286e4926 100644 --- a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +++ b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml @@ -154,17 +154,26 @@ patternProperties: memory-region: description: | phandle to the reserved memory nodes to be associated with the - remoteproc device. There should be at least two reserved memory nodes - defined. The reserved memory nodes should be carveout nodes, and - should be defined with a "no-map" property as per the bindings in + remoteproc device. There should be two reserved memory nodes defined + for the basic layout or 6 partitions for a detailed layout. The + reserved memory nodes should be carveout nodes, and should be defined + with a "no-map" property as per the bindings in Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt - minItems: 2 - maxItems: 8 - items: - - description: region used for dynamic DMA allocations like vrings and - vring buffers - - description: region reserved for firmware image sections - additionalItems: true + oneOf: + - description: Basic layout + items: + - description: region used for dynamic DMA allocations like vrings and + vring buffers + - description: region reserved for firmware image sections + - description: Detailed layout + items: + - description: region used for dynamic DMA allocations like vrings and + vring buffers + - description: region reserved for IPC resources + - description: LPM FS stub binary + - description: LPM metadata + - description: LPM FS context data and reserved sections + - description: DM RM/PM trace and firmware code/data # Optional properties: # -------------------- From 479ba9d293f5fa32cfd2a14a502690eca769e5ee Mon Sep 17 00:00:00 2001 From: "Markus Schneider-Pargmann (TI)" Date: Wed, 18 Mar 2026 16:13:08 +0100 Subject: [PATCH 30/35] dt-bindings: remoteproc: k3-r5f: Add memory-region-names Add names to the memory-region-names for easier identification of memory regions. As the meaning of the second memory region can be different also require the use of memory-region-names if memory-region is in use. Signed-off-by: Markus Schneider-Pargmann (TI) Link: https://lore.kernel.org/r/20260318-topic-am62a-ioddr-dt-v6-19-v3-2-c41473cb23c3@baylibre.com Signed-off-by: Mathieu Poirier --- .../bindings/remoteproc/ti,k3-r5f-rproc.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml index 15e0286e4926..775e9b3a1938 100644 --- a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +++ b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml @@ -175,6 +175,24 @@ patternProperties: - description: LPM FS context data and reserved sections - description: DM RM/PM trace and firmware code/data + memory-region-names: + description: | + Names for the memory regions specified in the memory-region property. + The names must correspond with the entries in memory-region. + oneOf: + - description: Basic layout + items: + - const: dma + - const: firmware + - description: Detailed layout + items: + - const: dma + - const: ipc + - const: lpm-stub + - const: lpm-metadata + - const: lpm-context + - const: dm-firmware + # Optional properties: # -------------------- # The following properties are optional properties for each of the R5F cores: @@ -227,6 +245,13 @@ patternProperties: - resets - firmware-name + if: + required: + - memory-region + then: + required: + - memory-region-names + unevaluatedProperties: false allOf: @@ -330,6 +355,7 @@ examples: mboxes = <&mailbox0 &mbox_mcu_r5fss0_core0>; memory-region = <&mcu_r5fss0_core0_dma_memory_region>, <&mcu_r5fss0_core0_memory_region>; + memory-region-names = "dma", "firmware"; sram = <&mcu_r5fss0_core0_sram>; }; From 743cfae79d2458e241b06ed523c28a09f1449b75 Mon Sep 17 00:00:00 2001 From: Mukesh Ojha Date: Tue, 31 Mar 2026 22:42:43 +0530 Subject: [PATCH 31/35] remoteproc: qcom: Fix minidump out-of-bounds access on subsystems array MAX_NUM_OF_SS was hardcoded to 10 in the minidump_global_toc struct, which is a direct overlay on an SMEM item allocated by the firmware. Newer Qualcomm SoC firmware allocates space for more subsystems, while older firmware only allocates space for 10. Bumping the constant would cause Linux to read/write beyond the SMEM item boundary on older platforms. Fix this by converting subsystems[] to a flexible array member and deriving the actual number of subsystems at runtime from the size returned by qcom_smem_get(). Add a bounds check on minidump_id against the derived count before indexing into the array. Signed-off-by: Mukesh Ojha Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260331171243.1962067-1-mukesh.ojha@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_common.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c index 6c31140268ac..fd2b6824ad26 100644 --- a/drivers/remoteproc/qcom_common.c +++ b/drivers/remoteproc/qcom_common.c @@ -28,7 +28,6 @@ #define to_ssr_subdev(d) container_of(d, struct qcom_rproc_ssr, subdev) #define to_pdm_subdev(d) container_of(d, struct qcom_rproc_pdm, subdev) -#define MAX_NUM_OF_SS 10 #define MAX_REGION_NAME_LENGTH 16 #define SBL_MINIDUMP_SMEM_ID 602 #define MINIDUMP_REGION_VALID ('V' << 24 | 'A' << 16 | 'L' << 8 | 'I' << 0) @@ -80,7 +79,7 @@ struct minidump_global_toc { __le32 status; __le32 md_revision; __le32 enabled; - struct minidump_subsystem subsystems[MAX_NUM_OF_SS]; + struct minidump_subsystem subsystems[]; }; struct qcom_ssr_subsystem { @@ -151,9 +150,11 @@ void qcom_minidump(struct rproc *rproc, unsigned int minidump_id, int ret; struct minidump_subsystem *subsystem; struct minidump_global_toc *toc; + unsigned int num_ss; + size_t toc_size; /* Get Global minidump ToC*/ - toc = qcom_smem_get(QCOM_SMEM_HOST_ANY, SBL_MINIDUMP_SMEM_ID, NULL); + toc = qcom_smem_get(QCOM_SMEM_HOST_ANY, SBL_MINIDUMP_SMEM_ID, &toc_size); /* check if global table pointer exists and init is set */ if (IS_ERR(toc) || !toc->status) { @@ -161,6 +162,16 @@ void qcom_minidump(struct rproc *rproc, unsigned int minidump_id, return; } + /* Derive the number of subsystems from the actual SMEM item size */ + num_ss = (toc_size - offsetof(struct minidump_global_toc, subsystems)) / + sizeof(struct minidump_subsystem); + + if (minidump_id >= num_ss) { + dev_err(&rproc->dev, "Minidump id %d is out of range: %d\n", + minidump_id, num_ss); + return; + } + /* Get subsystem table of contents using the minidump id */ subsystem = &toc->subsystems[minidump_id]; From 74eb6cd91aef968ee792575f10b438ae2f2a2bb2 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Mon, 9 Mar 2026 20:33:57 +0800 Subject: [PATCH 32/35] dt-bindings: remoteproc: qcom: Drop types for firmware-name The type of firmware-name is already defined by core schemas. Drop it from individual bindings that have either a redundant definition or an override as string type. For the later cases, constrain the number of expected firmware names to 1. Signed-off-by: Shawn Guo Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20260309123357.1911586-1-shengchao.guo@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml | 1 - .../devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml | 1 - .../devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml | 1 - .../devicetree/bindings/remoteproc/qcom,sc7180-mss-pil.yaml | 1 - .../devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml | 1 - .../devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml | 2 +- .../devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml | 2 +- .../devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml | 1 - 8 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml index 8c0ff4dfad10..faf2712e3d27 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml @@ -141,7 +141,6 @@ properties: - description: MPSS reserved region firmware-name: - $ref: /schemas/types.yaml#/definitions/string-array items: - description: Name of MBA firmware - description: Name of modem firmware diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml index 4d2055f283ac..1b65813cc8ad 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml @@ -126,7 +126,6 @@ properties: - description: Metadata reserved region firmware-name: - $ref: /schemas/types.yaml#/definitions/string-array items: - description: Name of MBA firmware - description: Name of modem firmware diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml index 188a25194000..bcd2bcf96e24 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml @@ -51,7 +51,6 @@ properties: description: Reference to the AOSS side-channel message RAM. firmware-name: - $ref: /schemas/types.yaml#/definitions/string-array items: - description: Firmware name of the Hexagon core diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-mss-pil.yaml index b1402bef0ebe..7c9accac92d0 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-mss-pil.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-mss-pil.yaml @@ -98,7 +98,6 @@ properties: - description: metadata reserved region firmware-name: - $ref: /schemas/types.yaml#/definitions/string-array items: - description: Name of MBA firmware - description: Name of modem firmware diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml index 005cb21732af..f349c303fa07 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml @@ -98,7 +98,6 @@ properties: - description: metadata reserved region firmware-name: - $ref: /schemas/types.yaml#/definitions/string-array items: - description: Name of MBA firmware - description: Name of modem firmware diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml index 5dbda3a55047..8227527c1d77 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml @@ -42,7 +42,7 @@ properties: description: Reference to the reserved-memory for the Hexagon core firmware-name: - $ref: /schemas/types.yaml#/definitions/string + maxItems: 1 description: Firmware name for the Hexagon core required: diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml index 5d463272165f..8c4abde74915 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml @@ -56,7 +56,7 @@ properties: smd-edge: false firmware-name: - $ref: /schemas/types.yaml#/definitions/string + maxItems: 1 description: Firmware name for the Hexagon core required: diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml index 6a29d239ef41..1e4db0c9fcf9 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml @@ -60,7 +60,6 @@ properties: smd-edge: false firmware-name: - $ref: /schemas/types.yaml#/definitions/string-array items: - description: Firmware name of the Hexagon core - description: Firmware name of the Hexagon Devicetree From 1b4eceb4829141ffa7de0255d5578d4bc3178563 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Fri, 6 Mar 2026 22:56:07 +0800 Subject: [PATCH 33/35] remoteproc: qcom: Add missing space before closing bracket Add missing space before closing curly bracket for qcom_q6v5_mss and qcom_q6v5_pas driver of_match[] lines, so that all qcom remoteproc drivers are consistent on the common coding style. Signed-off-by: Shawn Guo Link: https://lore.kernel.org/r/20260306145607.1394878-1-shengchao.guo@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_mss.c | 34 +++---- drivers/remoteproc/qcom_q6v5_pas.c | 138 ++++++++++++++--------------- 2 files changed, 86 insertions(+), 86 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index 4e9eb5bd11fa..ae78f5c7c1b6 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -2874,23 +2874,23 @@ static const struct rproc_hexagon_res msm8926_mss = { }; static const struct of_device_id q6v5_of_match[] = { - { .compatible = "qcom,q6v5-pil", .data = &msm8916_mss}, - { .compatible = "qcom,mdm9607-mss-pil", .data = &mdm9607_mss}, - { .compatible = "qcom,msm8226-mss-pil", .data = &msm8226_mss}, - { .compatible = "qcom,msm8909-mss-pil", .data = &msm8909_mss}, - { .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_mss}, - { .compatible = "qcom,msm8917-mss-pil", .data = &msm8917_mss}, - { .compatible = "qcom,msm8926-mss-pil", .data = &msm8926_mss}, - { .compatible = "qcom,msm8937-mss-pil", .data = &msm8937_mss}, - { .compatible = "qcom,msm8940-mss-pil", .data = &msm8940_mss}, - { .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss}, - { .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss}, - { .compatible = "qcom,msm8996-mss-pil", .data = &msm8996_mss}, - { .compatible = "qcom,msm8998-mss-pil", .data = &msm8998_mss}, - { .compatible = "qcom,sc7180-mss-pil", .data = &sc7180_mss}, - { .compatible = "qcom,sc7280-mss-pil", .data = &sc7280_mss}, - { .compatible = "qcom,sdm660-mss-pil", .data = &sdm660_mss}, - { .compatible = "qcom,sdm845-mss-pil", .data = &sdm845_mss}, + { .compatible = "qcom,q6v5-pil", .data = &msm8916_mss }, + { .compatible = "qcom,mdm9607-mss-pil", .data = &mdm9607_mss }, + { .compatible = "qcom,msm8226-mss-pil", .data = &msm8226_mss }, + { .compatible = "qcom,msm8909-mss-pil", .data = &msm8909_mss }, + { .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_mss }, + { .compatible = "qcom,msm8917-mss-pil", .data = &msm8917_mss }, + { .compatible = "qcom,msm8926-mss-pil", .data = &msm8926_mss }, + { .compatible = "qcom,msm8937-mss-pil", .data = &msm8937_mss }, + { .compatible = "qcom,msm8940-mss-pil", .data = &msm8940_mss }, + { .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_mss }, + { .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss }, + { .compatible = "qcom,msm8996-mss-pil", .data = &msm8996_mss }, + { .compatible = "qcom,msm8998-mss-pil", .data = &msm8998_mss }, + { .compatible = "qcom,sc7180-mss-pil", .data = &sc7180_mss }, + { .compatible = "qcom,sc7280-mss-pil", .data = &sc7280_mss }, + { .compatible = "qcom,sdm660-mss-pil", .data = &sdm660_mss }, + { .compatible = "qcom,sdm845-mss-pil", .data = &sdm845_mss }, { }, }; MODULE_DEVICE_TABLE(of, q6v5_of_match); diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 46204da046fa..46daa5c9ac3f 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -1531,78 +1531,78 @@ static const struct qcom_pas_data sm8750_mpss_resource = { }; static const struct of_device_id qcom_pas_of_match[] = { - { .compatible = "qcom,milos-adsp-pas", .data = &sm8550_adsp_resource}, - { .compatible = "qcom,milos-cdsp-pas", .data = &milos_cdsp_resource}, - { .compatible = "qcom,milos-mpss-pas", .data = &sm8450_mpss_resource}, - { .compatible = "qcom,milos-wpss-pas", .data = &sc7280_wpss_resource}, - { .compatible = "qcom,msm8226-adsp-pil", .data = &msm8996_adsp_resource}, - { .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource}, - { .compatible = "qcom,msm8974-adsp-pil", .data = &msm8996_adsp_resource}, - { .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource}, - { .compatible = "qcom,msm8996-slpi-pil", .data = &msm8996_slpi_resource_init}, - { .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource}, - { .compatible = "qcom,msm8998-slpi-pas", .data = &msm8996_slpi_resource_init}, + { .compatible = "qcom,milos-adsp-pas", .data = &sm8550_adsp_resource }, + { .compatible = "qcom,milos-cdsp-pas", .data = &milos_cdsp_resource }, + { .compatible = "qcom,milos-mpss-pas", .data = &sm8450_mpss_resource }, + { .compatible = "qcom,milos-wpss-pas", .data = &sc7280_wpss_resource }, + { .compatible = "qcom,msm8226-adsp-pil", .data = &msm8996_adsp_resource }, + { .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource }, + { .compatible = "qcom,msm8974-adsp-pil", .data = &msm8996_adsp_resource }, + { .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource }, + { .compatible = "qcom,msm8996-slpi-pil", .data = &msm8996_slpi_resource_init }, + { .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource }, + { .compatible = "qcom,msm8998-slpi-pas", .data = &msm8996_slpi_resource_init }, { .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init }, { .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init }, { .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init }, - { .compatible = "qcom,sa8775p-adsp-pas", .data = &sa8775p_adsp_resource}, - { .compatible = "qcom,sa8775p-cdsp0-pas", .data = &sa8775p_cdsp0_resource}, - { .compatible = "qcom,sa8775p-cdsp1-pas", .data = &sa8775p_cdsp1_resource}, - { .compatible = "qcom,sa8775p-gpdsp0-pas", .data = &sa8775p_gpdsp0_resource}, - { .compatible = "qcom,sa8775p-gpdsp1-pas", .data = &sa8775p_gpdsp1_resource}, - { .compatible = "qcom,sar2130p-adsp-pas", .data = &sm8350_adsp_resource}, - { .compatible = "qcom,sc7180-adsp-pas", .data = &sm8250_adsp_resource}, - { .compatible = "qcom,sc7180-mpss-pas", .data = &mpss_resource_init}, - { .compatible = "qcom,sc7280-adsp-pas", .data = &sm8350_adsp_resource}, - { .compatible = "qcom,sc7280-cdsp-pas", .data = &sm6350_cdsp_resource}, - { .compatible = "qcom,sc7280-mpss-pas", .data = &mpss_resource_init}, - { .compatible = "qcom,sc7280-wpss-pas", .data = &sc7280_wpss_resource}, - { .compatible = "qcom,sc8180x-adsp-pas", .data = &sm8150_adsp_resource}, - { .compatible = "qcom,sc8180x-cdsp-pas", .data = &sm8150_cdsp_resource}, - { .compatible = "qcom,sc8180x-mpss-pas", .data = &sc8180x_mpss_resource}, - { .compatible = "qcom,sc8280xp-adsp-pas", .data = &sm8250_adsp_resource}, - { .compatible = "qcom,sc8280xp-nsp0-pas", .data = &sc8280xp_nsp0_resource}, - { .compatible = "qcom,sc8280xp-nsp1-pas", .data = &sc8280xp_nsp1_resource}, - { .compatible = "qcom,sdm660-adsp-pas", .data = &adsp_resource_init}, - { .compatible = "qcom,sdm660-cdsp-pas", .data = &cdsp_resource_init}, - { .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init}, - { .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init}, - { .compatible = "qcom,sdm845-slpi-pas", .data = &sdm845_slpi_resource_init}, - { .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource}, - { .compatible = "qcom,sdx75-mpss-pas", .data = &sm8650_mpss_resource}, - { .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init}, - { .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init}, - { .compatible = "qcom,sm6115-mpss-pas", .data = &sc8180x_mpss_resource}, - { .compatible = "qcom,sm6350-adsp-pas", .data = &sm6350_adsp_resource}, - { .compatible = "qcom,sm6350-cdsp-pas", .data = &sm6350_cdsp_resource}, - { .compatible = "qcom,sm6350-mpss-pas", .data = &mpss_resource_init}, - { .compatible = "qcom,sm6375-adsp-pas", .data = &sm6350_adsp_resource}, - { .compatible = "qcom,sm6375-cdsp-pas", .data = &sm8150_cdsp_resource}, - { .compatible = "qcom,sm6375-mpss-pas", .data = &sm6375_mpss_resource}, - { .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource}, - { .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource}, - { .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init}, - { .compatible = "qcom,sm8150-slpi-pas", .data = &sdm845_slpi_resource_init}, - { .compatible = "qcom,sm8250-adsp-pas", .data = &sm8250_adsp_resource}, - { .compatible = "qcom,sm8250-cdsp-pas", .data = &sm8250_cdsp_resource}, - { .compatible = "qcom,sm8250-slpi-pas", .data = &sdm845_slpi_resource_init}, - { .compatible = "qcom,sm8350-adsp-pas", .data = &sm8350_adsp_resource}, - { .compatible = "qcom,sm8350-cdsp-pas", .data = &sm8350_cdsp_resource}, - { .compatible = "qcom,sm8350-slpi-pas", .data = &sdm845_slpi_resource_init}, - { .compatible = "qcom,sm8350-mpss-pas", .data = &mpss_resource_init}, - { .compatible = "qcom,sm8450-adsp-pas", .data = &sm8350_adsp_resource}, - { .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource}, - { .compatible = "qcom,sm8450-slpi-pas", .data = &sdm845_slpi_resource_init}, - { .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource}, - { .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource}, - { .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource}, - { .compatible = "qcom,sm8550-mpss-pas", .data = &sm8550_mpss_resource}, - { .compatible = "qcom,sm8650-adsp-pas", .data = &sm8550_adsp_resource}, - { .compatible = "qcom,sm8650-cdsp-pas", .data = &sm8650_cdsp_resource}, - { .compatible = "qcom,sm8650-mpss-pas", .data = &sm8650_mpss_resource}, - { .compatible = "qcom,sm8750-mpss-pas", .data = &sm8750_mpss_resource}, - { .compatible = "qcom,x1e80100-adsp-pas", .data = &x1e80100_adsp_resource}, - { .compatible = "qcom,x1e80100-cdsp-pas", .data = &x1e80100_cdsp_resource}, + { .compatible = "qcom,sa8775p-adsp-pas", .data = &sa8775p_adsp_resource }, + { .compatible = "qcom,sa8775p-cdsp0-pas", .data = &sa8775p_cdsp0_resource }, + { .compatible = "qcom,sa8775p-cdsp1-pas", .data = &sa8775p_cdsp1_resource }, + { .compatible = "qcom,sa8775p-gpdsp0-pas", .data = &sa8775p_gpdsp0_resource }, + { .compatible = "qcom,sa8775p-gpdsp1-pas", .data = &sa8775p_gpdsp1_resource }, + { .compatible = "qcom,sar2130p-adsp-pas", .data = &sm8350_adsp_resource }, + { .compatible = "qcom,sc7180-adsp-pas", .data = &sm8250_adsp_resource }, + { .compatible = "qcom,sc7180-mpss-pas", .data = &mpss_resource_init }, + { .compatible = "qcom,sc7280-adsp-pas", .data = &sm8350_adsp_resource }, + { .compatible = "qcom,sc7280-cdsp-pas", .data = &sm6350_cdsp_resource }, + { .compatible = "qcom,sc7280-mpss-pas", .data = &mpss_resource_init }, + { .compatible = "qcom,sc7280-wpss-pas", .data = &sc7280_wpss_resource }, + { .compatible = "qcom,sc8180x-adsp-pas", .data = &sm8150_adsp_resource }, + { .compatible = "qcom,sc8180x-cdsp-pas", .data = &sm8150_cdsp_resource }, + { .compatible = "qcom,sc8180x-mpss-pas", .data = &sc8180x_mpss_resource }, + { .compatible = "qcom,sc8280xp-adsp-pas", .data = &sm8250_adsp_resource }, + { .compatible = "qcom,sc8280xp-nsp0-pas", .data = &sc8280xp_nsp0_resource }, + { .compatible = "qcom,sc8280xp-nsp1-pas", .data = &sc8280xp_nsp1_resource }, + { .compatible = "qcom,sdm660-adsp-pas", .data = &adsp_resource_init }, + { .compatible = "qcom,sdm660-cdsp-pas", .data = &cdsp_resource_init }, + { .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init }, + { .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init }, + { .compatible = "qcom,sdm845-slpi-pas", .data = &sdm845_slpi_resource_init }, + { .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource }, + { .compatible = "qcom,sdx75-mpss-pas", .data = &sm8650_mpss_resource }, + { .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init }, + { .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init }, + { .compatible = "qcom,sm6115-mpss-pas", .data = &sc8180x_mpss_resource }, + { .compatible = "qcom,sm6350-adsp-pas", .data = &sm6350_adsp_resource }, + { .compatible = "qcom,sm6350-cdsp-pas", .data = &sm6350_cdsp_resource }, + { .compatible = "qcom,sm6350-mpss-pas", .data = &mpss_resource_init }, + { .compatible = "qcom,sm6375-adsp-pas", .data = &sm6350_adsp_resource }, + { .compatible = "qcom,sm6375-cdsp-pas", .data = &sm8150_cdsp_resource }, + { .compatible = "qcom,sm6375-mpss-pas", .data = &sm6375_mpss_resource }, + { .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource }, + { .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource }, + { .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init }, + { .compatible = "qcom,sm8150-slpi-pas", .data = &sdm845_slpi_resource_init }, + { .compatible = "qcom,sm8250-adsp-pas", .data = &sm8250_adsp_resource }, + { .compatible = "qcom,sm8250-cdsp-pas", .data = &sm8250_cdsp_resource }, + { .compatible = "qcom,sm8250-slpi-pas", .data = &sdm845_slpi_resource_init }, + { .compatible = "qcom,sm8350-adsp-pas", .data = &sm8350_adsp_resource }, + { .compatible = "qcom,sm8350-cdsp-pas", .data = &sm8350_cdsp_resource }, + { .compatible = "qcom,sm8350-slpi-pas", .data = &sdm845_slpi_resource_init }, + { .compatible = "qcom,sm8350-mpss-pas", .data = &mpss_resource_init }, + { .compatible = "qcom,sm8450-adsp-pas", .data = &sm8350_adsp_resource }, + { .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource }, + { .compatible = "qcom,sm8450-slpi-pas", .data = &sdm845_slpi_resource_init }, + { .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource }, + { .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource }, + { .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource }, + { .compatible = "qcom,sm8550-mpss-pas", .data = &sm8550_mpss_resource }, + { .compatible = "qcom,sm8650-adsp-pas", .data = &sm8550_adsp_resource }, + { .compatible = "qcom,sm8650-cdsp-pas", .data = &sm8650_cdsp_resource }, + { .compatible = "qcom,sm8650-mpss-pas", .data = &sm8650_mpss_resource }, + { .compatible = "qcom,sm8750-mpss-pas", .data = &sm8750_mpss_resource }, + { .compatible = "qcom,x1e80100-adsp-pas", .data = &x1e80100_adsp_resource }, + { .compatible = "qcom,x1e80100-cdsp-pas", .data = &x1e80100_cdsp_resource }, { }, }; MODULE_DEVICE_TABLE(of, qcom_pas_of_match); From 7cf2f07f949c999f8c0349d1fa3f1f0e69854469 Mon Sep 17 00:00:00 2001 From: Abel Vesa Date: Fri, 27 Mar 2026 18:18:38 +0200 Subject: [PATCH 34/35] dt-bindings: remoteproc: qcom,milos-pas: Document Eliza ADSP Since the devicetree bindings are exactly the same between Eliza ADSP and Milos ADSP, reuse the existing Milos schema, just add the Eliza specific ADSP compatible. Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20260327-eliza-remoteproc-adsp-v1-1-1c46c5e5f809@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,milos-pas.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml index c47d97004b33..e5cce0d05fc6 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,milos-pas.yaml @@ -16,6 +16,7 @@ description: properties: compatible: enum: + - qcom,eliza-adsp-pas - qcom,milos-adsp-pas - qcom,milos-cdsp-pas - qcom,milos-mpss-pas @@ -69,6 +70,7 @@ allOf: properties: compatible: enum: + - qcom,eliza-adsp-pas - qcom,milos-adsp-pas - qcom,milos-cdsp-pas then: @@ -89,6 +91,7 @@ allOf: compatible: contains: enum: + - qcom,eliza-adsp-pas - qcom,milos-adsp-pas then: properties: From 56c1ec524284805da0181bc6e9ca656c0091b201 Mon Sep 17 00:00:00 2001 From: Abel Vesa Date: Fri, 27 Mar 2026 18:18:39 +0200 Subject: [PATCH 35/35] remoteproc: qcom: pas: Add Eliza ADSP support The ADSP found on Eliza SoC is similar to the one found on SM8550. So just add the dedicated compatible for Eliza ADSP and reuse the SM8550 resource configuration. Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20260327-eliza-remoteproc-adsp-v1-2-1c46c5e5f809@oss.qualcomm.com Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_pas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 46daa5c9ac3f..da27d1d3c9da 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -1531,6 +1531,7 @@ static const struct qcom_pas_data sm8750_mpss_resource = { }; static const struct of_device_id qcom_pas_of_match[] = { + { .compatible = "qcom,eliza-adsp-pas", .data = &sm8550_adsp_resource }, { .compatible = "qcom,milos-adsp-pas", .data = &sm8550_adsp_resource }, { .compatible = "qcom,milos-cdsp-pas", .data = &milos_cdsp_resource }, { .compatible = "qcom,milos-mpss-pas", .data = &sm8450_mpss_resource },