Squash warnings such as:
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dtb: /ahb/interrupt-controller@1e6c0080: failed to match any schema with compatible: ['aspeed,ast2400-vic']
The YAML DT schema defines an optional property, valid-sources, which
was not previously described in the prose binding. It is added to
document existing practice in the Aspeed devicetrees. Unfortunately
the property seems to predate the requirement that vendor-specific
properties be prefixed.
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
---
.../interrupt-controller/aspeed,ast2400-vic.txt | 23 --------
.../interrupt-controller/aspeed,ast2400-vic.yaml | 63 ++++++++++++++++++++++
2 files changed, 63 insertions(+), 23 deletions(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2400-vic.txt b/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2400-vic.txt
deleted file mode 100644
index e3fea0758d25..000000000000
--- a/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2400-vic.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Aspeed Vectored Interrupt Controller
-
-These bindings are for the Aspeed interrupt controller. The AST2400 and
-AST2500 SoC families include a legacy register layout before a re-designed
-layout, but the bindings do not prescribe the use of one or the other.
-
-Required properties:
-
-- compatible : "aspeed,ast2400-vic"
- "aspeed,ast2500-vic"
-
-- interrupt-controller : Identifies the node as an interrupt controller
-- #interrupt-cells : Specifies the number of cells needed to encode an
- interrupt source. The value shall be 1.
-
-Example:
-
- vic: interrupt-controller@1e6c0080 {
- compatible = "aspeed,ast2400-vic";
- interrupt-controller;
- #interrupt-cells = <1>;
- reg = <0x1e6c0080 0x80>;
- };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2400-vic.yaml b/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2400-vic.yaml
new file mode 100644
index 000000000000..1ecbc55571e2
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2400-vic.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/aspeed,ast2400-vic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Aspeed Vectored Interrupt Controller
+
+maintainers:
+ - Andrew Jeffery <andrew@codeconstruct.com.au>
+
+description:
+ The AST2400 and AST2500 SoC families include a legacy register layout before
+ a redesigned layout, but the bindings do not prescribe the use of one or the
+ other.
+
+properties:
+ compatible:
+ enum:
+ - aspeed,ast2400-vic
+ - aspeed,ast2500-vic
+
+ interrupt-controller: true
+
+ "#interrupt-cells":
+ const: 1
+ description:
+ Specifies the number of cells needed to encode an interrupt source. It
+ must be 1 as the VIC has no configuration options for interrupt sources.
+ The single cell defines the interrupt number.
+
+ valid-sources:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description:
+ One cell, bitmap of support sources for the implementation.
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupt-controller
+ - "#interrupt-cells"
+
+allOf:
+ - $ref: /schemas/interrupt-controller.yaml
+
+additionalProperties: false
+
+examples:
+ - |
+ interrupt-controller@1e6c0080 {
+ compatible = "aspeed,ast2400-vic";
+ reg = <0x1e6c0080 0x80>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+
+...
--
2.39.2
On 02/08/2024 07:36, Andrew Jeffery wrote:
> Squash warnings such as:
>
> arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dtb: /ahb/interrupt-controller@1e6c0080: failed to match any schema with compatible: ['aspeed,ast2400-vic']
>
> The YAML DT schema defines an optional property, valid-sources, which
> was not previously described in the prose binding. It is added to
> document existing practice in the Aspeed devicetrees. Unfortunately
> the property seems to predate the requirement that vendor-specific
> properties be prefixed.
>
> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
> +
> +description:
> + The AST2400 and AST2500 SoC families include a legacy register layout before
> + a redesigned layout, but the bindings do not prescribe the use of one or the
> + other.
> +
> +properties:
> + compatible:
> + enum:
> + - aspeed,ast2400-vic
> + - aspeed,ast2500-vic
> +
> + interrupt-controller: true
> +
> + "#interrupt-cells":
> + const: 1
> + description:
> + Specifies the number of cells needed to encode an interrupt source. It
> + must be 1 as the VIC has no configuration options for interrupt sources.
> + The single cell defines the interrupt number.
> +
> + valid-sources:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + description:
> + One cell, bitmap of support sources for the implementation.
maxItems: 2
What does "one cell" mean? uint32? DTS has two items.
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
Is this correct? DTS does not have parent interrupt controller for this
device.
> +
> +required:
> + - compatible
> + - reg
> + - interrupt-controller
> + - "#interrupt-cells"
> +
> +allOf:
> + - $ref: /schemas/interrupt-controller.yaml
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + interrupt-controller@1e6c0080 {
> + compatible = "aspeed,ast2400-vic";
> + reg = <0x1e6c0080 0x80>;
> + interrupt-controller;
> + #interrupt-cells = <1>;
Make the example complete - add valid-sources interupts.
Best regards,
Krzysztof
On Tue, 2024-08-06 at 08:07 +0200, Krzysztof Kozlowski wrote:
> On 02/08/2024 07:36, Andrew Jeffery wrote:
> > Squash warnings such as:
> >
> > arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dtb: /ahb/interrupt-controller@1e6c0080: failed to match any schema with compatible: ['aspeed,ast2400-vic']
> >
> > The YAML DT schema defines an optional property, valid-sources, which
> > was not previously described in the prose binding. It is added to
> > document existing practice in the Aspeed devicetrees. Unfortunately
> > the property seems to predate the requirement that vendor-specific
> > properties be prefixed.
> >
> > Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
>
>
> > +
> > +description:
> > + The AST2400 and AST2500 SoC families include a legacy register layout before
> > + a redesigned layout, but the bindings do not prescribe the use of one or the
> > + other.
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - aspeed,ast2400-vic
> > + - aspeed,ast2500-vic
> > +
> > + interrupt-controller: true
> > +
> > + "#interrupt-cells":
> > + const: 1
> > + description:
> > + Specifies the number of cells needed to encode an interrupt source. It
> > + must be 1 as the VIC has no configuration options for interrupt sources.
> > + The single cell defines the interrupt number.
> > +
> > + valid-sources:
> > + $ref: /schemas/types.yaml#/definitions/uint32-array
> > + description:
> > + One cell, bitmap of support sources for the implementation.
>
> maxItems: 2
Ack.
> What does "one cell" mean? uint32? DTS has two items.
Hah, I think that was a process error :) Two is correct here. I'll
rework the description.
>
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
>
> Is this correct? DTS does not have parent interrupt controller for this
> device.
I'll removed it, it's not necessary.
>
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupt-controller
> > + - "#interrupt-cells"
> > +
> > +allOf:
> > + - $ref: /schemas/interrupt-controller.yaml
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + interrupt-controller@1e6c0080 {
> > + compatible = "aspeed,ast2400-vic";
> > + reg = <0x1e6c0080 0x80>;
> > + interrupt-controller;
> > + #interrupt-cells = <1>;
>
> Make the example complete - add valid-sources interupts.
>
Ack.
Thanks for the review.
Andrew
© 2016 - 2026 Red Hat, Inc.