devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Sireesh Kodali <sireeshkodali1@gmail.com>,
	linux-remoteproc@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	bjorn.andersson@linaro.org, devicetree@vger.kernel.org,
	phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Gross <agross@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>
Subject: Re: [PATCH 2/9] remoteproc: qcom: q6v5-mss: Add modem support on MSM8953
Date: Wed, 11 May 2022 19:54:40 +0300	[thread overview]
Message-ID: <1d43e1fa-30b2-dbf0-bfaf-f9cfaf987efb@linaro.org> (raw)
In-Reply-To: <20220511161602.117772-3-sireeshkodali1@gmail.com>

On 11/05/2022 19:15, Sireesh Kodali wrote:
> The modem on the MSM8953 platform is similar to the modem on the MSM8996
> platform in terms of set up. It differs primarily in the way it needs SCM
> to bless the MPSS firmware region.
> 
> Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>
> ---
>   drivers/remoteproc/qcom_q6v5_mss.c | 64 +++++++++++++++++++++++++++---
>   1 file changed, 58 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index af217de75e4d..a73fdcddeda4 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -234,6 +234,7 @@ struct q6v5 {
>   
>   enum {
>   	MSS_MSM8916,
> +	MSS_MSM8953,
>   	MSS_MSM8974,
>   	MSS_MSM8996,
>   	MSS_MSM8998,
> @@ -687,12 +688,14 @@ static int q6v5proc_reset(struct q6v5 *qproc)
>   		}
>   		goto pbl_wait;
>   	} else if (qproc->version == MSS_MSM8996 ||
> -		   qproc->version == MSS_MSM8998) {
> +		   qproc->version == MSS_MSM8998 ||
> +		   qproc->version == MSS_MSM8953) {
>   		int mem_pwr_ctl;
>   
>   		/* Override the ACC value if required */
> -		writel(QDSP6SS_ACC_OVERRIDE_VAL,
> -		       qproc->reg_base + QDSP6SS_STRAP_ACC);
> +		if (qproc->version != MSS_MSM8953)
> +			writel(QDSP6SS_ACC_OVERRIDE_VAL,
> +					qproc->reg_base + QDSP6SS_STRAP_ACC);
>   
>   		/* Assert resets, stop core */
>   		val = readl(qproc->reg_base + QDSP6SS_RESET_REG);
> @@ -734,7 +737,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_MSM8996 ||
> +			qproc->version == MSS_MSM8953) {
>   			mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL;
>   			i = 19;
>   		} else {
> @@ -1314,7 +1318,16 @@ 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(5, qproc->mpss_phys, qproc->mpss_size);
> +		if (ret) {
> +			dev_err(qproc->dev,
> +					"setting up mpss memory failed: %d\n", ret);
> +			goto release_firmware;
> +		}
> +	}
> +
> +	/**

Single star please

>   	 * In case of a modem subsystem restart on secure devices, the modem
>   	 * memory can be reclaimed only after MBA is loaded.
>   	 */
> @@ -1413,7 +1426,6 @@ static int q6v5_mpss_load(struct q6v5 *qproc)
>   			writel(RMB_CMD_LOAD_READY, qproc->rmb_base + RMB_MBA_COMMAND_REG);
>   		}
>   		writel(size, qproc->rmb_base + RMB_PMI_CODE_LENGTH_REG);
> -
>   		ret = readl(qproc->rmb_base + RMB_MBA_STATUS_REG);
>   		if (ret < 0) {
>   			dev_err(qproc->dev, "MPSS authentication failed: %d\n",
> @@ -1422,6 +1434,7 @@ static int q6v5_mpss_load(struct q6v5 *qproc)
>   		}
>   	}
>   
> +

Unnecessary


>   	/* Transfer ownership of modem ddr region to q6 */
>   	ret = q6v5_xfer_mem_ownership(qproc, &qproc->mpss_perm, false, true,
>   				      qproc->mpss_phys, qproc->mpss_size);
> @@ -2198,6 +2211,44 @@ static const struct rproc_hexagon_res msm8996_mss = {
>   	.version = MSS_MSM8996,
>   };
>   
> +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_pd_names = (char*[]) {
> +			"cx",
> +			"mx",
> +			NULL
> +	},
> +	.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
> +	},
> +	.need_mem_protection = false,
> +	.has_alt_reset = false,
> +	.has_spare_reg = false,


