Merge tag 'kgdb-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt...
[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  - #address-cells: must be 1
29  - #size-cells: must be 1
30  - ranges: must be present
31
32  - clocks: a list of phandles and clock-specifier pairs,
33            one for each entry in clock-names.
34  - clock-names: "cfg_ahb" for phy config clock,
35                 "aux" for phy aux clock,
36                 "ref" for 19.2 MHz ref clk,
37                 "com_aux" for phy common block aux clock,
38                 "ref_aux" for phy reference aux clock,
39
40                 For "qcom,ipq8074-qmp-pcie-phy": no clocks are listed.
41                 For "qcom,msm8996-qmp-pcie-phy" must contain:
42                         "aux", "cfg_ahb", "ref".
43                 For "qcom,msm8996-qmp-usb3-phy" must contain:
44                         "aux", "cfg_ahb", "ref".
45                 For "qcom,sdm845-qmp-usb3-phy" must contain:
46                         "aux", "cfg_ahb", "ref", "com_aux".
47                 For "qcom,sdm845-qmp-usb3-uni-phy" must contain:
48                         "aux", "cfg_ahb", "ref", "com_aux".
49                 For "qcom,sdm845-qmp-ufs-phy" must contain:
50                         "ref", "ref_aux".
51
52  - resets: a list of phandles and reset controller specifier pairs,
53            one for each entry in reset-names.
54  - reset-names: "phy" for reset of phy block,
55                 "common" for phy common block reset,
56                 "cfg" for phy's ahb cfg block reset.
57
58                 For "qcom,ipq8074-qmp-pcie-phy" must contain:
59                         "phy", "common".
60                 For "qcom,msm8996-qmp-pcie-phy" must contain:
61                         "phy", "common", "cfg".
62                 For "qcom,msm8996-qmp-usb3-phy" must contain
63                         "phy", "common".
64                 For "qcom,sdm845-qmp-usb3-phy" must contain:
65                         "phy", "common".
66                 For "qcom,sdm845-qmp-usb3-uni-phy" must contain:
67                         "phy", "common".
68                 For "qcom,sdm845-qmp-ufs-phy": no resets are listed.
69
70  - vdda-phy-supply: Phandle to a regulator supply to PHY core block.
71  - vdda-pll-supply: Phandle to 1.8V regulator supply to PHY refclk pll block.
72
73 Optional properties:
74  - vddp-ref-clk-supply: Phandle to a regulator supply to any specific refclk
75                         pll block.
76
77 Required nodes:
78  - Each device node of QMP phy is required to have as many child nodes as
79    the number of lanes the PHY has.
80
81 Required properties for child nodes of PCIe PHYs (one child per lane):
82  - reg: list of offset and length pairs of register sets for PHY blocks -
83         tx, rx, pcs, and pcs_misc (optional).
84  - #phy-cells: must be 0
85
86 Required properties for a single "lanes" child node of non-PCIe PHYs:
87  - reg: list of offset and length pairs of register sets for PHY blocks
88         For 1-lane devices:
89                 tx, rx, pcs, and (optionally) pcs_misc
90         For 2-lane devices:
91                 tx0, rx0, pcs, tx1, rx1, and (optionally) pcs_misc
92  - #phy-cells: must be 0
93
94 Required properties for 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         For "qcom,ipq8074-qmp-pcie-phy":
102                 - "pcie20_phy0_pipe_clk"        Pipe Clock parent
103                         (or)
104                   "pcie20_phy1_pipe_clk"
105  - #clock-cells: must be 0
106     - Phy pll outputs pipe clocks for pipe based PHYs. These clocks are then
107       gate-controlled by the gcc.
108
109 Required properties for child node of PHYs with lane reset, AKA:
110         "qcom,msm8996-qmp-pcie-phy"
111  - resets: a list of phandles and reset controller specifier pairs,
112            one for each entry in reset-names.
113  - reset-names: Must contain following:
114                  "lane<lane-number>" for reset specific to each lane.
115
116 Example:
117         phy@34000 {
118                 compatible = "qcom,msm8996-qmp-pcie-phy";
119                 reg = <0x34000 0x488>;
120                 #address-cells = <1>;
121                 #size-cells = <1>;
122                 ranges;
123
124                 clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
125                         <&gcc GCC_PCIE_PHY_CFG_AHB_CLK>,
126                         <&gcc GCC_PCIE_CLKREF_CLK>;
127                 clock-names = "aux", "cfg_ahb", "ref";
128
129                 vdda-phy-supply = <&pm8994_l28>;
130                 vdda-pll-supply = <&pm8994_l12>;
131
132                 resets = <&gcc GCC_PCIE_PHY_BCR>,
133                         <&gcc GCC_PCIE_PHY_COM_BCR>,
134                         <&gcc GCC_PCIE_PHY_COM_NOCSR_BCR>;
135                 reset-names = "phy", "common", "cfg";
136
137                 pciephy_0: lane@35000 {
138                         reg = <0x35000 0x130>,
139                                 <0x35200 0x200>,
140                                 <0x35400 0x1dc>;
141                         #clock-cells = <0>;
142                         #phy-cells = <0>;
143
144                         clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
145                         clock-names = "pipe0";
146                         clock-output-names = "pcie_0_pipe_clk_src";
147                         resets = <&gcc GCC_PCIE_0_PHY_BCR>;
148                         reset-names = "lane0";
149                 };
150
151                 pciephy_1: lane@36000 {
152                 ...
153                 ...
154         };
155
156         phy@88eb000 {
157                 compatible = "qcom,sdm845-qmp-usb3-uni-phy";
158                 reg = <0x88eb000 0x18c>;
159                 #address-cells = <1>;
160                 #size-cells = <1>;
161                 ranges;
162
163                 clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>,
164                          <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
165                          <&gcc GCC_USB3_SEC_CLKREF_CLK>,
166                          <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
167                 clock-names = "aux", "cfg_ahb", "ref", "com_aux";
168
169                 resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
170                          <&gcc GCC_USB3_PHY_SEC_BCR>;
171                 reset-names = "phy", "common";
172
173                 lane@88eb200 {
174                         reg = <0x88eb200 0x128>,
175                               <0x88eb400 0x1fc>,
176                               <0x88eb800 0x218>,
177                               <0x88eb600 0x70>;
178                         #clock-cells = <0>;
179                         #phy-cells = <0>;
180                         clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
181                         clock-names = "pipe0";
182                         clock-output-names = "usb3_uni_phy_pipe_clk_src";
183                 };
184         };
185
186         phy@1d87000 {
187                 compatible = "qcom,sdm845-qmp-ufs-phy";
188                 reg = <0x1d87000 0x18c>;
189                 #address-cells = <1>;
190                 #size-cells = <1>;
191                 ranges;
192                 clock-names = "ref",
193                               "ref_aux";
194                 clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>,
195                          <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
196
197                 lanes@1d87400 {
198                         reg = <0x1d87400 0x108>,
199                               <0x1d87600 0x1e0>,
200                               <0x1d87c00 0x1dc>,
201                               <0x1d87800 0x108>,
202                               <0x1d87a00 0x1e0>;
203                         #phy-cells = <0>;
204                 };
205         };