blob: db76a2483f21280a35a202bb443349b3b6d52fa6 [file] [log] [blame]
Umang Agrawal61e37122019-04-25 16:29:39 +05301/*
2 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#include <dt-bindings/interrupt-controller/arm-gic.h>
15#include <dt-bindings/regulator/qcom,rpm-smd-regulator.h>
Pradeep P V K6bb1a032019-05-29 11:22:38 +053016#include <dt-bindings/gpio/gpio.h>
Umang Agrawal61e37122019-04-25 16:29:39 +053017
18&rpm_bus {
19 /* PM660 S1 - VDD_CX supply */
20 rpm-regulator-smpa1 {
21 status = "okay";
22 VDD_CX_LEVEL: S1A_LEVEL:
23 pm660_s1_level: regulator-s1-level {
24 compatible = "qcom,rpm-smd-regulator";
25 regulator-name = "pm660_s1_level";
26 qcom,set = <3>;
27 regulator-min-microvolt =
28 <RPM_SMD_REGULATOR_LEVEL_RETENTION>;
29 regulator-max-microvolt =
30 <RPM_SMD_REGULATOR_LEVEL_BINNING>;
31 qcom,use-voltage-level;
32 };
33
34 VDD_CX_FLOOR_LEVEL: S1A_FLOOR_LEVEL:
35 pm660_s1_floor_level: regulator-s1-floor-level {
36 compatible = "qcom,rpm-smd-regulator";
37 regulator-name = "pm660_s1_floor_level";
38 qcom,set = <3>;
39 regulator-min-microvolt =
40 <RPM_SMD_REGULATOR_LEVEL_RETENTION>;
41 regulator-max-microvolt =
42 <RPM_SMD_REGULATOR_LEVEL_BINNING>;
43 qcom,use-voltage-floor-level;
44 qcom,always-send-voltage;
45 };
46
47 VDD_CX_LEVEL_AO: S1A_LEVEL_AO:
48 pm660_s1_level_ao: regulator-s1-level-ao {
49 compatible = "qcom,rpm-smd-regulator";
50 regulator-name = "pm660_s1_level_ao";
51 qcom,set = <1>;
52 regulator-min-microvolt =
53 <RPM_SMD_REGULATOR_LEVEL_RETENTION>;
54 regulator-max-microvolt =
55 <RPM_SMD_REGULATOR_LEVEL_BINNING>;
56 qcom,use-voltage-level;
57 };
Jing Xue212856e2019-08-13 15:28:03 +080058
59 pm660_cx_cdev: regulator-cx-cdev {
60 compatible = "qcom,regulator-cooling-device";
61 regulator-cdev-supply = <&pm660_s1_floor_level>;
62 regulator-levels = <RPM_SMD_REGULATOR_LEVEL_NOM_PLUS
63 RPM_SMD_REGULATOR_LEVEL_RETENTION>;
64 #cooling-cells = <2>;
65 };
Umang Agrawal61e37122019-04-25 16:29:39 +053066 };
67
68 /* PM660 S2 - VDD_MX supply */
69 rpm-regulator-smpa2 {
70 status = "okay";
71 VDD_MX_LEVEL: S2A_LEVEL:
72 pm660_s2_level: regulator-s2-level {
73 compatible = "qcom,rpm-smd-regulator";
74 regulator-name = "pm660_s2_level";
75 qcom,set = <3>;
76 regulator-min-microvolt =
77 <RPM_SMD_REGULATOR_LEVEL_RETENTION>;
78 regulator-max-microvolt =
79 <RPM_SMD_REGULATOR_LEVEL_BINNING>;
80 qcom,use-voltage-level;
81 };
82
83 VDD_MX_LEVEL_AO: S2A_LEVEL_AO:
84 pm660_s2_level_ao: regulator-s2-level-ao {
85 compatible = "qcom,rpm-smd-regulator";
86 regulator-name = "pm660_s2_level_ao";
87 qcom,set = <1>;
88 regulator-min-microvolt =
89 <RPM_SMD_REGULATOR_LEVEL_RETENTION>;
90 regulator-max-microvolt =
91 <RPM_SMD_REGULATOR_LEVEL_BINNING>;
92 qcom,use-voltage-level;
93 };
94
95 VDD_MX_LEVEL_SO: S2A_LEVEL_SO:
96 pm660_s2_level_so: regulator-s2-level-so {
97 compatible = "qcom,rpm-smd-regulator";
98 regulator-name = "pm660_s2_level_so";
99 qcom,set = <2>;
100 regulator-min-microvolt =
101 <RPM_SMD_REGULATOR_LEVEL_RETENTION>;
102 regulator-max-microvolt =
103 <RPM_SMD_REGULATOR_LEVEL_BINNING>;
104 qcom,use-voltage-level;
105 };
106 };
107
108 rpm-regulator-smpa4 {
109 status = "okay";
110 S4A: pm660_s4: regulator-s4 {
111 regulator-min-microvolt = <1800000>;
112 regulator-max-microvolt = <2040000>;
113 qcom,init-voltage = <1800000>;
114 status = "okay";
115 };
116 };
117
118 rpm-regulator-smpa5 {
119 status = "okay";
120 S5A: pm660_s5: regulator-s5 {
121 regulator-min-microvolt = <1040000>;
xiaolin86e6b902019-07-22 16:05:20 +0800122 regulator-max-microvolt = <1420000>;
Umang Agrawal61e37122019-04-25 16:29:39 +0530123 qcom,init-voltage = <1040000>;
124 status = "okay";
125 };
126 };
127
Umang Agrawal026afce2019-06-06 16:00:14 +0530128 rpm-regulator-smpa6 {
129 status = "okay";
130 S6A: pm660_s6_level: regulator-s6-level {
131 compatible = "qcom,rpm-smd-regulator";
132 regulator-name = "pm660_s6_level";
133 qcom,set = <3>;
134 regulator-min-microvolt =
135 <RPM_SMD_REGULATOR_LEVEL_RETENTION>;
136 regulator-max-microvolt =
137 <RPM_SMD_REGULATOR_LEVEL_BINNING>;
138 qcom,use-voltage-level;
139 status = "okay";
140 };
141 };
142
Umang Agrawal61e37122019-04-25 16:29:39 +0530143 rpm-regulator-ldoa1 {
144 status = "okay";
145 L1A: pm660_l1: regulator-l1 {
146 regulator-min-microvolt = <970000>;
147 regulator-max-microvolt = <1280000>;
148 qcom,init-voltage = <970000>;
149 status = "okay";
150 };
151 };
152
153 rpm-regulator-ldoa2 {
154 status = "okay";
155 L2A: pm660_l2: regulator-l2 {
156 regulator-min-microvolt = <900000>;
157 regulator-max-microvolt = <1280000>;
158 qcom,init-voltage = <900000>;
159 status = "okay";
160 };
161 };
162
163 rpm-regulator-ldoa3 {
164 status = "okay";
165 L3A: pm660_l3: regulator-l3 {
166 regulator-min-microvolt = <900000>;
167 regulator-max-microvolt = <1280000>;
168 qcom,init-voltage = <900000>;
169 status = "okay";
170 };
171 };
172
173 rpm-regulator-ldoa5 {
174 status = "okay";
175 L5A: pm660_l5: regulator-l5 {
176 regulator-min-microvolt = <1150000>;
177 regulator-max-microvolt = <1450000>;
178 qcom,init-voltage = <1150000>;
179 status = "okay";
180 };
181 };
182
183 rpm-regulator-ldoa6 {
184 status = "okay";
185 L6A: pm660_l6: regulator-l6 {
186 regulator-min-microvolt = <670000>;
shaoxingf57f4cd2019-06-12 13:30:51 +0800187 regulator-max-microvolt = <930000>;
Xipeng Gu60d7e462019-07-16 16:15:30 +0800188 qcom,init-voltage = <800000>;
Umang Agrawal61e37122019-04-25 16:29:39 +0530189 status = "okay";
190 };
191 };
192
193 rpm-regulator-ldoa7 {
194 status = "okay";
195 L7A: pm660_l7: regulator-l7 {
196 regulator-min-microvolt = <1140000>;
197 regulator-max-microvolt = <1280000>;
198 qcom,init-voltage = <1140000>;
199 status = "okay";
200 };
201 };
202
203 rpm-regulator-ldoa8 {
204 status = "okay";
205 L8A: pm660_l8: regulator-l8 {
206 regulator-min-microvolt = <1500000>;
207 regulator-max-microvolt = <2040000>;
208 qcom,init-voltage = <1500000>;
209 status = "okay";
210 };
211 };
212
213 rpm-regulator-ldoa9 {
214 status = "okay";
215 L9A: pm660_l9: regulator-l9 {
216 regulator-min-microvolt = <1200000>;
217 regulator-max-microvolt = <2040000>;
218 qcom,init-voltage = <1200000>;
219 status = "okay";
220 };
221 };
222
223 rpm-regulator-ldoa10 {
224 status = "okay";
225 L10A: pm660_l10: regulator-l10 {
226 regulator-min-microvolt = <500000>;
227 regulator-max-microvolt = <2040000>;
228 qcom,init-voltage = <500000>;
229 status = "okay";
230 };
231 };
232
233 rpm-regulator-ldoa11 {
234 status = "okay";
235 L11A: pm660_l11: regulator-l11 {
236 regulator-min-microvolt = <1200000>;
237 regulator-max-microvolt = <2040000>;
238 qcom,init-voltage = <1200000>;
239 status = "okay";
240 };
241 };
242
243 rpm-regulator-ldoa12 {
244 status = "okay";
245 L12A: pm660_l12: regulator-l12 {
246 regulator-min-microvolt = <1620000>;
247 regulator-max-microvolt = <2040000>;
248 qcom,init-voltage = <1620000>;
249 status = "okay";
250 };
251
252 L12A_AO: pm660_l12_ao: regulator-l12-ao {
253 compatible = "qcom,rpm-smd-regulator";
254 regulator-name = "pm660_l12_ao";
255 qcom,set = <1>;
256 regulator-min-microvolt = <1620000>;
257 regulator-max-microvolt = <2040000>;
258 qcom,init-voltage = <1620000>;
259 };
260 };
261
262 rpm-regulator-ldoa13 {
263 status = "okay";
264 L13A: pm660_l13: regulator-l13 {
265 regulator-min-microvolt = <1600000>;
266 regulator-max-microvolt = <2040000>;
267 qcom,init-voltage = <1600000>;
268 status = "okay";
269 };
270 };
271
272 rpm-regulator-ldoa14 {
273 status = "okay";
274 L14A: pm660_l14: regulator-l14 {
275 regulator-min-microvolt = <1700000>;
276 regulator-max-microvolt = <1900000>;
277 qcom,init-voltage = <1700000>;
278 status = "okay";
279 };
280 };
281
282 rpm-regulator-ldoa15 {
283 status = "okay";
284 L15A: pm660_l15: regulator-l15 {
285 regulator-min-microvolt = <2650000>;
286 regulator-max-microvolt = <3400000>;
287 qcom,init-voltage = <2650000>;
288 status = "okay";
289 };
290 };
291
292 rpm-regulator-ldoa16 {
293 status = "okay";
294 L16A: pm660_l16: regulator-l16 {
295 regulator-min-microvolt = <2970000>;
296 regulator-max-microvolt = <3400000>;
297 qcom,init-voltage = <2970000>;
298 status = "okay";
299 };
300 };
301
302 rpm-regulator-ldoa17 {
303 status = "okay";
304 L17A: pm660_l17: regulator-l17 {
305 regulator-min-microvolt = <2400000>;
306 regulator-max-microvolt = <3300000>;
307 qcom,init-voltage = <2400000>;
308 status = "okay";
309 };
310 };
311
312 rpm-regulator-ldoa18 {
313 status = "okay";
314 L18A: pm660_l18: regulator-l18 {
315 regulator-min-microvolt = <1650000>;
316 regulator-max-microvolt = <3050000>;
317 qcom,init-voltage = <1650000>;
318 status = "okay";
319 };
320 };
321
322 rpm-regulator-ldoa19 {
323 status = "okay";
324 L19A: pm660_l19: regulator-l19 {
325 regulator-min-microvolt = <2700000>;
326 regulator-max-microvolt = <3400000>;
327 qcom,init-voltage = <2700000>;
328 status = "okay";
329 };
330 };
331};
332
333/* SPM controlled regulators */
334&spmi_bus {
335 qcom,pm660@1 {
Shefali Jain5b91e112019-05-27 17:41:21 +0530336 apc_vreg_regulator: S3A: pm660_s3: spm-regulator@1a00 {
Umang Agrawal61e37122019-04-25 16:29:39 +0530337 compatible = "qcom,spm-regulator";
338 reg = <0x1a00 0x100>;
339 regulator-name = "pm660_s3";
Anirudh Ghayal2aadf3d2019-05-29 20:43:06 +0530340 regulator-min-microvolt = <490000>;
341 regulator-max-microvolt = <980000>;
Umang Agrawal61e37122019-04-25 16:29:39 +0530342 };
343 };
344};
345
346&soc {
347 regulator@b018000 {
348 vdd-apc-supply = <&pm660_s3>;
Anirudh Ghayal28d37882019-07-23 09:54:39 +0530349 qcom,cpr-apc-volt-step = <4000>;
Umang Agrawal61e37122019-04-25 16:29:39 +0530350 };
Pradeep P V K6bb1a032019-05-29 11:22:38 +0530351
352 vreg_sd_pad: vreg_sd_pad {
353 compatible = "regulator-gpio";
xiaolin2120d162019-06-10 18:46:03 +0800354 regulator-name = "vreg_sd_pad";
Pradeep P V K6bb1a032019-05-29 11:22:38 +0530355 regulator-min-microvolt = <1800000>;
356 regulator-max-microvolt = <2950000>;
357 enable-gpio = <&tlmm 63 GPIO_ACTIVE_HIGH>;
358 gpios = <&tlmm 91 GPIO_ACTIVE_HIGH>;
359 states = <1800000 0>, <2950000 1>;
360 startup-delay-us = <200000>;
361 enable-active-high;
362 };
363
364 vreg_sd_vdd: sd-vdd-fixed-regulator {
365 compatible = "regulator-fixed";
366 regulator-name = "sd_vdd";
367 regulator-min-microvolt = <2950000>;
368 regulator-max-microvolt = <2950000>;
369 };
Umang Agrawal61e37122019-04-25 16:29:39 +0530370};