All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: phy: convert Qualcomm USB HS phy to yaml
@ 2021-12-30  0:07 ` David Heidelberg
  0 siblings, 0 replies; 8+ messages in thread
From: David Heidelberg @ 2021-12-30  0:07 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I, Vinod Koul,
	Rob Herring
  Cc: ~okias/devicetree, David Heidelberg, linux-arm-msm, linux-phy,
	devicetree, linux-kernel

Conversion of Qualcomm USB HS phy documentation to yaml.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
v2:
 - changed uint8 array to matrix
 - improved clock-names check
 - move reset-names items, adjust DTS files later
 - added clocks and resets min and maxItems
 - if'ed resets, since apq8064 doesn't have phy reset
---
 .../bindings/phy/qcom,usb-hs-phy.txt          |  84 --------------
 .../bindings/phy/qcom,usb-hs-phy.yaml         | 108 ++++++++++++++++++
 2 files changed, 108 insertions(+), 84 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
deleted file mode 100644
index b3b75c1e6285..000000000000
--- a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-Qualcomm's USB HS PHY
-
-PROPERTIES
-
-- compatible:
-    Usage: required
-    Value type: <string>
-    Definition: Should contain "qcom,usb-hs-phy" and more specifically one of the
-                following:
-
-                        "qcom,usb-hs-phy-apq8064"
-                        "qcom,usb-hs-phy-msm8916"
-                        "qcom,usb-hs-phy-msm8974"
-
-- #phy-cells:
-    Usage: required
-    Value type: <u32>
-    Definition: Should contain 0
-
-- clocks:
-    Usage: required
-    Value type: <prop-encoded-array>
-    Definition: Should contain clock specifier for the reference and sleep
-                clocks
-
-- clock-names:
-    Usage: required
-    Value type: <stringlist>
-    Definition: Should contain "ref" and "sleep" for the reference and sleep
-                clocks respectively
-
-- resets:
-    Usage: required
-    Value type: <prop-encoded-array>
-    Definition: Should contain the phy and POR resets
-
-- reset-names:
-    Usage: required
-    Value type: <stringlist>
-    Definition: Should contain "phy" and "por" for the phy and POR resets
-                respectively
-
-- v3p3-supply:
-    Usage: required
-    Value type: <phandle>
-    Definition: Should contain a reference to the 3.3V supply
-
-- v1p8-supply:
-    Usage: required
-    Value type: <phandle>
-    Definition: Should contain a reference to the 1.8V supply
-
-- extcon:
-    Usage: optional
-    Value type: <prop-encoded-array>
-    Definition: Should contain the vbus extcon
-
-- qcom,init-seq:
-    Usage: optional
-    Value type: <u8 array>
-    Definition: Should contain a sequence of ULPI address and value pairs to
-                program into the ULPI_EXT_VENDOR_SPECIFIC area. This is related
-                to Device Mode Eye Diagram test. The addresses are offsets
-                from the ULPI_EXT_VENDOR_SPECIFIC address, for example,
-                <0x1 0x53> would mean "write the value 0x53 to address 0x81".
-
-EXAMPLE
-
-otg: usb-controller {
-	ulpi {
-		phy {
-			compatible = "qcom,usb-hs-phy-msm8974", "qcom,usb-hs-phy";
-			#phy-cells = <0>;
-			clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
-			clock-names = "ref", "sleep";
-			resets = <&gcc GCC_USB2A_PHY_BCR>, <&otg 0>;
-			reset-names = "phy", "por";
-			v3p3-supply = <&pm8941_l24>;
-			v1p8-supply = <&pm8941_l6>;
-			extcon = <&smbb>;
-			qcom,init-seq = /bits/ 8 <0x1 0x63>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
new file mode 100644
index 000000000000..a60386bd19b2
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
@@ -0,0 +1,108 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,usb-hs-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm's USB HS PHY binding description
+
+maintainers:
+  - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+if:
+  properties:
+    compatible:
+      contains:
+        const: qcom,usb-hs-phy-apq8064
+  then:
+    properties:
+      resets:
+        maxItems: 1
+
+      reset-names:
+        const: por
+
+  else:
+    properties:
+      resets:
+        minItems: 2
+        maxItems: 2
+
+      reset-names:
+        items:
+          - const: phy
+          - const: por
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - qcom,usb-hs-phy-apq8064
+          - qcom,usb-hs-phy-msm8916
+          - qcom,usb-hs-phy-msm8974
+      - const: qcom,usb-hs-phy
+
+  clocks:
+    minItems: 2
+    maxItems: 2
+
+  clock-names:
+    maxItems: 2
+    contains:
+      items:
+        - const: ref
+        - const: sleep
+
+  resets: true
+
+  reset-names: true
+
+  v1p8-supply: true
+
+  v3p3-supply: true
+
+  extcon: true
+
+  "#phy-cells":
+    const: 0
+
+  qcom,init-seq:
+    $ref: /schemas/types.yaml#/definitions/uint8-matrix
+    description: >
+      Sequence of ULPI address and value pairs to
+      program into the ULPI_EXT_VENDOR_SPECIFIC area.
+      This is related to Device Mode Eye Diagram test.
+    maxItems: 32 # no hard limit
+    items:
+      items:
+        - description: >
+            the address is offset from the ULPI_EXT_VENDOR_SPECIFIC address
+        - description: value
+
+required:
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    otg: usb-controller {
+      ulpi {
+        phy {
+          compatible = "qcom,usb-hs-phy-msm8974", "qcom,usb-hs-phy";
+          #phy-cells = <0>;
+          clocks = <&clk 0>, <&clk 258>;
+          clock-names = "ref", "sleep";
+          resets = <&gcc 10>, <&otg 0>;
+          reset-names = "phy", "por";
+          v3p3-supply = <&pm8941_l24>;
+          v1p8-supply = <&pm8941_l6>;
+          extcon = <&smbb>;
+          qcom,init-seq = /bits/ 8 <0x1 0x63>;
+        };
+      };
+    };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2] dt-bindings: phy: convert Qualcomm USB HS phy to yaml
@ 2021-12-30  0:07 ` David Heidelberg
  0 siblings, 0 replies; 8+ messages in thread
