xref: /linux/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml (revision 7cd3e586068aca123ff244fc259ba62ba96b6d31)
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
4330638230SJohan Hovold
4430638230SJohan Hovold  reg:
4530638230SJohan Hovold    minItems: 1
4630638230SJohan Hovold    maxItems: 2
4730638230SJohan Hovold
4830638230SJohan Hovold  clocks:
4943a6a29bSDmitry Baryshkov    minItems: 5
50fd2d4e4cSMrinmay Sarkar    maxItems: 7
5130638230SJohan Hovold
5230638230SJohan Hovold  clock-names:
5343a6a29bSDmitry Baryshkov    minItems: 5
5430638230SJohan Hovold    items:
5530638230SJohan Hovold      - const: aux
5630638230SJohan Hovold      - const: cfg_ahb
5730638230SJohan Hovold      - const: ref
58505fb254SDmitry Baryshkov      - enum: [rchng, refgen]
5930638230SJohan Hovold      - const: pipe
6030638230SJohan Hovold      - const: pipediv2
61fd2d4e4cSMrinmay Sarkar      - const: phy_aux
6230638230SJohan Hovold
6330638230SJohan Hovold  power-domains:
6430638230SJohan Hovold    maxItems: 1
6530638230SJohan Hovold
6630638230SJohan Hovold  resets:
67496d068eSAbel Vesa    minItems: 1
68496d068eSAbel Vesa    maxItems: 2
6930638230SJohan Hovold
7030638230SJohan Hovold  reset-names:
71496d068eSAbel Vesa    minItems: 1
7230638230SJohan Hovold    items:
7330638230SJohan Hovold      - const: phy
74496d068eSAbel Vesa      - const: phy_nocsr
7530638230SJohan Hovold
7630638230SJohan Hovold  vdda-phy-supply: true
7730638230SJohan Hovold
7830638230SJohan Hovold  vdda-pll-supply: true
7930638230SJohan Hovold
80496d068eSAbel Vesa  vdda-qref-supply: true
81496d068eSAbel Vesa
8230638230SJohan Hovold  qcom,4ln-config-sel:
8330638230SJohan Hovold    description: PCIe 4-lane configuration
8430638230SJohan Hovold    $ref: /schemas/types.yaml#/definitions/phandle-array
8530638230SJohan Hovold    items:
8630638230SJohan Hovold      - items:
8730638230SJohan Hovold          - description: phandle of TCSR syscon
8830638230SJohan Hovold          - description: offset of PCIe 4-lane configuration register
8930638230SJohan Hovold          - description: offset of configuration bit for this PHY
9030638230SJohan Hovold
9172bea132SNeil Armstrong  "#clock-cells": true
9230638230SJohan Hovold
9330638230SJohan Hovold  clock-output-names:
94*7cd3e586SDmitry Baryshkov    maxItems: 1
9530638230SJohan Hovold
9630638230SJohan Hovold  "#phy-cells":
9730638230SJohan Hovold    const: 0
9830638230SJohan Hovold
9930638230SJohan Hovoldrequired:
10030638230SJohan Hovold  - compatible
10130638230SJohan Hovold  - reg
10230638230SJohan Hovold  - clocks
10330638230SJohan Hovold  - clock-names
10430638230SJohan Hovold  - resets
10530638230SJohan Hovold  - reset-names
10630638230SJohan Hovold  - vdda-phy-supply
10730638230SJohan Hovold  - vdda-pll-supply
10830638230SJohan Hovold  - "#clock-cells"
10930638230SJohan Hovold  - clock-output-names
11030638230SJohan Hovold  - "#phy-cells"
11130638230SJohan Hovold
11230638230SJohan HovoldadditionalProperties: false
11330638230SJohan Hovold
11430638230SJohan HovoldallOf:
11530638230SJohan Hovold  - if:
11630638230SJohan Hovold      properties:
11730638230SJohan Hovold        compatible:
11830638230SJohan Hovold          contains:
11930638230SJohan Hovold            enum:
12030638230SJohan Hovold              - qcom,sc8280xp-qmp-gen3x4-pcie-phy
12130638230SJohan Hovold    then:
12230638230SJohan Hovold      properties:
12330638230SJohan Hovold        reg:
12430638230SJohan Hovold          items:
12530638230SJohan Hovold            - description: port a
12630638230SJohan Hovold            - description: port b
12730638230SJohan Hovold      required:
12830638230SJohan Hovold        - qcom,4ln-config-sel
12930638230SJohan Hovold    else:
13030638230SJohan Hovold      properties:
13130638230SJohan Hovold        reg:
13230638230SJohan Hovold          maxItems: 1
13330638230SJohan Hovold
13443a6a29bSDmitry Baryshkov  - if:
13543a6a29bSDmitry Baryshkov      properties:
13643a6a29bSDmitry Baryshkov        compatible:
13743a6a29bSDmitry Baryshkov          contains:
13843a6a29bSDmitry Baryshkov            enum:
139505fb254SDmitry Baryshkov              - qcom,sc8180x-qmp-pcie-phy
140505fb254SDmitry Baryshkov              - qcom,sdm845-qhp-pcie-phy
141505fb254SDmitry Baryshkov              - qcom,sdm845-qmp-pcie-phy
142505fb254SDmitry Baryshkov              - qcom,sdx55-qmp-pcie-phy
143377107bcSDmitry Baryshkov              - qcom,sm8150-qmp-gen3x1-pcie-phy
144377107bcSDmitry Baryshkov              - qcom,sm8150-qmp-gen3x2-pcie-phy
145505fb254SDmitry Baryshkov              - qcom,sm8250-qmp-gen3x1-pcie-phy
146505fb254SDmitry Baryshkov              - qcom,sm8250-qmp-gen3x2-pcie-phy
147505fb254SDmitry Baryshkov              - qcom,sm8250-qmp-modem-pcie-phy
14843a6a29bSDmitry Baryshkov              - qcom,sm8350-qmp-gen3x1-pcie-phy
149505fb254SDmitry Baryshkov              - qcom,sm8450-qmp-gen3x1-pcie-phy
150505fb254SDmitry Baryshkov              - qcom,sm8450-qmp-gen3x2-pcie-phy
151496d068eSAbel Vesa              - qcom,sm8550-qmp-gen3x2-pcie-phy
152496d068eSAbel Vesa              - qcom,sm8550-qmp-gen4x2-pcie-phy
1539e3f3819SNeil Armstrong              - qcom,sm8650-qmp-gen3x2-pcie-phy
1549e3f3819SNeil Armstrong              - qcom,sm8650-qmp-gen4x2-pcie-phy
155e94b29f2SAbel Vesa              - qcom,x1e80100-qmp-gen3x2-pcie-phy
156e94b29f2SAbel Vesa              - qcom,x1e80100-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
172505fb254SDmitry Baryshkov    then:
17343a6a29bSDmitry Baryshkov      properties:
17443a6a29bSDmitry Baryshkov        clocks:
17543a6a29bSDmitry Baryshkov          minItems: 6
17643a6a29bSDmitry Baryshkov        clock-names:
17743a6a29bSDmitry Baryshkov          minItems: 6
17843a6a29bSDmitry Baryshkov
179496d068eSAbel Vesa  - if:
180496d068eSAbel Vesa      properties:
181496d068eSAbel Vesa        compatible:
182496d068eSAbel Vesa          contains:
183496d068eSAbel Vesa            enum:
184fd2d4e4cSMrinmay Sarkar              - qcom,sa8775p-qmp-gen4x2-pcie-phy
185fd2d4e4cSMrinmay Sarkar              - qcom,sa8775p-qmp-gen4x4-pcie-phy
186fd2d4e4cSMrinmay Sarkar    then:
187fd2d4e4cSMrinmay Sarkar      properties:
188fd2d4e4cSMrinmay Sarkar        clocks:
189fd2d4e4cSMrinmay Sarkar          minItems: 7
190fd2d4e4cSMrinmay Sarkar        clock-names:
191fd2d4e4cSMrinmay Sarkar          minItems: 7
192fd2d4e4cSMrinmay Sarkar
193fd2d4e4cSMrinmay Sarkar  - if:
194fd2d4e4cSMrinmay Sarkar      properties:
195fd2d4e4cSMrinmay Sarkar        compatible:
196fd2d4e4cSMrinmay Sarkar          contains:
197fd2d4e4cSMrinmay Sarkar            enum:
198496d068eSAbel Vesa              - qcom,sm8550-qmp-gen4x2-pcie-phy
1999e3f3819SNeil Armstrong              - qcom,sm8650-qmp-gen4x2-pcie-phy
200e94b29f2SAbel Vesa              - qcom,x1e80100-qmp-gen4x2-pcie-phy
201496d068eSAbel Vesa    then:
202496d068eSAbel Vesa      properties:
203496d068eSAbel Vesa        resets:
204496d068eSAbel Vesa          minItems: 2
205496d068eSAbel Vesa        reset-names:
206496d068eSAbel Vesa          minItems: 2
207496d068eSAbel Vesa    else:
208496d068eSAbel Vesa      properties:
209496d068eSAbel Vesa        resets:
210496d068eSAbel Vesa          maxItems: 1
211496d068eSAbel Vesa        reset-names:
212496d068eSAbel Vesa          maxItems: 1
213496d068eSAbel Vesa
21472bea132SNeil Armstrong  - if:
21572bea132SNeil Armstrong      properties:
21672bea132SNeil Armstrong        compatible:
21772bea132SNeil Armstrong          contains:
21872bea132SNeil Armstrong            enum:
21972bea132SNeil Armstrong              - qcom,sm8450-qmp-gen4x2-pcie-phy
22072bea132SNeil Armstrong              - qcom,sm8550-qmp-gen4x2-pcie-phy
22172bea132SNeil Armstrong              - qcom,sm8650-qmp-gen4x2-pcie-phy
22272bea132SNeil Armstrong    then:
22372bea132SNeil Armstrong      properties:
22472bea132SNeil Armstrong        "#clock-cells":
22572bea132SNeil Armstrong          const: 1
22672bea132SNeil Armstrong    else:
22772bea132SNeil Armstrong      properties:
22872bea132SNeil Armstrong        "#clock-cells":
22972bea132SNeil Armstrong          const: 0
23072bea132SNeil Armstrong
23130638230SJohan Hovoldexamples:
23230638230SJohan Hovold  - |
23330638230SJohan Hovold    #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
23430638230SJohan Hovold
23530638230SJohan Hovold    pcie2b_phy: phy@1c18000 {
23630638230SJohan Hovold      compatible = "qcom,sc8280xp-qmp-gen3x2-pcie-phy";
23730638230SJohan Hovold      reg = <0x01c18000 0x2000>;
23830638230SJohan Hovold
23930638230SJohan Hovold      clocks = <&gcc GCC_PCIE_2B_AUX_CLK>,
24030638230SJohan Hovold               <&gcc GCC_PCIE_2B_CFG_AHB_CLK>,
24130638230SJohan Hovold               <&gcc GCC_PCIE_2A2B_CLKREF_CLK>,
24230638230SJohan Hovold               <&gcc GCC_PCIE2B_PHY_RCHNG_CLK>,
24330638230SJohan Hovold               <&gcc GCC_PCIE_2B_PIPE_CLK>,
24430638230SJohan Hovold               <&gcc GCC_PCIE_2B_PIPEDIV2_CLK>;
24530638230SJohan Hovold      clock-names = "aux", "cfg_ahb", "ref", "rchng",
24630638230SJohan Hovold                    "pipe", "pipediv2";
24730638230SJohan Hovold
24830638230SJohan Hovold      power-domains = <&gcc PCIE_2B_GDSC>;
24930638230SJohan Hovold
25030638230SJohan Hovold      resets = <&gcc GCC_PCIE_2B_PHY_BCR>;
25130638230SJohan Hovold      reset-names = "phy";
25230638230SJohan Hovold
25330638230SJohan Hovold      vdda-phy-supply = <&vreg_l6d>;
25430638230SJohan Hovold      vdda-pll-supply = <&vreg_l4d>;
25530638230SJohan Hovold
25630638230SJohan Hovold      #clock-cells = <0>;
25730638230SJohan Hovold      clock-output-names = "pcie_2b_pipe_clk";
25830638230SJohan Hovold
25930638230SJohan Hovold      #phy-cells = <0>;
26030638230SJohan Hovold    };
26130638230SJohan Hovold
26230638230SJohan Hovold    pcie2a_phy: phy@1c24000 {
26330638230SJohan Hovold      compatible = "qcom,sc8280xp-qmp-gen3x4-pcie-phy";
26430638230SJohan Hovold      reg = <0x01c24000 0x2000>, <0x01c26000 0x2000>;
26530638230SJohan Hovold
26630638230SJohan Hovold      clocks = <&gcc GCC_PCIE_2A_AUX_CLK>,
26730638230SJohan Hovold               <&gcc GCC_PCIE_2A_CFG_AHB_CLK>,
26830638230SJohan Hovold               <&gcc GCC_PCIE_2A2B_CLKREF_CLK>,
26930638230SJohan Hovold               <&gcc GCC_PCIE2A_PHY_RCHNG_CLK>,
27030638230SJohan Hovold               <&gcc GCC_PCIE_2A_PIPE_CLK>,
27130638230SJohan Hovold               <&gcc GCC_PCIE_2A_PIPEDIV2_CLK>;
27230638230SJohan Hovold      clock-names = "aux", "cfg_ahb", "ref", "rchng",
27330638230SJohan Hovold                    "pipe", "pipediv2";
27430638230SJohan Hovold
27530638230SJohan Hovold      power-domains = <&gcc PCIE_2A_GDSC>;
27630638230SJohan Hovold
27730638230SJohan Hovold      resets = <&gcc GCC_PCIE_2A_PHY_BCR>;
27830638230SJohan Hovold      reset-names = "phy";
27930638230SJohan Hovold
28030638230SJohan Hovold      vdda-phy-supply = <&vreg_l6d>;
28130638230SJohan Hovold      vdda-pll-supply = <&vreg_l4d>;
28230638230SJohan Hovold
28330638230SJohan Hovold      qcom,4ln-config-sel = <&tcsr 0xa044 0>;
28430638230SJohan Hovold
28530638230SJohan Hovold      #clock-cells = <0>;
28630638230SJohan Hovold      clock-output-names = "pcie_2a_pipe_clk";
28730638230SJohan Hovold
28830638230SJohan Hovold      #phy-cells = <0>;
28930638230SJohan Hovold    };
290