diff mbox series

[4/6] dt-bindings: usb: usbmisc-imx: convert to yaml

Message ID 20221010101816.298334-5-peng.fan@oss.nxp.com
State New
Headers show
Series dt-bindings: usb: covert ci-hdrc-usb2/usbmisc-imx to yaml | expand

Commit Message

Peng Fan (OSS) Oct. 10, 2022, 10:18 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

Convert usbmisc-imx to yaml format.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 .../devicetree/bindings/usb/usbmisc-imx.txt   | 18 -------
 .../devicetree/bindings/usb/usbmisc-imx.yaml  | 52 +++++++++++++++++++
 2 files changed, 52 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/usbmisc-imx.txt
 create mode 100644 Documentation/devicetree/bindings/usb/usbmisc-imx.yaml

Comments

Krzysztof Kozlowski Oct. 12, 2022, 1:28 p.m. UTC | #1
On 10/10/2022 06:18, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Convert usbmisc-imx to yaml format.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  .../devicetree/bindings/usb/usbmisc-imx.txt   | 18 -------
>  .../devicetree/bindings/usb/usbmisc-imx.yaml  | 52 +++++++++++++++++++
>  2 files changed, 52 insertions(+), 18 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/usb/usbmisc-imx.txt
>  create mode 100644 Documentation/devicetree/bindings/usb/usbmisc-imx.yaml
> 
> diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt
> deleted file mode 100644
> index b796836d2ce7..000000000000
> --- a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -* Freescale i.MX non-core registers
> -
> -Required properties:
> -- #index-cells: Cells used to describe usb controller index. Should be <1>
> -- compatible: Should be one of below:
> -	"fsl,imx6q-usbmisc" for imx6q
> -	"fsl,vf610-usbmisc" for Vybrid vf610
> -	"fsl,imx6sx-usbmisc" for imx6sx
> -	"fsl,imx7d-usbmisc" for imx7d
> -	"fsl,imx7ulp-usbmisc" for imx7ulp
> -- reg: Should contain registers location and length
> -
> -Examples:
> -usbmisc@2184800 {
> -	#index-cells = <1>;
> -	compatible = "fsl,imx6q-usbmisc";
> -	reg = <0x02184800 0x200>;
> -};
> diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.yaml b/Documentation/devicetree/bindings/usb/usbmisc-imx.yaml

Filename: fsl,usbmisc.yaml

> new file mode 100644
> index 000000000000..c0741ce9b523
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/usbmisc-imx.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/usbmisc-imx.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale i.MX non-core registers

non-core registers? Does not look right.


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt
deleted file mode 100644
index b796836d2ce7..000000000000
--- a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt
+++ /dev/null
@@ -1,18 +0,0 @@ 
-* Freescale i.MX non-core registers
-
-Required properties:
-- #index-cells: Cells used to describe usb controller index. Should be <1>
-- compatible: Should be one of below:
-	"fsl,imx6q-usbmisc" for imx6q
-	"fsl,vf610-usbmisc" for Vybrid vf610
-	"fsl,imx6sx-usbmisc" for imx6sx
-	"fsl,imx7d-usbmisc" for imx7d
-	"fsl,imx7ulp-usbmisc" for imx7ulp
-- reg: Should contain registers location and length
-
-Examples:
-usbmisc@2184800 {
-	#index-cells = <1>;
-	compatible = "fsl,imx6q-usbmisc";
-	reg = <0x02184800 0x200>;
-};
diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.yaml b/Documentation/devicetree/bindings/usb/usbmisc-imx.yaml
new file mode 100644
index 000000000000..c0741ce9b523
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/usbmisc-imx.yaml
@@ -0,0 +1,52 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/usbmisc-imx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale i.MX non-core registers
+
+maintainers:
+  - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - fsl,imx6q-usbmisc
+          - fsl,imx7ulp-usbmisc
+          - fsl,vf610-usbmisc
+      - items:
+          - enum:
+              - fsl,imx6ul-usbmisc
+              - fsl,imx6sx-usbmisc
+              - fsl,imx7d-usbmisc
+          - const: fsl,imx6q-usbmisc
+      - items:
+          - enum:
+              - fsl,imx7ulp-usbmisc
+          - const: fsl,imx7d-usbmisc
+
+  reg:
+    maxItems: 1
+
+  '#index-cells':
+    const: 1
+    description: Cells used to describe usb controller index. Should be <1>
+
+required:
+  - compatible
+  - reg
+  - '#index-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    usbmisc@2184800 {
+        #index-cells = <1>;
+        compatible = "fsl,imx6q-usbmisc";
+        reg = <0x02184800 0x200>;
+    };
+
+...