blob: 6919e741e00663e54c521209f188b0f035cba63c [file] [log] [blame]
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +05301/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
Umang Agrawal16b11602017-12-21 15:32:55 +05302 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <dt-bindings/interrupt-controller/irq.h>
14#include <dt-bindings/spmi/spmi.h>
15#include <dt-bindings/msm/power-on.h>
16
17&spmi_bus {
18 qcom,pmi632@2 {
19 compatible = "qcom,spmi-pmic";
20 reg = <0x2 SPMI_USID>;
Anirudh Ghayald77f8f62018-03-04 20:05:25 +053021 #address-cells = <1>;
22 #size-cells = <1>;
Umang Agrawal16b11602017-12-21 15:32:55 +053023
24 pmi632_revid: qcom,revid@100 {
25 compatible = "qcom,qpnp-revid";
26 reg = <0x100 0x100>;
27 };
28
29 pmi632_pon: qcom,power-on@800 {
30 compatible = "qcom,qpnp-power-on";
31 reg = <0x800 0x100>;
Anirudh Ghayalff3660e2018-04-19 10:21:18 +053032
Umang Agrawal16b11602017-12-21 15:32:55 +053033 qcom,secondary-pon-reset;
Anirudh Ghayalff3660e2018-04-19 10:21:18 +053034 qcom,s3-src = "kpdpwr";
Umang Agrawal16b11602017-12-21 15:32:55 +053035 };
36
Jishnu Prakash292e28c2018-01-18 11:28:34 +053037 pmi632_vadc: vadc@3100 {
Jishnu Prakashfe450a72018-05-04 10:51:15 +053038 compatible = "qcom,qpnp-vadc-hc",
39 "qcom,qpnp-adc-hc-pm5";
Jishnu Prakash292e28c2018-01-18 11:28:34 +053040 reg = <0x3100 0x100>;
41 #address-cells = <1>;
42 #size-cells = <0>;
Jishnu Prakash3238aad2018-03-08 10:37:18 +053043 interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
Jishnu Prakash292e28c2018-01-18 11:28:34 +053044 interrupt-names = "eoc-int-en-set";
45 qcom,adc-vdd-reference = <1875>;
46 qcom,adc-full-scale-code = <0x70e4>;
Jishnu Prakashb374dab2018-11-30 18:49:52 +053047 qcom,pmic-revid = <&pmi632_revid>;
Jishnu Prakash292e28c2018-01-18 11:28:34 +053048
49 chan@0 {
50 label = "ref_gnd";
51 reg = <0>;
52 qcom,decimation = <2>;
53 qcom,pre-div-channel-scaling = <0>;
54 qcom,calibration-type = "absolute";
55 qcom,scale-function = <0>;
56 qcom,hw-settle-time = <0>;
57 qcom,fast-avg-setup = <0>;
58 qcom,cal-val = <0>;
59 };
60
61 chan@1 {
62 label = "ref_1250v";
63 reg = <1>;
64 qcom,decimation = <2>;
65 qcom,pre-div-channel-scaling = <0>;
66 qcom,calibration-type = "absolute";
67 qcom,scale-function = <0>;
68 qcom,hw-settle-time = <0>;
69 qcom,fast-avg-setup = <0>;
70 qcom,cal-val = <0>;
71 };
72
73 chan@83 {
74 label = "vph_pwr";
75 reg = <0x83>;
76 qcom,decimation = <2>;
77 qcom,pre-div-channel-scaling = <1>;
78 qcom,calibration-type = "absolute";
79 qcom,scale-function = <0>;
80 qcom,hw-settle-time = <0>;
81 qcom,fast-avg-setup = <0>;
82 qcom,cal-val = <0>;
83 };
84
85 chan@84 {
86 label = "vbat_sns";
87 reg = <0x84>;
88 qcom,decimation = <2>;
89 qcom,pre-div-channel-scaling = <1>;
90 qcom,calibration-type = "absolute";
91 qcom,scale-function = <0>;
92 qcom,hw-settle-time = <0>;
93 qcom,fast-avg-setup = <0>;
94 qcom,cal-val = <0>;
95 };
96
97 chan@6 {
98 label = "die_temp";
99 reg = <6>;
100 qcom,decimation = <2>;
101 qcom,pre-div-channel-scaling = <0>;
102 qcom,calibration-type = "absolute";
103 qcom,scale-function = <19>;
104 qcom,hw-settle-time = <0>;
105 qcom,fast-avg-setup = <0>;
106 qcom,cal-val = <0>;
107 };
108
109 chan@7 {
110 label = "usb_in_i";
111 reg = <7>;
112 qcom,decimation = <2>;
113 qcom,pre-div-channel-scaling = <0>;
114 qcom,calibration-type = "absolute";
115 qcom,scale-function = <21>;
116 qcom,hw-settle-time = <0>;
117 qcom,fast-avg-setup = <0>;
118 qcom,cal-val = <0>;
119 };
120
121 chan@8 {
122 label = "usb_in_v";
123 reg = <8>;
124 qcom,decimation = <2>;
125 qcom,pre-div-channel-scaling = <8>;
126 qcom,calibration-type = "absolute";
127 qcom,scale-function = <0>;
128 qcom,hw-settle-time = <0>;
129 qcom,fast-avg-setup = <0>;
130 qcom,cal-val = <0>;
131 };
132
133 chan@9 {
134 label = "chg_temp";
135 reg = <9>;
136 qcom,decimation = <2>;
137 qcom,pre-div-channel-scaling = <0>;
138 qcom,calibration-type = "absolute";
139 qcom,scale-function = <18>;
140 qcom,hw-settle-time = <0>;
141 qcom,fast-avg-setup = <0>;
142 qcom,cal-val = <0>;
143 };
144
145 chan@4a {
146 label = "bat_therm";
147 reg = <0x4a>;
148 qcom,decimation = <2>;
149 qcom,pre-div-channel-scaling = <0>;
150 qcom,calibration-type = "ratiometric";
151 qcom,scale-function = <17>;
152 qcom,hw-settle-time = <0>;
153 qcom,fast-avg-setup = <0>;
154 qcom,cal-val = <0>;
155 };
156
Jishnu Prakash32dab112018-04-12 15:13:12 +0530157 chan@2a {
158 label = "bat_therm_PU30";
159 reg = <0x2a>;
160 qcom,decimation = <2>;
161 qcom,pre-div-channel-scaling = <0>;
162 qcom,calibration-type = "ratiometric";
163 qcom,scale-function = <24>;
164 qcom,hw-settle-time = <0>;
165 qcom,fast-avg-setup = <0>;
166 qcom,cal-val = <0>;
167 };
168
169 chan@6a {
170 label = "bat_therm_PU400";
171 reg = <0x6a>;
172 qcom,decimation = <2>;
173 qcom,pre-div-channel-scaling = <0>;
174 qcom,calibration-type = "ratiometric";
175 qcom,scale-function = <25>;
176 qcom,hw-settle-time = <0>;
177 qcom,fast-avg-setup = <0>;
178 qcom,cal-val = <0>;
179 };
180
Jishnu Prakash292e28c2018-01-18 11:28:34 +0530181 chan@4b {
182 label = "bat_id";
183 reg = <0x4b>;
184 qcom,decimation = <2>;
185 qcom,pre-div-channel-scaling = <0>;
186 qcom,calibration-type = "ratiometric";
187 qcom,scale-function = <0>;
188 qcom,hw-settle-time = <0>;
189 qcom,fast-avg-setup = <0>;
190 qcom,cal-val = <0>;
191 };
192
193 chan@4c {
194 label = "xo_therm";
195 reg = <0x4c>;
196 qcom,decimation = <2>;
197 qcom,pre-div-channel-scaling = <0>;
198 qcom,calibration-type = "ratiometric";
199 qcom,scale-function = <4>;
200 qcom,hw-settle-time = <8>;
201 qcom,fast-avg-setup = <0>;
202 };
203
204
205 chan@1e {
206 label = "mid_chg";
207 reg = <0x1e>;
208 qcom,decimation = <2>;
209 qcom,pre-div-channel-scaling = <3>;
210 qcom,calibration-type = "absolute";
211 qcom,scale-function = <0>;
212 qcom,hw-settle-time = <0>;
213 qcom,fast-avg-setup = <0>;
214 qcom,cal-val = <0>;
215 };
216
Jishnu Prakash9940b752018-03-15 20:05:12 +0530217 chan@52 {
218 label = "typec_therm";
219 reg = <0x52>;
220 qcom,decimation = <2>;
221 qcom,pre-div-channel-scaling = <0>;
222 qcom,calibration-type = "ratiometric";
223 qcom,scale-function = <2>;
224 qcom,hw-settle-time = <0>;
225 qcom,fast-avg-setup = <0>;
226 qcom,cal-val = <0>;
227 };
228
229 chan@53 {
230 label = "quiet_therm";
231 reg = <0x53>;
232 qcom,decimation = <2>;
233 qcom,pre-div-channel-scaling = <0>;
234 qcom,calibration-type = "ratiometric";
235 qcom,scale-function = <2>;
236 qcom,hw-settle-time = <0>;
237 qcom,fast-avg-setup = <0>;
238 qcom,cal-val = <0>;
239 };
240
241 chan@54 {
242 label = "smb_therm";
243 reg = <0x54>;
244 qcom,decimation = <2>;
245 qcom,pre-div-channel-scaling = <0>;
246 qcom,calibration-type = "ratiometric";
247 qcom,scale-function = <2>;
248 qcom,hw-settle-time = <0>;
249 qcom,fast-avg-setup = <0>;
250 qcom,cal-val = <0>;
251 };
Jishnu Prakash292e28c2018-01-18 11:28:34 +0530252 };
253
Jishnu Prakash097d97d2018-04-04 21:08:27 +0530254 pmi632_adc_tm: vadc@3500 {
Jishnu Prakashfe450a72018-05-04 10:51:15 +0530255 compatible = "qcom,qpnp-adc-tm-hc",
256 "qcom,qpnp-adc-tm-hc-pm5";
Jishnu Prakash097d97d2018-04-04 21:08:27 +0530257 reg = <0x3500 0x100>;
258 #address-cells = <1>;
259 #size-cells = <0>;
260 interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
261 interrupt-names = "eoc-int-en-set";
262 qcom,adc-vdd-reference = <1875>;
263 qcom,adc-full-scale-code = <0x70e4>;
264 qcom,adc_tm-vadc = <&pmi632_vadc>;
265 qcom,decimation = <0>;
266 qcom,fast-avg-setup = <0>;
267 #thermal-sensor-cells = <1>;
268
269 chan@53 {
270 label = "quiet_therm";
271 reg = <0x53>;
272 qcom,pre-div-channel-scaling = <0>;
273 qcom,calibration-type = "ratiometric";
274 qcom,scale-function = <2>;
275 qcom,hw-settle-time = <0>;
276 qcom,btm-channel-number = <0x60>;
277 qcom,thermal-node;
278 };
279
280 };
281
Umang Agrawal16b11602017-12-21 15:32:55 +0530282 pmi632_tz: qcom,temp-alarm@2400 {
283 compatible = "qcom,qpnp-temp-alarm";
284 reg = <0x2400 0x100>;
285 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
286 label = "pmi632_tz";
287 #thermal-sensor-cells = <0>;
288 };
289
290 pmi632_gpios: pinctrl@c000 {
291 compatible = "qcom,spmi-gpio";
292 reg = <0xc000 0x800>;
Ashay Jaiswal15d3c8f2018-06-14 21:27:45 +0530293 interrupts = <0x2 0xc0 0 IRQ_TYPE_NONE>,
294 <0x2 0xc1 0 IRQ_TYPE_NONE>,
Umang Agrawal16b11602017-12-21 15:32:55 +0530295 <0x2 0xc2 0 IRQ_TYPE_NONE>,
296 <0x2 0xc3 0 IRQ_TYPE_NONE>,
297 <0x2 0xc4 0 IRQ_TYPE_NONE>,
298 <0x2 0xc5 0 IRQ_TYPE_NONE>,
299 <0x2 0xc6 0 IRQ_TYPE_NONE>,
Umang Agrawalfbbfb7f2017-12-29 19:27:01 +0530300 <0x2 0xc7 0 IRQ_TYPE_NONE>;
Ashay Jaiswal15d3c8f2018-06-14 21:27:45 +0530301 interrupt-names = "pmi632_gpio1", "pmi632_gpio2",
302 "pmi632_gpio3", "pmi632_gpio4",
303 "pmi632_gpio5", "pmi632_gpio6",
304 "pmi632_gpio7", "pmi632_gpio8";
Umang Agrawal16b11602017-12-21 15:32:55 +0530305 gpio-controller;
306 #gpio-cells = <2>;
Umang Agrawal16b11602017-12-21 15:32:55 +0530307 };
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530308
309 pmi632_charger: qcom,qpnp-smb5 {
310 compatible = "qcom,qpnp-smb5";
311 #address-cells = <1>;
312 #size-cells = <1>;
Manaf Meethalavalappu Pallikunhi585ef212018-02-27 21:10:51 +0530313 #cooling-cells = <2>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530314
315 qcom,pmic-revid = <&pmi632_revid>;
316 dpdm-supply = <&qusb_phy>;
Anirudh Ghayal23fa4a32018-03-08 18:16:23 +0530317 qcom,auto-recharge-soc = <98>;
Ashay Jaiswal338858c2018-04-20 11:55:38 +0530318 qcom,chg-vadc = <&pmi632_vadc>;
Kiran Gunda7d7830d2018-05-23 16:58:58 +0530319 qcom,flash-disable-soc = <10>;
Ashay Jaiswalb6fc5802018-05-31 14:40:08 +0530320 qcom,sw-jeita-enable;
321 qcom,step-charging-enable;
Ashay Jaiswal15d3c8f2018-06-14 21:27:45 +0530322 qcom,hw-die-temp-mitigation;
323 qcom,hw-connector-mitigation;
324 qcom,connector-internal-pull-kohm = <100>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530325
Manaf Meethalavalappu Pallikunhi585ef212018-02-27 21:10:51 +0530326 qcom,thermal-mitigation
327 = <3000000 2500000 2000000 1500000
328 1000000 500000>;
329
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530330 qcom,chgr@1000 {
331 reg = <0x1000 0x100>;
332 interrupts =
333 <0x2 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
334 <0x2 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
335 <0x2 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
336 <0x2 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
337 <0x2 0x10 0x4 IRQ_TYPE_EDGE_RISING>,
338 <0x2 0x10 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530339 <0x2 0x10 0x6 IRQ_TYPE_EDGE_RISING>,
340 <0x2 0x10 0x7 IRQ_TYPE_EDGE_RISING>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530341
342 interrupt-names = "chgr-error",
343 "chg-state-change",
344 "step-chg-state-change",
345 "step-chg-soc-update-fail",
346 "step-chg-soc-update-req",
347 "fg-fvcal-qualified",
348 "vph-alarm",
349 "vph-drop-prechg";
350 };
351
352 qcom,dcdc@1100 {
353 reg = <0x1100 0x100>;
354 interrupts =
355 <0x2 0x11 0x0 IRQ_TYPE_EDGE_RISING>,
356 <0x2 0x11 0x1 IRQ_TYPE_EDGE_RISING>,
357 <0x2 0x11 0x2 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530358 <0x2 0x11 0x3 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530359 <0x2 0x11 0x4 IRQ_TYPE_EDGE_BOTH>,
360 <0x2 0x11 0x5 IRQ_TYPE_EDGE_BOTH>,
361 <0x2 0x11 0x6 IRQ_TYPE_EDGE_RISING>,
362 <0x2 0x11 0x7 IRQ_TYPE_EDGE_BOTH>;
363
364 interrupt-names = "otg-fail",
365 "otg-oc-disable-sw",
366 "otg-oc-hiccup",
367 "bsm-active",
368 "high-duty-cycle",
369 "input-current-limiting",
370 "concurrent-mode-disable",
371 "switcher-power-ok";
372 };
373
374 qcom,batif@1200 {
375 reg = <0x1200 0x100>;
376 interrupts =
377 <0x2 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
378 <0x2 0x12 0x1 IRQ_TYPE_EDGE_RISING>,
379 <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
380 <0x2 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
381 <0x2 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
382 <0x2 0x12 0x5 IRQ_TYPE_EDGE_BOTH>,
383 <0x2 0x12 0x6 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530384 <0x2 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530385
386 interrupt-names = "bat-temp",
387 "all-chnl-conv-done",
388 "bat-ov",
389 "bat-low",
390 "bat-therm-or-id-missing",
391 "bat-terminal-missing",
392 "buck-oc",
393 "vph-ov";
394 };
395
396 qcom,usb@1300 {
397 reg = <0x1300 0x100>;
398 interrupts =
399 <0x2 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
400 <0x2 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswald346b562018-06-25 18:43:42 +0530401 <0x2 0x13 0x2 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530402 <0x2 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530403 <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
404 <0x2 0x13 0x5 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530405 <0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
406 <0x2 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
407
408 interrupt-names = "usbin-collapse",
409 "usbin-vashdn",
410 "usbin-uv",
411 "usbin-ov",
412 "usbin-plugin",
413 "usbin-revi-change",
414 "usbin-src-change",
415 "usbin-icl-change";
416 };
417
418 qcom,typec@1500 {
419 reg = <0x1500 0x100>;
420 interrupts =
421 <0x2 0x15 0x0 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530422 <0x2 0x15 0x1 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530423 <0x2 0x15 0x2 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530424 <0x2 0x15 0x3 IRQ_TYPE_EDGE_RISING>,
425 <0x2 0x15 0x4 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530426 <0x2 0x15 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530427 <0x2 0x15 0x6 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530428 <0x2 0x15 0x7 IRQ_TYPE_EDGE_RISING>;
429
430 interrupt-names = "typec-or-rid-detect-change",
431 "typec-vpd-detect",
432 "typec-cc-state-change",
433 "typec-vconn-oc",
434 "typec-vbus-change",
435 "typec-attach-detach",
436 "typec-legacy-cable-detect",
437 "typec-try-snk-src-detect";
438 };
439
440 qcom,misc@1600 {
441 reg = <0x1600 0x100>;
442 interrupts =
443 <0x2 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
444 <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530445 <0x2 0x16 0x2 IRQ_TYPE_EDGE_RISING>,
446 <0x2 0x16 0x3 IRQ_TYPE_EDGE_RISING>,
447 <0x2 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530448 <0x2 0x16 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530449 <0x2 0x16 0x6 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530450 <0x2 0x16 0x7 IRQ_TYPE_EDGE_RISING>;
451
452 interrupt-names = "wdog-snarl",
453 "wdog-bark",
454 "aicl-fail",
455 "aicl-done",
456 "smb-en",
457 "imp-trigger",
458 "temp-change",
459 "temp-change-smb";
460 };
461
Ashay Jaiswal3ee6df62018-02-19 17:02:16 +0530462 qcom,schgm-flash@a600 {
463 reg = <0xa600 0x100>;
464 interrupts =
465 <0x2 0xa6 0x2 IRQ_TYPE_EDGE_RISING>,
466 <0x2 0xa6 0x5 IRQ_TYPE_EDGE_RISING>,
467 <0x2 0xa6 0x6 IRQ_TYPE_EDGE_RISING>,
468 <0x2 0xa6 0x7 IRQ_TYPE_EDGE_BOTH>;
469
470 interrupt-names = "flash-state-change",
471 "ilim1-s1",
472 "ilim2-s2",
473 "vreg-ok";
474 };
475
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530476 smb5_vbus: qcom,smb5-vbus {
477 regulator-name = "smb5-vbus";
478 };
479 };
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530480
481 pmi632_qg: qpnp,qg {
482 compatible = "qcom,qpnp-qg";
483 #address-cells = <1>;
484 #size-cells = <1>;
485
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530486 qcom,qg-iterm-ma = <100>;
Anirudh Ghayal23fa4a32018-03-08 18:16:23 +0530487 qcom,hold-soc-while-full;
488 qcom,linearize-soc;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530489 qcom,qg-vadc = <&pmi632_vadc>;
490 qcom,pmic-revid = <&pmi632_revid>;
491
492 qcom,qgauge@4800 {
493 status = "okay";
494 reg = <0x4800 0x100>;
Anirudh Ghayalff3660e2018-04-19 10:21:18 +0530495 interrupts =
496 <0x2 0x48 0x0 IRQ_TYPE_EDGE_BOTH>,
497 <0x2 0x48 0x1 IRQ_TYPE_EDGE_BOTH>,
498 <0x2 0x48 0x2 IRQ_TYPE_EDGE_RISING>,
499 <0x2 0x48 0x3 IRQ_TYPE_EDGE_RISING>,
500 <0x2 0x48 0x4 IRQ_TYPE_EDGE_RISING>;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530501 interrupt-names = "qg-batt-missing",
502 "qg-vbat-low",
503 "qg-vbat-empty",
504 "qg-fifo-done",
505 "qg-good-ocv";
506 };
507
508 qcom,qg-sdam@b100 {
509 status = "okay";
510 reg = <0xb100 0x100>;
511 };
512 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530513
514 bcl_sensor: bcl@3d00 {
Manaf Meethalavalappu Pallikunhie49406e2018-03-09 18:34:14 +0530515 compatible = "qcom,bcl-v5";
516 reg = <0x3d00 0x100>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530517 interrupts = <0x2 0x3d 0x0 IRQ_TYPE_NONE>,
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530518 <0x2 0x3d 0x1 IRQ_TYPE_NONE>,
519 <0x2 0x3d 0x0 IRQ_TYPE_NONE>,
520 <0x2 0x3d 0x1 IRQ_TYPE_NONE>,
521 <0x2 0x3d 0x2 IRQ_TYPE_NONE>;
522 interrupt-names = "bcl-ibat-lvl0",
523 "bcl-ibat-lvl1",
524 "bcl-vbat-lvl0",
525 "bcl-vbat-lvl1",
526 "bcl-vbat-lvl2";
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530527 #thermal-sensor-cells = <1>;
528 };
529
530 bcl_soc: bcl-soc {
531 compatible = "qcom,msm-bcl-soc";
532 #thermal-sensor-cells = <0>;
533 };
Fenglin Wub17f2452018-06-06 13:57:47 +0800534
535 pmi632_pbs_client3: qcom,pbs@7400 {
536 compatible = "qcom,qpnp-pbs";
537 reg = <0x7400 0x100>;
538 };
539
540 pmi632_sdam7: qcom,sdam@b600 {
541 compatible = "qcom,spmi-sdam";
542 reg = <0xb600 0x100>;
543 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530544 };
545
546 pmi632_3: qcom,pmi632@3 {
547 compatible ="qcom,spmi-pmic";
548 reg = <0x3 SPMI_USID>;
Anirudh Ghayald77f8f62018-03-04 20:05:25 +0530549 #address-cells = <1>;
550 #size-cells = <1>;
Umang Agrawal16b11602017-12-21 15:32:55 +0530551
Tirupathi Reddy08968e82018-01-09 16:58:28 +0530552 pmi632_vib: qcom,vibrator@5700 {
553 compatible = "qcom,qpnp-vibrator-ldo";
554 reg = <0x5700 0x100>;
Tirupathi Reddy398336a2018-02-02 09:01:15 +0530555 qcom,vib-ldo-volt-uv = <3000000>;
Tirupathi Reddyab95bea2018-06-18 14:06:42 +0530556 qcom,disable-overdrive;
Tirupathi Reddy08968e82018-01-09 16:58:28 +0530557 };
558
Fenglin Wu80e87902018-01-24 11:39:47 +0800559 pmi632_pwm: qcom,pwms@b300 {
560 compatible = "qcom,pwm-lpg";
561 reg = <0xb300 0x500>;
562 reg-names = "lpg-base";
Umang Agrawal16b11602017-12-21 15:32:55 +0530563 #pwm-cells = <2>;
Fenglin Wub17f2452018-06-06 13:57:47 +0800564 nvmem-names = "ppg_sdam";
565 nvmem = <&pmi632_sdam7>;
566 qcom,pbs-client = <&pmi632_pbs_client3>;
567 qcom,lut-sdam-base = <0x80>;
568 qcom,lut-patterns = <0 0 0 14 28 42 56 70 84 100
569 100 84 70 56 42 28 14 0 0 0>;
570 lpg@1 {
571 qcom,lpg-chan-id = <1>;
572 qcom,ramp-step-ms = <200>;
573 qcom,ramp-low-index = <0>;
574 qcom,ramp-high-index = <19>;
575 qcom,ramp-pattern-repeat;
576 qcom,lpg-sdam-base = <0x48>;
577 };
578 lpg@2 {
579 qcom,lpg-chan-id = <2>;
580 qcom,ramp-step-ms = <200>;
581 qcom,ramp-low-index = <0>;
582 qcom,ramp-high-index = <19>;
583 qcom,ramp-pattern-repeat;
584 qcom,lpg-sdam-base = <0x56>;
585 };
586 lpg@3 {
587 qcom,lpg-chan-id = <3>;
588 qcom,ramp-step-ms = <200>;
589 qcom,ramp-low-index = <0>;
590 qcom,ramp-high-index = <19>;
591 qcom,ramp-pattern-repeat;
592 qcom,lpg-sdam-base = <0x64>;
593 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530594 };
595
Fenglin Wu80e87902018-01-24 11:39:47 +0800596 pmi632_rgb: qcom,leds@d000 {
597 compatible = "qcom,tri-led";
598 reg = <0xd000 0x100>;
599 red {
600 label = "red";
601 pwms = <&pmi632_pwm 0 1000000>;
602 led-sources = <0>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800603 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800604 };
605 green {
606 label = "green";
607 pwms = <&pmi632_pwm 1 1000000>;
608 led-sources = <1>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800609 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800610 };
611 blue {
612 label = "blue";
613 pwms = <&pmi632_pwm 2 1000000>;
614 led-sources = <2>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800615 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800616 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530617 };
Kiran Gunda833a5c72018-01-09 18:34:42 +0530618
619 pmi632_lcdb: qpnp-lcdb@ec00 {
620 compatible = "qcom,qpnp-lcdb-regulator";
621 #address-cells = <1>;
622 #size-cells = <1>;
623 reg = <0xec00 0x100>;
624 interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>;
625 interrupt-names = "sc-irq";
626
627 qcom,pmic-revid = <&pmi632_revid>;
Kiran Gunda440f9eb2018-09-12 14:57:29 +0530628 qcom,voltage-step-ramp;
Kiran Gunda833a5c72018-01-09 18:34:42 +0530629
630 lcdb_ldo_vreg: ldo {
631 label = "ldo";
632 regulator-name = "lcdb_ldo";
633 regulator-min-microvolt = <4000000>;
634 regulator-max-microvolt = <6000000>;
635 };
636
637 lcdb_ncp_vreg: ncp {
638 label = "ncp";
639 regulator-name = "lcdb_ncp";
640 regulator-min-microvolt = <4000000>;
641 regulator-max-microvolt = <6000000>;
642 };
Kiran Gunda777182b2018-09-07 17:19:59 +0530643
644 lcdb_bst_vreg: bst {
645 label = "bst";
646 regulator-name = "lcdb_bst";
647 regulator-min-microvolt = <4700000>;
648 regulator-max-microvolt = <6275000>;
649 };
Kiran Gunda833a5c72018-01-09 18:34:42 +0530650 };
Kiran Gunda27259b52018-01-16 15:12:04 +0530651
652 flash_led: qcom,leds@d300 {
653 compatible = "qcom,qpnp-flash-led-v2";
654 status = "okay";
655 reg = <0xd300 0x100>;
656 label = "flash";
657 interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>,
658 <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>,
659 <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>;
660 interrupt-names = "led-fault-irq",
661 "all-ramp-down-done-irq",
662 "all-ramp-up-done-irq";
663 qcom,short-circuit-det;
664 qcom,open-circuit-det;
665 qcom,vph-droop-det;
666 qcom,thermal-derate-en;
667 qcom,thermal-derate-current = <200 500 1000>;
668 qcom,isc-delay = <192>;
669 qcom,pmic-revid = <&pmi632_revid>;
670
671 pmi632_flash0: qcom,flash_0 {
672 label = "flash";
673 qcom,led-name = "led:flash_0";
674 qcom,max-current = <1500>;
675 qcom,default-led-trigger = "flash0_trigger";
676 qcom,id = <0>;
677 qcom,current-ma = <1000>;
678 qcom,duration-ms = <1280>;
679 qcom,ires-ua = <12500>;
680 qcom,hdrm-voltage-mv = <400>;
681 qcom,hdrm-vol-hi-lo-win-mv = <100>;
682 };
683
684 pmi632_flash1: qcom,flash_1 {
685 label = "flash";
686 qcom,led-name = "led:flash_1";
687 qcom,max-current = <1500>;
688 qcom,default-led-trigger = "flash1_trigger";
689 qcom,id = <1>;
690 qcom,current-ma = <1000>;
691 qcom,duration-ms = <1280>;
692 qcom,ires-ua = <12500>;
693 qcom,hdrm-voltage-mv = <400>;
694 qcom,hdrm-vol-hi-lo-win-mv = <100>;
695 };
696
697 pmi632_torch0: qcom,torch_0 {
698 label = "torch";
699 qcom,led-name = "led:torch_0";
700 qcom,max-current = <500>;
701 qcom,default-led-trigger = "torch0_trigger";
702 qcom,id = <0>;
703 qcom,current-ma = <300>;
704 qcom,ires-ua = <12500>;
705 qcom,hdrm-voltage-mv = <400>;
706 qcom,hdrm-vol-hi-lo-win-mv = <100>;
707 };
708
709 pmi632_torch1: qcom,torch_1 {
710 label = "torch";
711 qcom,led-name = "led:torch_1";
712 qcom,max-current = <500>;
713 qcom,default-led-trigger = "torch1_trigger";
714 qcom,id = <1>;
715 qcom,current-ma = <300>;
716 qcom,ires-ua = <12500>;
717 qcom,hdrm-voltage-mv = <400>;
718 qcom,hdrm-vol-hi-lo-win-mv = <100>;
719 };
720
721 pmi632_switch0: qcom,led_switch_0 {
722 label = "switch";
723 qcom,led-name = "led:switch_0";
724 qcom,led-mask = <3>;
725 qcom,default-led-trigger = "switch0_trigger";
726 };
727
728 pmi632_switch1: qcom,led_switch_1 {
729 label = "switch";
730 qcom,led-name = "led:switch_1";
731 qcom,led-mask = <2>;
732 qcom,default-led-trigger = "switch1_trigger";
733 };
734
735 };
736
Umang Agrawal16b11602017-12-21 15:32:55 +0530737 };
738};
Vijay kumar Tumati26fe6282018-02-21 18:40:21 +0530739&soc {
740 led_flash0: qcom,camera-flash {
741 cell-index = <0>;
742 compatible = "qcom,camera-flash";
743 qcom,flash-type = <1>;
744 qcom,flash-source = <&pmi632_flash0 &pmi632_flash1>;
745 qcom,torch-source = <&pmi632_torch0 &pmi632_torch1>;
746 qcom,switch-source = <&pmi632_switch0>;
747 };
748};
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530749
750&thermal_zones {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530751 pmi-ibat-lvl0 {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530752 polling-delay-passive = <100>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530753 polling-delay = <0>;
754 thermal-governor = "step_wise";
755 thermal-sensors = <&bcl_sensor 0>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530756 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530757
758 trips {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530759 pmi632_ibat_lvl0: ibat-lvl0 {
760 temperature = <4000>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530761 hysteresis = <200>;
762 type = "passive";
763 };
764 };
765 };
766
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530767 pmi-ibat-lvl1 {
768 polling-delay-passive = <0>;
769 polling-delay = <0>;
770 thermal-governor = "step_wise";
771 thermal-sensors = <&bcl_sensor 1>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530772 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530773
774 trips {
775 ibat-lvl1 {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530776 temperature = <4200>;
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530777 hysteresis = <200>;
778 type = "passive";
779 };
780 };
781 };
782
783 pmi-vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530784 polling-delay-passive = <100>;
785 polling-delay = <0>;
786 thermal-governor = "low_limits_cap";
787 thermal-sensors = <&bcl_sensor 2>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530788 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530789 tracks-low;
790
791 trips {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530792 pmi632_vbat_lvl0: vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530793 temperature = <3000>;
794 hysteresis = <100>;
795 type = "passive";
796 };
797 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530798 };
799
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530800 pmi-vbat-lvl1 {
801 polling-delay-passive = <0>;
802 polling-delay = <0>;
803 thermal-governor = "low_limits_cap";
804 thermal-sensors = <&bcl_sensor 3>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530805 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530806 tracks-low;
807
808 trips {
809 vbat-lvl1 {
810 temperature = <2800>;
811 hysteresis = <100>;
812 type = "passive";
813 };
814 };
815 };
816
817 pmi-vbat-lvl2 {
818 polling-delay-passive = <0>;
819 polling-delay = <0>;
820 thermal-governor = "low_limits_cap";
821 thermal-sensors = <&bcl_sensor 4>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530822 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530823 tracks-low;
824
825 trips {
826 vbat-lvl1 {
827 temperature = <2600>;
828 hysteresis = <100>;
829 type = "passive";
830 };
831 };
832 };
833
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530834 soc {
835 polling-delay-passive = <100>;
836 polling-delay = <0>;
837 thermal-governor = "low_limits_cap";
838 thermal-sensors = <&bcl_soc>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530839 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530840 tracks-low;
841
842 trips {
843 pmi632_low_soc: low-soc {
844 temperature = <10>;
845 hysteresis = <0>;
846 type = "passive";
847 };
848 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530849 };
Manaf Meethalavalappu Pallikunhiabfcb46b2018-03-15 17:51:29 +0530850
851 pmi632_tz {
852 polling-delay-passive = <0>;
853 polling-delay = <0>;
854 thermal-governor = "step_wise";
855 thermal-sensors = <&pmi632_tz>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530856 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhiabfcb46b2018-03-15 17:51:29 +0530857
858 trips {
859 pmi632_tz_trip0: pmi632-trip0 {
860 temperature = <105000>;
861 hysteresis = <0>;
862 type = "passive";
863 };
864 pmi632_tz_trip1: pmi632-trip1 {
865 temperature = <125000>;
866 hysteresis = <0>;
867 type = "passive";
868 };
869 pmi632_tz_trip2: pmi632-trip2 {
870 temperature = <145000>;
871 hysteresis = <0>;
872 type = "passive";
873 };
874 };
875 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530876};