Skip to contentSkip to conversation

dt-bindings: arm: omap: Convert DSP and IVA bindings to DT schema

PATCH Superseded Eduard Bostina 2 participants 8 messages Jun 30 – Jul 2 Device tree bindings

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover dt-bindings: arm: omap: Convert DSP and IVA bindings to DT schema

This series converts the Texas Instruments DSP and IVA Device Tree bindings from text format to DT schema.

These conversions are grouped together because the IVA schema explicitly depends on the DSP schema. The DSP is defined as a child node within the IVA subsystem.

Eduard Bostina (2):
dt-bindings: arm: omap: Convert DSP to DT schema
dt-bindings: arm: omap: Convert IVA to DT schema

 .../devicetree/bindings/arm/omap/dsp.txt      | 14 -----
 .../devicetree/bindings/arm/omap/iva.txt      | 19 -------
 .../devicetree/bindings/arm/omap/ti,iva.yaml  | 51 +++++++++++++++++++
 .../bindings/arm/omap/ti,omap3-c64.yaml       | 32 ++++++++++++
 4 files changed, 83 insertions(+), 33 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/omap/dsp.txt
 delete mode 100644 Documentation/devicetree/bindings/arm/omap/iva.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/ti,iva.yaml
 create mode 100644 Documentation/devicetree/bindings/arm/omap/ti,omap3-c64.yaml
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 dt-bindings: arm: omap: Convert DSP to DT schema

Convert the Texas Instruments DSP bindings to DT schema.

During the conversion, ti,hwmods has been made optional.

---
 .../devicetree/bindings/arm/omap/dsp.txt      | 14 --------
 .../bindings/arm/omap/ti,omap3-c64.yaml       | 32 +++++++++++++++++++
 2 files changed, 32 insertions(+), 14 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/omap/dsp.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/ti,omap3-c64.yaml
Documentation/devicetree/bindings/arm/omap/dsp.txt deleted +0 -14
deleted file mode 100644
index d3830a32ce08..000000000000
@@ -1,14 +0,0 @@
-* TI - DSP (Digital Signal Processor)
-
-TI DSP included in OMAP SoC
-
-Required properties:
-- compatible : Should be "ti,omap3-c64" for OMAP3 & 4
-- ti,hwmods: "dsp"
-
-Examples:
-
-dsp {
-    compatible = "ti,omap3-c64";
-    ti,hwmods = "dsp";
-};
Documentation/devicetree/bindings/arm/omap/ti,omap3-c64.yaml new file +32 -0
new file mode 100644
index 000000000000..72429749ebf4
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/omap/ti,omap3-c64.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments DSP (Digital Signal Processor)
+
+maintainers:
+  - Eduard Bostina <[email protected]>
+
+properties:
+  compatible:
+    const: ti,omap3-c64
+
+  ti,hwmods:
+    description: Name of the hwmod associated to the dsp
+    $ref: /schemas/types.yaml#/definitions/string-array
+    items:
+      - const: dsp
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    dsp {
+        compatible = "ti,omap3-c64";
+        ti,hwmods = "dsp";
+    };
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH 1/2] dt-bindings: arm: omap: Convert DSP to DT schema

Quoted 3 lines · Eduard Bostina

Convert the Texas Instruments DSP bindings to DT schema.

During the conversion, ti,hwmods has been made optional.

You need to explain why.

Quoted 5 lines
---
 .../devicetree/bindings/arm/omap/dsp.txt      | 14 --------
 .../bindings/arm/omap/ti,omap3-c64.yaml       | 32 +++++++++++++++++++

This should be moved to bindings/soc/ti/ directory

Quoted 38 lines
 2 files changed, 32 insertions(+), 14 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/omap/dsp.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/ti,omap3-c64.yaml
