]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dt-bindings: serial: Convert arm,mps2-uart to DT schema
authorRob Herring (Arm) <robh@kernel.org>
Tue, 6 May 2025 22:00:11 +0000 (17:00 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 May 2025 11:36:32 +0000 (13:36 +0200)
Convert the Arm MPS2 UART binding to DT schema. It is a straight-forward
conversion.

Signed-off-by: "Rob Herring (Arm)" <robh@kernel.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20250506220012.2545470-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/serial/arm,mps2-uart.txt [deleted file]
Documentation/devicetree/bindings/serial/arm,mps2-uart.yaml [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/serial/arm,mps2-uart.txt b/Documentation/devicetree/bindings/serial/arm,mps2-uart.txt
deleted file mode 100644 (file)
index 128cc6a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-ARM MPS2 UART
-
-Required properties:
-- compatible   : Should be "arm,mps2-uart"
-- reg          : Address and length of the register set
-- interrupts   : Reference to the UART RX, TX and overrun interrupts
-
-Required clocking property:
-- clocks         : The input clock of the UART
-
-
-Examples:
-
-uart0: serial@40004000 {
-       compatible = "arm,mps2-uart";
-       reg = <0x40004000 0x1000>;
-       interrupts = <0 1 12>;
-       clocks = <&sysclk>;
-};
diff --git a/Documentation/devicetree/bindings/serial/arm,mps2-uart.yaml b/Documentation/devicetree/bindings/serial/arm,mps2-uart.yaml
new file mode 100644 (file)
index 0000000..4a8df07
--- /dev/null
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/arm,mps2-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Arm MPS2 UART
+
+maintainers:
+  - Vladimir Murzin <vladimir.murzin@arm.com>
+
+allOf:
+  - $ref: /schemas/serial/serial.yaml#
+
+properties:
+  compatible:
+    const: arm,mps2-uart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: RX interrupt
+      - description: TX interrupt
+      - description: Overrun interrupt
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    serial@40004000 {
+        compatible = "arm,mps2-uart";
+        reg = <0x40004000 0x1000>;
+        interrupts = <0>, <1>, <12>;
+        clocks = <&sysclk>;
+    };