1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm QMP PHY controller (USB, SC8280XP)
8
9maintainers:
10  - Vinod Koul <vkoul@kernel.org>
11
12description:
13  The QMP PHY controller supports physical layer functionality for a number of
14  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
15
16properties:
17  compatible:
18    enum:
19      - qcom,ipq9574-qmp-usb3-phy
20      - qcom,qcm2290-qmp-usb3-phy
21      - qcom,sa8775p-qmp-usb3-uni-phy
22      - qcom,sc8280xp-qmp-usb3-uni-phy
23      - qcom,sm6115-qmp-usb3-phy
24
25  reg:
26    maxItems: 1
27
28  clocks:
29    maxItems: 4
30
31  clock-names:
32    maxItems: 4
33
34  power-domains:
35    maxItems: 1
36
37  resets:
38    maxItems: 2
39
40  reset-names:
41    items:
42      - const: phy
43      - const: phy_phy
44
45  vdda-phy-supply: true
46
47  vdda-pll-supply: true
48
49  "#clock-cells":
50    const: 0
51
52  clock-output-names:
53    maxItems: 1
54
55  "#phy-cells":
56    const: 0
57
58required:
59  - compatible
60  - reg
61  - clocks
62  - clock-names
63  - resets
64  - reset-names
65  - vdda-phy-supply
66  - vdda-pll-supply
67  - "#clock-cells"
68  - clock-output-names
69  - "#phy-cells"
70
71allOf:
72  - if:
73      properties:
74        compatible:
75          contains:
76            enum:
77              - qcom,ipq9574-qmp-usb3-phy
78    then:
79      properties:
80        clock-names:
81          items:
82            - const: aux
83            - const: ref
84            - const: cfg_ahb
85            - const: pipe
86
87  - if:
88      properties:
89        compatible:
90          contains:
91            enum:
92              - qcom,sa8775p-qmp-usb3-uni-phy
93              - qcom,sc8280xp-qmp-usb3-uni-phy
94    then:
95      properties:
96        clocks:
97          maxItems: 4
98        clock-names:
99          items:
100            - const: aux
101            - const: ref
102            - const: com_aux
103            - const: pipe
104      required:
105        - power-domains
106
107additionalProperties: false
108
109allOf:
110  - if:
111      properties:
112        compatible:
113          contains:
114            enum:
115              - qcom,qcm2290-qmp-usb3-phy
116              - qcom,sm6115-qmp-usb3-phy
117    then:
118      properties:
119        clocks:
120          maxItems: 4
121        clock-names:
122          items:
123            - const: cfg_ahb
124            - const: ref
125            - const: com_aux
126            - const: pipe
127
128  - if:
129      properties:
130        compatible:
131          contains:
132            enum:
133              - qcom,sc8280xp-qmp-usb3-uni-phy
134    then:
135      properties:
136        clocks:
137          maxItems: 4
138        clock-names:
139          items:
140            - const: aux
141            - const: ref
142            - const: com_aux
143            - const: pipe
144
145examples:
146  - |
147    #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
148    #include <dt-bindings/clock/qcom,rpmh.h>
149
150    phy@88ef000 {
151      compatible = "qcom,sc8280xp-qmp-usb3-uni-phy";
152      reg = <0x088ef000 0x2000>;
153
154      clocks = <&gcc GCC_USB3_MP_PHY_AUX_CLK>,
155               <&gcc GCC_USB3_MP0_CLKREF_CLK>,
156               <&gcc GCC_USB3_MP_PHY_COM_AUX_CLK>,
157               <&gcc GCC_USB3_MP_PHY_PIPE_0_CLK>;
158      clock-names = "aux", "ref", "com_aux", "pipe";
159
160      power-domains = <&gcc USB30_MP_GDSC>;
161
162      resets = <&gcc GCC_USB3_UNIPHY_MP0_BCR>,
163               <&gcc GCC_USB3UNIPHY_PHY_MP0_BCR>;
164      reset-names = "phy", "phy_phy";
165
166      vdda-phy-supply = <&vreg_l3a>;
167      vdda-pll-supply = <&vreg_l5a>;
168
169      #clock-cells = <0>;
170      clock-output-names = "usb2_phy0_pipe_clk";
171
172      #phy-cells = <0>;
173    };
174