Message ID | 20210827171534.62380-2-mark.kettenis@xs4all.nl (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Apple M1 PCIe DT bindings | expand |
> From: Mark Kettenis <mark.kettenis@xs4all.nl> > Date: Fri, 27 Aug 2021 19:15:26 +0200 > > From: Mark Kettenis <kettenis@openbsd.org> > > Split the MSI controller bindings from the MSI binding document > into DT schema format using json-schema. > > Signed-off-by: Mark Kettenis <kettenis@openbsd.org> > --- > .../interrupt-controller/msi-controller.yaml | 34 +++++++++++++++++++ > .../bindings/pci/brcm,stb-pcie.yaml | 1 + > .../bindings/pci/microchip,pcie-host.yaml | 1 + > 3 files changed, 36 insertions(+) > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > new file mode 100644 > index 000000000000..5ed6cd46e2e0 > --- /dev/null > +++ b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > @@ -0,0 +1,34 @@ > +# SPDX-License-Identifier: BSD-2-Clause Noticed that checkpatch complains that the preferred license for new binding schemas is (GPL-2.0-only OR BSD-2-Clause) so I'll fix that in the next version. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/interrupt-controller/msi-controller.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MSI controller > + > +maintainers: > + - Marc Zyngier <marc.zyngier@arm.com> > + > +description: | > + An MSI controller signals interrupts to a CPU when a write is made > + to an MMIO address by some master. An MSI controller may feature a > + number of doorbells. > + > +properties: > + "#msi-cells": > + description: | > + The number of cells in an msi-specifier, required if not zero. > + > + Typically this will encode information related to sideband data, > + and will not encode doorbells or payloads as these can be > + configured dynamically. > + > + The meaning of the msi-specifier is defined by the device tree > + binding of the specific MSI controller. > + > + msi-controller: > + description: > + Identifies the node as an MSI controller. > + $ref: /schemas/types.yaml#/definitions/flag > + > +additionalProperties: true > diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > index b9589a0daa5c..5c67976a8dc2 100644 > --- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > +++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > @@ -88,6 +88,7 @@ required: > > allOf: > - $ref: /schemas/pci/pci-bus.yaml# > + - $ref: ../interrupt-controller/msi-controller.yaml# > - if: > properties: > compatible: > diff --git a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > index fb95c276a986..684d9d036f48 100644 > --- a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > +++ b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > @@ -11,6 +11,7 @@ maintainers: > > allOf: > - $ref: /schemas/pci/pci-bus.yaml# > + - $ref: ../interrupt-controller/msi-controller.yaml# > > properties: > compatible: > -- > 2.32.0 > >
On Fri, Aug 27, 2021 at 07:15:26PM +0200, Mark Kettenis wrote: > From: Mark Kettenis <kettenis@openbsd.org> > > Split the MSI controller bindings from the MSI binding document > into DT schema format using json-schema. > > Signed-off-by: Mark Kettenis <kettenis@openbsd.org> > --- > .../interrupt-controller/msi-controller.yaml | 34 +++++++++++++++++++ > .../bindings/pci/brcm,stb-pcie.yaml | 1 + > .../bindings/pci/microchip,pcie-host.yaml | 1 + > 3 files changed, 36 insertions(+) > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > new file mode 100644 > index 000000000000..5ed6cd46e2e0 > --- /dev/null > +++ b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > @@ -0,0 +1,34 @@ > +# SPDX-License-Identifier: BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/interrupt-controller/msi-controller.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MSI controller > + > +maintainers: > + - Marc Zyngier <marc.zyngier@arm.com> > + > +description: | > + An MSI controller signals interrupts to a CPU when a write is made > + to an MMIO address by some master. An MSI controller may feature a > + number of doorbells. > + > +properties: > + "#msi-cells": > + description: | > + The number of cells in an msi-specifier, required if not zero. > + > + Typically this will encode information related to sideband data, > + and will not encode doorbells or payloads as these can be > + configured dynamically. > + > + The meaning of the msi-specifier is defined by the device tree > + binding of the specific MSI controller. I'd prefer we limit this to the maximum range. I'd like to know when someone needs 2 cells (or 3000). enum: [ 0, 1 ] Though no one seems to use 0 (making it optional was probably a mistake...) > + > + msi-controller: > + description: > + Identifies the node as an MSI controller. > + $ref: /schemas/types.yaml#/definitions/flag dependencies: "#msi-cells": [ msi-controller ] > + > +additionalProperties: true > diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > index b9589a0daa5c..5c67976a8dc2 100644 > --- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > +++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > @@ -88,6 +88,7 @@ required: > > allOf: > - $ref: /schemas/pci/pci-bus.yaml# > + - $ref: ../interrupt-controller/msi-controller.yaml# /schemas/interrupt-controller/msi-controller.yaml# > - if: > properties: > compatible: > diff --git a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > index fb95c276a986..684d9d036f48 100644 > --- a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > +++ b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > @@ -11,6 +11,7 @@ maintainers: > > allOf: > - $ref: /schemas/pci/pci-bus.yaml# > + - $ref: ../interrupt-controller/msi-controller.yaml# > > properties: > compatible: > -- > 2.32.0 > >
On Fri, Aug 27, 2021 at 07:15:26PM +0200, Mark Kettenis wrote: > From: Mark Kettenis <kettenis@openbsd.org> > > Split the MSI controller bindings from the MSI binding document > into DT schema format using json-schema. > > Signed-off-by: Mark Kettenis <kettenis@openbsd.org> > --- > .../interrupt-controller/msi-controller.yaml | 34 +++++++++++++++++++ > .../bindings/pci/brcm,stb-pcie.yaml | 1 + > .../bindings/pci/microchip,pcie-host.yaml | 1 + > 3 files changed, 36 insertions(+) > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > new file mode 100644 > index 000000000000..5ed6cd46e2e0 > --- /dev/null > +++ b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > @@ -0,0 +1,34 @@ > +# SPDX-License-Identifier: BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/interrupt-controller/msi-controller.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MSI controller > + > +maintainers: > + - Marc Zyngier <marc.zyngier@arm.com> Not the current email for Marc. > + > +description: | > + An MSI controller signals interrupts to a CPU when a write is made > + to an MMIO address by some master. An MSI controller may feature a > + number of doorbells. > + > +properties: > + "#msi-cells": > + description: | > + The number of cells in an msi-specifier, required if not zero. > + > + Typically this will encode information related to sideband data, > + and will not encode doorbells or payloads as these can be > + configured dynamically. > + > + The meaning of the msi-specifier is defined by the device tree > + binding of the specific MSI controller. > + > + msi-controller: > + description: > + Identifies the node as an MSI controller. > + $ref: /schemas/types.yaml#/definitions/flag > + > +additionalProperties: true > diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > index b9589a0daa5c..5c67976a8dc2 100644 > --- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > +++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > @@ -88,6 +88,7 @@ required: > > allOf: > - $ref: /schemas/pci/pci-bus.yaml# > + - $ref: ../interrupt-controller/msi-controller.yaml# > - if: > properties: > compatible: > diff --git a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > index fb95c276a986..684d9d036f48 100644 > --- a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > +++ b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > @@ -11,6 +11,7 @@ maintainers: > > allOf: > - $ref: /schemas/pci/pci-bus.yaml# > + - $ref: ../interrupt-controller/msi-controller.yaml# > > properties: > compatible: > -- > 2.32.0 > >
On Fri, Aug 27, 2021 at 09:15:11PM +0200, Mark Kettenis wrote: > > From: Mark Kettenis <mark.kettenis@xs4all.nl> > > Date: Fri, 27 Aug 2021 19:15:26 +0200 > > > > From: Mark Kettenis <kettenis@openbsd.org> > > > > Split the MSI controller bindings from the MSI binding document > > into DT schema format using json-schema. > > > > Signed-off-by: Mark Kettenis <kettenis@openbsd.org> > > --- > > .../interrupt-controller/msi-controller.yaml | 34 +++++++++++++++++++ > > .../bindings/pci/brcm,stb-pcie.yaml | 1 + > > .../bindings/pci/microchip,pcie-host.yaml | 1 + > > 3 files changed, 36 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > > > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > > new file mode 100644 > > index 000000000000..5ed6cd46e2e0 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > > @@ -0,0 +1,34 @@ > > +# SPDX-License-Identifier: BSD-2-Clause > > Noticed that checkpatch complains that the preferred license for new > binding schemas is (GPL-2.0-only OR BSD-2-Clause) so I'll fix that in > the next version. Yes, but the text you copied is default GPL-2.0, so you need the author's permission to add BSD license. However, as Mark Rutland wrote all of msi.txt for Arm Ltd, I can tell you dual licensing this is fine. Maybe it's so little to fall under fair use anyways, but IANAL. Rob
> Date: Tue, 31 Aug 2021 15:57:10 -0500 > From: Rob Herring <robh@kernel.org> > > On Fri, Aug 27, 2021 at 07:15:26PM +0200, Mark Kettenis wrote: > > From: Mark Kettenis <kettenis@openbsd.org> > > > > Split the MSI controller bindings from the MSI binding document > > into DT schema format using json-schema. > > > > Signed-off-by: Mark Kettenis <kettenis@openbsd.org> > > --- > > .../interrupt-controller/msi-controller.yaml | 34 +++++++++++++++++++ > > .../bindings/pci/brcm,stb-pcie.yaml | 1 + > > .../bindings/pci/microchip,pcie-host.yaml | 1 + > > 3 files changed, 36 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > > > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > > new file mode 100644 > > index 000000000000..5ed6cd46e2e0 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml > > @@ -0,0 +1,34 @@ > > +# SPDX-License-Identifier: BSD-2-Clause > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/interrupt-controller/msi-controller.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: MSI controller > > + > > +maintainers: > > + - Marc Zyngier <marc.zyngier@arm.com> > > + > > +description: | > > + An MSI controller signals interrupts to a CPU when a write is made > > + to an MMIO address by some master. An MSI controller may feature a > > + number of doorbells. > > + > > +properties: > > + "#msi-cells": > > + description: | > > + The number of cells in an msi-specifier, required if not zero. > > + > > + Typically this will encode information related to sideband data, > > + and will not encode doorbells or payloads as these can be > > + configured dynamically. > > + > > + The meaning of the msi-specifier is defined by the device tree > > + binding of the specific MSI controller. > > I'd prefer we limit this to the maximum range. I'd like to know when > someone needs 2 cells (or 3000). > > enum: [ 0, 1 ] > > Though no one seems to use 0 (making it optional was probably a > mistake...) > > > + > > + msi-controller: > > + description: > > + Identifies the node as an MSI controller. > > + $ref: /schemas/types.yaml#/definitions/flag > > dependencies: > "#msi-cells": [ msi-controller ] > > > + > > +additionalProperties: true > > diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > > index b9589a0daa5c..5c67976a8dc2 100644 > > --- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > > +++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml > > @@ -88,6 +88,7 @@ required: > > > > allOf: > > - $ref: /schemas/pci/pci-bus.yaml# > > + - $ref: ../interrupt-controller/msi-controller.yaml# > > /schemas/interrupt-controller/msi-controller.yaml# > > > - if: > > properties: > > compatible: > > diff --git a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > > index fb95c276a986..684d9d036f48 100644 > > --- a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > > +++ b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml > > @@ -11,6 +11,7 @@ maintainers: > > > > allOf: > > - $ref: /schemas/pci/pci-bus.yaml# > > + - $ref: ../interrupt-controller/msi-controller.yaml# > > > > properties: > > compatible: Thanks Rob. Makes sense to me, so I made these changes (and fixed Marc's mail address) for v5.
diff --git a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml new file mode 100644 index 000000000000..5ed6cd46e2e0 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/msi-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MSI controller + +maintainers: + - Marc Zyngier <marc.zyngier@arm.com> + +description: | + An MSI controller signals interrupts to a CPU when a write is made + to an MMIO address by some master. An MSI controller may feature a + number of doorbells. + +properties: + "#msi-cells": + description: | + The number of cells in an msi-specifier, required if not zero. + + Typically this will encode information related to sideband data, + and will not encode doorbells or payloads as these can be + configured dynamically. + + The meaning of the msi-specifier is defined by the device tree + binding of the specific MSI controller. + + msi-controller: + description: + Identifies the node as an MSI controller. + $ref: /schemas/types.yaml#/definitions/flag + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml index b9589a0daa5c..5c67976a8dc2 100644 --- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml @@ -88,6 +88,7 @@ required: allOf: - $ref: /schemas/pci/pci-bus.yaml# + - $ref: ../interrupt-controller/msi-controller.yaml# - if: properties: compatible: diff --git a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml index fb95c276a986..684d9d036f48 100644 --- a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml +++ b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml @@ -11,6 +11,7 @@ maintainers: allOf: - $ref: /schemas/pci/pci-bus.yaml# + - $ref: ../interrupt-controller/msi-controller.yaml# properties: compatible: