devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan+linaro@kernel.org>
To: Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Johan Hovold <johan+linaro@kernel.org>
Subject: [PATCH v2 15/30] dt-bindings: phy: add QMP UFS PHY schema
Date: Thu,  7 Jul 2022 15:47:10 +0200	[thread overview]
Message-ID: <20220707134725.3512-16-johan+linaro@kernel.org> (raw)
In-Reply-To: <20220707134725.3512-1-johan+linaro@kernel.org>

The QMP PHY DT schema is getting unwieldy. Break out the UFS PHY
binding in a separate file.

Add an example node based on a cleaned up version of sc8280xp.dtsi.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  60 -------
 .../bindings/phy/qcom,qmp-ufs-phy.yaml        | 148 ++++++++++++++++++
 2 files changed, 148 insertions(+), 60 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
index 897dcd4f7dc9..21d6ec875529 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml
@@ -19,32 +19,21 @@ properties:
     enum:
       - qcom,ipq6018-qmp-usb3-phy
       - qcom,ipq8074-qmp-usb3-phy
-      - qcom,msm8996-qmp-ufs-phy
       - qcom,msm8996-qmp-usb3-phy
-      - qcom,msm8998-qmp-ufs-phy
       - qcom,msm8998-qmp-usb3-phy
       - qcom,qcm2290-qmp-usb3-phy
       - qcom,sc7180-qmp-usb3-phy
-      - qcom,sc8180x-qmp-ufs-phy
       - qcom,sc8180x-qmp-usb3-phy
-      - qcom,sc8280xp-qmp-ufs-phy
-      - qcom,sdm845-qmp-ufs-phy
       - qcom,sdm845-qmp-usb3-phy
       - qcom,sdm845-qmp-usb3-uni-phy
       - qcom,sdx55-qmp-usb3-uni-phy
       - qcom,sdx65-qmp-usb3-uni-phy
-      - qcom,sm6115-qmp-ufs-phy
-      - qcom,sm6350-qmp-ufs-phy
-      - qcom,sm8150-qmp-ufs-phy
       - qcom,sm8150-qmp-usb3-phy
       - qcom,sm8150-qmp-usb3-uni-phy
-      - qcom,sm8250-qmp-ufs-phy
       - qcom,sm8250-qmp-usb3-phy
       - qcom,sm8250-qmp-usb3-uni-phy
-      - qcom,sm8350-qmp-ufs-phy
       - qcom,sm8350-qmp-usb3-phy
       - qcom,sm8350-qmp-usb3-uni-phy
-      - qcom,sm8450-qmp-ufs-phy
       - qcom,sm8450-qmp-usb3-phy
 
   reg:
@@ -178,55 +167,6 @@ allOf:
       required:
         - vdda-phy-supply
         - vdda-pll-supply
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8996-qmp-ufs-phy
-    then:
-      properties:
-        clocks:
-          maxItems: 1
-        clock-names:
-          items:
-            - const: ref
-        resets:
-          maxItems: 1
-        reset-names:
-          items:
-            - const: ufsphy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8998-qmp-ufs-phy
-              - qcom,sc8180x-qmp-ufs-phy
-              - qcom,sc8280xp-qmp-ufs-phy
-              - qcom,sdm845-qmp-ufs-phy
-              - qcom,sm6350-qmp-ufs-phy
-              - qcom,sm8150-qmp-ufs-phy
-              - qcom,sm8250-qmp-ufs-phy
-    then:
-      properties:
-        clocks:
-          maxItems: 2
-        clock-names:
-          items:
-            - const: ref
-            - const: ref_aux
-        resets:
-          maxItems: 1
-        reset-names:
-          items:
-            - const: ufsphy
-      required:
-        - vdda-phy-supply
-        - vdda-pll-supply
   - if:
       properties:
         compatible:
diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
new file mode 100644
index 000000000000..e9dfed29e996
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
@@ -0,0 +1,148 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,qmp-ufs-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QMP PHY controller (UFS)
+
+maintainers:
+  - Vinod Koul <vkoul@kernel.org>
+
+description:
+  QMP PHY controller supports physical layer functionality for a number of
+  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
+
+properties:
+  compatible:
+    enum:
+      - qcom,msm8996-qmp-ufs-phy
+      - qcom,msm8998-qmp-ufs-phy
+      - qcom,sc8180x-qmp-ufs-phy
+      - qcom,sc8280xp-qmp-ufs-phy
+      - qcom,sdm845-qmp-ufs-phy
+      - qcom,sm6115-qmp-ufs-phy
+      - qcom,sm6350-qmp-ufs-phy
+      - qcom,sm8150-qmp-ufs-phy
+      - qcom,sm8250-qmp-ufs-phy
+      - qcom,sm8350-qmp-ufs-phy
+      - qcom,sm8450-qmp-ufs-phy
+
+  reg:
+    items:
+      - description: serdes
+
+  "#address-cells":
+    enum: [ 1, 2 ]
+
+  "#size-cells":
+    enum: [ 1, 2 ]
+
+  ranges: true
+
+  clocks:
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    minItems: 1
+    maxItems: 2
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    items:
+      - const: ufsphy
+
+  vdda-phy-supply: true
+
+  vdda-pll-supply: true
+
+  vddp-ref-clk-supply: true
+
+patternProperties:
+  "^phy@[0-9a-f]+$":
+    type: object
+    description: single PHY-provider child node
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+  - vdda-phy-supply
+  - vdda-pll-supply
+
+additionalProperties: false
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8996-qmp-ufs-phy
+    then:
+      properties:
+        clocks:
+          maxItems: 1
+        clock-names:
+          items:
+            - const: ref
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,msm8998-qmp-ufs-phy
+              - qcom,sc8180x-qmp-ufs-phy
+              - qcom,sc8280xp-qmp-ufs-phy
+              - qcom,sdm845-qmp-ufs-phy
+              - qcom,sm6350-qmp-ufs-phy
+              - qcom,sm8150-qmp-ufs-phy
+              - qcom,sm8250-qmp-ufs-phy
+    then:
+      properties:
+        clocks:
+          maxItems: 2
+        clock-names:
+          items:
+            - const: ref
+            - const: ref_aux
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    phy-wrapper@1d87000 {
+        compatible = "qcom,sc8280xp-qmp-ufs-phy";
+        reg = <0x01d87000 0xe10>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x01d87000 0x1000>;
+
+        clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
+        clock-names = "ref", "ref_aux";
+
+        resets = <&ufs_mem_hc 0>;
+        reset-names = "ufsphy";
+
+        vdda-phy-supply = <&vreg_l6b>;
+        vdda-pll-supply = <&vreg_l3b>;
+
+        phy@400 {
+            reg = <0x400 0x108>,
+                  <0x600 0x1e0>,
+                  <0xc00 0x1dc>,
+                  <0x800 0x108>,
+                  <0xa00 0x1e0>;
+            #phy-cells = <0>;
+        };
+    };
-- 
2.35.1


  parent reply	other threads:[~2022-07-07 13:47 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07 13:46 [PATCH v2 00/30] phy: qcom,qmp: fix dt-bindings and deprecate lane suffix Johan Hovold
2022-07-07 13:46 ` [PATCH v2 01/30] dt-bindings: phy: qcom,qmp: fix bogus clock-cells property Johan Hovold
2022-07-07 13:46 ` [PATCH v2 02/30] dt-bindings: phy: qcom,qmp: sort compatible strings Johan Hovold
2022-07-07 13:46 ` [PATCH v2 03/30] dt-bindings: phy: qcom,qmp: drop redundant descriptions Johan Hovold
2022-07-14  9:07   ` Krzysztof Kozlowski
2022-07-14 10:00     ` Johan Hovold
2022-07-14 10:42       ` Krzysztof Kozlowski
2022-07-07 13:46 ` [PATCH v2 04/30] dt-bindings: phy: qcom,qmp: fix child node description Johan Hovold
2022-07-14  9:07   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 05/30] dt-bindings: phy: qcom,qmp: clean up descriptions Johan Hovold
2022-07-14  9:07   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 06/30] dt-bindings: phy: qcom,qmp: clean up example Johan Hovold
2022-07-07 13:47 ` [PATCH v2 07/30] dt-bindings: phy: qcom,qmp: drop child-node comment Johan Hovold
2022-07-07 13:47 ` [PATCH v2 08/30] dt-bindings: phy: add qcom,msm8996-qmp-pcie-phy schema Johan Hovold
2022-07-14  9:09   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 09/30] dt-bindings: phy: qcom,msm8996-qmp-pcie: add missing child node schema Johan Hovold
2022-07-14  9:10   ` Krzysztof Kozlowski
2022-07-14  9:21     ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 10/30] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate PIPE clock names Johan Hovold
2022-07-14  9:13   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 11/30] dt-bindings: phy: qcom,msm8996-qmp-pcie: deprecate reset names Johan Hovold
2022-07-14  9:13   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 12/30] dt-bindings: phy: add QMP PCIe PHY schema Johan Hovold
2022-07-14  9:15   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 13/30] dt-bindings: phy: qcom,qmp-pcie: add missing child node schema Johan Hovold
2022-07-14  9:15   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 14/30] dt-bindings: phy: qcom,qmp-pcie: deprecate PIPE clock name Johan Hovold
2022-07-14  9:18   ` Krzysztof Kozlowski
2022-07-07 13:47 ` Johan Hovold [this message]
2022-07-14  9:19   ` [PATCH v2 15/30] dt-bindings: phy: add QMP UFS PHY schema Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 16/30] dt-bindings: phy: qcom,qmp-ufs: add missing SM8450 clock Johan Hovold
2022-07-14  9:21   ` Krzysztof Kozlowski
2022-07-14 10:07     ` Johan Hovold
2022-07-14 10:42       ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 17/30] dt-bindings: phy: qcom,qmp-ufs: add missing SM8150 power domain Johan Hovold
2022-07-14  9:22   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 18/30] dt-bindings: phy: qcom,qmp-ufs: add missing child node schema Johan Hovold
2022-07-14  9:23   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 19/30] dt-bindings: phy: add QMP USB PHY schema Johan Hovold
2022-07-14  9:24   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 20/30] dt-bindings: phy: qcom,qmp-usb: add missing child node schema Johan Hovold
2022-07-14  9:24   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 21/30] dt-bindings: phy: qcom,qmp-usb: deprecate PIPE clock name Johan Hovold
2022-07-14  9:24   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 22/30] dt-bindings: phy: qcom,qmp-usb: add missing qcom,sc7180-qmp-usb3-phy schema Johan Hovold
2022-07-14  9:25   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 23/30] dt-bindings: phy: qcom,qmp-usb3-dp: fix bogus clock-cells property Johan Hovold
2022-07-14  9:27   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 24/30] dt-bindings: phy: qcom,qmp-usb3-dp: deprecate USB PIPE clock name Johan Hovold
2022-07-14  9:27   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 25/30] phy: qcom-qmp-pcie: drop pipe clock lane suffix Johan Hovold
2022-07-14  9:28   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 26/30] phy: qcom-qmp-combo: drop unused lane reset Johan Hovold
2022-07-14  9:29   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 27/30] phy: qcom-qmp-combo: drop pipe clock lane suffix Johan Hovold
2022-07-14  9:29   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 28/30] phy: qcom-qmp-pcie-msm8996: " Johan Hovold
2022-07-14  9:29   ` Krzysztof Kozlowski
2022-07-14  9:30   ` Krzysztof Kozlowski
2022-07-14  9:49     ` Johan Hovold
2022-07-07 13:47 ` [PATCH v2 29/30] phy: qcom-qmp-pcie-msm8996: drop reset " Johan Hovold
2022-07-14  9:31   ` Krzysztof Kozlowski
2022-07-07 13:47 ` [PATCH v2 30/30] phy: qcom-qmp-usb: drop pipe clock " Johan Hovold
2022-07-14  9:31   ` Krzysztof Kozlowski
2022-07-14  8:12 ` [PATCH v2 00/30] phy: qcom,qmp: fix dt-bindings and deprecate " Johan Hovold
2022-07-14  9:31   ` Krzysztof Kozlowski
2022-07-14  9:44     ` Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220707134725.3512-16-johan+linaro@kernel.org \
    --to=johan+linaro@kernel.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=kishon@ti.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).