xref: /linux/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml (revision 52c996d3f40b40f87ef9dc80596903309682acc3)
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-pcie-phy.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm QMP PHY controller (PCIe, 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,sa8775p-qmp-gen4x2-pcie-phy
20      - qcom,sa8775p-qmp-gen4x4-pcie-phy
21      - qcom,sc8180x-qmp-pcie-phy
22      - qcom,sc8280xp-qmp-gen3x1-pcie-phy
23      - qcom,sc8280xp-qmp-gen3x2-pcie-phy
24      - qcom,sc8280xp-qmp-gen3x4-pcie-phy
25      - qcom,sdm845-qhp-pcie-phy
26      - qcom,sdm845-qmp-pcie-phy
27      - qcom,sdx55-qmp-pcie-phy
28      - qcom,sdx65-qmp-gen4x2-pcie-phy
29      - qcom,sm8150-qmp-gen3x1-pcie-phy
30      - qcom,sm8150-qmp-gen3x2-pcie-phy
31      - qcom,sm8250-qmp-gen3x1-pcie-phy
32      - qcom,sm8250-qmp-gen3x2-pcie-phy
33      - qcom,sm8250-qmp-modem-pcie-phy
34      - qcom,sm8350-qmp-gen3x1-pcie-phy
35      - qcom,sm8450-qmp-gen3x1-pcie-phy
36      - qcom,sm8450-qmp-gen4x2-pcie-phy
37      - qcom,sm8550-qmp-gen3x2-pcie-phy
38      - qcom,sm8550-qmp-gen4x2-pcie-phy
39      - qcom,sm8650-qmp-gen3x2-pcie-phy
40      - qcom,sm8650-qmp-gen4x2-pcie-phy
41      - qcom,x1e80100-qmp-gen3x2-pcie-phy
42      - qcom,x1e80100-qmp-gen4x2-pcie-phy
43      - qcom,x1e80100-qmp-gen4x4-pcie-phy
44
45  reg:
46    minItems: 1
47    maxItems: 2
48
49  clocks:
50    minItems: 5
51    maxItems: 7
52
53  clock-names:
54    minItems: 5
55    items:
56      - const: aux
57      - const: cfg_ahb
58      - const: ref
59      - enum: [rchng, refgen]
60      - const: pipe
61      - const: pipediv2
62      - const: phy_aux
63
64  power-domains:
65    maxItems: 1
66
67  resets:
68    minItems: 1
69    maxItems: 2
70
71  reset-names:
72    minItems: 1
73    items:
74      - const: phy
75      - const: phy_nocsr
76
77  vdda-phy-supply: true
78
79  vdda-pll-supply: true
80
81  vdda-qref-supply: true
82
83  qcom,4ln-config-sel:
84    description: PCIe 4-lane configuration
85    $ref: /schemas/types.yaml#/definitions/phandle-array
86    items:
87      - items:
88          - description: phandle of TCSR syscon
89          - description: offset of PCIe 4-lane configuration register
90          - description: offset of configuration bit for this PHY
91
92  "#clock-cells": true
93
94  clock-output-names:
95    maxItems: 1
96
97  "#phy-cells":
98    const: 0
99
100required:
101  - compatible
102  - reg
103  - clocks
104  - clock-names
105  - resets
106  - reset-names
107  - vdda-phy-supply
108  - vdda-pll-supply
109  - "#clock-cells"
110  - clock-output-names
111  - "#phy-cells"
112
113additionalProperties: false
114
115allOf:
116  - if:
117      properties:
118        compatible:
119          contains:
120            enum:
121              - qcom,sc8280xp-qmp-gen3x4-pcie-phy
122              - qcom,x1e80100-qmp-gen4x4-pcie-phy
123    then:
124      properties:
125        reg:
126          items:
127            - description: port a
128            - description: port b
129      required:
130        - qcom,4ln-config-sel
131    else:
132      properties:
133        reg:
134          maxItems: 1
135
136  - if:
137      properties:
138        compatible:
139          contains:
140            enum:
141              - qcom,sc8180x-qmp-pcie-phy
142              - qcom,sdm845-qhp-pcie-phy
143              - qcom,sdm845-qmp-pcie-phy
144              - qcom,sdx55-qmp-pcie-phy
145              - qcom,sm8150-qmp-gen3x1-pcie-phy
146              - qcom,sm8150-qmp-gen3x2-pcie-phy
147              - qcom,sm8250-qmp-gen3x1-pcie-phy
148              - qcom,sm8250-qmp-gen3x2-pcie-phy
149              - qcom,sm8250-qmp-modem-pcie-phy
150              - qcom,sm8350-qmp-gen3x1-pcie-phy
151              - qcom,sm8450-qmp-gen3x1-pcie-phy
152              - qcom,sm8450-qmp-gen3x2-pcie-phy
153              - qcom,sm8550-qmp-gen3x2-pcie-phy
154              - qcom,sm8550-qmp-gen4x2-pcie-phy
155              - qcom,sm8650-qmp-gen3x2-pcie-phy
156              - qcom,sm8650-qmp-gen4x2-pcie-phy
157              - qcom,x1e80100-qmp-gen3x2-pcie-phy
158              - qcom,x1e80100-qmp-gen4x2-pcie-phy
159    then:
160      properties:
161        clocks:
162          maxItems: 5
163        clock-names:
164          maxItems: 5
165
166  - if:
167      properties:
168        compatible:
169          contains:
170            enum:
171              - qcom,sc8280xp-qmp-gen3x1-pcie-phy
172              - qcom,sc8280xp-qmp-gen3x2-pcie-phy
173              - qcom,sc8280xp-qmp-gen3x4-pcie-phy
174              - qcom,x1e80100-qmp-gen4x4-pcie-phy
175    then:
176      properties:
177        clocks:
178          minItems: 6
179        clock-names:
180          minItems: 6
181
182  - if:
183      properties:
184        compatible:
185          contains:
186            enum:
187              - qcom,sa8775p-qmp-gen4x2-pcie-phy
188              - qcom,sa8775p-qmp-gen4x4-pcie-phy
189    then:
190      properties:
191        clocks:
192          minItems: 7
193        clock-names:
194          minItems: 7
195
196  - if:
197      properties:
198        compatible:
199          contains:
200            enum:
201              - qcom,sm8550-qmp-gen4x2-pcie-phy
202              - qcom,sm8650-qmp-gen4x2-pcie-phy
203              - qcom,x1e80100-qmp-gen4x2-pcie-phy
204    then:
205      properties:
206        resets:
207          minItems: 2
208        reset-names:
209          minItems: 2
210    else:
211      properties:
212        resets:
213          maxItems: 1
214        reset-names:
215          maxItems: 1
216
217  - if:
218      properties:
219        compatible:
220          contains:
221            enum:
222              - qcom,sm8450-qmp-gen4x2-pcie-phy
223              - qcom,sm8550-qmp-gen4x2-pcie-phy
224              - qcom,sm8650-qmp-gen4x2-pcie-phy
225    then:
226      properties:
227        "#clock-cells":
228          const: 1
229    else:
230      properties:
231        "#clock-cells":
232          const: 0
233
234examples:
235  - |
236    #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
237
238    pcie2b_phy: phy@1c18000 {
239      compatible = "qcom,sc8280xp-qmp-gen3x2-pcie-phy";
240      reg = <0x01c18000 0x2000>;
241
242      clocks = <&gcc GCC_PCIE_2B_AUX_CLK>,
243               <&gcc GCC_PCIE_2B_CFG_AHB_CLK>,
244               <&gcc GCC_PCIE_2A2B_CLKREF_CLK>,
245               <&gcc GCC_PCIE2B_PHY_RCHNG_CLK>,
246               <&gcc GCC_PCIE_2B_PIPE_CLK>,
247               <&gcc GCC_PCIE_2B_PIPEDIV2_CLK>;
248      clock-names = "aux", "cfg_ahb", "ref", "rchng",
249                    "pipe", "pipediv2";
250
251      power-domains = <&gcc PCIE_2B_GDSC>;
252
253      resets = <&gcc GCC_PCIE_2B_PHY_BCR>;
254      reset-names = "phy";
255
256      vdda-phy-supply = <&vreg_l6d>;
257      vdda-pll-supply = <&vreg_l4d>;
258
259      #clock-cells = <0>;
260      clock-output-names = "pcie_2b_pipe_clk";
261
262      #phy-cells = <0>;
263    };
264
265    pcie2a_phy: phy@1c24000 {
266      compatible = "qcom,sc8280xp-qmp-gen3x4-pcie-phy";
267      reg = <0x01c24000 0x2000>, <0x01c26000 0x2000>;
268
269      clocks = <&gcc GCC_PCIE_2A_AUX_CLK>,
270               <&gcc GCC_PCIE_2A_CFG_AHB_CLK>,
271               <&gcc GCC_PCIE_2A2B_CLKREF_CLK>,
272               <&gcc GCC_PCIE2A_PHY_RCHNG_CLK>,
273               <&gcc GCC_PCIE_2A_PIPE_CLK>,
274               <&gcc GCC_PCIE_2A_PIPEDIV2_CLK>;
275      clock-names = "aux", "cfg_ahb", "ref", "rchng",
276                    "pipe", "pipediv2";
277
278      power-domains = <&gcc PCIE_2A_GDSC>;
279
280      resets = <&gcc GCC_PCIE_2A_PHY_BCR>;
281      reset-names = "phy";
282
283      vdda-phy-supply = <&vreg_l6d>;
284      vdda-pll-supply = <&vreg_l4d>;
285
286      qcom,4ln-config-sel = <&tcsr 0xa044 0>;
287
288      #clock-cells = <0>;
289      clock-output-names = "pcie_2a_pipe_clk";
290
291      #phy-cells = <0>;
292    };
293