diff mbox series

[2/2] dt-bindings: soc: bcm: Convert brcm,bcm2835-vchiq to json-schema

Message ID 1634475996-6809-3-git-send-email-stefan.wahren@i2se.com
State Changes Requested, archived
Headers show
Series dt-bindings: soc: bcm: Convert brcm,bcm2835-vchiq to json-schemas | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 2 warnings, 47 lines checked
robh/dt-meta-schema success
robh/dtbs-check fail build log

Commit Message

Stefan Wahren Oct. 17, 2021, 1:06 p.m. UTC
This converts the VCHIQ bindings to YAML format.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../bindings/soc/bcm/brcm,bcm2835-vchiq.txt        | 17 --------
 .../bindings/soc/bcm/brcm,bcm2835-vchiq.yaml       | 47 ++++++++++++++++++++++
 2 files changed, 47 insertions(+), 17 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
 create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml

Comments

Rob Herring Oct. 17, 2021, 3:29 p.m. UTC | #1
On Sun, 17 Oct 2021 15:06:36 +0200, Stefan Wahren wrote:
> This converts the VCHIQ bindings to YAML format.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  .../bindings/soc/bcm/brcm,bcm2835-vchiq.txt        | 17 --------
>  .../bindings/soc/bcm/brcm,bcm2835-vchiq.yaml       | 47 ++++++++++++++++++++++
>  2 files changed, 47 insertions(+), 17 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
>  create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.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/1542230


mailbox@7e00b840: compatible: Additional items are not allowed ('brcm,bcm2835-vchiq' was unexpected)
	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dt.yaml
	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dt.yaml
	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dt.yaml
	arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dt.yaml
	arch/arm/boot/dts/bcm2836-rpi-2-b.dt.yaml
	arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dt.yaml
	arch/arm/boot/dts/bcm2837-rpi-3-b.dt.yaml
	arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dt.yaml
	arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dt.yaml

mailbox@7e00b840: compatible: ['brcm,bcm2836-vchiq', 'brcm,bcm2835-vchiq'] is too long
	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dt.yaml
	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dt.yaml
	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dt.yaml
	arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dt.yaml
	arch/arm/boot/dts/bcm2836-rpi-2-b.dt.yaml
	arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dt.yaml
	arch/arm/boot/dts/bcm2837-rpi-3-b.dt.yaml
	arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dt.yaml
	arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dt.yaml
Stefan Wahren Oct. 17, 2021, 4:31 p.m. UTC | #2
Hi Rob,

Am 17.10.21 um 17:29 schrieb Rob Herring:
> On Sun, 17 Oct 2021 15:06:36 +0200, Stefan Wahren wrote:
>> This converts the VCHIQ bindings to YAML format.
>>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> ---
>>  .../bindings/soc/bcm/brcm,bcm2835-vchiq.txt        | 17 --------
>>  .../bindings/soc/bcm/brcm,bcm2835-vchiq.yaml       | 47 ++++++++++++++++++++++
>>  2 files changed, 47 insertions(+), 17 deletions(-)
>>  delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
>>  create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.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/1542230
>
>
> mailbox@7e00b840: compatible: Additional items are not allowed ('brcm,bcm2835-vchiq' was unexpected)
> 	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dt.yaml
> 	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dt.yaml
> 	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dt.yaml
> 	arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dt.yaml
> 	arch/arm/boot/dts/bcm2836-rpi-2-b.dt.yaml
> 	arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dt.yaml
> 	arch/arm/boot/dts/bcm2837-rpi-3-b.dt.yaml
> 	arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dt.yaml
> 	arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dt.yaml
>
> mailbox@7e00b840: compatible: ['brcm,bcm2836-vchiq', 'brcm,bcm2835-vchiq'] is too long
> 	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dt.yaml
> 	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dt.yaml
> 	arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dt.yaml
> 	arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dt.yaml
> 	arch/arm/boot/dts/bcm2836-rpi-2-b.dt.yaml
> 	arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dt.yaml
> 	arch/arm/boot/dts/bcm2837-rpi-3-b.dt.yaml
> 	arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dt.yaml
> 	arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dt.yaml

i'm confused patch 1/2 ( "ARM: dts: bcm283x: Drop fallback compatible
for vchiq" ) of this series should prevent this warning. Was it applied
before running dtbs_check?

Best regards

