dt-bindings: serial: Convert UniPhier UART to json-schema
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 21 Feb 2020 02:11:36 +0000 (11:11 +0900)
committerRob Herring <robh@kernel.org>
Wed, 26 Feb 2020 16:45:36 +0000 (10:45 -0600)
Convert the UniPhier UART binding to DT schema format.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/serial/socionext,uniphier-uart.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/serial/uniphier-uart.txt [deleted file]

diff --git a/Documentation/devicetree/bindings/serial/socionext,uniphier-uart.yaml b/Documentation/devicetree/bindings/serial/socionext,uniphier-uart.yaml
new file mode 100644 (file)
index 0000000..09a3030
--- /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/socionext,uniphier-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: UniPhier UART controller
+
+maintainers:
+  - Masahiro Yamada <yamada.masahiro@socionext.com>
+
+properties:
+  compatible:
+    const: socionext,uniphier-uart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 1
+
+  auto-flow-control:
+    description: enable automatic flow control support.
+    $ref: /schemas/types.yaml#/definitions/flag
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+examples:
+  - |
+    aliases {
+        serial0 = &serial0;
+    };
+
+    serial0: serial@54006800 {
+        compatible = "socionext,uniphier-uart";
+        reg = <0x54006800 0x40>;
+        interrupts = <0 33 4>;
+        clocks = <&uart_clk>;
+    };
diff --git a/Documentation/devicetree/bindings/serial/uniphier-uart.txt b/Documentation/devicetree/bindings/serial/uniphier-uart.txt
deleted file mode 100644 (file)
index 7a1bf02..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-UniPhier UART controller
-
-Required properties:
-- compatible: should be "socionext,uniphier-uart".
-- reg: offset and length of the register set for the device.
-- interrupts: a single interrupt specifier.
-- clocks: phandle to the input clock.
-
-Optional properties:
--auto-flow-control: enable automatic flow control support.
-
-Example:
-       aliases {
-               serial0 = &serial0;
-       };
-
-       serial0: serial@54006800 {
-               compatible = "socionext,uniphier-uart";
-               reg = <0x54006800 0x40>;
-               interrupts = <0 33 4>;
-               clocks = <&uart_clk>;
-       };