[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YmB9NxyFdxWAvlPr@robh.at.kernel.org>
Date: Wed, 20 Apr 2022 16:37:59 -0500
From: Rob Herring <robh@...nel.org>
To: Herve Codina <herve.codina@...tlin.com>
Cc: Marek Vasut <marek.vasut+renesas@...il.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Krzysztof WilczyĆski <kw@...ux.com>,
linux-pci@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Sergey Shtylyov <s.shtylyov@....ru>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Clement Leger <clement.leger@...tlin.com>,
Miquel Raynal <miquel.raynal@...tlin.com>
Subject: Re: [PATCH v2 2/8] dt-bindings: PCI: renesas-pci-usb: Convert
bindings to json-schema
On Wed, Apr 20, 2022 at 03:46:11PM +0200, Herve Codina wrote:
> Hi Rob,
>
> On Wed, 20 Apr 2022 08:18:50 -0500
> Rob Herring <robh@...nel.org> wrote:
>
> ...
>
> > > > > + bus-range:
> > > > > + description: |
> > > > > + The PCI bus number range; as this is a single bus, the range
> > > > > + should be specified as the same value twice.
> > > >
> > > > items:
> > > > const: 0
> > >
> > > Well, some other values are present in some dtsi files such as
> > > 'bus_range = <1 1>;' or 'bus_range = <2 2>;' in r8a7742.dtsi.
> > >
> > > The constraint is to have the same value twice. Is there a way
> > > to specify this constraint ?
> >
> > Yes, but probably not worthwhile. Just drop it as pci-bus.yaml already
> > defines it.
>
> Instead of fully dropping the property, don't you think that keeping
> the given description here can be a way to express that the same value
> is needed twice ?
Yeah, that's fine.
> > > > > + "#address-cells":
> > > > > + const: 3
> > > > > +
> > > > > + "#size-cells":
> > > > > + const: 2
> > > > > +
> > > > > + "#interrupt-cells":
> > > > > + const: 1
> > > >
> > > > All these are defined by pci-bus.yaml
> > >
> > > Right.
> > > Replaced by:
> > >
> > > "#address-cells": true
> > > "#size-cells": true
> > > "#interrupt-cells": true
> > >
> > > Is that correct ?
> >
> > You can just drop them completely.
>
> Ok for #address-cells and #size-cells but not for #interrupt-cells.
>
> Dropping #interrupt-cells makes 'make dtbindings_check' unhappy:
> --- 8< ---
> $ make dt_binding_check DT_SCHEMA_FILES=renesas,pci-rcar-gen2.yaml
> LINT Documentation/devicetree/bindings
> CHKDT Documentation/devicetree/bindings/processed-schema.json
> /home/hcodina/xxx/Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml: properties: '#interrupt-cells' is a dependency of 'interrupt-map'
> from schema $id: http://devicetree.org/meta-schemas/interrupts.yaml#
> SCHEMA Documentation/devicetree/bindings/processed-schema.json
> /home/hcodina/xxx/Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml: ignoring, error in schema: properties
> DTEX Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.example.dts
> DTC Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.example.dtb
> CHECK Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.example.dtb
> $
> --- 8< ---
>
> So I keep
> "#interrupt-cells": true
You should also drop 'interrupt-map' and 'interrupt-map-mask'.
Rob
Powered by blists - more mailing lists