Merge tag 'for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / phy / qcom-qmp-phy.txt
1 Qualcomm QMP PHY controller
2 ===========================
3
4 QMP phy controller supports physical layer functionality for a number of
5 controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
6
7 Required properties:
8  - compatible: compatible list, contains:
9                "qcom,ipq8074-qmp-pcie-phy" for PCIe phy on IPQ8074
10                "qcom,msm8996-qmp-pcie-phy" for 14nm PCIe phy on msm8996,
11                "qcom,msm8996-qmp-usb3-phy" for 14nm USB3 phy on msm8996,
12                "qcom,sdm845-qmp-usb3-phy" for USB3 QMP V3 phy on sdm845,
13                "qcom,sdm845-qmp-usb3-uni-phy" for USB3 QMP V3 UNI phy on sdm845,
14                "qcom,sdm845-qmp-ufs-phy" for UFS QMP phy on sdm845.
15
16 - reg:
17   - index 0: address and length of register set for PHY's common
18              serdes block.
19   - index 1: address and length of the DP_COM control block (for
20              "qcom,sdm845-qmp-usb3-phy" only).
21
22 - reg-names:
23   - For "qcom,sdm845-qmp-usb3-phy":
24     - Should be: "reg-base", "dp_com"
25   - For all others:
26     - The reg-names property shouldn't be defined.
27
28  - #clock-cells: must be 1
29     - Phy pll outputs a bunch of clocks for Tx, Rx and Pipe
30       interface (for pipe based PHYs). These clock are then gate-controlled
31       by gcc.
32  - #address-cells: must be 1
33  - #size-cells: must be 1
34  - ranges: must be present
35
36  - clocks: a list of phandles and clock-specifier pairs,
37            one for each entry in clock-names.
38  - clock-names: "cfg_ahb" for phy config clock,
39                 "aux" for phy aux clock,
40                 "ref" for 19.2 MHz ref clk,
41                 "com_aux" for phy common block aux clock,
42                 "ref_aux" for phy reference aux clock,
43
44                 For "qcom,ipq8074-qmp-pcie-phy": no clocks are listed.
45                 For "qcom,msm8996-qmp-pcie-phy" must contain:
46                         "aux", "cfg_ahb", "ref".
47                 For "qcom,msm8996-qmp-usb3-phy" must contain:
48                         "aux", "cfg_ahb", "ref".
49                 For "qcom,sdm845-qmp-usb3-phy" must contain:
50                         "aux", "cfg_ahb", "ref", "com_aux".
51                 For "qcom,sdm845-qmp-usb3-uni-phy" must contain:
52                         "aux", "cfg_ahb", "ref", "com_aux".
53                 For "qcom,sdm845-qmp-ufs-phy" must contain:
54                         "ref", "ref_aux".
55
56  - resets: a list of phandles and reset controller specifier pairs,
57            one for each entry in reset-names.
58  - reset-names: "phy" for reset of phy block,
59                 "common" for phy common block reset,
60                 "cfg" for phy's ahb cfg block reset.
61
62                 For "qcom,ipq8074-qmp-pcie-phy" must contain:
63                         "phy", "common".
64                 For "qcom,msm8996-qmp-pcie-phy" must contain:
65                         "phy", "common", "cfg".
66                 For "qcom,msm8996-qmp-usb3-phy" must contain
67                         "phy", "common".
68                 For "qcom,sdm845-qmp-usb3-phy" must contain:
69                         "phy", "common".
70                 For "qcom,sdm845-qmp-usb3-uni-phy" must contain:
71                         "phy", "common".
72                 For "qcom,sdm845-qmp-ufs-phy": no resets are listed.
73
74  - vdda-phy-supply: Phandle to a regulator supply to PHY core block.
75  - vdda-pll-supply: Phandle to 1.8V regulator supply to PHY refclk pll block.
76
77 Optional properties:
78  - vddp-ref-clk-supply: Phandle to a regulator supply to any specific refclk
79                         pll block.
80
81 Required nodes:
82  - Each device node of QMP phy is required to have as many child nodes as
83    the number of lanes the PHY has.
84
85 Required properties for child node:
86  - reg: list of offset and length pairs of register sets for PHY blocks -
87         - index 0: tx
88         - index 1: rx
89         - index 2: pcs
90         - index 3: pcs_misc (optional)
91
92  - #phy-cells: must be 0
93
94 Required properties child node of pcie and usb3 qmp phys:
95  - clocks: a list of phandles and clock-specifier pairs,
96            one for each entry in clock-names.
97  - clock-names: Must contain following:
98                  "pipe<lane-number>" for pipe clock specific to each lane.
99  - clock-output-names: Name of the PHY clock that will be the parent for
100                        the above pipe clock.
101
102         For "qcom,ipq8074-qmp-pcie-phy":
103                 - "pcie20_phy0_pipe_clk"        Pipe Clock parent
104                         (or)
105                   "pcie20_phy1_pipe_clk"
106
107 Required properties for child node of PHYs with lane reset, AKA:
108         "qcom,msm8996-qmp-pcie-phy"
109  - resets: a list of phandles and reset controller specifier pairs,
110            one for each entry in reset-names.
111  - reset-names: Must contain following:
112                  "lane<lane-number>" for reset specific to each lane.
113
114 Example:
115         phy@34000 {
116                 compatible = "qcom,msm8996-qmp-pcie-phy";
117                 reg = <0x34000 0x488>;
118                 #clock-cells = <1>;
119                 #address-cells = <1>;
120                 #size-cells = <1>;
121                 ranges;
122
123                 clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
124                         <&gcc GCC_PCIE_PHY_CFG_AHB_CLK>,
125                         <&gcc GCC_PCIE_CLKREF_CLK>;
126                 clock-names = "aux", "cfg_ahb", "ref";
127
128                 vdda-phy-supply = <&pm8994_l28>;
129                 vdda-pll-supply = <&pm8994_l12>;
130
131                 resets = <&gcc GCC_PCIE_PHY_BCR>,
132                         <&gcc GCC_PCIE_PHY_COM_BCR>,
133                         <&gcc GCC_PCIE_PHY_COM_NOCSR_BCR>;
134                 reset-names = "phy", "common", "cfg";
135
136                 pciephy_0: lane@35000 {
137                         reg = <0x35000 0x130>,
138                                 <0x35200 0x200>,
139                                 <0x35400 0x1dc>;
140                         #phy-cells = <0>;
141
142                         clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
143                         clock-names = "pipe0";
144                         clock-output-names = "pcie_0_pipe_clk_src";
145                         resets = <&gcc GCC_PCIE_0_PHY_BCR>;
146                         reset-names = "lane0";
147                 };
148
149                 pciephy_1: lane@36000 {
150                 ...
151                 ...
152         };