[1/3] dt-bindings: phy: convert Broadcom NS USB 2.0 to the json-schema
diff mbox series

Message ID 20210226114501.31086-1-zajec5@gmail.com
State New, archived
Headers show
Series
  • [1/3] dt-bindings: phy: convert Broadcom NS USB 2.0 to the json-schema
Related show

Commit Message

Rafał Miłecki Feb. 26, 2021, 11:44 a.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

Minor example fixes:
1. Include bcm-nsp.h
2. Add address to the node name

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
This has been verified using dt_binding_check
---
 .../bindings/phy/bcm-ns-usb2-phy.txt          | 21 -------
 .../bindings/phy/brcm,ns-usb2-phy.yaml        | 55 +++++++++++++++++++
 2 files changed, 55 insertions(+), 21 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt
 create mode 100644 Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml

Comments

Rafał Miłecki March 5, 2021, 5:24 p.m. UTC | #1
Cc linux-phy@

On 26.02.2021 12:44, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Minor example fixes:
> 1. Include bcm-nsp.h
> 2. Add address to the node name
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> This has been verified using dt_binding_check
> ---
>   .../bindings/phy/bcm-ns-usb2-phy.txt          | 21 -------
>   .../bindings/phy/brcm,ns-usb2-phy.yaml        | 55 +++++++++++++++++++
>   2 files changed, 55 insertions(+), 21 deletions(-)
>   delete mode 100644 Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt
>   create mode 100644 Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt b/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt
> deleted file mode 100644
> index a7aee9ea8926..000000000000
> --- a/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -Driver for Broadcom Northstar USB 2.0 PHY
> -
> -Required properties:
> -- compatible: brcm,ns-usb2-phy
> -- reg: iomem address range of DMU (Device Management Unit)
> -- reg-names: "dmu", the only needed & supported reg right now
> -- clocks: USB PHY reference clock
> -- clock-names: "phy-ref-clk", the only needed & supported clock right now
> -
> -To initialize USB 2.0 PHY driver needs to setup PLL correctly. To do this it
> -requires passing phandle to the USB PHY reference clock.
> -
> -Example:
> -	usb2-phy {
> -		compatible = "brcm,ns-usb2-phy";
> -		reg = <0x1800c000 0x1000>;
> -		reg-names = "dmu";
> -		#phy-cells = <0>;
> -		clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
> -		clock-names = "phy-ref-clk";
> -	};
> diff --git a/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml
> new file mode 100644
> index 000000000000..b8b683ce8fa9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/brcm,ns-usb2-phy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom Northstar USB 2.0 PHY
> +
> +description: Broadcom's USB 2.0 PHY integrated into Northstar family SoCs
> +
> +maintainers:
> +  - Rafał Miłecki <rafal@milecki.pl>
> +
> +properties:
> +  compatible:
> +    const: brcm,ns-usb2-phy
> +
> +  reg:
> +    maxItems: 1
> +    description: DMU (Device Management Unit) address range
> +
> +  reg-names:
> +    const: dmu
> +
> +  clocks:
> +    maxItems: 1
> +    description: USB PHY reference clock
> +
> +  clock-names:
> +    const: phy-ref-clk
> +
> +  "#phy-cells":
> +    const: 0
> +
> +required:
> +  - reg
> +  - reg-names
> +  - clocks
> +  - clock-names
> +  - "#phy-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/bcm-nsp.h>
> +
> +    usb2-phy@1800c000 {
> +        compatible = "brcm,ns-usb2-phy";
> +        reg = <0x1800c000 0x1000>;
> +        reg-names = "dmu";
> +        clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
> +        clock-names = "phy-ref-clk";
> +        #phy-cells = <0>;
> +    };
>
Rafał Miłecki March 5, 2021, 9:48 p.m. UTC | #2
Cc linux-phy@ again (after fixing recipients limit)

