devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Johan Hovold <johan@kernel.org>
Cc: Rajendra Nayak <rnayak@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RESEND 2/2] soc: qcom: rpmhpd: add sc8280xp rpmh power-domains
Date: Tue, 12 Apr 2022 10:16:10 -0500	[thread overview]
Message-ID: <YlWXuiHZQXHBXz6F@builder.lan> (raw)
In-Reply-To: <YlQtfu5K9IeJLPcS@hovoldconsulting.com>

On Mon 11 Apr 08:30 CDT 2022, Johan Hovold wrote:

> On Thu, Feb 24, 2022 at 09:43:45PM -0800, Bjorn Andersson wrote:
> > The Qualcomm sc8280xp platform has 8 power-domains. Add these, and their
> > relevant active-only variants, to the RPMh power-domain driver.
> 
> As we discussed off-list, the sc8280xp apparently has 13 domains. Guess
> the commit message should be updated even if you don't expose all of
> these to Linux.
> 

Thanks for spotting that, I will update the patch and rewrite the commit
message accordingly.

> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > ---
> >  drivers/soc/qcom/rpmhpd.c | 26 ++++++++++++++++++++++++++
> >  1 file changed, 26 insertions(+)
> > 
> > diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
> > index 58f1dc9b9cb7..71602eb824f7 100644
> > --- a/drivers/soc/qcom/rpmhpd.c
> > +++ b/drivers/soc/qcom/rpmhpd.c
> > @@ -180,6 +180,11 @@ static struct rpmhpd mxc_ao = {
> >  	.res_name = "mxc.lvl",
> >  };
> >  
> > +static struct rpmhpd nsp = {
> > +	.pd = { .name = "nsp", },
> > +	.res_name = "nsp.lvl",
> > +};
> > +
> >  /* SDM845 RPMH powerdomains */
> >  static struct rpmhpd *sdm845_rpmhpds[] = {
> >  	[SDM845_CX] = &cx_w_mx_parent,
> > @@ -363,10 +368,31 @@ 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_MX] = &mx,
> > +	[SC8280XP_MX_AO] = &mx_ao,
> > +	[SC8280XP_EBI] = &ebi,
> > +	[SC8280XP_LCX] = &lcx,
> > +	[SC8280XP_LMX] = &lmx,
> > +	[SC8280XP_GFX] = &gfx,
> > +	[SC8280XP_MMCX] = &mmcx,
> > +	[SC8280XP_MMCX_AO] = &mmcx_ao,
> > +	[SC8280XP_NSP] = &nsp,
> > +};
> 
> Commit 90c74c1c2574 ("soc: qcom: rpmhpd: Sort power-domain definitions
> and lists") recently sorted the other arrays. Sorting by address like
> you've implicitly done here makes it easy to compare with the firmware
> interface, but perhaps you want to sort alphabetically for consistency.
> 

I like consistency.

> Since there apparently are no users for active-only domains in the tree,
> perhaps they can also be added later.
> 

I'll take an extra look at this as well. Seems we do cx, mx and mmcx ao
on the other platforms, but question is if that's only because we do it
on previous platforms...

Thanks for the review,
Bjorn

> > +
> > +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,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,sm6350-rpmhpd", .data = &sm6350_desc },
> 
> Johan

      reply	other threads:[~2022-04-12 15:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25  5:43 [RESEND 1/2] dt-bindings: power: rpmpd: Add sc8280xp RPMh power-domains Bjorn Andersson
2022-02-25  5:43 ` [RESEND 2/2] soc: qcom: rpmhpd: add sc8280xp rpmh power-domains Bjorn Andersson
2022-04-11 13:30   ` Johan Hovold
2022-04-12 15:16     ` Bjorn Andersson [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=YlWXuiHZQXHBXz6F@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=johan@kernel.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rnayak@codeaurora.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;
as well as URLs for NNTP newsgroup(s).