dt-bindings: phy: Convert phy-mmp3-usb to json-schema
authorLubomir Rintel <lkundrak@v3.sk>
Tue, 17 Mar 2020 09:39:14 +0000 (10:39 +0100)
committerRob Herring <robh@kernel.org>
Tue, 31 Mar 2020 15:03:33 +0000 (09:03 -0600)
A rather straightforward conversion of the phy-mmp3-usb binding to DT
schema format using json-schema.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
[robh: add additionalProperties]
Signed-off-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/phy/marvell,mmp3-usb-phy.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/phy/phy-mmp3-usb.txt [deleted file]

diff --git a/Documentation/devicetree/bindings/phy/marvell,mmp3-usb-phy.yaml b/Documentation/devicetree/bindings/phy/marvell,mmp3-usb-phy.yaml
new file mode 100644 (file)
index 0000000..c97043e
--- /dev/null
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+# Copyright 2019,2020 Lubomir Rintel <lkundrak@v3.sk>
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/marvell,mmp3-usb-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell MMP3 USB PHY bindings
+
+maintainers:
+  - Lubomir Rintel <lkundrak@v3.sk>
+
+properties:
+  $nodename:
+    pattern: '^usb-phy@[a-f0-9]+$'
+
+  compatible:
+    const: marvell,mmp3-usb-phy
+
+  reg:
+    maxItems: 1
+    description: base address of the device
+
+  '#phy-cells':
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - '#phy-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    usb-phy@d4207000 {
+      compatible = "marvell,mmp3-usb-phy";
+      reg = <0xd4207000 0x40>;
+      #phy-cells = <0>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/phy/phy-mmp3-usb.txt b/Documentation/devicetree/bindings/phy/phy-mmp3-usb.txt
deleted file mode 100644 (file)
index 7183b91..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Marvell MMP3 USB PHY
---------------------
-
-Required properties:
-- compatible: must be "marvell,mmp3-usb-phy"
-- #phy-cells: must be 0
-
-Example:
-       usb-phy: usb-phy@d4207000 {
-               compatible = "marvell,mmp3-usb-phy";
-               reg = <0xd4207000 0x40>;
-               #phy-cells = <0>;
-       };