Please follow the custom  and define the rest of fields here.

> +	.version = MSS_MSM8953,
> +};
> +
>   static const struct rproc_hexagon_res msm8916_mss = {
>   	.hexagon_mba_image = "mba.mbn",
>   	.proxy_supply = (struct qcom_mss_reg_res[]) {
> @@ -2301,6 +2352,7 @@ static const struct of_device_id q6v5_of_match[] = {
>   	{ .compatible = "qcom,msm8916-mss-pil", .data = &msm8916_mss},
>   	{ .compatible = "qcom,msm8974-mss-pil", .data = &msm8974_mss},
>   	{ .compatible = "qcom,msm8996-mss-pil", .data = &msm8996_mss},
> +	{ .compatible = "qcom,msm8953-mss-pil", .data = &msm8953_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},


-- 
With best wishes
Dmitry

  reply	other threads:[~2022-05-11 16:54 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 16:15 [PATCH 0/9] Add support for remoteprocs on the MSM8953 platform Sireesh Kodali
2022-05-11 16:15 ` [PATCH 1/9] remoteproc: qcom: pas: Add MSM8953 ADSP PIL support Sireesh Kodali
2022-05-11 16:49   ` Dmitry Baryshkov
2022-05-11 16:51   ` Dmitry Baryshkov
2022-05-12 10:39     ` Sireesh Kodali
2022-05-11 16:15 ` [PATCH 2/9] remoteproc: qcom: q6v5-mss: Add modem support on MSM8953 Sireesh Kodali
2022-05-11 16:54   ` Dmitry Baryshkov [this message]
2022-05-12  5:16     ` Sireesh Kodali
2022-05-12 10:38     ` Sireesh Kodali
2022-05-11 16:15 ` [PATCH 3/9] remoteproc: qcom: qcom_wcnss: Add support for pronto-v3 Sireesh Kodali
2022-05-11 16:15 ` [PATCH 4/9] dt-bindings: remoteproc: qcom: wcnss: Convert to YAML Sireesh Kodali
2022-05-11 17:15   ` Krzysztof Kozlowski
2022-05-12  6:50     ` Sireesh Kodali
2022-05-12  8:14       ` Krzysztof Kozlowski
2022-05-12  9:32         ` Sireesh Kodali
2022-05-12 11:02           ` Krzysztof Kozlowski
2022-05-12 13:42             ` Sireesh Kodali
2022-05-12  8:36       ` Krzysztof Kozlowski
2022-05-12 10:01         ` Sireesh Kodali
2022-05-12 13:49   ` Rob Herring
2022-12-01 13:22   ` Krzysztof Kozlowski
2022-12-01 16:17     ` Sireesh Kodali
2022-12-01 16:24       ` Krzysztof Kozlowski
2022-05-11 16:15 ` [PATCH 5/9] dt-bindings: remoteproc: qcom: wcnss: Add compatible for pronto v3 Sireesh Kodali
2022-05-11 16:15 ` [PATCH 6/9] dt-bindings: remoteproc: qcom: mss: Convert bindings to YAML Sireesh Kodali
2022-05-11 17:50   ` Krzysztof Kozlowski
2022-05-12  9:50     ` Sireesh Kodali
2022-05-12 13:49   ` Rob Herring
2022-05-11 16:16 ` [PATCH 7/9] dt-bindings: remoteproc: qcom: mss: Add MSS on MSM8953 Sireesh Kodali
2022-05-11 16:16 ` [PATCH 8/9] dt-bindings: remoteproc: qcom: adsp: Add ADSP " Sireesh Kodali
2022-05-11 16:16 ` [PATCH 9/9] arm64: dts: qcom: msm8953: Add remote processor nodes Sireesh Kodali
2022-05-11 17:55   ` Krzysztof Kozlowski
2022-05-12  9:19     ` Sireesh Kodali
2022-05-12 14:37       ` Krzysztof Kozlowski
2022-05-12 15:15         ` Sireesh Kodali

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=1d43e1fa-30b2-dbf0-bfaf-f9cfaf987efb@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=sireeshkodali1@gmail.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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).