>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Rob Herring Oct. 18, 2021, 12:44 p.m. UTC | #3
On Sun, Oct 17, 2021 at 11:31 AM Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> Hi Rob,
>
> Am 17.10.21 um 17:29 schrieb Rob Herring:
> > On Sun, 17 Oct 2021 15:06:36 +0200, Stefan Wahren wrote:
> >> This converts the VCHIQ bindings to YAML format.
> >>
> >> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> >> ---
> >>  .../bindings/soc/bcm/brcm,bcm2835-vchiq.txt        | 17 --------
> >>  .../bindings/soc/bcm/brcm,bcm2835-vchiq.yaml       | 47 ++++++++++++++++++++++
> >>  2 files changed, 47 insertions(+), 17 deletions(-)
> >>  delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
> >>  create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.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/1542230
> >
> >
> > mailbox@7e00b840: compatible: Additional items are not allowed ('brcm,bcm2835-vchiq' was unexpected)
> >       arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dt.yaml
> >       arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dt.yaml
> >       arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dt.yaml
> >       arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dt.yaml
> >       arch/arm/boot/dts/bcm2836-rpi-2-b.dt.yaml
> >       arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dt.yaml
> >       arch/arm/boot/dts/bcm2837-rpi-3-b.dt.yaml
> >       arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dt.yaml
> >       arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dt.yaml
> >
> > mailbox@7e00b840: compatible: ['brcm,bcm2836-vchiq', 'brcm,bcm2835-vchiq'] is too long
> >       arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dt.yaml
> >       arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dt.yaml
> >       arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dt.yaml
> >       arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dt.yaml
> >       arch/arm/boot/dts/bcm2836-rpi-2-b.dt.yaml
> >       arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dt.yaml
> >       arch/arm/boot/dts/bcm2837-rpi-3-b.dt.yaml
> >       arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dt.yaml
> >       arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dt.yaml
>
> i'm confused patch 1/2 ( "ARM: dts: bcm283x: Drop fallback compatible
> for vchiq" ) of this series should prevent this warning. Was it applied
> before running dtbs_check?

No, so you can ignore this.

Rob
Rob Herring Oct. 26, 2021, 11:30 p.m. UTC | #4
On Sun, Oct 17, 2021 at 03:06:36PM +0200, Stefan Wahren wrote:
> This converts the VCHIQ bindings to YAML format.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  .../bindings/soc/bcm/brcm,bcm2835-vchiq.txt        | 17 --------
>  .../bindings/soc/bcm/brcm,bcm2835-vchiq.yaml       | 47 ++++++++++++++++++++++
>  2 files changed, 47 insertions(+), 17 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
>  create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml
> 
> diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
> deleted file mode 100644
> index f331316..0000000
> --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -Broadcom VCHIQ firmware services
> -
> -Required properties:
> -
> -- compatible:	Should be "brcm,bcm2835-vchiq" on BCM2835, otherwise
> -		"brcm,bcm2836-vchiq".
> -- reg:		Physical base address and length of the doorbell register pair
> -- interrupts:	The interrupt number
> -		  See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
> -
> -Example:
> -
> -mailbox@7e00b840 {
> -	compatible = "brcm,bcm2835-vchiq";
> -	reg = <0x7e00b840 0xf>;
> -	interrupts = <0 2>;
> -};
> diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml
> new file mode 100644
> index 0000000..2ef6b21
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/bcm/brcm,bcm2835-vchiq.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom VCHIQ firmware services
> +
> +maintainers:
> +  - Nicolas Saenz Julienne <nsaenz@kernel.org>
> +
> +description: |

Don't need '|' if there is no formatting to preserve.

> +  The VCHIQ communication channel can be provided by BCM283x and Capri SoCs,
> +  to communicate with the VPU-side OS services.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - brcm,bcm2835-vchiq
> +      - brcm,bcm2836-vchiq
> +
> +  reg:
> +    description: Physical base address and length of the doorbell register pair
> +    minItems: 1
> +
> +  interrupts:
> +    description: |
> +      Interrupt number of the doorbell interrupt
> +      see bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt

What interrupt controller you are attached to is outside the scope of a 
binding, so drop the ref. Plus, then we don't have to update it later.

> +    minItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    mailbox@7e00b840 {
> +      compatible = "brcm,bcm2835-vchiq";
> +      reg = <0x7e00b840 0xf>;
> +      interrupts = <0 2>;
> +    };
> +
> +...
> -- 
> 2.7.4
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
deleted file mode 100644
index f331316..0000000
--- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt
+++ /dev/null
@@ -1,17 +0,0 @@ 
-Broadcom VCHIQ firmware services
-
-Required properties:
-
-- compatible:	Should be "brcm,bcm2835-vchiq" on BCM2835, otherwise
-		"brcm,bcm2836-vchiq".
-- reg:		Physical base address and length of the doorbell register pair
-- interrupts:	The interrupt number
-		  See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
-
-Example:
-
-mailbox@7e00b840 {
-	compatible = "brcm,bcm2835-vchiq";
-	reg = <0x7e00b840 0xf>;
-	interrupts = <0 2>;
-};
diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml
new file mode 100644
index 0000000..2ef6b21
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml
@@ -0,0 +1,47 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/bcm/brcm,bcm2835-vchiq.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom VCHIQ firmware services
+
+maintainers:
+  - Nicolas Saenz Julienne <nsaenz@kernel.org>
+
+description: |
+  The VCHIQ communication channel can be provided by BCM283x and Capri SoCs,
+  to communicate with the VPU-side OS services.
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm2835-vchiq
+      - brcm,bcm2836-vchiq
+
+  reg:
+    description: Physical base address and length of the doorbell register pair
+    minItems: 1
+
+  interrupts:
+    description: |
+      Interrupt number of the doorbell interrupt
+      see bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
+    minItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    mailbox@7e00b840 {
+      compatible = "brcm,bcm2835-vchiq";
+      reg = <0x7e00b840 0xf>;
+      interrupts = <0 2>;
+    };
+
+...