Documentation/devicetree/bindings/arm/omap/dsp.txt deleted +0 -14
deleted file mode 100644
index d3830a32ce08..000000000000
@@ -1,14 +0,0 @@
-* TI - DSP (Digital Signal Processor)
-
-TI DSP included in OMAP SoC
-
-Required properties:
-- compatible : Should be "ti,omap3-c64" for OMAP3 & 4
-- ti,hwmods: "dsp"
-
-Examples:
-
-dsp {
-    compatible = "ti,omap3-c64";
-    ti,hwmods = "dsp";
-};
Documentation/devicetree/bindings/arm/omap/ti,omap3-c64.yaml new file +8 -0
new file mode 100644
index 000000000000..72429749ebf4
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/omap/ti,omap3-c64.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments DSP (Digital Signal Processor)
+

Documentation/devicetree/bindings/arm/omap/ti,omap3-c64.yaml line 18

Quoted 10 lines
Documentation/devicetree/bindings/arm/omap/ti,omap3-c64.yaml new file +10 -0
+maintainers:
+  - Eduard Bostina <[email protected]>
+
+properties:
+  compatible:
+    const: ti,omap3-c64
+
+  ti,hwmods:
+    description: Name of the hwmod associated to the dsp
+    $ref: /schemas/types.yaml#/definitions/string-array

Same comments as before. The type is already fixed to string. Why this has to be an array? Do Linux drivers read it as an array?

Documentation/devicetree/bindings/arm/omap/ti,omap3-c64.yaml line 20

Quoted 2 lines
Documentation/devicetree/bindings/arm/omap/ti,omap3-c64.yaml new file +2 -0
+    items:
+      - const: dsp

Best regards,
Krzysztof

#3 lore raw

PATCH 2/2 dt-bindings: arm: omap: Convert IVA to DT schema

In reply to Eduard Bostina

Convert the Texas Instruments IVA bindings to DT schema.

During the conversion, several updates were made to reflect actual hardware usage and resolve dtbs_check warnings:
- Added a dsp sub node that references the new ti,omap3-c64.yaml
schema to support OMAP3 configurations where the DSP is defined as a child of the IVA node.
- Updated the compatible property to allow ti,ivahd as a standalone
string.
- ti,hwmods has been made optional.
- Added a second example to demonstrate the OMAP3 configuration
with the nested DSP node.

---
 .../devicetree/bindings/arm/omap/iva.txt      | 19 -------
 .../devicetree/bindings/arm/omap/ti,iva.yaml  | 51 +++++++++++++++++++
 2 files changed, 51 insertions(+), 19 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/omap/iva.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/ti,iva.yaml
Documentation/devicetree/bindings/arm/omap/iva.txt deleted +0 -19
deleted file mode 100644
index 6d6295171358..000000000000
@@ -1,19 +0,0 @@
-* TI - IVA (Imaging and Video Accelerator) subsystem
-
-The IVA contain various audio, video or imaging HW accelerator
-depending of the version.
-
-Required properties:
-- compatible : Should be:
-  - "ti,ivahd" for OMAP4
-  - "ti,iva2.2" for OMAP3
-  - "ti,iva2.1" for OMAP2430
-  - "ti,iva1" for OMAP2420
-- ti,hwmods: "iva"
-
-Examples:
-
-iva {
-    compatible = "ti,ivahd", "ti,iva";
-    ti,hwmods = "iva";
-};
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +51 -0

51 lines not on this page · raw message

Signature · 1 line
2.43.0
#4 lore raw

Re: [PATCH 2/2] dt-bindings: arm: omap: Convert IVA to DT schema

Quoted 9 lines · Eduard Bostina

Convert the Texas Instruments IVA bindings to DT schema.

During the conversion, several updates were made to reflect actual hardware usage and resolve dtbs_check warnings:
- Added a dsp sub node that references the new ti,omap3-c64.yaml
schema to support OMAP3 configurations where the DSP is defined as a child of the IVA node.
- Updated the compatible property to allow ti,ivahd as a standalone
string.

Heh? Old binding already said that, so you did not implement such change. Instead you invented ti,iva without a reason...

Quoted 1 line

- ti,hwmods has been made optional.

