Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Andrew Halaney <ahalaney@redhat.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Johan Hovold <johan+linaro@kernel.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] soc: qcom: rpmhpd: add sc8280xp & sa8540p rpmh power-domains
Date: Wed, 27 Apr 2022 07:38:35 -0500	[thread overview]
Message-ID: <20220427123835.hmfdu66ut3uvvtjp@halaneylaptop> (raw)
In-Reply-To: <20220426233508.1762345-4-bjorn.andersson@linaro.org>

On Tue, Apr 26, 2022 at 04:35:08PM -0700, Bjorn Andersson wrote:
> The Qualcomm sc8280xp platform has 13 and the sa8540p platform has 11
> power-domains. Add compatibles, the typically used ones power-domains
> and their relevant active-only variants, to the RPMh power-domain
> driver.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> 
> Changes since v1:
> - Added QPHY
> - Split out sa8540
> - Sorted the entries alphabetically
> 
>  drivers/soc/qcom/rpmhpd.c | 53 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 53 insertions(+)
> 
> diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
> index f8d28e902942..05fff8691ee3 100644
> --- a/drivers/soc/qcom/rpmhpd.c
> +++ b/drivers/soc/qcom/rpmhpd.c
> @@ -180,6 +180,36 @@ static struct rpmhpd mxc_ao = {
>  	.res_name = "mxc.lvl",
>  };
>  
> +static struct rpmhpd nsp = {
> +	.pd = { .name = "nsp", },
> +	.res_name = "nsp.lvl",
> +};
> +
> +static struct rpmhpd qphy = {
> +	.pd = { .name = "qphy", },
> +	.res_name = "qphy.lvl",
> +};
> +
> +/* SA8540P RPMH powerdomains */
> +static struct rpmhpd *sa8540p_rpmhpds[] = {
> +	[SC8280XP_CX] = &cx,
> +	[SC8280XP_CX_AO] = &cx_ao,
> +	[SC8280XP_EBI] = &ebi,
> +	[SC8280XP_GFX] = &gfx,
> +	[SC8280XP_LCX] = &lcx,
> +	[SC8280XP_LMX] = &lmx,
> +	[SC8280XP_MMCX] = &mmcx,
> +	[SC8280XP_MMCX_AO] = &mmcx_ao,
> +	[SC8280XP_MX] = &mx,
> +	[SC8280XP_MX_AO] = &mx_ao,
> +	[SC8280XP_NSP] = &nsp,
> +};
> +
> +static const struct rpmhpd_desc sa8540p_desc = {
> +	.rpmhpds = sa8540p_rpmhpds,
> +	.num_pds = ARRAY_SIZE(sa8540p_rpmhpds),
> +};
> +
>  /* SDM845 RPMH powerdomains */
>  static struct rpmhpd *sdm845_rpmhpds[] = {
>  	[SDM845_CX] = &cx_w_mx_parent,
> @@ -378,10 +408,33 @@ static const struct rpmhpd_desc sc8180x_desc = {
>  	.num_pds = ARRAY_SIZE(sc8180x_rpmhpds),
>  };
>  
> +/* SC8280xp RPMH powerdomains */
> +static struct rpmhpd *sc8280xp_rpmhpds[] = {
> +	[SC8280XP_CX] = &cx,
> +	[SC8280XP_CX_AO] = &cx_ao,
> +	[SC8280XP_EBI] = &ebi,
> +	[SC8280XP_GFX] = &gfx,
> +	[SC8280XP_LCX] = &lcx,
> +	[SC8280XP_LMX] = &lmx,
> +	[SC8280XP_MMCX] = &mmcx,
> +	[SC8280XP_MMCX_AO] = &mmcx_ao,
> +	[SC8280XP_MX] = &mx,
> +	[SC8280XP_MX_AO] = &mx_ao,
> +	[SC8280XP_NSP] = &nsp,
> +	[SC8280XP_QPHY] = &qphy,
> +};

The commit messages mention sc8280xp having 13 power domains, but here I
only count 12. Good chance I'm just missing something obvious (not
familiar with using power domains or rpmh) but I thought I should
highlight it in case that was an error.

I attempted to find where this sort of thing is defined downstream, but
failed :(

Thanks,
Andrew

> +
> +static const struct rpmhpd_desc sc8280xp_desc = {
> +	.rpmhpds = sc8280xp_rpmhpds,
> +	.num_pds = ARRAY_SIZE(sc8280xp_rpmhpds),
> +};
> +
>  static const struct of_device_id rpmhpd_match_table[] = {
> +	{ .compatible = "qcom,sa8540p-rpmhpd", .data = &sa8540p_desc },
>  	{ .compatible = "qcom,sc7180-rpmhpd", .data = &sc7180_desc },
>  	{ .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc },
>  	{ .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc },
> +	{ .compatible = "qcom,sc8280xp-rpmhpd", .data = &sc8280xp_desc },
>  	{ .compatible = "qcom,sdm845-rpmhpd", .data = &sdm845_desc },
>  	{ .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc},
>  	{ .compatible = "qcom,sdx65-rpmhpd", .data = &sdx65_desc},
> -- 
> 2.35.1
> 


  reply	other threads:[~2022-04-27 12:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 23:35 [PATCH v2 0/3] soc: qcom: rpmhpd: Add sc8280xp and sa8540p Bjorn Andersson
2022-04-26 23:35 ` [PATCH v2 1/3] dt-bindings: power: rpmpd: Add sc8280xp RPMh power-domains Bjorn Andersson
2022-04-28  6:42   ` Krzysztof Kozlowski
2022-04-26 23:35 ` [PATCH v2 2/3] soc: qcom: rpmhpd: Don't warn about sparse rpmhpd arrays Bjorn Andersson
2022-04-26 23:35 ` [PATCH v2 3/3] soc: qcom: rpmhpd: add sc8280xp & sa8540p rpmh power-domains Bjorn Andersson
2022-04-27 12:38   ` Andrew Halaney [this message]
2022-04-28 15:48     ` Bjorn Andersson
2022-04-28 16:19       ` Andrew Halaney
2022-04-27  8:49 ` [PATCH v2 0/3] soc: qcom: rpmhpd: Add sc8280xp and sa8540p Johan Hovold
2022-05-04 17:21 ` Bjorn Andersson

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=20220427123835.hmfdu66ut3uvvtjp@halaneylaptop \
    --to=ahalaney@redhat.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=johan+linaro@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox