Message ID | 20211206182616.2089677-10-f.fainelli@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Broadcom DT bindings updates to YAML | expand |
On Mon, 06 Dec 2021 10:26:11 -0800, Florian Fainelli wrote: > Convert the Broadcom STB L2 generic Level 2 interrupt controller Device > Tree binding to YAML to help with validation. > > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> > --- > .../interrupt-controller/brcm,l2-intc.txt | 31 --------- > .../interrupt-controller/brcm,l2-intc.yaml | 64 +++++++++++++++++++ > 2 files changed, 64 insertions(+), 31 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.yaml > Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if they are expected or the schema is incorrect. These may not be new warnings. Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future. Full log is available here: https://patchwork.ozlabs.org/patch/1564135 interrupt-controller@3e1000: 'interrupt-names' does not match any of the regexes: 'pinctrl-[0-9]+' arch/arm/boot/dts/bcm7445-bcm97445svmb.dt.yaml interrupt-controller@7ef00100: compatible: 'oneOf' conditional failed, one must be fixed: arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dt.yaml arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dt.yaml arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dt.yaml arch/arm/boot/dts/bcm2711-rpi-400.dt.yaml arch/arm/boot/dts/bcm2711-rpi-4-b.dt.yaml arch/arm/boot/dts/bcm2711-rpi-cm4-io.dt.yaml
On 12/7/21 6:58 AM, Rob Herring wrote: > On Mon, 06 Dec 2021 10:26:11 -0800, Florian Fainelli wrote: >> Convert the Broadcom STB L2 generic Level 2 interrupt controller Device >> Tree binding to YAML to help with validation. >> >> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> >> --- >> .../interrupt-controller/brcm,l2-intc.txt | 31 --------- >> .../interrupt-controller/brcm,l2-intc.yaml | 64 +++++++++++++++++++ >> 2 files changed, 64 insertions(+), 31 deletions(-) >> delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt >> create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.yaml >> > > Running 'make dtbs_check' with the schema in this patch gives the > following warnings. Consider if they are expected or the schema is > incorrect. These may not be new warnings. > > Note that it is not yet a requirement to have 0 warnings for dtbs_check. > This will change in the future. > > Full log is available here: https://patchwork.ozlabs.org/patch/1564135 > > > interrupt-controller@3e1000: 'interrupt-names' does not match any of the regexes: 'pinctrl-[0-9]+' > arch/arm/boot/dts/bcm7445-bcm97445svmb.dt.yaml > > interrupt-controller@7ef00100: compatible: 'oneOf' conditional failed, one must be fixed: > arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dt.yaml > arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dt.yaml > arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dt.yaml > arch/arm/boot/dts/bcm2711-rpi-400.dt.yaml > arch/arm/boot/dts/bcm2711-rpi-4-b.dt.yaml > arch/arm/boot/dts/bcm2711-rpi-cm4-io.dt.yaml Both fixed in v3.
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt deleted file mode 100644 index 021cf822395c..000000000000 --- a/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt +++ /dev/null @@ -1,31 +0,0 @@ -Broadcom Generic Level 2 Interrupt Controller - -Required properties: - -- compatible: should be one of: - "brcm,hif-spi-l2-intc" or - "brcm,upg-aux-aon-l2-intc" or - "brcm,l2-intc" for latched interrupt controllers - should be "brcm,bcm7271-l2-intc" for level interrupt controllers -- reg: specifies the base physical address and size of the registers -- interrupt-controller: identifies the node as an interrupt controller -- #interrupt-cells: specifies the number of cells needed to encode an - interrupt source. Should be 1. -- interrupts: specifies the interrupt line in the interrupt-parent irq space - to be used for cascading - -Optional properties: - -- brcm,irq-can-wake: If present, this means the L2 controller can be used as a - wakeup source for system suspend/resume. - -Example: - -hif_intr2_intc: interrupt-controller@f0441000 { - compatible = "brcm,l2-intc"; - reg = <0xf0441000 0x30>; - interrupt-controller; - #interrupt-cells = <1>; - interrupt-parent = <&intc>; - interrupts = <0x0 0x20 0x0>; -}; diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.yaml new file mode 100644 index 000000000000..b1e812e7c714 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/brcm,l2-intc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom Generic Level 2 Interrupt Controller + +maintainers: + - Florian Fainelli <f.fainelli@gmail.com> + +allOf: + - $ref: /schemas/interrupt-controller.yaml# + +properties: + compatible: + oneOf: + - items: + - enum: + - brcm,hif-spi-l2-intc + - brcm,upg-aux-aon-l2-intc + - const: brcm,l2-intc + - items: + - const: brcm,bcm7271-l2-intc + - items: + - const: brcm,l2-intc + + reg: + maxItems: 1 + description: > + Specifies the base physical address and size of the registers + + interrupt-controller: true + + "#interrupt-cells": + const: 1 + + interrupts: true + + brcm,irq-can-wake: + type: boolean + description: > + If present, this means the L2 controller can be used as a wakeup source + for system suspend/resume. + +additionalProperties: false + +required: + - compatible + - reg + - interrupt-controller + - "#interrupt-cells" + - interrupts + +examples: + - | + hif_intr2_intc: interrupt-controller@f0441000 { + compatible = "brcm,l2-intc"; + reg = <0xf0441000 0x30>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&intc>; + interrupts = <0x0 0x20 0x0>; + };
Convert the Broadcom STB L2 generic Level 2 interrupt controller Device Tree binding to YAML to help with validation. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> --- .../interrupt-controller/brcm,l2-intc.txt | 31 --------- .../interrupt-controller/brcm,l2-intc.yaml | 64 +++++++++++++++++++ 2 files changed, 64 insertions(+), 31 deletions(-) delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.yaml