Why?

Quoted 49 lines

- Added a second example to demonstrate the OMAP3 configuration
with the nested DSP node.

---
 .../devicetree/bindings/arm/omap/iva.txt      | 19 -------
 .../devicetree/bindings/arm/omap/ti,iva.yaml  | 51 +++++++++++++++++++
 2 files changed, 51 insertions(+), 19 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/omap/iva.txt
 create mode 100644 Documentation/devicetree/bindings/arm/omap/ti,iva.yaml
Documentation/devicetree/bindings/arm/omap/iva.txt deleted +0 -19
deleted file mode 100644
index 6d6295171358..000000000000
@@ -1,19 +0,0 @@
-* TI - IVA (Imaging and Video Accelerator) subsystem
-
-The IVA contain various audio, video or imaging HW accelerator
-depending of the version.
-
-Required properties:
-- compatible : Should be:
-  - "ti,ivahd" for OMAP4
-  - "ti,iva2.2" for OMAP3
-  - "ti,iva2.1" for OMAP2430
-  - "ti,iva1" for OMAP2420
-- ti,hwmods: "iva"
-
-Examples:
-
-iva {
-    compatible = "ti,ivahd", "ti,iva";
-    ti,hwmods = "iva";
-};
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +7 -0
new file mode 100644
index 000000000000..771415196235
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/omap/ti,iva.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments IVA (Imaging and Video Accelerator)

Documentation/devicetree/bindings/arm/omap/ti,iva.yaml line 17

Quoted 10 lines
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +10 -0
+
+maintainers:
+  - Eduard Bostina <[email protected]>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: ti,ivahd
+          - const: ti,iva

From where did you get such list (ti,iva fallback)? ti,iva is completely undocumented and completely unused (not existing), so why it did come up with it?

Documentation/devicetree/bindings/arm/omap/ti,iva.yaml line 22

Quoted 5 lines
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +5 -0
+      - enum:
+          - ti,iva1
+          - ti,iva2.1
+          - ti,iva2.2
+          - ti,ivahd

This is wrong. ti,ivahd cannot be both: compatible and not compatible with ti,iva

Documentation/devicetree/bindings/arm/omap/ti,iva.yaml line 26

Quoted 4 lines
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +4 -0
+
+  ti,hwmods:
+    description: Name of the hwmod associated to the iva
+    $ref: /schemas/types.yaml#/definitions/string

And here it is a string. Confusing.

Documentation/devicetree/bindings/arm/omap/ti,iva.yaml line 31

Quoted 5 lines
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +5 -0
+    const: iva
+
+  dsp:
+    type: object
+    $ref: /schemas/arm/omap/ti,omap3-c64.yaml#

Missing unevaluatedProperties: false.

Actually the other binding could be squashed/folded into this place... but split is fine as well.

Quoted 23 lines
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +20 -0
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    iva {
+        compatible = "ti,iva2.2";
+        ti,hwmods = "iva";
+        dsp {
+            compatible = "ti,omap3-c64";
+        };
+    };
+  - |
+    iva {
+        compatible = "ti,ivahd", "ti,iva";
+        ti,hwmods = "iva";
+    };
Signature · 1 line
2.43.0
author
#5 lore raw

Re: [PATCH 2/2] dt-bindings: arm: omap: Convert IVA to DT schema

Quoted 12 lines · Krzysztof Kozlowski
Quoted 9 lines · Eduard Bostina

Convert the Texas Instruments IVA bindings to DT schema.

During the conversion, several updates were made to reflect actual hardware usage and resolve dtbs_check warnings:
- Added a dsp sub node that references the new ti,omap3-c64.yaml
schema to support OMAP3 configurations where the DSP is defined as a child of the IVA node.
- Updated the compatible property to allow ti,ivahd as a standalone
string.

Quoted 2 lines

Heh? Old binding already said that, so you did not implement such change. Instead you invented ti,iva without a reason...

