From: Rob Herring <robh@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: "Marek Behún" <kabel@kernel.org>,
devicetree@vger.kernel.org, PCI <linux-pci@vger.kernel.org>,
"Bjorn Helgaas" <helgaas@kernel.org>
Subject: Re: [PATCH dt + pci 1/2] dt-bindings: Add 'slot-power-limit-milliwatt' PCIe port property
Date: Wed, 5 Jan 2022 09:26:22 -0600 [thread overview]
Message-ID: <CAL_JsqL0mfRb7k4V-wjyGgjpB3pu88yPNT38k8zs-HoiVYaekQ@mail.gmail.com> (raw)
In-Reply-To: <20220105151410.wm5ti6kbjmvm5dwf@pali>
On Wed, Jan 5, 2022 at 9:14 AM Pali Rohár <pali@kernel.org> wrote:
>
> On Wednesday 05 January 2022 08:27:21 Rob Herring wrote:
> > On Wed, Jan 5, 2022 at 8:14 AM Marek Behún <kabel@kernel.org> wrote:
> > >
> > > On Fri, 12 Nov 2021 09:25:20 -0600
> > > Rob Herring <robh@kernel.org> wrote:
> > >
> > > > On Sun, Oct 31, 2021 at 04:07:05PM +0100, Marek Behún wrote:
> > > > > From: Pali Rohár <pali@kernel.org>
> > > > >
> > > > > This property specifies slot power limit in mW unit. It is a form-factor
> > > > > and board specific value and must be initialized by hardware.
> > > > >
> > > > > Some PCIe controllers delegate this work to software to allow hardware
> > > > > flexibility and therefore this property basically specifies what should
> > > > > host bridge program into PCIe Slot Capabilities registers.
> > > > >
> > > > > The property needs to be specified in mW unit instead of the special format
> > > > > defined by Slot Capabilities (which encodes scaling factor or different
> > > > > unit). Host drivers should convert the value from mW to needed format.
> > > > >
> > > > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > > > > Signed-off-by: Marek Behún <kabel@kernel.org>
> > > > > ---
> > > > > Documentation/devicetree/bindings/pci/pci.txt | 6 ++++++
> > > > > 1 file changed, 6 insertions(+)
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt
> > > > > index 6a8f2874a24d..7296d599c5ac 100644
> > > > > --- a/Documentation/devicetree/bindings/pci/pci.txt
> > > > > +++ b/Documentation/devicetree/bindings/pci/pci.txt
> > > > > @@ -32,6 +32,12 @@ driver implementation may support the following properties:
> > > > > root port to downstream device and host bridge drivers can do programming
> > > > > which depends on CLKREQ signal existence. For example, programming root port
> > > > > not to advertise ASPM L1 Sub-States support if there is no CLKREQ signal.
> > > > > +- slot-power-limit-miliwatt:
> > > >
> > > > Typo.
> > > >
> > > > But we shouldn't be adding to pci.txt. This needs to go in the
> > > > schema[1]. Patch to devicetree-spec list or GH PR is fine.
> > >
> > > Hello Rob,
> > >
> > > Pali's PR draft https://github.com/devicetree-org/dt-schema/pull/64
> > > looks like it's going to take some time to work out.
> > >
> > > In the meantime, is it possible to somehow get the
> > > slot-power-limit-milliwatt property merged into pci.txt so that we can start
> > > putting it into existing device-trees?
> > >
> > > Or would it break dt_bindings_check if it isn't put into dt-schema's
> > > pci-bus.yaml?
> > >
> > > Or should we simply put it into current version of pci-bus.yaml and
> > > work out the split proposed by Pali's PR afterwards?
> >
> > In the existing pci-bus.yaml is fine.
>
> Hello Rob! I do not think that it is possible to add this property
> correctly in to the existing pci-bus.yaml file. As this file is not
> prepared for slot properties. And I guess that adding new property at
> "random" place is against the idea of schema validation (that validation
> procedure accepts only valid DTS files).
The only issue I see is the property would be allowed in host bridge
nodes rather than only root port or PCIe-PCIe bridge nodes because the
current file is a mixture of all of those. I think a note that the
property is not valid in host bridge nodes would be sufficient. It's
still better than documenting in pci.txt.
Rob
next prev parent reply other threads:[~2022-01-05 15:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-31 15:07 [PATCH dt + pci 1/2] dt-bindings: Add 'slot-power-limit-milliwatt' PCIe port property Marek Behún
2021-10-31 15:07 ` [PATCH dt + pci 2/2] PCI: Add function for parsing `slot-power-limit-milliwatt` DT property Marek Behún
2022-01-07 18:04 ` Marek Behún
2022-01-07 21:17 ` Rob Herring
2022-01-12 22:08 ` Bjorn Helgaas
2022-01-12 22:28 ` Pali Rohár
2022-01-13 0:00 ` Bjorn Helgaas
2021-11-12 15:25 ` [PATCH dt + pci 1/2] dt-bindings: Add 'slot-power-limit-milliwatt' PCIe port property Rob Herring
2021-11-12 15:32 ` Pali Rohár
2021-11-12 16:30 ` Rob Herring
2021-11-12 17:12 ` Pali Rohár
2021-11-12 17:24 ` Marek Behún
2021-11-12 20:56 ` Rob Herring
2021-11-13 11:31 ` Pali Rohár
2021-11-16 21:31 ` Pali Rohár
2022-01-05 14:14 ` Marek Behún
2022-01-05 14:27 ` Rob Herring
2022-01-05 15:14 ` Pali Rohár
2022-01-05 15:26 ` Rob Herring [this message]
2022-01-05 15:36 ` Pali Rohár
2022-01-05 17:11 ` Marek Behún
2022-02-18 11:31 ` Pali Rohár
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=CAL_JsqL0mfRb7k4V-wjyGgjpB3pu88yPNT38k8zs-HoiVYaekQ@mail.gmail.com \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=helgaas@kernel.org \
--cc=kabel@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=pali@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).