diff mbox series

dt-bindings: phy: convert phy-hi3660-usb3.txt to yaml

Message ID edfeafe6b5a60a84d08095fb380f32e61af46d40.1599206213.git.mchehab+huawei@kernel.org
State Accepted, archived
Headers show
Series dt-bindings: phy: convert phy-hi3660-usb3.txt to yaml | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 2 warnings, 60 lines checked
robh/dt-meta-schema success

Commit Message

Mauro Carvalho Chehab Sept. 4, 2020, 7:58 a.m. UTC
Convert Hisilicon Kirin 960 USB3 PHY bindings to DT schema
format using json-schema.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

Rob,

As I'm about to submit a patch series with the phy interface for Kirin 970,
let's first convert the Kirin 960 USB3 PHY binding, as it is close enough 
to the PHY interface bindins for Kirin 970.

 .../bindings/phy/hisilicon,hi3660-usb3.yaml   | 60 +++++++++++++++++++
 .../bindings/phy/phy-hi3660-usb3.txt          | 26 --------
 2 files changed, 60 insertions(+), 26 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/hisilicon,hi3660-usb3.yaml
 delete mode 100644 Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt

Comments

Rob Herring (Arm) Sept. 14, 2020, 9:10 p.m. UTC | #1
On Fri, 04 Sep 2020 09:58:34 +0200, Mauro Carvalho Chehab wrote:
> Convert Hisilicon Kirin 960 USB3 PHY bindings to DT schema
> format using json-schema.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> 
> Rob,
> 
> As I'm about to submit a patch series with the phy interface for Kirin 970,
> let's first convert the Kirin 960 USB3 PHY binding, as it is close enough
> to the PHY interface bindins for Kirin 970.
> 
>  .../bindings/phy/hisilicon,hi3660-usb3.yaml   | 60 +++++++++++++++++++
>  .../bindings/phy/phy-hi3660-usb3.txt          | 26 --------
>  2 files changed, 60 insertions(+), 26 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/phy/hisilicon,hi3660-usb3.yaml
>  delete mode 100644 Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/phy/hisilicon,hi3660-usb3.yaml b/Documentation/devicetree/bindings/phy/hisilicon,hi3660-usb3.yaml
new file mode 100644
index 000000000000..c2e073e26190
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/hisilicon,hi3660-usb3.yaml
@@ -0,0 +1,60 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/hisilicon,hi3660-usb3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon Kirin 960 USB PHY
+
+maintainers:
+  - Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+description: |+
+  Bindings for USB3 PHY on HiSilicon Kirin 960.
+
+properties:
+  compatible:
+    const: hisilicon,hi3660-usb-phy
+
+  "#phy-cells":
+    const: 0
+
+  hisilicon,pericrg-syscon:
+    $ref: '/schemas/types.yaml#/definitions/phandle'
+    description: phandle of syscon used to control iso refclk.
+
+  hisilicon,pctrl-syscon:
+    $ref: '/schemas/types.yaml#/definitions/phandle'
+    description: phandle of syscon used to control usb tcxo.
+
+  hisilicon,eye-diagram-param:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Eye diagram for phy.
+
+required:
+  - compatible
+  - hisilicon,pericrg-syscon
+  - hisilicon,pctrl-syscon
+  - hisilicon,eye-diagram-param
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    bus {
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      usb3_otg_bc: usb3_otg_bc@ff200000 {
+        compatible = "syscon", "simple-mfd";
+        reg = <0x0 0xff200000 0x0 0x1000>;
+
+        usb-phy {
+          compatible = "hisilicon,hi3660-usb-phy";
+          #phy-cells = <0>;
+          hisilicon,pericrg-syscon = <&crg_ctrl>;
+          hisilicon,pctrl-syscon = <&pctrl>;
+          hisilicon,eye-diagram-param = <0x22466e4>;
+        };
+      };
+    };
diff --git a/Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt b/Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt
deleted file mode 100644
index e88ba7d92dcb..000000000000
--- a/Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt
+++ /dev/null
@@ -1,26 +0,0 @@ 
-Hisilicon hi3660 USB PHY
------------------------
-
-Required properties:
-- compatible: should be "hisilicon,hi3660-usb-phy"
-- #phy-cells: must be 0
-- hisilicon,pericrg-syscon: phandle of syscon used to control phy.
-- hisilicon,pctrl-syscon: phandle of syscon used to control phy.
-- hisilicon,eye-diagram-param: parameter set for phy
-Refer to phy/phy-bindings.txt for the generic PHY binding properties
-
-This is a subnode of usb3_otg_bc register node.
-
-Example:
-	usb3_otg_bc: usb3_otg_bc@ff200000 {
-		compatible = "syscon", "simple-mfd";
-		reg = <0x0 0xff200000 0x0 0x1000>;
-
-		usb-phy {
-			compatible = "hisilicon,hi3660-usb-phy";
-			#phy-cells = <0>;
-			hisilicon,pericrg-syscon = <&crg_ctrl>;
-			hisilicon,pctrl-syscon = <&pctrl>;
-			hisilicon,eye-diagram-param = <0x22466e4>;
-		};
-	};