I copied ti,iva from the old example and failed to check if it's actually used anymore.
I will drop it in v2.

Quoted 3 lines
Quoted 1 line

- ti,hwmods has been made optional.

Why?

I will add the justification to the commit message in v2: the TI hwmod framework is legacy and is being phased out, so new device tree nodes should not be required to include it.

Quoted 10 lines

Documentation/devicetree/bindings/arm/omap/ti,iva.yaml line 17

Quoted 6 lines
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +6 -0
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: ti,ivahd
+          - const: ti,iva

From where did you get such list (ti,iva fallback)? ti,iva is completely undocumented and completely unused (not existing), so why it did come up with it?

As mentioned above, this was a mistake carried over from the old .txt example. I will remove it.

Quoted 8 lines

Documentation/devicetree/bindings/arm/omap/ti,iva.yaml line 22

Quoted 5 lines
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +5 -0
+      - enum:
+          - ti,iva1
+          - ti,iva2.1
+          - ti,iva2.2
+          - ti,ivahd

This is wrong. ti,ivahd cannot be both: compatible and not compatible with ti,iva

Will clean this up by removing the items list and just using a single enum containing the valid strings in v2.

Quoted 6 lines

Documentation/devicetree/bindings/arm/omap/ti,iva.yaml line 26

Quoted 4 lines
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +4 -0
+
+  ti,hwmods:
+    description: Name of the hwmod associated to the iva
+    $ref: /schemas/types.yaml#/definitions/string

And here it is a string. Confusing.

I will change the DSP ti,hwmods to string too.

Quoted 10 lines

Documentation/devicetree/bindings/arm/omap/ti,iva.yaml line 31

Quoted 5 lines
Documentation/devicetree/bindings/arm/omap/ti,iva.yaml new file +5 -0
+    const: iva
+
+  dsp:
+    type: object
+    $ref: /schemas/arm/omap/ti,omap3-c64.yaml#

Missing unevaluatedProperties: false.

Actually the other binding could be squashed/folded into this place... but split is fine as well.

I will add unevaluatedProperties: false in v2.
I will keep them split for now, but I will also move this IVA binding to bindings/soc/ti/ in v2 so that both live in the appropriate directory.
Thanks for the review.

Best regards,
Eduard

#6 lore raw

Re: [PATCH 2/2] dt-bindings: arm: omap: Convert IVA to DT schema

Quoted 7 lines · Eddie
Quoted 3 lines
Quoted 1 line

- ti,hwmods has been made optional.

Why?

I will add the justification to the commit message in v2: the TI hwmod framework is legacy and is being phased out, so new device tree nodes should not be required to include it.

This should not be part of the conversion but separate commit with separate reason and analysis of actual ABI usage. During conversion you only make changes necessary to finish it, not things you in general find better.

Best regards,
Krzysztof

author
#7 lore raw

Re: [PATCH 2/2] dt-bindings: arm: omap: Convert IVA to DT schema

Quoted 8 lines · Krzysztof Kozlowski
Quoted 3 lines

I will add the justification to the commit message in v2: the TI hwmod framework is legacy and is being phased out, so new device tree nodes should not be required to include it.

This should not be part of the conversion but separate commit with separate reason and analysis of actual ABI usage. During conversion you only make changes necessary to finish it, not things you in general find better.

Understood. The reason I included it in the conversion was that keeping hwmods required causes dtbs_check warnings as several dts files omit it.
However, I completely understand the need to separate it. For v2, I will structure this as a two patch series per component:
1. A 1:1 conversion keeping ti,hwmods required.
2. A separate patch dropping the requirement, including the ABI analysis in the commit message.

Quick question regarding the general rule of thumb for these conversions. I understand the expected pattern is Patch 1 (strict 1:1 conversion) followed by patches fixing the dtbs_check warnings (adding undocumented properties that are used or dropping requirements). For those follow-up fixes, do you prefer one commit per property changed, or is it ok to group all the warning fixes for a specific file into a single follow-up commit?
Thanks for the guidance.