From: Stephan Gerhold <stephan.gerhold@linaro.org>
To: Luca Weiss <luca@lucaweiss.eu>
Cc: ~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org,
"Bjorn Andersson" <andersson@kernel.org>,
"Mathieu Poirier" <mathieu.poirier@linaro.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Matti Lehtimäki" <matti.lehtimaki@gmail.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: remoteproc: qcom,wcnss-pil: Add support for single power-domain platforms
Date: Thu, 30 Jan 2025 10:22:50 +0100 [thread overview]
Message-ID: <Z5tE6hrmVLUD5lLB@linaro.org> (raw)
In-Reply-To: <4981958.31r3eYUQgx@lucaweiss.eu>
On Wed, Jan 29, 2025 at 10:42:22PM +0100, Luca Weiss wrote:
> On woensdag 29 januari 2025 19:44:54 Midden-Europese standaardtijd Krzysztof
> Kozlowski wrote:
> > On 29/01/2025 18:51, Luca Weiss wrote:
> > > From: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> > >
> > > Support platforms such as MSM8226 and MSM8974 with only one power rail
> > > (CX) modelled as power domain while MX and PX are regulators.
> > >
> > > Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> > > [luca: reword commit message]
> > > Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> > > ---
> > > Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-
> pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
> > > index
> 8e033b22d28cfa8203234f744b3b408e976e20c3..d3c71bcf0f02122eb0dae214f135d8d7f71a9600
> 100644
> > > --- a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
> > > +++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
> > > @@ -69,9 +69,11 @@ properties:
> > > CX regulator to be held on behalf of the booting of the WCNSS core.
> > >
> > > power-domains:
> > > + minItems: 1
> > > maxItems: 2
> > >
> > > power-domain-names:
> > > + minItems: 1
> >
> >
> > This should be further narrowed in allOf:if:then per each variant,
> > because now you say that all devices here can have only one power
> > domain... unless the compatibles do not allow that, but then explain in
> > commit msg.
>
> Yes, the compatibles are so broad that they cannot be used to narrow this
> down. I can add this information in v2.
>
> I'd add something like the following. Let me know if that isn't clear enough.
>
> "Due to the compatibles qcom,pronto-vN-pil being so broad we cannot narrow
> this down by SoC without introducing new compatibles."
>
The qcom,pronto-v2-pil compatible isn't too broad here IMO. It describes
a specific hardware block that needs the CX and MX power domains to
operate. The hardware block doesn't care if the power rail is being
turned on via a regulator or power domain. At the end, this is a
firmware difference "leaking" into the hardware description of the DT.
We can describe this in the bindings. Both CX and MX must be present,
either as actual power domains or regulators. For the old setup (=
either PDs OR regulators, but not mixed) it's already there further
below. You need to adjust the part where vddmx-supply is marked as
deprecated, undeprecate it, and then try something like the following
(untested):
- if:
properties:
compatible:
contains:
enum:
- qcom,pronto-v1-pil
- qcom,pronto-v2-pil
# ... drop deprecations ...
# CX and MX must be present either as power domains or regulators
oneOf:
# Both CX and MX represented as power domains
- required:
- power-domains
- power-domain-names
properties:
vddmx-supply: false
vddcx-supply: false
# CX represented as power domain, MX as regulator
- required:
- power-domains
- power-domain-names
- vddmx-supply
properties:
# Not sure if this works here, might need to put minItems: 1
# into top-level and restrict entry above to minItems: 2
power-domains:
minItems: 1
maxItems: 1
power-domain-names:
minItems: 1
maxItems: 1
vddcx-supply: false
# Both CX and MX represented as regulators
- required:
- vddmx-supply
- vddcx-supply
properties:
power-domains: false
power-domain-names: false
Thanks,
Stephan
next prev parent reply other threads:[~2025-01-30 9:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 17:51 [PATCH 0/2] Support single-PD in wcnss driver Luca Weiss
2025-01-29 17:51 ` [PATCH 1/2] dt-bindings: remoteproc: qcom,wcnss-pil: Add support for single power-domain platforms Luca Weiss
2025-01-29 18:44 ` Krzysztof Kozlowski
2025-01-29 21:42 ` Luca Weiss
2025-01-30 9:22 ` Stephan Gerhold [this message]
2025-01-29 17:51 ` [PATCH 2/2] remoteproc: qcom_wcnss: Handle platforms with only single power domain Luca Weiss
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=Z5tE6hrmVLUD5lLB@linaro.org \
--to=stephan.gerhold@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=luca@lucaweiss.eu \
--cc=mathieu.poirier@linaro.org \
--cc=matti.lehtimaki@gmail.com \
--cc=phone-devel@vger.kernel.org \
--cc=robh@kernel.org \
--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).