xref: /linux/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml (revision d5aaa0bc6de9c2649fa15def775a6710c052c966)
130638230SJohan Hovold# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
230638230SJohan Hovold%YAML 1.2
330638230SJohan Hovold---
430638230SJohan Hovold$id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml#
530638230SJohan Hovold$schema: http://devicetree.org/meta-schemas/core.yaml#
630638230SJohan Hovold
730638230SJohan Hovoldtitle: Qualcomm QMP PHY controller (PCIe, SC8280XP)
830638230SJohan Hovold
930638230SJohan Hovoldmaintainers:
1030638230SJohan Hovold  - Vinod Koul <vkoul@kernel.org>
1130638230SJohan Hovold
1230638230SJohan Hovolddescription:
1330638230SJohan Hovold  The QMP PHY controller supports physical layer functionality for a number of
1430638230SJohan Hovold  controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
1530638230SJohan Hovold
1630638230SJohan Hovoldproperties:
1730638230SJohan Hovold  compatible:
1830638230SJohan Hovold    enum:
19fd2d4e4cSMrinmay Sarkar      - qcom,sa8775p-qmp-gen4x2-pcie-phy
20fd2d4e4cSMrinmay Sarkar      - qcom,sa8775p-qmp-gen4x4-pcie-phy
21505fb254SDmitry Baryshkov      - qcom,sc8180x-qmp-pcie-phy
2230638230SJohan Hovold      - qcom,sc8280xp-qmp-gen3x1-pcie-phy
2330638230SJohan Hovold      - qcom,sc8280xp-qmp-gen3x2-pcie-phy
2430638230SJohan Hovold      - qcom,sc8280xp-qmp-gen3x4-pcie-phy
25505fb254SDmitry Baryshkov      - qcom,sdm845-qhp-pcie-phy
26505fb254SDmitry Baryshkov      - qcom,sdm845-qmp-pcie-phy
27505fb254SDmitry Baryshkov      - qcom,sdx55-qmp-pcie-phy
280d678713SRohit Agarwal      - qcom,sdx65-qmp-gen4x2-pcie-phy
29377107bcSDmitry Baryshkov      - qcom,sm8150-qmp-gen3x1-pcie-phy
30377107bcSDmitry Baryshkov      - qcom,sm8150-qmp-gen3x2-pcie-phy
31505fb254SDmitry Baryshkov      - qcom,sm8250-qmp-gen3x1-pcie-phy
32505fb254SDmitry Baryshkov      - qcom,sm8250-qmp-gen3x2-pcie-phy
33505fb254SDmitry Baryshkov      - qcom,sm8250-qmp-modem-pcie-phy
3443a6a29bSDmitry Baryshkov      - qcom,sm8350-qmp-gen3x1-pcie-phy
35505fb254SDmitry Baryshkov      - qcom,sm8450-qmp-gen3x1-pcie-phy
36505fb254SDmitry Baryshkov      - qcom,sm8450-qmp-gen4x2-pcie-phy
37496d068eSAbel Vesa      - qcom,sm8550-qmp-gen3x2-pcie-phy
38496d068eSAbel Vesa      - qcom,sm8550-qmp-gen4x2-pcie-phy
399e3f3819SNeil Armstrong      - qcom,sm8650-qmp-gen3x2-pcie-phy
409e3f3819SNeil Armstrong      - qcom,sm8650-qmp-gen4x2-pcie-phy
41e94b29f2SAbel Vesa      - qcom,x1e80100-qmp-gen3x2-pcie-phy
42e94b29f2SAbel Vesa      - qcom,x1e80100-qmp-gen4x2-pcie-phy
430c5f4d23SAbel Vesa      - qcom,x1e80100-qmp-gen4x4-pcie-phy
4430638230SJohan Hovold
4530638230SJohan Hovold  reg:
4630638230SJohan Hovold    minItems: 1
4730638230SJohan Hovold    maxItems: 2
4830638230SJohan Hovold
4930638230SJohan Hovold  clocks:
5043a6a29bSDmitry Baryshkov    minItems: 5
51fd2d4e4cSMrinmay Sarkar    maxItems: 7
5230638230SJohan Hovold
5330638230SJohan Hovold  clock-names:
5443a6a29bSDmitry Baryshkov    minItems: 5
5530638230SJohan Hovold    items:
5630638230SJohan Hovold      - const: aux
5730638230SJohan Hovold      - const: cfg_ahb
5830638230SJohan Hovold      - const: ref
59505fb254SDmitry Baryshkov      - enum: [rchng, refgen]
6030638230SJohan Hovold      - const: pipe
6130638230SJohan Hovold      - const: pipediv2
62fd2d4e4cSMrinmay Sarkar      - const: phy_aux
6330638230SJohan Hovold
6430638230SJohan Hovold  power-domains:
6530638230SJohan Hovold    maxItems: 1
6630638230SJohan Hovold
6730638230SJohan Hovold  resets:
68496d068eSAbel Vesa    minItems: 1
69496d068eSAbel Vesa    maxItems: 2
7030638230SJohan Hovold
7130638230SJohan Hovold  reset-names:
72496d068eSAbel Vesa    minItems: 1
7330638230SJohan Hovold    items:
7430638230SJohan Hovold      - const: phy
75496d068eSAbel Vesa      - const: phy_nocsr
7630638230SJohan Hovold
7730638230SJohan Hovold  vdda-phy-supply: true
7830638230SJohan Hovold
7930638230SJohan Hovold  vdda-pll-supply: true
8030638230SJohan Hovold
81496d068eSAbel Vesa  vdda-qref-supply: true
82496d068eSAbel Vesa
8330638230SJohan Hovold  qcom,4ln-config-sel:
8430638230SJohan Hovold    description: PCIe 4-lane configuration
8530638230SJohan Hovold    $ref: /schemas/types.yaml#/definitions/phandle-array
8630638230SJohan Hovold    items:
8730638230SJohan Hovold      - items:
8830638230SJohan Hovold          - description: phandle of TCSR syscon
8930638230SJohan Hovold          - description: offset of PCIe 4-lane configuration register
9030638230SJohan Hovold          - description: offset of configuration bit for this PHY
9130638230SJohan Hovold
9272bea132SNeil Armstrong  "#clock-cells": true
9330638230SJohan Hovold
9430638230SJohan Hovold  clock-output-names:
957cd3e586SDmitry Baryshkov    maxItems: 1
9630638230SJohan Hovold
9730638230SJohan Hovold  "#phy-cells":
9830638230SJohan Hovold    const: 0
9930638230SJohan Hovold
10030638230SJohan Hovoldrequired:
10130638230SJohan Hovold  - compatible
10230638230SJohan Hovold  - reg
10330638230SJohan Hovold  - clocks
10430638230SJohan Hovold  - clock-names
10530638230SJohan Hovold  - resets
10630638230SJohan Hovold  - reset-names
10730638230SJohan Hovold  - vdda-phy-supply
10830638230SJohan Hovold  - vdda-pll-supply
10930638230SJohan Hovold  - "#clock-cells"
11030638230SJohan Hovold  - clock-output-names
11130638230SJohan Hovold  - "#phy-cells"
11230638230SJohan Hovold
11330638230SJohan HovoldadditionalProperties: false
11430638230SJohan Hovold
11530638230SJohan HovoldallOf:
11630638230SJohan Hovold  - if:
11730638230SJohan Hovold      properties:
11830638230SJohan Hovold        compatible:
11930638230SJohan Hovold          contains:
12030638230SJohan Hovold            enum:
12130638230SJohan Hovold              - qcom,sc8280xp-qmp-gen3x4-pcie-phy
1220c5f4d23SAbel Vesa              - qcom,x1e80100-qmp-gen4x4-pcie-phy
12330638230SJohan Hovold    then:
12430638230SJohan Hovold      properties:
12530638230SJohan Hovold        reg:
12630638230SJohan Hovold          items:
12730638230SJohan Hovold            - description: port a
12830638230SJohan Hovold            - description: port b
12930638230SJohan Hovold      required:
13030638230SJohan Hovold        - qcom,4ln-config-sel
13130638230SJohan Hovold    else:
13230638230SJohan Hovold      properties:
13330638230SJohan Hovold        reg:
13430638230SJohan Hovold          maxItems: 1
13530638230SJohan Hovold
13643a6a29bSDmitry Baryshkov  - if:
13743a6a29bSDmitry Baryshkov      properties:
13843a6a29bSDmitry Baryshkov        compatible:
13943a6a29bSDmitry Baryshkov          contains:
14043a6a29bSDmitry Baryshkov            enum:
141505fb254SDmitry Baryshkov              - qcom,sc8180x-qmp-pcie-phy
142505fb254SDmitry Baryshkov              - qcom,sdm845-qhp-pcie-phy
143505fb254SDmitry Baryshkov              - qcom,sdm845-qmp-pcie-phy
144505fb254SDmitry Baryshkov              - qcom,sdx55-qmp-pcie-phy
145377107bcSDmitry Baryshkov              - qcom,sm8150-qmp-gen3x1-pcie-phy
146377107bcSDmitry Baryshkov              - qcom,sm8150-qmp-gen3x2-pcie-phy
147505fb254SDmitry Baryshkov              - qcom,sm8250-qmp-gen3x1-pcie-phy
148505fb254SDmitry Baryshkov              - qcom,sm8250-qmp-gen3x2-pcie-phy
149505fb254SDmitry Baryshkov              - qcom,sm8250-qmp-modem-pcie-phy
15043a6a29bSDmitry Baryshkov              - qcom,sm8350-qmp-gen3x1-pcie-phy
151505fb254SDmitry Baryshkov              - qcom,sm8450-qmp-gen3x1-pcie-phy
152505fb254SDmitry Baryshkov              - qcom,sm8450-qmp-gen3x2-pcie-phy
153496d068eSAbel Vesa              - qcom,sm8550-qmp-gen3x2-pcie-phy
154496d068eSAbel Vesa              - qcom,sm8550-qmp-gen4x2-pcie-phy
1559e3f3819SNeil Armstrong              - qcom,sm8650-qmp-gen3x2-pcie-phy
1569e3f3819SNeil Armstrong              - qcom,sm8650-qmp-gen4x2-pcie-phy
15743a6a29bSDmitry Baryshkov    then:
15843a6a29bSDmitry Baryshkov      properties:
15943a6a29bSDmitry Baryshkov        clocks:
16043a6a29bSDmitry Baryshkov          maxItems: 5
16143a6a29bSDmitry Baryshkov        clock-names:
16243a6a29bSDmitry Baryshkov          maxItems: 5
163505fb254SDmitry Baryshkov
164505fb254SDmitry Baryshkov  - if:
165505fb254SDmitry Baryshkov      properties:
166505fb254SDmitry Baryshkov        compatible:
167505fb254SDmitry Baryshkov          contains:
168505fb254SDmitry Baryshkov            enum:
169505fb254SDmitry Baryshkov              - qcom,sc8280xp-qmp-gen3x1-pcie-phy
170505fb254SDmitry Baryshkov              - qcom,sc8280xp-qmp-gen3x2-pcie-phy
171505fb254SDmitry Baryshkov              - qcom,sc8280xp-qmp-gen3x4-pcie-phy
172938ade15SJohan Hovold              - qcom,x1e80100-qmp-gen3x2-pcie-phy
173938ade15SJohan Hovold              - qcom,x1e80100-qmp-gen4x2-pcie-phy
1740c5f4d23SAbel Vesa              - qcom,x1e80100-qmp-gen4x4-pcie-phy
175505fb254SDmitry Baryshkov    then:
17643a6a29bSDmitry Baryshkov      properties:
17743a6a29bSDmitry Baryshkov        clocks:
17843a6a29bSDmitry Baryshkov          minItems: 6
17943a6a29bSDmitry Baryshkov        clock-names:
18043a6a29bSDmitry Baryshkov          minItems: 6
18143a6a29bSDmitry Baryshkov
182496d068eSAbel Vesa  - if:
183496d068eSAbel Vesa      properties:
184496d068eSAbel Vesa        compatible:
185496d068eSAbel Vesa          contains:
186496d068eSAbel Vesa            enum:
187fd2d4e4cSMrinmay Sarkar              - qcom,sa8775p-qmp-gen4x2-pcie-phy
188fd2d4e4cSMrinmay Sarkar              - qcom,sa8775p-qmp-gen4x4-pcie-phy
189fd2d4e4cSMrinmay Sarkar    then:
190fd2d4e4cSMrinmay Sarkar      properties:
191fd2d4e4cSMrinmay Sarkar        clocks:
192fd2d4e4cSMrinmay Sarkar          minItems: 7
193fd2d4e4cSMrinmay Sarkar        clock-names:
194fd2d4e4cSMrinmay Sarkar          minItems: 7
195fd2d4e4cSMrinmay Sarkar
196fd2d4e4cSMrinmay Sarkar  - if:
197fd2d4e4cSMrinmay Sarkar      properties:
198fd2d4e4cSMrinmay Sarkar        compatible:
199fd2d4e4cSMrinmay Sarkar          contains:
200fd2d4e4cSMrinmay Sarkar            enum:
201496d068eSAbel Vesa              - qcom,sm8550-qmp-gen4x2-pcie-phy
2029e3f3819SNeil Armstrong              - qcom,sm8650-qmp-gen4x2-pcie-phy
203e94b29f2SAbel Vesa              - qcom,x1e80100-qmp-gen4x2-pcie-phy
204*16fde3e0SAbel Vesa              - qcom,x1e80100-qmp-gen4x4-pcie-phy
205496d068eSAbel Vesa    then:
206496d068eSAbel Vesa      properties:
207496d068eSAbel Vesa        resets:
208496d068eSAbel Vesa          minItems: 2
209496d068eSAbel Vesa        reset-names:
210496d068eSAbel Vesa          minItems: 2
211496d068eSAbel Vesa    else:
212496d068eSAbel Vesa      properties:
213496d068eSAbel Vesa        resets:
214496d068eSAbel Vesa          maxItems: 1
215496d068eSAbel Vesa        reset-names:
216496d068eSAbel Vesa          maxItems: 1
217496d068eSAbel Vesa
21872bea132SNeil Armstrong  - if:
21972bea132SNeil Armstrong      properties:
22072bea132SNeil Armstrong        compatible:
22172bea132SNeil Armstrong          contains:
22272bea132SNeil Armstrong            enum:
22372bea132SNeil Armstrong              - qcom,sm8450-qmp-gen4x2-pcie-phy
22472bea132SNeil Armstrong              - qcom,sm8550-qmp-gen4x2-pcie-phy
22572bea132SNeil Armstrong              - qcom,sm8650-qmp-gen4x2-pcie-phy
22672bea132SNeil Armstrong    then:
22772bea132SNeil Armstrong      properties:
22872bea132SNeil Armstrong        "#clock-cells":
22972bea132SNeil Armstrong          const: 1
23072bea132SNeil Armstrong    else:
23172bea132SNeil Armstrong      properties:
23272bea132SNeil Armstrong        "#clock-cells":
23372bea132SNeil Armstrong          const: 0
23472bea132SNeil Armstrong
23530638230SJohan Hovoldexamples:
23630638230SJohan Hovold  - |
23730638230SJohan Hovold    #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
23830638230SJohan Hovold
23930638230SJohan Hovold    pcie2b_phy: phy@1c18000 {
24030638230SJohan Hovold      compatible = "qcom,sc8280xp-qmp-gen3x2-pcie-phy";
24130638230SJohan Hovold      reg = <0x01c18000 0x2000>;
24230638230SJohan Hovold
24330638230SJohan Hovold      clocks = <&gcc GCC_PCIE_2B_AUX_CLK>,
24430638230SJohan Hovold               <&gcc GCC_PCIE_2B_CFG_AHB_CLK>,
24530638230SJohan Hovold               <&gcc GCC_PCIE_2A2B_CLKREF_CLK>,
24630638230SJohan Hovold               <&gcc GCC_PCIE2B_PHY_RCHNG_CLK>,
24730638230SJohan Hovold               <&gcc GCC_PCIE_2B_PIPE_CLK>,
24830638230SJohan Hovold               <&gcc GCC_PCIE_2B_PIPEDIV2_CLK>;
24930638230SJohan Hovold      clock-names = "aux", "cfg_ahb", "ref", "rchng",
25030638230SJohan Hovold                    "pipe", "pipediv2";
25130638230SJohan Hovold
25230638230SJohan Hovold      power-domains = <&gcc PCIE_2B_GDSC>;
25330638230SJohan Hovold
25430638230SJohan Hovold      resets = <&gcc GCC_PCIE_2B_PHY_BCR>;
25530638230SJohan Hovold      reset-names = "phy";
25630638230SJohan Hovold
25730638230SJohan Hovold      vdda-phy-supply = <&vreg_l6d>;
25830638230SJohan Hovold      vdda-pll-supply = <&vreg_l4d>;
25930638230SJohan Hovold
26030638230SJohan Hovold      #clock-cells = <0>;
26130638230SJohan Hovold      clock-output-names = "pcie_2b_pipe_clk";
26230638230SJohan Hovold
26330638230SJohan Hovold      #phy-cells = <0>;
26430638230SJohan Hovold    };
26530638230SJohan Hovold
26630638230SJohan Hovold    pcie2a_phy: phy@1c24000 {
26730638230SJohan Hovold      compatible = "qcom,sc8280xp-qmp-gen3x4-pcie-phy";
26830638230SJohan Hovold      reg = <0x01c24000 0x2000>, <0x01c26000 0x2000>;
26930638230SJohan Hovold
27030638230SJohan Hovold      clocks = <&gcc GCC_PCIE_2A_AUX_CLK>,
27130638230SJohan Hovold               <&gcc GCC_PCIE_2A_CFG_AHB_CLK>,
27230638230SJohan Hovold               <&gcc GCC_PCIE_2A2B_CLKREF_CLK>,
27330638230SJohan Hovold               <&gcc GCC_PCIE2A_PHY_RCHNG_CLK>,
27430638230SJohan Hovold               <&gcc GCC_PCIE_2A_PIPE_CLK>,
27530638230SJohan Hovold               <&gcc GCC_PCIE_2A_PIPEDIV2_CLK>;
27630638230SJohan Hovold      clock-names = "aux", "cfg_ahb", "ref", "rchng",
27730638230SJohan Hovold                    "pipe", "pipediv2";
27830638230SJohan Hovold
27930638230SJohan Hovold      power-domains = <&gcc PCIE_2A_GDSC>;
28030638230SJohan Hovold
28130638230SJohan Hovold      resets = <&gcc GCC_PCIE_2A_PHY_BCR>;
28230638230SJohan Hovold      reset-names = "phy";
28330638230SJohan Hovold
28430638230SJohan Hovold      vdda-phy-supply = <&vreg_l6d>;
28530638230SJohan Hovold      vdda-pll-supply = <&vreg_l4d>;
28630638230SJohan Hovold
28730638230SJohan Hovold      qcom,4ln-config-sel = <&tcsr 0xa044 0>;
28830638230SJohan Hovold
28930638230SJohan Hovold      #clock-cells = <0>;
29030638230SJohan Hovold      clock-output-names = "pcie_2a_pipe_clk";
29130638230SJohan Hovold
29230638230SJohan Hovold      #phy-cells = <0>;
29330638230SJohan Hovold    };
294