linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Anand Moon <linux.amoon@gmail.com>
Cc: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"open list:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS"
	<linux-pci@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"open list:TEGRA ARCHITECTURE SUPPORT"
	<linux-tegra@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/5] dt-bindings: PCI: Convert the existing nvidia,tegra-pcie.txt bindings documentation into a YAML schema
Date: Mon, 29 Sep 2025 08:48:46 -0500	[thread overview]
Message-ID: <CAL_JsqLsEDFv4T1ZMmjaoFfs7WNAjVvOk9o1eTXL2EeGF8uuDA@mail.gmail.com> (raw)
In-Reply-To: <CANAwSgT3jo35xBvkH4GmQcZuZH=D+SRKJ6e9fSBRz45zwuCmYw@mail.gmail.com>

On Mon, Sep 29, 2025 at 2:40 AM Anand Moon <linux.amoon@gmail.com> wrote:
>
> Hi Rob,
>
> Thanks for your review comments
>
> On Fri, 26 Sept 2025 at 19:26, Rob Herring <robh@kernel.org> wrote:
> >
> > On Fri, Sep 26, 2025 at 2:29 AM Anand Moon <linux.amoon@gmail.com> wrote:
> > >
> > > Convert the legacy text-based binding documentation for
> > > nvidia,tegra-pcie into a nvidia,tegra-pcie.yaml YAML schema, following
> >
> > s/YAML/DT/
> >
> Ok,
> > > the Devicetree Schema format. This improves validation coverage and enables
> > > dtbs_check compliance for Tegra PCIe nodes.
> >
> > Your subject needs some work too. 'existing' and 'bindings
> > documentation' are redundant.
> >
> Here is the simplified version
>
> dt-bindings: PCI: Convert the nvidia,tegra-pcie bindings documentation
> into a YAML schema

Still doesn't fit on one line and you say bindings twice:

dt-bindings: PCI: Convert nvidia,tegra-pcie to DT schema

>
> Convert the existing text-based DT bindings documentation for the
> NVIDIA Tegra PCIe host controller to a YAML schema format.

s/YAML/DT/

Lots of things are YAML. Only one thing is DT schema.

>
> > >
> > > Cc: Jon Hunter <jonathanh@nvidia.com>
> > > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > > ---
> > > v1: new patch in this series.
> > > ---
> > >  .../bindings/pci/nvidia,tegra-pcie.yaml       | 651 +++++++++++++++++
> > >  .../bindings/pci/nvidia,tegra20-pcie.txt      | 670 ------------------
> > >  2 files changed, 651 insertions(+), 670 deletions(-)
> > >  create mode 100644 Documentation/devicetree/bindings/pci/nvidia,tegra-pcie.yaml
> > >  delete mode 100644 Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra-pcie.yaml b/Documentation/devicetree/bindings/pci/nvidia,tegra-pcie.yaml
> > > new file mode 100644
> > > index 000000000000..dd8cba125b53
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/pci/nvidia,tegra-pcie.yaml
> > > @@ -0,0 +1,651 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/pci/nvidia,tegra-pcie.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: NVIDIA Tegra PCIe Controller
> > > +
> > > +maintainers:
> > > +  - Thierry Reding <thierry.reding@gmail.com>
> > > +  - Jon Hunter <jonathanh@nvidia.com>
> > > +
> > > +description: |
> >
> > Don't need '|'.
> >
> Ok
> > > +  PCIe controller found on NVIDIA Tegra SoCs including Tgra20, Tegra30,
> > > +  Tegra124, Tegra210, and Tegra186. Supports multiple root ports and
> > > +  platform-specific clock, reset, and power supply configurations.
> >
> > I would suggest not listing every SoC here unless the list is not going to grow.
> >
> Here is the short format.
>   PCIe controller found on NVIDIA Tegra SoCs which supports multiple
>   root ports and platform-specific clock, reset, and power supply
>   configurations.
> Ok
> > > +
> > > +properties:
> > > +  compatible:
> > > +    oneOf:
> >
> > Only 1 entry here, don't need 'oneOf'.
>
> I am observing the following warning if I remove this.
>
>  make ARCH=arm64 -j$(nproc) dt_binding_check
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/pci/nvidia,tegra-pcie.yaml
>   CHKDT   ./Documentation/devicetree/bindings
> /media/nvme0/mainline/linux-tegra-6.y-devel/Documentation/devicetree/bindings/pci/nvidia,tegra-pcie.yaml:
> properties:compatible: [{'items': [{'enum': ['nvidia,tegra20-pcie',
> 'nvidia,tegra30-pcie', 'nvidia,tegra124-pcie', 'nvidia,tegra210-pcie',
> 'nvidia,tegra186-pcie']}]}] is not of type 'object', 'boolean'

Because you made 'compatible' a list rather than a schema/map/dict.
IOW, You need to remove the '-' as well.


> > > +  nvidia,num-lanes:
> > > +    description: Number of PCIe lanes used
> > > +    $ref: /schemas/types.yaml#/definitions/uint32
> >
> > The examples show this in child nodes.
> yes it patternProperties example I missed this.
>
> patternProperties:
>   "^pci@[0-9a-f]+$":
>     type: object
>
>     properties:
>       reg:
>         maxItems: 1
>
>       nvidia,num-lanes:
>         description: Number of PCIe lanes used
>         $ref: /schemas/types.yaml#/definitions/uint32
>         minimum: 1
>
>     unevaluatedProperties: false

What about all the other properties in the child nodes? You need a
$ref to pci-pci-bridge.yaml as well.

Rob

  reply	other threads:[~2025-09-29 13:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26  7:27 [PATCH v1 0/5] PCI: tegra: A couple of cleanups Anand Moon
2025-09-26  7:27 ` [PATCH v1 1/5] dt-bindings: PCI: Convert the existing nvidia,tegra-pcie.txt bindings documentation into a YAML schema Anand Moon
2025-09-26 13:56   ` Rob Herring
2025-09-29  7:39     ` Anand Moon
2025-09-29 13:48       ` Rob Herring [this message]
2025-09-29 15:25         ` Anand Moon
2025-09-30 14:37           ` Rob Herring
2025-09-30 16:32             ` Anand Moon
2025-10-01 15:33               ` Rob Herring
2025-10-01 18:57                 ` Anand Moon
2025-09-26  7:27 ` [PATCH v1 2/5] PCI: tegra: Simplify clock handling by using clk_bulk*() functions Anand Moon
2025-09-26 18:12   ` Frank Li
2025-09-27  5:50     ` Anand Moon
2025-09-29 14:01       ` Manivannan Sadhasivam
2025-09-29 16:12         ` Anand Moon
2025-09-26  7:27 ` [PATCH v1 3/5] PCI: tegra: Use readl_poll_timeout() for link status polling Anand Moon
2025-10-19  7:50   ` Manivannan Sadhasivam
2025-10-20 12:17     ` Anand Moon
2025-10-21  1:43       ` Manivannan Sadhasivam
2025-10-24  6:17         ` Anand Moon
2025-09-26  7:27 ` [PATCH v1 4/5] PCI: tegra: Use BIT() and GENMASK() macros for register definitions Anand Moon
2025-09-26  7:27 ` [PATCH v1 5/5] PCI: tegra: Document map_lock and mask_lock usage Anand Moon

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_JsqLsEDFv4T1ZMmjaoFfs7WNAjVvOk9o1eTXL2EeGF8uuDA@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=thierry.reding@gmail.com \
    /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).