]> Gentwo Git Trees - linux/.git/commitdiff
dt-bindings: bus: Convert cznic,moxtet to DT schema
authorRob Herring (Arm) <robh@kernel.org>
Tue, 14 Oct 2025 15:30:05 +0000 (10:30 -0500)
committerRob Herring (Arm) <robh@kernel.org>
Mon, 17 Nov 2025 17:24:49 +0000 (11:24 -0600)
Convert the cznic,moxtet binding to DT schema format. It's a
straight-forward conversion.

Reviewed-by: Marek BehĂșn <kabel@kernel.org>
Link: https://patch.msgid.link/20251014153009.3783183-1-robh@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Documentation/devicetree/bindings/bus/cznic,moxtet.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/bus/moxtet.txt [deleted file]
MAINTAINERS

diff --git a/Documentation/devicetree/bindings/bus/cznic,moxtet.yaml b/Documentation/devicetree/bindings/bus/cznic,moxtet.yaml
new file mode 100644 (file)
index 0000000..d340899
--- /dev/null
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/cznic,moxtet.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Turris Moxtet SPI bus
+
+maintainers:
+  - Marek BehĂșn <kabel@kernel.org>
+
+description: >
+  Turris Mox module status and configuration bus (over SPI)
+
+  The driver finds the devices connected to the bus by itself, but it may be
+  needed to reference some of them from other parts of the device tree. In that
+  case the devices can be defined as subnodes of the moxtet node.
+
+properties:
+  compatible:
+    const: cznic,moxtet
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+  spi-cpol: true
+
+  spi-cpha: true
+
+  spi-max-frequency: true
+
+  interrupt-controller: true
+
+  "#interrupt-cells":
+    const: 1
+
+  interrupts:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - spi-cpol
+  - spi-cpha
+  - interrupts
+  - interrupt-controller
+  - "#interrupt-cells"
+
+additionalProperties:
+  type: object
+
+  required:
+    - reg
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        moxtet@1 {
+            compatible = "cznic,moxtet";
+            #address-cells = <1>;
+            #size-cells = <0>;
+            reg = <1>;
+            spi-max-frequency = <10000000>;
+            spi-cpol;
+            spi-cpha;
+            interrupt-controller;
+            #interrupt-cells = <1>;
+            interrupt-parent = <&gpiosb>;
+            interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+
+            gpio@0 {
+                compatible = "cznic,moxtet-gpio";
+                gpio-controller;
+                #gpio-cells = <2>;
+                reg = <0>;
+            };
+        };
+    };
diff --git a/Documentation/devicetree/bindings/bus/moxtet.txt b/Documentation/devicetree/bindings/bus/moxtet.txt
deleted file mode 100644 (file)
index fb50fc8..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-Turris Mox module status and configuration bus (over SPI)
-
-Required properties:
- - compatible          : Should be "cznic,moxtet"
- - #address-cells      : Has to be 1
- - #size-cells         : Has to be 0
- - spi-cpol            : Required inverted clock polarity
- - spi-cpha            : Required shifted clock phase
- - interrupts          : Must contain reference to the shared interrupt line
- - interrupt-controller        : Required
- - #interrupt-cells    : Has to be 1
-
-For other required and optional properties of SPI slave nodes please refer to
-../spi/spi-bus.txt.
-
-Required properties of subnodes:
- - reg                 : Should be position on the Moxtet bus (how many Moxtet
-                         modules are between this module and CPU module, so
-                         either 0 or a positive integer)
-
-The driver finds the devices connected to the bus by itself, but it may be
-needed to reference some of them from other parts of the device tree. In that
-case the devices can be defined as subnodes of the moxtet node.
-
-Example:
-
-       moxtet@1 {
-               compatible = "cznic,moxtet";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               reg = <1>;
-               spi-max-frequency = <10000000>;
-               spi-cpol;
-               spi-cpha;
-               interrupt-controller;
-               #interrupt-cells = <1>;
-               interrupt-parent = <&gpiosb>;
-               interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
-
-               moxtet_sfp: gpio@0 {
-                       compatible = "cznic,moxtet-gpio";
-                       gpio-controller;
-                       #gpio-cells = <2>;
-                       reg = <0>;
-               }
-       };
index 46126ce2f968e4f9260263f1574ee29f5ff0de1c..62dc8672d3e176ff288590175c770fb2df93fc81 100644 (file)
@@ -2656,7 +2656,7 @@ F:        Documentation/ABI/testing/debugfs-moxtet
 F:     Documentation/ABI/testing/sysfs-bus-i2c-devices-turris-omnia-mcu
 F:     Documentation/ABI/testing/sysfs-bus-moxtet-devices
 F:     Documentation/ABI/testing/sysfs-firmware-turris-mox-rwtm
-F:     Documentation/devicetree/bindings/bus/moxtet.txt
+F:     Documentation/devicetree/bindings/bus/cznic,moxtet.yaml
 F:     Documentation/devicetree/bindings/firmware/cznic,turris-mox-rwtm.txt
 F:     Documentation/devicetree/bindings/firmware/cznic,turris-omnia-mcu.yaml
 F:     Documentation/devicetree/bindings/interrupt-controller/marvell,mpic.yaml