Skip to contentSkip to conversation

dt-bindings: arm: st,nomadik: Convert to DT schema

PATCH Superseded Andrew Rembrandt 4 participants 4 messages May 6

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: arm: st,nomadik: Convert to DT schema

Convert the ST Nomadik boards binding from free-form text to DT schema.

The binding documents the Nomadik NHK15/USB-S8815 platform compatibles and keeps the existing example.

---
 .../devicetree/bindings/arm/st,nomadik.yaml   | 36 ++++++++++++++++++
 .../devicetree/bindings/arm/ste-nomadik.txt   | 38 -------------------
 MAINTAINERS                                   |  2 +-
 3 files changed, 37 insertions(+), 39 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/st,nomadik.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/ste-nomadik.txt
Documentation/devicetree/bindings/arm/st,nomadik.yaml new file +36 -0
new file mode 100644
index 000000000000..9a6d1458cad3
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/st,nomadik.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ST Nomadik SoC based Boards
+
+maintainers:
+  - Linus Walleij <[email protected]>
+
+description: |
+  Boards using the Nomadik SoC platform
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+      - const: st,nomadik-nhk-15
+      - const: calaosystems,usb-s8815
+
+additionalProperties: true
+
+examples:
+  - |
+    usb-s8815 {
+        ethernet-gpio {
+            gpios = <&gpio3 19 0x1>;
+            interrupts = <19 0x1>;
+            interrupt-parent = <&gpio3>;
+        };
+        mmcsd-gpio {
+            gpios = <&gpio3 16 0x1>;
+        };
+    };
Documentation/devicetree/bindings/arm/ste-nomadik.txt deleted +0 -38
deleted file mode 100644
index 2fdff5a806cf..000000000000
@@ -1,38 +0,0 @@
-ST-Ericsson Nomadik Device Tree Bindings
-
-For various board the "board" node may contain specific properties
-that pertain to this particular board, such as board-specific GPIOs.
-
-Required root node property: src
-- Nomadik System and reset controller used for basic chip control, clock
-  and reset line control.
-- compatible: must be "stericsson,nomadik,src"
-
-Boards with the Nomadik SoC include:
-
-Nomadik NHK-15 board manufactured by ST Microelectronics:
-
-Required root node property:
-
-compatible="st,nomadik-nhk-15";
-
-S8815 "MiniKit" manufactured by Calao Systems:
-
-Required root node property:
-
-compatible="calaosystems,usb-s8815";
-
-Required node: usb-s8815
-
-Example:
-
-usb-s8815 {
-		ethernet-gpio {
-			gpios = <&gpio3 19 0x1>;
-			interrupts = <19 0x1>;
-			interrupt-parent = <&gpio3>;
-		};
-		mmcsd-gpio {
-			gpios = <&gpio3 16 0x1>;
-		};
-};
MAINTAINERS +1 -1
index 2fb1c75afd16..86e7c1dd51ed 100644
@@ -3155,7 +3155,7 @@ M:	Linus Walleij <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
-F:	Documentation/devicetree/bindings/arm/ste-*
+F:	Documentation/devicetree/bindings/arm/st,nomadik.yaml
 F:	Documentation/devicetree/bindings/arm/ux500.yaml
 F:	Documentation/devicetree/bindings/arm/ux500/
 F:	Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml
Signature · 1 line
2.54.0
Reviewed-by on v1 1/1
#2 lore raw
In reply to Andrew Rembrandt
Quoted 46 lines · Andrew Rembrandt

Convert the ST Nomadik boards binding from free-form text to DT schema.

The binding documents the Nomadik NHK15/USB-S8815 platform compatibles and keeps the existing example.

---
 .../devicetree/bindings/arm/st,nomadik.yaml   | 36 ++++++++++++++++++
 .../devicetree/bindings/arm/ste-nomadik.txt   | 38 -------------------
 MAINTAINERS                                   |  2 +-
 3 files changed, 37 insertions(+), 39 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/st,nomadik.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/ste-nomadik.txt
Documentation/devicetree/bindings/arm/st,nomadik.yaml new file +26 -0
new file mode 100644
index 000000000000..9a6d1458cad3
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/st,nomadik.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ST Nomadik SoC based Boards
+
+maintainers:
+  - Linus Walleij <[email protected]>
+
+description: |
+  Boards using the Nomadik SoC platform
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+      - const: st,nomadik-nhk-15
+      - const: calaosystems,usb-s8815
+
+additionalProperties: true
+
+examples:
+  - |

Documentation/devicetree/bindings/arm/st,nomadik.yaml line 36

Quoted 10 lines
Documentation/devicetree/bindings/arm/st,nomadik.yaml new file +10 -0
+    usb-s8815 {
+        ethernet-gpio {
+            gpios = <&gpio3 19 0x1>;
+            interrupts = <19 0x1>;
+            interrupt-parent = <&gpio3>;
+        };
+        mmcsd-gpio {
+            gpios = <&gpio3 16 0x1>;
+        };
+    };

This example should just be removed, it has nothing to do with what's in the binding above. The text binding describes it as a "required node", but no node by the name appears in the kernel sources.

With it gone,

pw-bot: changes-requested

Cheers,
Conor.

#3 lore raw
In reply to Andrew Rembrandt
Quoted 5 lines · Andrew Rembrandt

Convert the ST Nomadik boards binding from free-form text to DT schema.

The binding documents the Nomadik NHK15/USB-S8815 platform compatibles and keeps the existing example.

Quoted 9 lines
---
 .../devicetree/bindings/arm/st,nomadik.yaml   | 36 ++++++++++++++++++
 .../devicetree/bindings/arm/ste-nomadik.txt   | 38 -------------------
 MAINTAINERS                                   |  2 +-
 3 files changed, 37 insertions(+), 39 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/st,nomadik.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/ste-nomadik.txt

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/arm/st,nomadik.yaml: properties:compatible:oneOf: [{'const': 'st,nomadik-nhk-15'}, {'const': 'calaosystems,usb-s8815'}] should not be valid under {'items': {'propertyNames': {'const': 'const'}, 'required': ['const']}}
hint: Use 'enum' rather than 'oneOf' + 'const' entries
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/arm/st,nomadik.example.dtb: usb-s8815: ethernet-gpio: {'gpios': [[4294967295, 19, 1]], 'interrupts': [[19, 1]]} is not of type 'array'
from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/arm/st,nomadik.example.dtb: usb-s8815: mmcsd-gpio: {'gpios': [[4294967295, 16, 1]]} is not of type 'array'
from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.kernel.org/project/devicetree/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.