From: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Sireesh Kodali <sireeshkodali1@gmail.com>,
Luca Weiss <luca@z3ntu.xyz>,
Stephan Gerhold <stephan@gerhold.net>,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
devicetree@vger.kernel.org,
Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Subject: [PATCH v3 7/7] remoteproc: qcom: q6v5-mss: Add modem support on MSM8953
Date: Wed, 31 Aug 2022 15:46:26 +0200 [thread overview]
Message-ID: <20220831134626.2803117-8-stephan.gerhold@kernkonzept.com> (raw)
In-Reply-To: <20220831134626.2803117-1-stephan.gerhold@kernkonzept.com>
From: Sireesh Kodali <sireeshkodali1@gmail.com>
The modem on the MSM8953 platform is similar to the modem on the MSM8996
platform in terms of set up. It differs primarily in that TZ needs to be
informed of the modem start address and pas_id.
Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>
Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
---
Changes in v3: Combine series with Sireesh's patches for MSM8953
---
drivers/remoteproc/qcom_q6v5_mss.c | 55 ++++++++++++++++++++++++++++--
1 file changed, 53 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 2555f06dfc74..2f4027664a0e 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -40,6 +40,8 @@
#define MBA_LOG_SIZE SZ_4K
+#define MPSS_PAS_ID 5
+
/* RMB Status Register Values */
#define RMB_PBL_SUCCESS 0x1
@@ -239,6 +241,7 @@ struct q6v5 {
enum {
MSS_MSM8909,
MSS_MSM8916,
+ MSS_MSM8953,
MSS_MSM8974,
MSS_MSM8996,
MSS_MSM8998,
@@ -692,10 +695,12 @@ static int q6v5proc_reset(struct q6v5 *qproc)
}
goto pbl_wait;
} else if (qproc->version == MSS_MSM8909 ||
+ qproc->version == MSS_MSM8953 ||
qproc->version == MSS_MSM8996 ||
qproc->version == MSS_MSM8998) {
- if (qproc->version != MSS_MSM8909)
+ if (qproc->version != MSS_MSM8909 &&
+ qproc->version != MSS_MSM8953)
/* Override the ACC value if required */
writel(QDSP6SS_ACC_OVERRIDE_VAL,
qproc->reg_base + QDSP6SS_STRAP_ACC);
@@ -743,7 +748,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_MSM8996) {
+ if (qproc->version == MSS_MSM8953 ||
+ qproc->version == MSS_MSM8996) {
mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL;
i = 19;
} else {
@@ -1365,6 +1371,15 @@ static int q6v5_mpss_load(struct q6v5 *qproc)
max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K);
}
+ if (qproc->version == MSS_MSM8953) {
+ ret = qcom_scm_pas_mem_setup(MPSS_PAS_ID, qproc->mpss_phys, qproc->mpss_size);
+ if (ret) {
+ dev_err(qproc->dev,
+ "setting up mpss memory failed: %d\n", ret);
+ goto release_firmware;
+ }
+ }
+
/*
* In case of a modem subsystem restart on secure devices, the modem
* memory can be reclaimed only after MBA is loaded.
@@ -2341,6 +2356,41 @@ static const struct rproc_hexagon_res msm8916_mss = {
.version = MSS_MSM8916,
};
+static const struct rproc_hexagon_res msm8953_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*[]) {
+ "cx",
+ "mx",
+ "mss",
+ NULL
+ },
+ .need_mem_protection = false,
+ .has_alt_reset = false,
+ .has_mba_logs = false,
+ .has_spare_reg = false,
+ .has_qaccept_regs = false,
+ .has_ext_cntl_regs = false,
+ .has_vq6 = false,
+ .version = MSS_MSM8953,
+};
+
static const struct rproc_hexagon_res msm8974_mss = {
.hexagon_mba_image = "mba.b00",
.proxy_supply = (struct qcom_mss_reg_res[]) {
@@ -2398,6 +2448,7 @@ static const struct of_device_id q6v5_of_match[] = {
{ .compatible = "qcom,q6v5-pil", .data = &msm8916_mss},
{ .compatible = "qcom,msm8909-mss-pil", .data = &msm8909_mss},
{ .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_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},
--
2.30.2
prev parent reply other threads:[~2022-08-31 15:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 13:46 [PATCH v3 0/7] remoteproc: qcom_q6v5_mss: Add MSM8909 and MSM8953 Stephan Gerhold
2022-08-31 13:46 ` [PATCH v3 1/7] arm64: dts: qcom: msm8916: Drop MSS fallback compatible Stephan Gerhold
2022-08-31 13:46 ` [PATCH v3 2/7] dt-bindings: remoteproc: qcom,q6v5: Move MSM8916 to schema Stephan Gerhold
2022-09-06 9:03 ` Krzysztof Kozlowski
2022-09-06 9:48 ` Krzysztof Kozlowski
2022-08-31 13:46 ` [PATCH v3 3/7] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8974 Stephan Gerhold
2022-09-08 9:48 ` Krzysztof Kozlowski
2022-08-31 13:46 ` [PATCH v3 4/7] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8909 Stephan Gerhold
2022-08-31 13:46 ` [PATCH v3 5/7] remoteproc: qcom_q6v5_mss: Add support for MSM8909 Stephan Gerhold
2022-08-31 13:46 ` [PATCH v3 6/7] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8953 Stephan Gerhold
2022-09-08 9:50 ` Krzysztof Kozlowski
2022-08-31 13:46 ` Stephan Gerhold [this message]
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=20220831134626.2803117-8-stephan.gerhold@kernkonzept.com \
--to=stephan.gerhold@kernkonzept.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=luca@z3ntu.xyz \
--cc=mathieu.poirier@linaro.org \
--cc=robh+dt@kernel.org \
--cc=sireeshkodali1@gmail.com \
--cc=stephan@gerhold.net \
/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;
as well as URLs for NNTP newsgroup(s).