On 26.02.2021 12:44, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Minor example fixes:
> 1. Include bcm-nsp.h
> 2. Add address to the node name
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> This has been verified using dt_binding_check
> ---
>   .../bindings/phy/bcm-ns-usb2-phy.txt          | 21 -------
>   .../bindings/phy/brcm,ns-usb2-phy.yaml        | 55 +++++++++++++++++++
>   2 files changed, 55 insertions(+), 21 deletions(-)
>   delete mode 100644 Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt
>   create mode 100644 Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt b/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt
> deleted file mode 100644
> index a7aee9ea8926..000000000000
> --- a/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -Driver for Broadcom Northstar USB 2.0 PHY
> -
> -Required properties:
> -- compatible: brcm,ns-usb2-phy
> -- reg: iomem address range of DMU (Device Management Unit)
> -- reg-names: "dmu", the only needed & supported reg right now
> -- clocks: USB PHY reference clock
> -- clock-names: "phy-ref-clk", the only needed & supported clock right now
> -
> -To initialize USB 2.0 PHY driver needs to setup PLL correctly. To do this it
> -requires passing phandle to the USB PHY reference clock.
> -
> -Example:
> -	usb2-phy {
> -		compatible = "brcm,ns-usb2-phy";
> -		reg = <0x1800c000 0x1000>;
> -		reg-names = "dmu";
> -		#phy-cells = <0>;
> -		clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
> -		clock-names = "phy-ref-clk";
> -	};
> diff --git a/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml
> new file mode 100644
> index 000000000000..b8b683ce8fa9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/brcm,ns-usb2-phy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom Northstar USB 2.0 PHY
> +
> +description: Broadcom's USB 2.0 PHY integrated into Northstar family SoCs
> +
> +maintainers:
> +  - Rafał Miłecki <rafal@milecki.pl>
> +
> +properties:
> +  compatible:
> +    const: brcm,ns-usb2-phy
> +
> +  reg:
> +    maxItems: 1
> +    description: DMU (Device Management Unit) address range
> +
> +  reg-names:
> +    const: dmu
> +
> +  clocks:
> +    maxItems: 1
> +    description: USB PHY reference clock
> +
> +  clock-names:
> +    const: phy-ref-clk
> +
> +  "#phy-cells":
> +    const: 0
> +
> +required:
> +  - reg
> +  - reg-names
> +  - clocks
> +  - clock-names
> +  - "#phy-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/bcm-nsp.h>
> +
> +    usb2-phy@1800c000 {
> +        compatible = "brcm,ns-usb2-phy";
> +        reg = <0x1800c000 0x1000>;
> +        reg-names = "dmu";
> +        clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
> +        clock-names = "phy-ref-clk";
> +        #phy-cells = <0>;
> +    };
>
Rob Herring March 6, 2021, 9:25 p.m. UTC | #3
On Fri, 26 Feb 2021 12:44:59 +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Minor example fixes:
> 1. Include bcm-nsp.h
> 2. Add address to the node name
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> This has been verified using dt_binding_check
> ---
>  .../bindings/phy/bcm-ns-usb2-phy.txt          | 21 -------
>  .../bindings/phy/brcm,ns-usb2-phy.yaml        | 55 +++++++++++++++++++
>  2 files changed, 55 insertions(+), 21 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt
>  create mode 100644 Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt b/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt
deleted file mode 100644
index a7aee9ea8926..000000000000
--- a/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.txt
+++ /dev/null
@@ -1,21 +0,0 @@ 
-Driver for Broadcom Northstar USB 2.0 PHY
-
-Required properties:
-- compatible: brcm,ns-usb2-phy
-- reg: iomem address range of DMU (Device Management Unit)
-- reg-names: "dmu", the only needed & supported reg right now
-- clocks: USB PHY reference clock
-- clock-names: "phy-ref-clk", the only needed & supported clock right now
-
-To initialize USB 2.0 PHY driver needs to setup PLL correctly. To do this it
-requires passing phandle to the USB PHY reference clock.
-
-Example:
-	usb2-phy {
-		compatible = "brcm,ns-usb2-phy";
-		reg = <0x1800c000 0x1000>;
-		reg-names = "dmu";
-		#phy-cells = <0>;
-		clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
-		clock-names = "phy-ref-clk";
-	};
diff --git a/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml
new file mode 100644
index 000000000000..b8b683ce8fa9
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/brcm,ns-usb2-phy.yaml
@@ -0,0 +1,55 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/brcm,ns-usb2-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom Northstar USB 2.0 PHY
+
+description: Broadcom's USB 2.0 PHY integrated into Northstar family SoCs
+
+maintainers:
+  - Rafał Miłecki <rafal@milecki.pl>
+
+properties:
+  compatible:
+    const: brcm,ns-usb2-phy
+
+  reg:
+    maxItems: 1
+    description: DMU (Device Management Unit) address range
+
+  reg-names:
+    const: dmu
+
+  clocks:
+    maxItems: 1
+    description: USB PHY reference clock
+
+  clock-names:
+    const: phy-ref-clk
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - reg
+  - reg-names
+  - clocks
+  - clock-names
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/bcm-nsp.h>
+
+    usb2-phy@1800c000 {
+        compatible = "brcm,ns-usb2-phy";
+        reg = <0x1800c000 0x1000>;
+        reg-names = "dmu";
+        clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
+        clock-names = "phy-ref-clk";
+        #phy-cells = <0>;
+    };