From: David Heidelberg @ 2021-12-30  0:07 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I, Vinod Koul,
	Rob Herring
  Cc: ~okias/devicetree, David Heidelberg, linux-arm-msm, linux-phy,
	devicetree, linux-kernel

Conversion of Qualcomm USB HS phy documentation to yaml.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
v2:
 - changed uint8 array to matrix
 - improved clock-names check
 - move reset-names items, adjust DTS files later
 - added clocks and resets min and maxItems
 - if'ed resets, since apq8064 doesn't have phy reset
---
 .../bindings/phy/qcom,usb-hs-phy.txt          |  84 --------------
 .../bindings/phy/qcom,usb-hs-phy.yaml         | 108 ++++++++++++++++++
 2 files changed, 108 insertions(+), 84 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
deleted file mode 100644
index b3b75c1e6285..000000000000
--- a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-Qualcomm's USB HS PHY
-
-PROPERTIES
-
-- compatible:
-    Usage: required
-    Value type: <string>
-    Definition: Should contain "qcom,usb-hs-phy" and more specifically one of the
-                following:
-
-                        "qcom,usb-hs-phy-apq8064"
-                        "qcom,usb-hs-phy-msm8916"
-                        "qcom,usb-hs-phy-msm8974"
-
-- #phy-cells:
-    Usage: required
-    Value type: <u32>
-    Definition: Should contain 0
-
-- clocks:
-    Usage: required
-    Value type: <prop-encoded-array>
-    Definition: Should contain clock specifier for the reference and sleep
-                clocks
-
-- clock-names:
-    Usage: required
-    Value type: <stringlist>
-    Definition: Should contain "ref" and "sleep" for the reference and sleep
-                clocks respectively
-
-- resets:
-    Usage: required
-    Value type: <prop-encoded-array>
-    Definition: Should contain the phy and POR resets
-
-- reset-names:
-    Usage: required
-    Value type: <stringlist>
-    Definition: Should contain "phy" and "por" for the phy and POR resets
-                respectively
-
-- v3p3-supply:
-    Usage: required
-    Value type: <phandle>
-    Definition: Should contain a reference to the 3.3V supply
-
-- v1p8-supply:
-    Usage: required
-    Value type: <phandle>
-    Definition: Should contain a reference to the 1.8V supply
-
-- extcon:
-    Usage: optional
-    Value type: <prop-encoded-array>
-    Definition: Should contain the vbus extcon
-
-- qcom,init-seq:
-    Usage: optional
-    Value type: <u8 array>
-    Definition: Should contain a sequence of ULPI address and value pairs to
-                program into the ULPI_EXT_VENDOR_SPECIFIC area. This is related
-                to Device Mode Eye Diagram test. The addresses are offsets
-                from the ULPI_EXT_VENDOR_SPECIFIC address, for example,
-                <0x1 0x53> would mean "write the value 0x53 to address 0x81".
-
-EXAMPLE
-
-otg: usb-controller {
-	ulpi {
-		phy {
-			compatible = "qcom,usb-hs-phy-msm8974", "qcom,usb-hs-phy";
-			#phy-cells = <0>;
-			clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
-			clock-names = "ref", "sleep";
-			resets = <&gcc GCC_USB2A_PHY_BCR>, <&otg 0>;
-			reset-names = "phy", "por";
-			v3p3-supply = <&pm8941_l24>;
-			v1p8-supply = <&pm8941_l6>;
-			extcon = <&smbb>;
-			qcom,init-seq = /bits/ 8 <0x1 0x63>;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
new file mode 100644
index 000000000000..a60386bd19b2
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
@@ -0,0 +1,108 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,usb-hs-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm's USB HS PHY binding description
+
+maintainers:
+  - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+if:
+  properties:
+    compatible:
+      contains:
+        const: qcom,usb-hs-phy-apq8064
+  then:
+    properties:
+      resets:
+        maxItems: 1
+
+      reset-names:
+        const: por
+
+  else:
+    properties:
+      resets:
+        minItems: 2
+        maxItems: 2
+
+      reset-names:
+        items:
+          - const: phy
+          - const: por
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - qcom,usb-hs-phy-apq8064
+          - qcom,usb-hs-phy-msm8916
+          - qcom,usb-hs-phy-msm8974
+      - const: qcom,usb-hs-phy
+
+  clocks:
+    minItems: 2
+    maxItems: 2
+
+  clock-names:
+    maxItems: 2
+    contains:
+      items:
+        - const: ref
+        - const: sleep
+
+  resets: true
+
+  reset-names: true
+
+  v1p8-supply: true
+
+  v3p3-supply: true
+
+  extcon: true
+
+  "#phy-cells":
+    const: 0
+
+  qcom,init-seq:
+    $ref: /schemas/types.yaml#/definitions/uint8-matrix
+    description: >
+      Sequence of ULPI address and value pairs to
+      program into the ULPI_EXT_VENDOR_SPECIFIC area.
+      This is related to Device Mode Eye Diagram test.
+    maxItems: 32 # no hard limit
+    items:
+      items:
+        - description: >
+            the address is offset from the ULPI_EXT_VENDOR_SPECIFIC address
+        - description: value
+
+required:
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    otg: usb-controller {
+      ulpi {
+        phy {
+          compatible = "qcom,usb-hs-phy-msm8974", "qcom,usb-hs-phy";
+          #phy-cells = <0>;
+          clocks = <&clk 0>, <&clk 258>;
+          clock-names = "ref", "sleep";
+          resets = <&gcc 10>, <&otg 0>;
+          reset-names = "phy", "por";
+          v3p3-supply = <&pm8941_l24>;
+          v1p8-supply = <&pm8941_l6>;
+          extcon = <&smbb>;
+          qcom,init-seq = /bits/ 8 <0x1 0x63>;
+        };
+      };
+    };
-- 
2.34.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] dt-bindings: phy: convert Qualcomm USB HS phy to yaml
  2021-12-30  0:07 ` David Heidelberg
@ 2022-01-10 19:45   ` Rob Herring
  -1 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2022-01-10 19:45 UTC (permalink / raw)
  To: David Heidelberg
  Cc: Kishon Vijay Abraham I, linux-kernel, linux-phy, Andy Gross,
	~okias/devicetree, devicetree, Rob Herring, Vinod Koul,
	Bjorn Andersson, linux-arm-msm

On Thu, 30 Dec 2021 01:07:40 +0100, David Heidelberg wrote:
> Conversion of Qualcomm USB HS phy documentation to yaml.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> v2:
>  - changed uint8 array to matrix
>  - improved clock-names check
>  - move reset-names items, adjust DTS files later
>  - added clocks and resets min and maxItems
>  - if'ed resets, since apq8064 doesn't have phy reset
> ---
>  .../bindings/phy/qcom,usb-hs-phy.txt          |  84 --------------
>  .../bindings/phy/qcom,usb-hs-phy.yaml         | 108 ++++++++++++++++++
>  2 files changed, 108 insertions(+), 84 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
> 

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] dt-bindings: phy: convert Qualcomm USB HS phy to yaml
@ 2022-01-10 19:45   ` Rob Herring
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2022-01-10 19:45 UTC (permalink / raw)
  To: David Heidelberg
  Cc: Kishon Vijay Abraham I, linux-kernel, linux-phy, Andy Gross,
	~okias/devicetree, devicetree, Rob Herring, Vinod Koul,
	Bjorn Andersson, linux-arm-msm

On Thu, 30 Dec 2021 01:07:40 +0100, David Heidelberg wrote:
> Conversion of Qualcomm USB HS phy documentation to yaml.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> v2:
>  - changed uint8 array to matrix
>  - improved clock-names check
>  - move reset-names items, adjust DTS files later
>  - added clocks and resets min and maxItems
>  - if'ed resets, since apq8064 doesn't have phy reset
> ---
>  .../bindings/phy/qcom,usb-hs-phy.txt          |  84 --------------
>  .../bindings/phy/qcom,usb-hs-phy.yaml         | 108 ++++++++++++++++++
>  2 files changed, 108 insertions(+), 84 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
> 

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

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] dt-bindings: phy: convert Qualcomm USB HS phy to yaml
  2021-12-30  0:07 ` David Heidelberg
@ 2022-01-10 20:54   ` Bjorn Andersson
  -1 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2022-01-10 20:54 UTC (permalink / raw)
  To: David Heidelberg
  Cc: Andy Gross, Kishon Vijay Abraham I, Vinod Koul, Rob Herring,
	~okias/devicetree, linux-arm-msm, linux-phy, devicetree,
	linux-kernel

On Wed 29 Dec 16:07 PST 2021, David Heidelberg wrote:

> Conversion of Qualcomm USB HS phy documentation to yaml.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
> v2:
>  - changed uint8 array to matrix
>  - improved clock-names check
>  - move reset-names items, adjust DTS files later
>  - added clocks and resets min and maxItems
>  - if'ed resets, since apq8064 doesn't have phy reset
> ---
>  .../bindings/phy/qcom,usb-hs-phy.txt          |  84 --------------
>  .../bindings/phy/qcom,usb-hs-phy.yaml         | 108 ++++++++++++++++++
>  2 files changed, 108 insertions(+), 84 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
> deleted file mode 100644
> index b3b75c1e6285..000000000000
> --- a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
> +++ /dev/null
> @@ -1,84 +0,0 @@
> -Qualcomm's USB HS PHY
> -
> -PROPERTIES
> -
> -- compatible:
> -    Usage: required
> -    Value type: <string>
> -    Definition: Should contain "qcom,usb-hs-phy" and more specifically one of the
> -                following:
> -
> -                        "qcom,usb-hs-phy-apq8064"
> -                        "qcom,usb-hs-phy-msm8916"
> -                        "qcom,usb-hs-phy-msm8974"
> -
> -- #phy-cells:
> -    Usage: required
> -    Value type: <u32>
> -    Definition: Should contain 0
> -
> -- clocks:
> -    Usage: required
> -    Value type: <prop-encoded-array>
> -    Definition: Should contain clock specifier for the reference and sleep
> -                clocks
> -
> -- clock-names:
> -    Usage: required
> -    Value type: <stringlist>
> -    Definition: Should contain "ref" and "sleep" for the reference and sleep
> -                clocks respectively
> -
> -- resets:
> -    Usage: required
> -    Value type: <prop-encoded-array>
> -    Definition: Should contain the phy and POR resets
> -
> -- reset-names:
> -    Usage: required
> -    Value type: <stringlist>
> -    Definition: Should contain "phy" and "por" for the phy and POR resets
> -                respectively
> -
> -- v3p3-supply:
> -    Usage: required
> -    Value type: <phandle>
> -    Definition: Should contain a reference to the 3.3V supply
> -
> -- v1p8-supply:
> -    Usage: required
> -    Value type: <phandle>
> -    Definition: Should contain a reference to the 1.8V supply
> -
> -- extcon:
> -    Usage: optional
> -    Value type: <prop-encoded-array>
> -    Definition: Should contain the vbus extcon
> -
> -- qcom,init-seq:
> -    Usage: optional
> -    Value type: <u8 array>
> -    Definition: Should contain a sequence of ULPI address and value pairs to
> -                program into the ULPI_EXT_VENDOR_SPECIFIC area. This is related
> -                to Device Mode Eye Diagram test. The addresses are offsets
> -                from the ULPI_EXT_VENDOR_SPECIFIC address, for example,
> -                <0x1 0x53> would mean "write the value 0x53 to address 0x81".
> -
> -EXAMPLE
> -
> -otg: usb-controller {
> -	ulpi {
> -		phy {
> -			compatible = "qcom,usb-hs-phy-msm8974", "qcom,usb-hs-phy";
> -			#phy-cells = <0>;
> -			clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
> -			clock-names = "ref", "sleep";
> -			resets = <&gcc GCC_USB2A_PHY_BCR>, <&otg 0>;
> -			reset-names = "phy", "por";
> -			v3p3-supply = <&pm8941_l24>;
> -			v1p8-supply = <&pm8941_l6>;
> -			extcon = <&smbb>;
> -			qcom,init-seq = /bits/ 8 <0x1 0x63>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
> new file mode 100644
> index 000000000000..a60386bd19b2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
> @@ -0,0 +1,108 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/qcom,usb-hs-phy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm's USB HS PHY binding description
> +
> +maintainers:
> +  - Bjorn Andersson <bjorn.andersson@linaro.org>
> +
> +if:
> +  properties:
> +    compatible:
> +      contains:
> +        const: qcom,usb-hs-phy-apq8064
> +  then:
> +    properties:
> +      resets:
> +        maxItems: 1
> +
> +      reset-names:
> +        const: por
> +
> +  else:
> +    properties:
> +      resets:
> +        minItems: 2
> +        maxItems: 2
> +
> +      reset-names:
> +        items:
> +          - const: phy
> +          - const: por
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - qcom,usb-hs-phy-apq8064
> +          - qcom,usb-hs-phy-msm8916
> +          - qcom,usb-hs-phy-msm8974
> +      - const: qcom,usb-hs-phy
> +
> +  clocks:
> +    minItems: 2
> +    maxItems: 2
> +
> +  clock-names:
> +    maxItems: 2
> +    contains:
> +      items:
> +        - const: ref
> +        - const: sleep
> +
> +  resets: true
> +
> +  reset-names: true
> +
> +  v1p8-supply: true
> +
> +  v3p3-supply: true
> +
> +  extcon: true
> +
> +  "#phy-cells":
> +    const: 0
> +
> +  qcom,init-seq:
> +    $ref: /schemas/types.yaml#/definitions/uint8-matrix
> +    description: >
> +      Sequence of ULPI address and value pairs to
> +      program into the ULPI_EXT_VENDOR_SPECIFIC area.
> +      This is related to Device Mode Eye Diagram test.
> +    maxItems: 32 # no hard limit
> +    items:
> +      items:
> +        - description: >
> +            the address is offset from the ULPI_EXT_VENDOR_SPECIFIC address
> +        - description: value
> +
> +required:
> +  - clocks
> +  - clock-names
> +  - resets
> +  - reset-names
> +  - "#phy-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    otg: usb-controller {
> +      ulpi {
> +        phy {
> +          compatible = "qcom,usb-hs-phy-msm8974", "qcom,usb-hs-phy";
> +          #phy-cells = <0>;
> +          clocks = <&clk 0>, <&clk 258>;
> +          clock-names = "ref", "sleep";
> +          resets = <&gcc 10>, <&otg 0>;
> +          reset-names = "phy", "por";
> +          v3p3-supply = <&pm8941_l24>;
> +          v1p8-supply = <&pm8941_l6>;
> +          extcon = <&smbb>;
> +          qcom,init-seq = /bits/ 8 <0x1 0x63>;
> +        };
> +      };
> +    };
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] dt-bindings: phy: convert Qualcomm USB HS phy to yaml
@ 2022-01-10 20:54   ` Bjorn Andersson
  0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2022-01-10 20:54 UTC (permalink / raw)
  To: David Heidelberg
  Cc: Andy Gross, Kishon Vijay Abraham I, Vinod Koul, Rob Herring,
	~okias/devicetree, linux-arm-msm, linux-phy, devicetree,
	linux-kernel

On Wed 29 Dec 16:07 PST 2021, David Heidelberg wrote:

> Conversion of Qualcomm USB HS phy documentation to yaml.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
> v2:
>  - changed uint8 array to matrix
>  - improved clock-names check
>  - move reset-names items, adjust DTS files later
>  - added clocks and resets min and maxItems
>  - if'ed resets, since apq8064 doesn't have phy reset
> ---
>  .../bindings/phy/qcom,usb-hs-phy.txt          |  84 --------------
>  .../bindings/phy/qcom,usb-hs-phy.yaml         | 108 ++++++++++++++++++
>  2 files changed, 108 insertions(+), 84 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
>  create mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
> deleted file mode 100644
> index b3b75c1e6285..000000000000
> --- a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
> +++ /dev/null
> @@ -1,84 +0,0 @@
> -Qualcomm's USB HS PHY
> -
> -PROPERTIES
> -
> -- compatible:
> -    Usage: required
> -    Value type: <string>
> -    Definition: Should contain "qcom,usb-hs-phy" and more specifically one of the
> -                following:
> -
> -                        "qcom,usb-hs-phy-apq8064"
> -                        "qcom,usb-hs-phy-msm8916"
> -                        "qcom,usb-hs-phy-msm8974"
> -
> -- #phy-cells:
> -    Usage: required
> -    Value type: <u32>
> -    Definition: Should contain 0
> -
> -- clocks:
> -    Usage: required
> -    Value type: <prop-encoded-array>
> -    Definition: Should contain clock specifier for the reference and sleep
> -                clocks
> -
> -- clock-names:
> -    Usage: required
> -    Value type: <stringlist>
> -    Definition: Should contain "ref" and "sleep" for the reference and sleep
> -                clocks respectively
> -
> -- resets:
> -    Usage: required
> -    Value type: <prop-encoded-array>
> -    Definition: Should contain the phy and POR resets
> -
> -- reset-names:
> -    Usage: required
> -    Value type: <stringlist>
> -    Definition: Should contain "phy" and "por" for the phy and POR resets
> -                respectively
> -
> -- v3p3-supply:
> -    Usage: required
> -    Value type: <phandle>
> -    Definition: Should contain a reference to the 3.3V supply
> -
> -- v1p8-supply:
> -    Usage: required
> -    Value type: <phandle>
> -    Definition: Should contain a reference to the 1.8V supply
> -
> -- extcon:
> -    Usage: optional
> -    Value type: <prop-encoded-array>
> -    Definition: Should contain the vbus extcon
> -
> -- qcom,init-seq:
> -    Usage: optional
> -    Value type: <u8 array>
> -    Definition: Should contain a sequence of ULPI address and value pairs to
> -                program into the ULPI_EXT_VENDOR_SPECIFIC area. This is related
> -                to Device Mode Eye Diagram test. The addresses are offsets
> -                from the ULPI_EXT_VENDOR_SPECIFIC address, for example,
> -                <0x1 0x53> would mean "write the value 0x53 to address 0x81".
> -
> -EXAMPLE
> -
> -otg: usb-controller {
> -	ulpi {
> -		phy {
> -			compatible = "qcom,usb-hs-phy-msm8974", "qcom,usb-hs-phy";
> -			#phy-cells = <0>;
> -			clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
> -			clock-names = "ref", "sleep";
> -			resets = <&gcc GCC_USB2A_PHY_BCR>, <&otg 0>;
> -			reset-names = "phy", "por";
> -			v3p3-supply = <&pm8941_l24>;
> -			v1p8-supply = <&pm8941_l6>;
> -			extcon = <&smbb>;
> -			qcom,init-seq = /bits/ 8 <0x1 0x63>;
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
> new file mode 100644
> index 000000000000..a60386bd19b2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml
> @@ -0,0 +1,108 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/qcom,usb-hs-phy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm's USB HS PHY binding description
> +
> +maintainers:
> +  - Bjorn Andersson <bjorn.andersson@linaro.org>
> +
> +if:
> +  properties:
> +    compatible:
> +      contains:
> +        const: qcom,usb-hs-phy-apq8064
> +  then:
> +    properties:
> +      resets:
> +        maxItems: 1
> +
> +      reset-names:
> +        const: por
> +
> +  else:
> +    properties:
> +      resets:
> +        minItems: 2
> +        maxItems: 2
> +
> +      reset-names:
> +        items:
> +          - const: phy
> +          - const: por
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - qcom,usb-hs-phy-apq8064
> +          - qcom,usb-hs-phy-msm8916
> +          - qcom,usb-hs-phy-msm8974
> +      - const: qcom,usb-hs-phy
> +
> +  clocks:
> +    minItems: 2
> +    maxItems: 2
> +
> +  clock-names:
> +    maxItems: 2
> +    contains:
> +      items:
> +        - const: ref
> +        - const: sleep
> +
> +  resets: true
> +
> +  reset-names: true
> +
> +  v1p8-supply: true
> +
> +  v3p3-supply: true
> +
> +  extcon: true
> +
> +  "#phy-cells":
> +    const: 0
> +
> +  qcom,init-seq:
> +    $ref: /schemas/types.yaml#/definitions/uint8-matrix
> +    description: >
> +      Sequence of ULPI address and value pairs to
> +      program into the ULPI_EXT_VENDOR_SPECIFIC area.
> +      This is related to Device Mode Eye Diagram test.
> +    maxItems: 32 # no hard limit
> +    items:
> +      items:
> +        - description: >
> +            the address is offset from the ULPI_EXT_VENDOR_SPECIFIC address
> +        - description: value
> +
> +required:
> +  - clocks
> +  - clock-names
> +  - resets
> +  - reset-names
> +  - "#phy-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    otg: usb-controller {
> +      ulpi {
> +        phy {
> +          compatible = "qcom,usb-hs-phy-msm8974", "qcom,usb-hs-phy";
> +          #phy-cells = <0>;
> +          clocks = <&clk 0>, <&clk 258>;
> +          clock-names = "ref", "sleep";
> +          resets = <&gcc 10>, <&otg 0>;
> +          reset-names = "phy", "por";
> +          v3p3-supply = <&pm8941_l24>;
> +          v1p8-supply = <&pm8941_l6>;
> +          extcon = <&smbb>;
> +          qcom,init-seq = /bits/ 8 <0x1 0x63>;
> +        };
> +      };
> +    };
> -- 
> 2.34.1
> 

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] dt-bindings: phy: convert Qualcomm USB HS phy to yaml
  2021-12-30  0:07 ` David Heidelberg
@ 2022-01-27  6:40   ` Vinod Koul
  -1 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2022-01-27  6:40 UTC (permalink / raw)
  To: David Heidelberg
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I, Rob Herring,
	~okias/devicetree, linux-arm-msm, linux-phy, devicetree,
	linux-kernel

On 30-12-21, 01:07, David Heidelberg wrote:
> Conversion of Qualcomm USB HS phy documentation to yaml.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] dt-bindings: phy: convert Qualcomm USB HS phy to yaml
@ 2022-01-27  6:40   ` Vinod Koul
  0 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2022-01-27  6:40 UTC (permalink / raw)
  To: David Heidelberg
  Cc: Andy Gross, Bjorn Andersson, Kishon Vijay Abraham I, Rob Herring,
	~okias/devicetree, linux-arm-msm, linux-phy, devicetree,
	linux-kernel

On 30-12-21, 01:07, David Heidelberg wrote:
> Conversion of Qualcomm USB HS phy documentation to yaml.

Applied, thanks

-- 
~Vinod

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-27  6:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30  0:07 [PATCH v2] dt-bindings: phy: convert Qualcomm USB HS phy to yaml David Heidelberg
2021-12-30  0:07 ` David Heidelberg
2022-01-10 19:45 ` Rob Herring
2022-01-10 19:45   ` Rob Herring
2022-01-10 20:54 ` Bjorn Andersson
2022-01-10 20:54   ` Bjorn Andersson
2022-01-27  6:40 ` Vinod Koul
2022-01-27  6:40   ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.