1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2018, The Linux Foundation. All rights reserved. */
3 
4 #ifndef _DT_BINDINGS_POWER_QCOM_RPMPD_H
5 #define _DT_BINDINGS_POWER_QCOM_RPMPD_H
6 
7 /* SDM670 Power Domain Indexes */
8 #define SDM670_MX	0
9 #define SDM670_MX_AO	1
10 #define SDM670_CX	2
11 #define SDM670_CX_AO	3
12 #define SDM670_LMX	4
13 #define SDM670_LCX	5
14 #define SDM670_GFX	6
15 #define SDM670_MSS	7
16 
17 /* SDM845 Power Domain Indexes */
18 #define SDM845_EBI	0
19 #define SDM845_MX	1
20 #define SDM845_MX_AO	2
21 #define SDM845_CX	3
22 #define SDM845_CX_AO	4
23 #define SDM845_LMX	5
24 #define SDM845_LCX	6
25 #define SDM845_GFX	7
26 #define SDM845_MSS	8
27 
28 /* SDX55 Power Domain Indexes */
29 #define SDX55_MSS	0
30 #define SDX55_MX	1
31 #define SDX55_CX	2
32 
33 /* SDX65 Power Domain Indexes */
34 #define SDX65_MSS	0
35 #define SDX65_MX	1
36 #define SDX65_MX_AO	2
37 #define SDX65_CX	3
38 #define SDX65_CX_AO	4
39 #define SDX65_MXC	5
40 
41 /* SM6350 Power Domain Indexes */
42 #define SM6350_CX	0
43 #define SM6350_GFX	1
44 #define SM6350_LCX	2
45 #define SM6350_LMX	3
46 #define SM6350_MSS	4
47 #define SM6350_MX	5
48 
49 /* SM6350 Power Domain Indexes */
50 #define SM6375_VDDCX		0
51 #define SM6375_VDDCX_AO	1
52 #define SM6375_VDDCX_VFL	2
53 #define SM6375_VDDMX		3
54 #define SM6375_VDDMX_AO	4
55 #define SM6375_VDDMX_VFL	5
56 #define SM6375_VDDGX		6
57 #define SM6375_VDDGX_AO	7
58 #define SM6375_VDD_LPI_CX	8
59 #define SM6375_VDD_LPI_MX	9
60 
61 /* SM8150 Power Domain Indexes */
62 #define SM8150_MSS	0
63 #define SM8150_EBI	1
64 #define SM8150_LMX	2
65 #define SM8150_LCX	3
66 #define SM8150_GFX	4
67 #define SM8150_MX	5
68 #define SM8150_MX_AO	6
69 #define SM8150_CX	7
70 #define SM8150_CX_AO	8
71 #define SM8150_MMCX	9
72 #define SM8150_MMCX_AO	10
73 
74 /* SM8250 Power Domain Indexes */
75 #define SM8250_CX	0
76 #define SM8250_CX_AO	1
77 #define SM8250_EBI	2
78 #define SM8250_GFX	3
79 #define SM8250_LCX	4
80 #define SM8250_LMX	5
81 #define SM8250_MMCX	6
82 #define SM8250_MMCX_AO	7
83 #define SM8250_MX	8
84 #define SM8250_MX_AO	9
85 
86 /* SM8350 Power Domain Indexes */
87 #define SM8350_CX	0
88 #define SM8350_CX_AO	1
89 #define SM8350_EBI	2
90 #define SM8350_GFX	3
91 #define SM8350_LCX	4
92 #define SM8350_LMX	5
93 #define SM8350_MMCX	6
94 #define SM8350_MMCX_AO	7
95 #define SM8350_MX	8
96 #define SM8350_MX_AO	9
97 #define SM8350_MXC	10
98 #define SM8350_MXC_AO	11
99 #define SM8350_MSS	12
100 
101 /* SM8450 Power Domain Indexes */
102 #define SM8450_CX	0
103 #define SM8450_CX_AO	1
104 #define SM8450_EBI	2
105 #define SM8450_GFX	3
106 #define SM8450_LCX	4
107 #define SM8450_LMX	5
108 #define SM8450_MMCX	6
109 #define SM8450_MMCX_AO	7
110 #define SM8450_MX	8
111 #define SM8450_MX_AO	9
112 #define SM8450_MXC	10
113 #define SM8450_MXC_AO	11
114 #define SM8450_MSS	12
115 
116 /* SM8550 Power Domain Indexes */
117 #define SM8550_CX	0
118 #define SM8550_CX_AO	1
119 #define SM8550_EBI	2
120 #define SM8550_GFX	3
121 #define SM8550_LCX	4
122 #define SM8550_LMX	5
123 #define SM8550_MMCX	6
124 #define SM8550_MMCX_AO	7
125 #define SM8550_MX	8
126 #define SM8550_MX_AO	9
127 #define SM8550_MXC	10
128 #define SM8550_MXC_AO	11
129 #define SM8550_MSS	12
130 #define SM8550_NSP	13
131 
132 /* QDU1000/QRU1000 Power Domain Indexes */
133 #define QDU1000_EBI	0
134 #define QDU1000_MSS	1
135 #define QDU1000_CX	2
136 #define QDU1000_MX	3
137 
138 /* SC7180 Power Domain Indexes */
139 #define SC7180_CX	0
140 #define SC7180_CX_AO	1
141 #define SC7180_GFX	2
142 #define SC7180_MX	3
143 #define SC7180_MX_AO	4
144 #define SC7180_LMX	5
145 #define SC7180_LCX	6
146 #define SC7180_MSS	7
147 
148 /* SC7280 Power Domain Indexes */
149 #define SC7280_CX	0
150 #define SC7280_CX_AO	1
151 #define SC7280_EBI	2
152 #define SC7280_GFX	3
153 #define SC7280_MX	4
154 #define SC7280_MX_AO	5
155 #define SC7280_LMX	6
156 #define SC7280_LCX	7
157 #define SC7280_MSS	8
158 
159 /* SC8180X Power Domain Indexes */
160 #define SC8180X_CX	0
161 #define SC8180X_CX_AO	1
162 #define SC8180X_EBI	2
163 #define SC8180X_GFX	3
164 #define SC8180X_LCX	4
165 #define SC8180X_LMX	5
166 #define SC8180X_MMCX	6
167 #define SC8180X_MMCX_AO	7
168 #define SC8180X_MSS	8
169 #define SC8180X_MX	9
170 #define SC8180X_MX_AO	10
171 
172 /* SC8280XP Power Domain Indexes */
173 #define SC8280XP_CX		0
174 #define SC8280XP_CX_AO		1
175 #define SC8280XP_DDR		2
176 #define SC8280XP_EBI		3
177 #define SC8280XP_GFX		4
178 #define SC8280XP_LCX		5
179 #define SC8280XP_LMX		6
180 #define SC8280XP_MMCX		7
181 #define SC8280XP_MMCX_AO	8
182 #define SC8280XP_MSS		9
183 #define SC8280XP_MX		10
184 #define SC8280XP_MXC		12
185 #define SC8280XP_MX_AO		11
186 #define SC8280XP_NSP		13
187 #define SC8280XP_QPHY		14
188 #define SC8280XP_XO		15
189 
190 /* SDM845 Power Domain performance levels */
191 #define RPMH_REGULATOR_LEVEL_RETENTION	16
192 #define RPMH_REGULATOR_LEVEL_MIN_SVS	48
193 #define RPMH_REGULATOR_LEVEL_LOW_SVS	64
194 #define RPMH_REGULATOR_LEVEL_SVS	128
195 #define RPMH_REGULATOR_LEVEL_SVS_L0	144
196 #define RPMH_REGULATOR_LEVEL_SVS_L1	192
197 #define RPMH_REGULATOR_LEVEL_SVS_L2	224
198 #define RPMH_REGULATOR_LEVEL_NOM	256
199 #define RPMH_REGULATOR_LEVEL_NOM_L1	320
200 #define RPMH_REGULATOR_LEVEL_NOM_L2	336
201 #define RPMH_REGULATOR_LEVEL_TURBO	384
202 #define RPMH_REGULATOR_LEVEL_TURBO_L1	416
203 
204 /* MDM9607 Power Domains */
205 #define MDM9607_VDDCX		0
206 #define MDM9607_VDDCX_AO	1
207 #define MDM9607_VDDCX_VFL	2
208 #define MDM9607_VDDMX		3
209 #define MDM9607_VDDMX_AO	4
210 #define MDM9607_VDDMX_VFL	5
211 
212 /* MSM8226 Power Domain Indexes */
213 #define MSM8226_VDDCX		0
214 #define MSM8226_VDDCX_AO	1
215 #define MSM8226_VDDCX_VFC	2
216 
217 /* MSM8939 Power Domains */
218 #define MSM8939_VDDMDCX		0
219 #define MSM8939_VDDMDCX_AO	1
220 #define MSM8939_VDDMDCX_VFC	2
221 #define MSM8939_VDDCX		3
222 #define MSM8939_VDDCX_AO	4
223 #define MSM8939_VDDCX_VFC	5
224 #define MSM8939_VDDMX		6
225 #define MSM8939_VDDMX_AO	7
226 
227 /* MSM8916 Power Domain Indexes */
228 #define MSM8916_VDDCX		0
229 #define MSM8916_VDDCX_AO	1
230 #define MSM8916_VDDCX_VFC	2
231 #define MSM8916_VDDMX		3
232 #define MSM8916_VDDMX_AO	4
233 
234 /* MSM8909 Power Domain Indexes */
235 #define MSM8909_VDDCX		MSM8916_VDDCX
236 #define MSM8909_VDDCX_AO	MSM8916_VDDCX_AO
237 #define MSM8909_VDDCX_VFC	MSM8916_VDDCX_VFC
238 #define MSM8909_VDDMX		MSM8916_VDDMX
239 #define MSM8909_VDDMX_AO	MSM8916_VDDMX_AO
240 
241 /* MSM8953 Power Domain Indexes */
242 #define MSM8953_VDDMD		0
243 #define MSM8953_VDDMD_AO	1
244 #define MSM8953_VDDCX		2
245 #define MSM8953_VDDCX_AO	3
246 #define MSM8953_VDDCX_VFL	4
247 #define MSM8953_VDDMX		5
248 #define MSM8953_VDDMX_AO	6
249 
250 /* MSM8976 Power Domain Indexes */
251 #define MSM8976_VDDCX		0
252 #define MSM8976_VDDCX_AO	1
253 #define MSM8976_VDDCX_VFL	2
254 #define MSM8976_VDDMX		3
255 #define MSM8976_VDDMX_AO	4
256 #define MSM8976_VDDMX_VFL	5
257 
258 /* MSM8994 Power Domain Indexes */
259 #define MSM8994_VDDCX		0
260 #define MSM8994_VDDCX_AO	1
261 #define MSM8994_VDDCX_VFC	2
262 #define MSM8994_VDDMX		3
263 #define MSM8994_VDDMX_AO	4
264 #define MSM8994_VDDGFX		5
265 #define MSM8994_VDDGFX_VFC	6
266 
267 /* MSM8996 Power Domain Indexes */
268 #define MSM8996_VDDCX		0
269 #define MSM8996_VDDCX_AO	1
270 #define MSM8996_VDDCX_VFC	2
271 #define MSM8996_VDDMX		3
272 #define MSM8996_VDDMX_AO	4
273 #define MSM8996_VDDSSCX		5
274 #define MSM8996_VDDSSCX_VFC	6
275 
276 /* MSM8998 Power Domain Indexes */
277 #define MSM8998_VDDCX		0
278 #define MSM8998_VDDCX_AO	1
279 #define MSM8998_VDDCX_VFL	2
280 #define MSM8998_VDDMX		3
281 #define MSM8998_VDDMX_AO	4
282 #define MSM8998_VDDMX_VFL	5
283 #define MSM8998_SSCCX		6
284 #define MSM8998_SSCCX_VFL	7
285 #define MSM8998_SSCMX		8
286 #define MSM8998_SSCMX_VFL	9
287 
288 /* QCS404 Power Domains */
289 #define QCS404_VDDMX		0
290 #define QCS404_VDDMX_AO		1
291 #define QCS404_VDDMX_VFL	2
292 #define QCS404_LPICX		3
293 #define QCS404_LPICX_VFL	4
294 #define QCS404_LPIMX		5
295 #define QCS404_LPIMX_VFL	6
296 
297 /* SDM660 Power Domains */
298 #define SDM660_VDDCX		0
299 #define SDM660_VDDCX_AO		1
300 #define SDM660_VDDCX_VFL	2
301 #define SDM660_VDDMX		3
302 #define SDM660_VDDMX_AO		4
303 #define SDM660_VDDMX_VFL	5
304 #define SDM660_SSCCX		6
305 #define SDM660_SSCCX_VFL	7
306 #define SDM660_SSCMX		8
307 #define SDM660_SSCMX_VFL	9
308 
309 /* SM4250 Power Domains */
310 #define SM4250_VDDCX		0
311 #define SM4250_VDDCX_AO		1
312 #define SM4250_VDDCX_VFL	2
313 #define SM4250_VDDMX		3
314 #define SM4250_VDDMX_AO		4
315 #define SM4250_VDDMX_VFL	5
316 #define SM4250_VDD_LPI_CX	6
317 #define SM4250_VDD_LPI_MX	7
318 
319 /* SM6115 Power Domains */
320 #define SM6115_VDDCX		0
321 #define SM6115_VDDCX_AO		1
322 #define SM6115_VDDCX_VFL	2
323 #define SM6115_VDDMX		3
324 #define SM6115_VDDMX_AO		4
325 #define SM6115_VDDMX_VFL	5
326 #define SM6115_VDD_LPI_CX	6
327 #define SM6115_VDD_LPI_MX	7
328 
329 /* SM6125 Power Domains */
330 #define SM6125_VDDCX		0
331 #define SM6125_VDDCX_AO		1
332 #define SM6125_VDDCX_VFL	2
333 #define SM6125_VDDMX		3
334 #define SM6125_VDDMX_AO		4
335 #define SM6125_VDDMX_VFL	5
336 
337 /* QCM2290 Power Domains */
338 #define QCM2290_VDDCX		0
339 #define QCM2290_VDDCX_AO	1
340 #define QCM2290_VDDCX_VFL	2
341 #define QCM2290_VDDMX		3
342 #define QCM2290_VDDMX_AO	4
343 #define QCM2290_VDDMX_VFL	5
344 #define QCM2290_VDD_LPI_CX	6
345 #define QCM2290_VDD_LPI_MX	7
346 
347 /* RPM SMD Power Domain performance levels */
348 #define RPM_SMD_LEVEL_RETENTION       16
349 #define RPM_SMD_LEVEL_RETENTION_PLUS  32
350 #define RPM_SMD_LEVEL_MIN_SVS         48
351 #define RPM_SMD_LEVEL_LOW_SVS         64
352 #define RPM_SMD_LEVEL_SVS             128
353 #define RPM_SMD_LEVEL_SVS_PLUS        192
354 #define RPM_SMD_LEVEL_NOM             256
355 #define RPM_SMD_LEVEL_NOM_PLUS        320
356 #define RPM_SMD_LEVEL_TURBO           384
357 #define RPM_SMD_LEVEL_TURBO_NO_CPR    416
358 #define RPM_SMD_LEVEL_TURBO_HIGH      448
359 #define RPM_SMD_LEVEL_BINNING         512
360 
361 #endif
362