On Wed, May 26, 2021 at 9:09 AM Nishanth Menon <nm@xxxxxx> wrote: > > On 19:17-20210526, Kishon Vijay Abraham I wrote: > > Convert PCIe host/endpoint mode dt-bindings for TI's AM65/Keystone SoC > > to YAML binding. > > > > Signed-off-by: Kishon Vijay Abraham I <kishon@xxxxxx> > > [...] > > diff --git a/Documentation/devicetree/bindings/pci/ti,am65-pci-ep.yaml b/Documentation/devicetree/bindings/pci/ti,am65-pci-ep.yaml > > new file mode 100644 > > index 000000000000..419d48528105 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/pci/ti,am65-pci-ep.yaml > > @@ -0,0 +1,80 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +# Copyright (C) 2021 Texas Instruments Incorporated - http://www.ti.com/ > > +%YAML 1.2 > > +--- > > +$id: "http://devicetree.org/schemas/pci/ti,am65-pci-ep.yaml#" > > drop the '"'? Yes, though we haven't been consistent here... > > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > > drop the '"'? > > + > > +title: TI AM65 PCI Endpoint > > + > > +maintainers: > > + - Kishon Vijay Abraham I <kishon@xxxxxx> > > + > > +allOf: > > + - $ref: "pci-ep.yaml#" > > drop the '"' ? > > > + > > +properties: > > + compatible: > > + enum: > > + - ti,am654-pcie-ep > > + > > + reg: > > + maxItems: 4 > > + > > + reg-names: > > + items: > > + - const: app > > + - const: dbics > > + - const: addr_space > > + - const: atu > > + > > + power-domains: > > + maxItems: 1 > > + > > + ti,syscon-pcie-mode: > > + description: Phandle to the SYSCON entry required for configuring PCIe in RC or EP mode. > > + $ref: /schemas/types.yaml#/definitions/phandle > > + > > + interrupts: > > + minItems: 1 > > + > > + dma-coherent: true > > + > > +required: > > + - compatible > > + - reg > > + - reg-names > > + - max-link-speed > > + - power-domains > > + - ti,syscon-pcie-mode > > + - dma-coherent > > + > > +unevaluatedProperties: false > > Is it possible to lock this down further with additionalProperties: false? unevaluatedProperties is what we want here. > I could add some ridiculous property like system-controller; to the > example and the checks wont catch it. Yes, because unevaluatedProperties is currently unimplemented. Once the upstream jsonschema tool supports it[1], there will be warnings. The other way we could address this is there are $ref resolving tools that flatten schemas. Rob [1] https://github.com/Julian/jsonschema/issues/613#issuecomment-636026577