* [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-09 10:50 ` Stefan Wahren
0 siblings, 0 replies; 15+ messages in thread
From: Stefan Wahren @ 2021-01-09 10:50 UTC (permalink / raw)
To: Eric Anholt, Maxime Ripard, David Airlie, Daniel Vetter,
Rob Herring, Nicolas Saenz Julienne
Cc: dri-devel, devicetree, linux-arm-kernel, Stefan Wahren
This converts the v3d bindings to yaml format.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
Changes in V3:
- drop redundant maxItems in case we already have items defined
- fix order of reg-names enum
- tag required items in description
- add reg-names to required properties
- drop clock-names
.../devicetree/bindings/gpu/brcm,bcm-v3d.txt | 33 ----------
.../devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 72 ++++++++++++++++++++++
2 files changed, 72 insertions(+), 33 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
create mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
deleted file mode 100644
index b2df82b..0000000
--- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-Broadcom V3D GPU
-
-Only the Broadcom V3D 3.x and newer GPUs are covered by this binding.
-For V3D 2.x, see brcm,bcm-vc4.txt.
-
-Required properties:
-- compatible: Should be "brcm,7268-v3d" or "brcm,7278-v3d"
-- reg: Physical base addresses and lengths of the register areas
-- reg-names: Names for the register areas. The "hub" and "core0"
- register areas are always required. The "gca" register area
- is required if the GCA cache controller is present. The
- "bridge" register area is required if an external reset
- controller is not present.
-- interrupts: The interrupt numbers. The first interrupt is for the hub,
- while the following interrupts are separate interrupt lines
- for the cores (if they don't share the hub's interrupt).
- See bindings/interrupt-controller/interrupts.txt
-
-Optional properties:
-- clocks: The core clock the unit runs on
-- resets: The reset line for v3d, if not using a mapping of the bridge
- See bindings/reset/reset.txt
-
-v3d {
- compatible = "brcm,7268-v3d";
- reg = <0xf1204000 0x100>,
- <0xf1200000 0x4000>,
- <0xf1208000 0x4000>,
- <0xf1204100 0x100>;
- reg-names = "bridge", "hub", "core0", "gca";
- interrupts = <0 78 4>,
- <0 77 4>;
-};
diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
new file mode 100644
index 0000000..3b543d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom V3D GPU Bindings
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+ - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+
+properties:
+ $nodename:
+ pattern: '^gpu@[a-f0-9]+$'
+
+ compatible:
+ enum:
+ - brcm,7268-v3d
+ - brcm,7278-v3d
+
+ reg:
+ items:
+ - description: hub register (required)
+ - description: core0 register (required)
+ - description: GCA cache controller register (if GCA controller present)
+ - description: bridge register (if no external reset controller)
+ minItems: 2
+
+ reg-names:
+ items:
+ enum: [ hub, core0, bridge, gca ]
+ minItems: 2
+ maxItems: 4
+
+ interrupts:
+ items:
+ - description: hub interrupt (required)
+ - description: core interrupts (if it doesn't share the hub's interrupt)
+ minItems: 1
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ gpu@f1200000 {
+ compatible = "brcm,7268-v3d";
+ reg = <0xf1204000 0x100>,
+ <0xf1200000 0x4000>,
+ <0xf1208000 0x4000>,
+ <0xf1204100 0x100>;
+ reg-names = "bridge", "hub", "core0", "gca";
+ interrupts = <0 78 4>,
+ <0 77 4>;
+ };
+
+...
--
2.7.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-09 10:50 ` Stefan Wahren
0 siblings, 0 replies; 15+ messages in thread
From: Stefan Wahren @ 2021-01-09 10:50 UTC (permalink / raw)
To: Eric Anholt, Maxime Ripard, David Airlie, Daniel Vetter,
Rob Herring, Nicolas Saenz Julienne
Cc: Stefan Wahren, devicetree, linux-arm-kernel, dri-devel
This converts the v3d bindings to yaml format.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
Changes in V3:
- drop redundant maxItems in case we already have items defined
- fix order of reg-names enum
- tag required items in description
- add reg-names to required properties
- drop clock-names
.../devicetree/bindings/gpu/brcm,bcm-v3d.txt | 33 ----------
.../devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 72 ++++++++++++++++++++++
2 files changed, 72 insertions(+), 33 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
create mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
deleted file mode 100644
index b2df82b..0000000
--- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-Broadcom V3D GPU
-
-Only the Broadcom V3D 3.x and newer GPUs are covered by this binding.
-For V3D 2.x, see brcm,bcm-vc4.txt.
-
-Required properties:
-- compatible: Should be "brcm,7268-v3d" or "brcm,7278-v3d"
-- reg: Physical base addresses and lengths of the register areas
-- reg-names: Names for the register areas. The "hub" and "core0"
- register areas are always required. The "gca" register area
- is required if the GCA cache controller is present. The
- "bridge" register area is required if an external reset
- controller is not present.
-- interrupts: The interrupt numbers. The first interrupt is for the hub,
- while the following interrupts are separate interrupt lines
- for the cores (if they don't share the hub's interrupt).
- See bindings/interrupt-controller/interrupts.txt
-
-Optional properties:
-- clocks: The core clock the unit runs on
-- resets: The reset line for v3d, if not using a mapping of the bridge
- See bindings/reset/reset.txt
-
-v3d {
- compatible = "brcm,7268-v3d";
- reg = <0xf1204000 0x100>,
- <0xf1200000 0x4000>,
- <0xf1208000 0x4000>,
- <0xf1204100 0x100>;
- reg-names = "bridge", "hub", "core0", "gca";
- interrupts = <0 78 4>,
- <0 77 4>;
-};
diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
new file mode 100644
index 0000000..3b543d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom V3D GPU Bindings
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+ - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+
+properties:
+ $nodename:
+ pattern: '^gpu@[a-f0-9]+$'
+
+ compatible:
+ enum:
+ - brcm,7268-v3d
+ - brcm,7278-v3d
+
+ reg:
+ items:
+ - description: hub register (required)
+ - description: core0 register (required)
+ - description: GCA cache controller register (if GCA controller present)
+ - description: bridge register (if no external reset controller)
+ minItems: 2
+
+ reg-names:
+ items:
+ enum: [ hub, core0, bridge, gca ]
+ minItems: 2
+ maxItems: 4
+
+ interrupts:
+ items:
+ - description: hub interrupt (required)
+ - description: core interrupts (if it doesn't share the hub's interrupt)
+ minItems: 1
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ gpu@f1200000 {
+ compatible = "brcm,7268-v3d";
+ reg = <0xf1204000 0x100>,
+ <0xf1200000 0x4000>,
+ <0xf1208000 0x4000>,
+ <0xf1204100 0x100>;
+ reg-names = "bridge", "hub", "core0", "gca";
+ interrupts = <0 78 4>,
+ <0 77 4>;
+ };
+
+...
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-09 10:50 ` Stefan Wahren
0 siblings, 0 replies; 15+ messages in thread
From: Stefan Wahren @ 2021-01-09 10:50 UTC (permalink / raw)
To: Eric Anholt, Maxime Ripard, David Airlie, Daniel Vetter,
Rob Herring, Nicolas Saenz Julienne
Cc: Stefan Wahren, devicetree, linux-arm-kernel, dri-devel
This converts the v3d bindings to yaml format.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
Changes in V3:
- drop redundant maxItems in case we already have items defined
- fix order of reg-names enum
- tag required items in description
- add reg-names to required properties
- drop clock-names
.../devicetree/bindings/gpu/brcm,bcm-v3d.txt | 33 ----------
.../devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 72 ++++++++++++++++++++++
2 files changed, 72 insertions(+), 33 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
create mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
deleted file mode 100644
index b2df82b..0000000
--- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-Broadcom V3D GPU
-
-Only the Broadcom V3D 3.x and newer GPUs are covered by this binding.
-For V3D 2.x, see brcm,bcm-vc4.txt.
-
-Required properties:
-- compatible: Should be "brcm,7268-v3d" or "brcm,7278-v3d"
-- reg: Physical base addresses and lengths of the register areas
-- reg-names: Names for the register areas. The "hub" and "core0"
- register areas are always required. The "gca" register area
- is required if the GCA cache controller is present. The
- "bridge" register area is required if an external reset
- controller is not present.
-- interrupts: The interrupt numbers. The first interrupt is for the hub,
- while the following interrupts are separate interrupt lines
- for the cores (if they don't share the hub's interrupt).
- See bindings/interrupt-controller/interrupts.txt
-
-Optional properties:
-- clocks: The core clock the unit runs on
-- resets: The reset line for v3d, if not using a mapping of the bridge
- See bindings/reset/reset.txt
-
-v3d {
- compatible = "brcm,7268-v3d";
- reg = <0xf1204000 0x100>,
- <0xf1200000 0x4000>,
- <0xf1208000 0x4000>,
- <0xf1204100 0x100>;
- reg-names = "bridge", "hub", "core0", "gca";
- interrupts = <0 78 4>,
- <0 77 4>;
-};
diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
new file mode 100644
index 0000000..3b543d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom V3D GPU Bindings
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+ - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+
+properties:
+ $nodename:
+ pattern: '^gpu@[a-f0-9]+$'
+
+ compatible:
+ enum:
+ - brcm,7268-v3d
+ - brcm,7278-v3d
+
+ reg:
+ items:
+ - description: hub register (required)
+ - description: core0 register (required)
+ - description: GCA cache controller register (if GCA controller present)
+ - description: bridge register (if no external reset controller)
+ minItems: 2
+
+ reg-names:
+ items:
+ enum: [ hub, core0, bridge, gca ]
+ minItems: 2
+ maxItems: 4
+
+ interrupts:
+ items:
+ - description: hub interrupt (required)
+ - description: core interrupts (if it doesn't share the hub's interrupt)
+ minItems: 1
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ gpu@f1200000 {
+ compatible = "brcm,7268-v3d";
+ reg = <0xf1204000 0x100>,
+ <0xf1200000 0x4000>,
+ <0xf1208000 0x4000>,
+ <0xf1204100 0x100>;
+ reg-names = "bridge", "hub", "core0", "gca";
+ interrupts = <0 78 4>,
+ <0 77 4>;
+ };
+
+...
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
2021-01-09 10:50 ` Stefan Wahren
(?)
@ 2021-01-13 9:15 ` Maxime Ripard
-1 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2021-01-13 9:15 UTC (permalink / raw)
To: Stefan Wahren
Cc: Eric Anholt, David Airlie, Daniel Vetter, Rob Herring,
Nicolas Saenz Julienne, dri-devel, devicetree, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 3636 bytes --]
Hi,
On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
> This converts the v3d bindings to yaml format.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>
> Changes in V3:
> - drop redundant maxItems in case we already have items defined
> - fix order of reg-names enum
> - tag required items in description
> - add reg-names to required properties
> - drop clock-names
>
> .../devicetree/bindings/gpu/brcm,bcm-v3d.txt | 33 ----------
> .../devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 72 ++++++++++++++++++++++
> 2 files changed, 72 insertions(+), 33 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> create mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> deleted file mode 100644
> index b2df82b..0000000
> --- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -Broadcom V3D GPU
> -
> -Only the Broadcom V3D 3.x and newer GPUs are covered by this binding.
> -For V3D 2.x, see brcm,bcm-vc4.txt.
> -
> -Required properties:
> -- compatible: Should be "brcm,7268-v3d" or "brcm,7278-v3d"
> -- reg: Physical base addresses and lengths of the register areas
> -- reg-names: Names for the register areas. The "hub" and "core0"
> - register areas are always required. The "gca" register area
> - is required if the GCA cache controller is present. The
> - "bridge" register area is required if an external reset
> - controller is not present.
> -- interrupts: The interrupt numbers. The first interrupt is for the hub,
> - while the following interrupts are separate interrupt lines
> - for the cores (if they don't share the hub's interrupt).
> - See bindings/interrupt-controller/interrupts.txt
> -
> -Optional properties:
> -- clocks: The core clock the unit runs on
> -- resets: The reset line for v3d, if not using a mapping of the bridge
> - See bindings/reset/reset.txt
> -
> -v3d {
> - compatible = "brcm,7268-v3d";
> - reg = <0xf1204000 0x100>,
> - <0xf1200000 0x4000>,
> - <0xf1208000 0x4000>,
> - <0xf1204100 0x100>;
> - reg-names = "bridge", "hub", "core0", "gca";
> - interrupts = <0 78 4>,
> - <0 77 4>;
> -};
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> new file mode 100644
> index 0000000..3b543d4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom V3D GPU Bindings
> +
> +maintainers:
> + - Eric Anholt <eric@anholt.net>
> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> +
> +properties:
> + $nodename:
> + pattern: '^gpu@[a-f0-9]+$'
> +
> + compatible:
> + enum:
> + - brcm,7268-v3d
> + - brcm,7278-v3d
> +
> + reg:
> + items:
> + - description: hub register (required)
> + - description: core0 register (required)
> + - description: GCA cache controller register (if GCA controller present)
> + - description: bridge register (if no external reset controller)
> + minItems: 2
maxItems will be set to 2 in this case, while it would be 4 I guess?
Looks fine otherwise
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-13 9:15 ` Maxime Ripard
0 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2021-01-13 9:15 UTC (permalink / raw)
To: Stefan Wahren
Cc: devicetree, David Airlie, dri-devel, Eric Anholt, Rob Herring,
linux-arm-kernel, Daniel Vetter, Nicolas Saenz Julienne
[-- Attachment #1.1: Type: text/plain, Size: 3636 bytes --]
Hi,
On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
> This converts the v3d bindings to yaml format.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>
> Changes in V3:
> - drop redundant maxItems in case we already have items defined
> - fix order of reg-names enum
> - tag required items in description
> - add reg-names to required properties
> - drop clock-names
>
> .../devicetree/bindings/gpu/brcm,bcm-v3d.txt | 33 ----------
> .../devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 72 ++++++++++++++++++++++
> 2 files changed, 72 insertions(+), 33 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> create mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> deleted file mode 100644
> index b2df82b..0000000
> --- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -Broadcom V3D GPU
> -
> -Only the Broadcom V3D 3.x and newer GPUs are covered by this binding.
> -For V3D 2.x, see brcm,bcm-vc4.txt.
> -
> -Required properties:
> -- compatible: Should be "brcm,7268-v3d" or "brcm,7278-v3d"
> -- reg: Physical base addresses and lengths of the register areas
> -- reg-names: Names for the register areas. The "hub" and "core0"
> - register areas are always required. The "gca" register area
> - is required if the GCA cache controller is present. The
> - "bridge" register area is required if an external reset
> - controller is not present.
> -- interrupts: The interrupt numbers. The first interrupt is for the hub,
> - while the following interrupts are separate interrupt lines
> - for the cores (if they don't share the hub's interrupt).
> - See bindings/interrupt-controller/interrupts.txt
> -
> -Optional properties:
> -- clocks: The core clock the unit runs on
> -- resets: The reset line for v3d, if not using a mapping of the bridge
> - See bindings/reset/reset.txt
> -
> -v3d {
> - compatible = "brcm,7268-v3d";
> - reg = <0xf1204000 0x100>,
> - <0xf1200000 0x4000>,
> - <0xf1208000 0x4000>,
> - <0xf1204100 0x100>;
> - reg-names = "bridge", "hub", "core0", "gca";
> - interrupts = <0 78 4>,
> - <0 77 4>;
> -};
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> new file mode 100644
> index 0000000..3b543d4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom V3D GPU Bindings
> +
> +maintainers:
> + - Eric Anholt <eric@anholt.net>
> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> +
> +properties:
> + $nodename:
> + pattern: '^gpu@[a-f0-9]+$'
> +
> + compatible:
> + enum:
> + - brcm,7268-v3d
> + - brcm,7278-v3d
> +
> + reg:
> + items:
> + - description: hub register (required)
> + - description: core0 register (required)
> + - description: GCA cache controller register (if GCA controller present)
> + - description: bridge register (if no external reset controller)
> + minItems: 2
maxItems will be set to 2 in this case, while it would be 4 I guess?
Looks fine otherwise
Maxime
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-13 9:15 ` Maxime Ripard
0 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2021-01-13 9:15 UTC (permalink / raw)
To: Stefan Wahren
Cc: devicetree, David Airlie, dri-devel, Rob Herring,
linux-arm-kernel, Nicolas Saenz Julienne
[-- Attachment #1.1: Type: text/plain, Size: 3636 bytes --]
Hi,
On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
> This converts the v3d bindings to yaml format.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>
> Changes in V3:
> - drop redundant maxItems in case we already have items defined
> - fix order of reg-names enum
> - tag required items in description
> - add reg-names to required properties
> - drop clock-names
>
> .../devicetree/bindings/gpu/brcm,bcm-v3d.txt | 33 ----------
> .../devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 72 ++++++++++++++++++++++
> 2 files changed, 72 insertions(+), 33 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> create mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> deleted file mode 100644
> index b2df82b..0000000
> --- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -Broadcom V3D GPU
> -
> -Only the Broadcom V3D 3.x and newer GPUs are covered by this binding.
> -For V3D 2.x, see brcm,bcm-vc4.txt.
> -
> -Required properties:
> -- compatible: Should be "brcm,7268-v3d" or "brcm,7278-v3d"
> -- reg: Physical base addresses and lengths of the register areas
> -- reg-names: Names for the register areas. The "hub" and "core0"
> - register areas are always required. The "gca" register area
> - is required if the GCA cache controller is present. The
> - "bridge" register area is required if an external reset
> - controller is not present.
> -- interrupts: The interrupt numbers. The first interrupt is for the hub,
> - while the following interrupts are separate interrupt lines
> - for the cores (if they don't share the hub's interrupt).
> - See bindings/interrupt-controller/interrupts.txt
> -
> -Optional properties:
> -- clocks: The core clock the unit runs on
> -- resets: The reset line for v3d, if not using a mapping of the bridge
> - See bindings/reset/reset.txt
> -
> -v3d {
> - compatible = "brcm,7268-v3d";
> - reg = <0xf1204000 0x100>,
> - <0xf1200000 0x4000>,
> - <0xf1208000 0x4000>,
> - <0xf1204100 0x100>;
> - reg-names = "bridge", "hub", "core0", "gca";
> - interrupts = <0 78 4>,
> - <0 77 4>;
> -};
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> new file mode 100644
> index 0000000..3b543d4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom V3D GPU Bindings
> +
> +maintainers:
> + - Eric Anholt <eric@anholt.net>
> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> +
> +properties:
> + $nodename:
> + pattern: '^gpu@[a-f0-9]+$'
> +
> + compatible:
> + enum:
> + - brcm,7268-v3d
> + - brcm,7278-v3d
> +
> + reg:
> + items:
> + - description: hub register (required)
> + - description: core0 register (required)
> + - description: GCA cache controller register (if GCA controller present)
> + - description: bridge register (if no external reset controller)
> + minItems: 2
maxItems will be set to 2 in this case, while it would be 4 I guess?
Looks fine otherwise
Maxime
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
2021-01-13 9:15 ` Maxime Ripard
(?)
@ 2021-01-13 12:53 ` Stefan Wahren
-1 siblings, 0 replies; 15+ messages in thread
From: Stefan Wahren @ 2021-01-13 12:53 UTC (permalink / raw)
To: Maxime Ripard, Rob Herring
Cc: devicetree, David Airlie, dri-devel, Eric Anholt,
linux-arm-kernel, Daniel Vetter, Nicolas Saenz Julienne
Hi Maxime,
Am 13.01.21 um 10:15 schrieb Maxime Ripard:
> Hi,
>
> On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
>> This converts the v3d bindings to yaml format.
>>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> ---
...
>> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>> new file mode 100644
>> index 0000000..3b543d4
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>> @@ -0,0 +1,72 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Broadcom V3D GPU Bindings
>> +
>> +maintainers:
>> + - Eric Anholt <eric@anholt.net>
>> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>> +
>> +properties:
>> + $nodename:
>> + pattern: '^gpu@[a-f0-9]+$'
>> +
>> + compatible:
>> + enum:
>> + - brcm,7268-v3d
>> + - brcm,7278-v3d
>> +
>> + reg:
>> + items:
>> + - description: hub register (required)
>> + - description: core0 register (required)
>> + - description: GCA cache controller register (if GCA controller present)
>> + - description: bridge register (if no external reset controller)
>> + minItems: 2
> maxItems will be set to 2 in this case, while it would be 4 I guess?
This confuses me. Based on this patch [1] by Rob, i would assume that
maxItems is derived from item list length.
[1] -
https://lists.freedesktop.org/archives/dri-devel/2020-December/292309.html
>
> Looks fine otherwise
>
> Maxime
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-13 12:53 ` Stefan Wahren
0 siblings, 0 replies; 15+ messages in thread
From: Stefan Wahren @ 2021-01-13 12:53 UTC (permalink / raw)
To: Maxime Ripard, Rob Herring
Cc: devicetree, David Airlie, dri-devel, Eric Anholt,
Nicolas Saenz Julienne, Daniel Vetter, linux-arm-kernel
Hi Maxime,
Am 13.01.21 um 10:15 schrieb Maxime Ripard:
> Hi,
>
> On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
>> This converts the v3d bindings to yaml format.
>>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> ---
...
>> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>> new file mode 100644
>> index 0000000..3b543d4
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>> @@ -0,0 +1,72 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Broadcom V3D GPU Bindings
>> +
>> +maintainers:
>> + - Eric Anholt <eric@anholt.net>
>> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>> +
>> +properties:
>> + $nodename:
>> + pattern: '^gpu@[a-f0-9]+$'
>> +
>> + compatible:
>> + enum:
>> + - brcm,7268-v3d
>> + - brcm,7278-v3d
>> +
>> + reg:
>> + items:
>> + - description: hub register (required)
>> + - description: core0 register (required)
>> + - description: GCA cache controller register (if GCA controller present)
>> + - description: bridge register (if no external reset controller)
>> + minItems: 2
> maxItems will be set to 2 in this case, while it would be 4 I guess?
This confuses me. Based on this patch [1] by Rob, i would assume that
maxItems is derived from item list length.
[1] -
https://lists.freedesktop.org/archives/dri-devel/2020-December/292309.html
>
> Looks fine otherwise
>
> Maxime
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-13 12:53 ` Stefan Wahren
0 siblings, 0 replies; 15+ messages in thread
From: Stefan Wahren @ 2021-01-13 12:53 UTC (permalink / raw)
To: Maxime Ripard, Rob Herring
Cc: devicetree, David Airlie, dri-devel, Nicolas Saenz Julienne,
linux-arm-kernel
Hi Maxime,
Am 13.01.21 um 10:15 schrieb Maxime Ripard:
> Hi,
>
> On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
>> This converts the v3d bindings to yaml format.
>>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> ---
...
>> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>> new file mode 100644
>> index 0000000..3b543d4
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>> @@ -0,0 +1,72 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Broadcom V3D GPU Bindings
>> +
>> +maintainers:
>> + - Eric Anholt <eric@anholt.net>
>> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>> +
>> +properties:
>> + $nodename:
>> + pattern: '^gpu@[a-f0-9]+$'
>> +
>> + compatible:
>> + enum:
>> + - brcm,7268-v3d
>> + - brcm,7278-v3d
>> +
>> + reg:
>> + items:
>> + - description: hub register (required)
>> + - description: core0 register (required)
>> + - description: GCA cache controller register (if GCA controller present)
>> + - description: bridge register (if no external reset controller)
>> + minItems: 2
> maxItems will be set to 2 in this case, while it would be 4 I guess?
This confuses me. Based on this patch [1] by Rob, i would assume that
maxItems is derived from item list length.
[1] -
https://lists.freedesktop.org/archives/dri-devel/2020-December/292309.html
>
> Looks fine otherwise
>
> Maxime
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
2021-01-09 10:50 ` Stefan Wahren
(?)
@ 2021-01-13 15:37 ` Rob Herring
-1 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2021-01-13 15:37 UTC (permalink / raw)
To: Stefan Wahren
Cc: Eric Anholt, Maxime Ripard, David Airlie, Daniel Vetter,
Nicolas Saenz Julienne, dri-devel, devicetree, linux-arm-kernel
On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
> This converts the v3d bindings to yaml format.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>
> Changes in V3:
> - drop redundant maxItems in case we already have items defined
> - fix order of reg-names enum
> - tag required items in description
> - add reg-names to required properties
> - drop clock-names
>
> .../devicetree/bindings/gpu/brcm,bcm-v3d.txt | 33 ----------
> .../devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 72 ++++++++++++++++++++++
> 2 files changed, 72 insertions(+), 33 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> create mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> deleted file mode 100644
> index b2df82b..0000000
> --- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -Broadcom V3D GPU
> -
> -Only the Broadcom V3D 3.x and newer GPUs are covered by this binding.
> -For V3D 2.x, see brcm,bcm-vc4.txt.
> -
> -Required properties:
> -- compatible: Should be "brcm,7268-v3d" or "brcm,7278-v3d"
> -- reg: Physical base addresses and lengths of the register areas
> -- reg-names: Names for the register areas. The "hub" and "core0"
> - register areas are always required. The "gca" register area
> - is required if the GCA cache controller is present. The
> - "bridge" register area is required if an external reset
> - controller is not present.
> -- interrupts: The interrupt numbers. The first interrupt is for the hub,
> - while the following interrupts are separate interrupt lines
> - for the cores (if they don't share the hub's interrupt).
> - See bindings/interrupt-controller/interrupts.txt
> -
> -Optional properties:
> -- clocks: The core clock the unit runs on
> -- resets: The reset line for v3d, if not using a mapping of the bridge
> - See bindings/reset/reset.txt
> -
> -v3d {
> - compatible = "brcm,7268-v3d";
> - reg = <0xf1204000 0x100>,
> - <0xf1200000 0x4000>,
> - <0xf1208000 0x4000>,
> - <0xf1204100 0x100>;
> - reg-names = "bridge", "hub", "core0", "gca";
> - interrupts = <0 78 4>,
> - <0 77 4>;
> -};
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> new file mode 100644
> index 0000000..3b543d4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom V3D GPU Bindings
> +
> +maintainers:
> + - Eric Anholt <eric@anholt.net>
> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> +
> +properties:
> + $nodename:
> + pattern: '^gpu@[a-f0-9]+$'
> +
> + compatible:
> + enum:
> + - brcm,7268-v3d
> + - brcm,7278-v3d
> +
> + reg:
> + items:
> + - description: hub register (required)
> + - description: core0 register (required)
> + - description: GCA cache controller register (if GCA controller present)
> + - description: bridge register (if no external reset controller)
> + minItems: 2
> +
> + reg-names:
> + items:
> + enum: [ hub, core0, bridge, gca ]
Need to define the order at least for the required ones:
items:
- const: hub
- const: core0
- enum: [ bridge, gca ]
- enum: [ bridge, gca ]
If you have dts files that are different, then fix them.
> + minItems: 2
> + maxItems: 4
> +
> + interrupts:
> + items:
> + - description: hub interrupt (required)
> + - description: core interrupts (if it doesn't share the hub's interrupt)
> + minItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + power-domains:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - reg-names
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + gpu@f1200000 {
> + compatible = "brcm,7268-v3d";
> + reg = <0xf1204000 0x100>,
> + <0xf1200000 0x4000>,
> + <0xf1208000 0x4000>,
> + <0xf1204100 0x100>;
> + reg-names = "bridge", "hub", "core0", "gca";
> + interrupts = <0 78 4>,
> + <0 77 4>;
> + };
> +
> +...
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-13 15:37 ` Rob Herring
0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2021-01-13 15:37 UTC (permalink / raw)
To: Stefan Wahren
Cc: linux-arm-kernel, devicetree, David Airlie, dri-devel,
Eric Anholt, Maxime Ripard, Daniel Vetter,
Nicolas Saenz Julienne
On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
> This converts the v3d bindings to yaml format.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>
> Changes in V3:
> - drop redundant maxItems in case we already have items defined
> - fix order of reg-names enum
> - tag required items in description
> - add reg-names to required properties
> - drop clock-names
>
> .../devicetree/bindings/gpu/brcm,bcm-v3d.txt | 33 ----------
> .../devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 72 ++++++++++++++++++++++
> 2 files changed, 72 insertions(+), 33 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> create mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> deleted file mode 100644
> index b2df82b..0000000
> --- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -Broadcom V3D GPU
> -
> -Only the Broadcom V3D 3.x and newer GPUs are covered by this binding.
> -For V3D 2.x, see brcm,bcm-vc4.txt.
> -
> -Required properties:
> -- compatible: Should be "brcm,7268-v3d" or "brcm,7278-v3d"
> -- reg: Physical base addresses and lengths of the register areas
> -- reg-names: Names for the register areas. The "hub" and "core0"
> - register areas are always required. The "gca" register area
> - is required if the GCA cache controller is present. The
> - "bridge" register area is required if an external reset
> - controller is not present.
> -- interrupts: The interrupt numbers. The first interrupt is for the hub,
> - while the following interrupts are separate interrupt lines
> - for the cores (if they don't share the hub's interrupt).
> - See bindings/interrupt-controller/interrupts.txt
> -
> -Optional properties:
> -- clocks: The core clock the unit runs on
> -- resets: The reset line for v3d, if not using a mapping of the bridge
> - See bindings/reset/reset.txt
> -
> -v3d {
> - compatible = "brcm,7268-v3d";
> - reg = <0xf1204000 0x100>,
> - <0xf1200000 0x4000>,
> - <0xf1208000 0x4000>,
> - <0xf1204100 0x100>;
> - reg-names = "bridge", "hub", "core0", "gca";
> - interrupts = <0 78 4>,
> - <0 77 4>;
> -};
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> new file mode 100644
> index 0000000..3b543d4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom V3D GPU Bindings
> +
> +maintainers:
> + - Eric Anholt <eric@anholt.net>
> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> +
> +properties:
> + $nodename:
> + pattern: '^gpu@[a-f0-9]+$'
> +
> + compatible:
> + enum:
> + - brcm,7268-v3d
> + - brcm,7278-v3d
> +
> + reg:
> + items:
> + - description: hub register (required)
> + - description: core0 register (required)
> + - description: GCA cache controller register (if GCA controller present)
> + - description: bridge register (if no external reset controller)
> + minItems: 2
> +
> + reg-names:
> + items:
> + enum: [ hub, core0, bridge, gca ]
Need to define the order at least for the required ones:
items:
- const: hub
- const: core0
- enum: [ bridge, gca ]
- enum: [ bridge, gca ]
If you have dts files that are different, then fix them.
> + minItems: 2
> + maxItems: 4
> +
> + interrupts:
> + items:
> + - description: hub interrupt (required)
> + - description: core interrupts (if it doesn't share the hub's interrupt)
> + minItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + power-domains:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - reg-names
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + gpu@f1200000 {
> + compatible = "brcm,7268-v3d";
> + reg = <0xf1204000 0x100>,
> + <0xf1200000 0x4000>,
> + <0xf1208000 0x4000>,
> + <0xf1204100 0x100>;
> + reg-names = "bridge", "hub", "core0", "gca";
> + interrupts = <0 78 4>,
> + <0 77 4>;
> + };
> +
> +...
> --
> 2.7.4
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-13 15:37 ` Rob Herring
0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2021-01-13 15:37 UTC (permalink / raw)
To: Stefan Wahren
Cc: linux-arm-kernel, devicetree, David Airlie, dri-devel,
Nicolas Saenz Julienne
On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
> This converts the v3d bindings to yaml format.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>
> Changes in V3:
> - drop redundant maxItems in case we already have items defined
> - fix order of reg-names enum
> - tag required items in description
> - add reg-names to required properties
> - drop clock-names
>
> .../devicetree/bindings/gpu/brcm,bcm-v3d.txt | 33 ----------
> .../devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 72 ++++++++++++++++++++++
> 2 files changed, 72 insertions(+), 33 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> create mode 100644 Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
>
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> deleted file mode 100644
> index b2df82b..0000000
> --- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -Broadcom V3D GPU
> -
> -Only the Broadcom V3D 3.x and newer GPUs are covered by this binding.
> -For V3D 2.x, see brcm,bcm-vc4.txt.
> -
> -Required properties:
> -- compatible: Should be "brcm,7268-v3d" or "brcm,7278-v3d"
> -- reg: Physical base addresses and lengths of the register areas
> -- reg-names: Names for the register areas. The "hub" and "core0"
> - register areas are always required. The "gca" register area
> - is required if the GCA cache controller is present. The
> - "bridge" register area is required if an external reset
> - controller is not present.
> -- interrupts: The interrupt numbers. The first interrupt is for the hub,
> - while the following interrupts are separate interrupt lines
> - for the cores (if they don't share the hub's interrupt).
> - See bindings/interrupt-controller/interrupts.txt
> -
> -Optional properties:
> -- clocks: The core clock the unit runs on
> -- resets: The reset line for v3d, if not using a mapping of the bridge
> - See bindings/reset/reset.txt
> -
> -v3d {
> - compatible = "brcm,7268-v3d";
> - reg = <0xf1204000 0x100>,
> - <0xf1200000 0x4000>,
> - <0xf1208000 0x4000>,
> - <0xf1204100 0x100>;
> - reg-names = "bridge", "hub", "core0", "gca";
> - interrupts = <0 78 4>,
> - <0 77 4>;
> -};
> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> new file mode 100644
> index 0000000..3b543d4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom V3D GPU Bindings
> +
> +maintainers:
> + - Eric Anholt <eric@anholt.net>
> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> +
> +properties:
> + $nodename:
> + pattern: '^gpu@[a-f0-9]+$'
> +
> + compatible:
> + enum:
> + - brcm,7268-v3d
> + - brcm,7278-v3d
> +
> + reg:
> + items:
> + - description: hub register (required)
> + - description: core0 register (required)
> + - description: GCA cache controller register (if GCA controller present)
> + - description: bridge register (if no external reset controller)
> + minItems: 2
> +
> + reg-names:
> + items:
> + enum: [ hub, core0, bridge, gca ]
Need to define the order at least for the required ones:
items:
- const: hub
- const: core0
- enum: [ bridge, gca ]
- enum: [ bridge, gca ]
If you have dts files that are different, then fix them.
> + minItems: 2
> + maxItems: 4
> +
> + interrupts:
> + items:
> + - description: hub interrupt (required)
> + - description: core interrupts (if it doesn't share the hub's interrupt)
> + minItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + power-domains:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - reg-names
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + gpu@f1200000 {
> + compatible = "brcm,7268-v3d";
> + reg = <0xf1204000 0x100>,
> + <0xf1200000 0x4000>,
> + <0xf1208000 0x4000>,
> + <0xf1204100 0x100>;
> + reg-names = "bridge", "hub", "core0", "gca";
> + interrupts = <0 78 4>,
> + <0 77 4>;
> + };
> +
> +...
> --
> 2.7.4
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
2021-01-13 12:53 ` Stefan Wahren
(?)
@ 2021-01-13 15:48 ` Maxime Ripard
-1 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2021-01-13 15:48 UTC (permalink / raw)
To: Stefan Wahren
Cc: Rob Herring, devicetree, David Airlie, dri-devel, Eric Anholt,
linux-arm-kernel, Daniel Vetter, Nicolas Saenz Julienne
[-- Attachment #1: Type: text/plain, Size: 2147 bytes --]
On Wed, Jan 13, 2021 at 01:53:38PM +0100, Stefan Wahren wrote:
> Hi Maxime,
>
> Am 13.01.21 um 10:15 schrieb Maxime Ripard:
> > Hi,
> >
> > On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
> >> This converts the v3d bindings to yaml format.
> >>
> >> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> >> ---
> ...
> >> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> >> new file mode 100644
> >> index 0000000..3b543d4
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> >> @@ -0,0 +1,72 @@
> >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: Broadcom V3D GPU Bindings
> >> +
> >> +maintainers:
> >> + - Eric Anholt <eric@anholt.net>
> >> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> >> +
> >> +properties:
> >> + $nodename:
> >> + pattern: '^gpu@[a-f0-9]+$'
> >> +
> >> + compatible:
> >> + enum:
> >> + - brcm,7268-v3d
> >> + - brcm,7278-v3d
> >> +
> >> + reg:
> >> + items:
> >> + - description: hub register (required)
> >> + - description: core0 register (required)
> >> + - description: GCA cache controller register (if GCA controller present)
> >> + - description: bridge register (if no external reset controller)
> >> + minItems: 2
> > maxItems will be set to 2 in this case, while it would be 4 I guess?
>
> This confuses me. Based on this patch [1] by Rob, i would assume that
> maxItems is derived from item list length.
>
> [1] -
> https://lists.freedesktop.org/archives/dri-devel/2020-December/292309.html
Yeah, you're right
My understanding was that maxItems was set to whatever minItems was if
maxItems was missing, but dt-validate also checks for whether it's a
list and will fill it like you said:
https://github.com/devicetree-org/dt-schema/blob/master/dtschema/lib.py#L258
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-13 15:48 ` Maxime Ripard
0 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2021-01-13 15:48 UTC (permalink / raw)
To: Stefan Wahren
Cc: devicetree, David Airlie, dri-devel, Eric Anholt, Rob Herring,
Nicolas Saenz Julienne, Daniel Vetter, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 2147 bytes --]
On Wed, Jan 13, 2021 at 01:53:38PM +0100, Stefan Wahren wrote:
> Hi Maxime,
>
> Am 13.01.21 um 10:15 schrieb Maxime Ripard:
> > Hi,
> >
> > On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
> >> This converts the v3d bindings to yaml format.
> >>
> >> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> >> ---
> ...
> >> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> >> new file mode 100644
> >> index 0000000..3b543d4
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> >> @@ -0,0 +1,72 @@
> >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: Broadcom V3D GPU Bindings
> >> +
> >> +maintainers:
> >> + - Eric Anholt <eric@anholt.net>
> >> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> >> +
> >> +properties:
> >> + $nodename:
> >> + pattern: '^gpu@[a-f0-9]+$'
> >> +
> >> + compatible:
> >> + enum:
> >> + - brcm,7268-v3d
> >> + - brcm,7278-v3d
> >> +
> >> + reg:
> >> + items:
> >> + - description: hub register (required)
> >> + - description: core0 register (required)
> >> + - description: GCA cache controller register (if GCA controller present)
> >> + - description: bridge register (if no external reset controller)
> >> + minItems: 2
> > maxItems will be set to 2 in this case, while it would be 4 I guess?
>
> This confuses me. Based on this patch [1] by Rob, i would assume that
> maxItems is derived from item list length.
>
> [1] -
> https://lists.freedesktop.org/archives/dri-devel/2020-December/292309.html
Yeah, you're right
My understanding was that maxItems was set to whatever minItems was if
maxItems was missing, but dt-validate also checks for whether it's a
list and will fill it like you said:
https://github.com/devicetree-org/dt-schema/blob/master/dtschema/lib.py#L258
Maxime
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema
@ 2021-01-13 15:48 ` Maxime Ripard
0 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2021-01-13 15:48 UTC (permalink / raw)
To: Stefan Wahren
Cc: devicetree, David Airlie, dri-devel, Rob Herring,
Nicolas Saenz Julienne, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 2147 bytes --]
On Wed, Jan 13, 2021 at 01:53:38PM +0100, Stefan Wahren wrote:
> Hi Maxime,
>
> Am 13.01.21 um 10:15 schrieb Maxime Ripard:
> > Hi,
> >
> > On Sat, Jan 09, 2021 at 11:50:32AM +0100, Stefan Wahren wrote:
> >> This converts the v3d bindings to yaml format.
> >>
> >> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> >> ---
> ...
> >> diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> >> new file mode 100644
> >> index 0000000..3b543d4
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
> >> @@ -0,0 +1,72 @@
> >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/gpu/brcm,bcm-v3d.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: Broadcom V3D GPU Bindings
> >> +
> >> +maintainers:
> >> + - Eric Anholt <eric@anholt.net>
> >> + - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> >> +
> >> +properties:
> >> + $nodename:
> >> + pattern: '^gpu@[a-f0-9]+$'
> >> +
> >> + compatible:
> >> + enum:
> >> + - brcm,7268-v3d
> >> + - brcm,7278-v3d
> >> +
> >> + reg:
> >> + items:
> >> + - description: hub register (required)
> >> + - description: core0 register (required)
> >> + - description: GCA cache controller register (if GCA controller present)
> >> + - description: bridge register (if no external reset controller)
> >> + minItems: 2
> > maxItems will be set to 2 in this case, while it would be 4 I guess?
>
> This confuses me. Based on this patch [1] by Rob, i would assume that
> maxItems is derived from item list length.
>
> [1] -
> https://lists.freedesktop.org/archives/dri-devel/2020-December/292309.html
Yeah, you're right
My understanding was that maxItems was set to whatever minItems was if
maxItems was missing, but dt-validate also checks for whether it's a
list and will fill it like you said:
https://github.com/devicetree-org/dt-schema/blob/master/dtschema/lib.py#L258
Maxime
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2021-01-14 9:29 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 10:50 [PATCH V3] dt-bindings: gpu: Convert v3d to json-schema Stefan Wahren
2021-01-09 10:50 ` Stefan Wahren
2021-01-09 10:50 ` Stefan Wahren
2021-01-13 9:15 ` Maxime Ripard
2021-01-13 9:15 ` Maxime Ripard
2021-01-13 9:15 ` Maxime Ripard
2021-01-13 12:53 ` Stefan Wahren
2021-01-13 12:53 ` Stefan Wahren
2021-01-13 12:53 ` Stefan Wahren
2021-01-13 15:48 ` Maxime Ripard
2021-01-13 15:48 ` Maxime Ripard
2021-01-13 15:48 ` Maxime Ripard
2021-01-13 15:37 ` Rob Herring
2021-01-13 15:37 ` Rob Herring
2021-01-13 15:37 ` Rob Herring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.