blob: 80480f14b7e332d53a424276ee9efcae4140cea8 [file] [log] [blame]
Umang Agrawal16b11602017-12-21 15:32:55 +05301/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
2 *
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 Prakash9940b752018-03-15 20:05:12 +053047 pinctrl-names = "default";
48 pinctrl-0 = <&quiet_therm_default &smb_therm_default>;
Jishnu Prakash292e28c2018-01-18 11:28:34 +053049
50 chan@0 {
51 label = "ref_gnd";
52 reg = <0>;
53 qcom,decimation = <2>;
54 qcom,pre-div-channel-scaling = <0>;
55 qcom,calibration-type = "absolute";
56 qcom,scale-function = <0>;
57 qcom,hw-settle-time = <0>;
58 qcom,fast-avg-setup = <0>;
59 qcom,cal-val = <0>;
60 };
61
62 chan@1 {
63 label = "ref_1250v";
64 reg = <1>;
65 qcom,decimation = <2>;
66 qcom,pre-div-channel-scaling = <0>;
67 qcom,calibration-type = "absolute";
68 qcom,scale-function = <0>;
69 qcom,hw-settle-time = <0>;
70 qcom,fast-avg-setup = <0>;
71 qcom,cal-val = <0>;
72 };
73
74 chan@83 {
75 label = "vph_pwr";
76 reg = <0x83>;
77 qcom,decimation = <2>;
78 qcom,pre-div-channel-scaling = <1>;
79 qcom,calibration-type = "absolute";
80 qcom,scale-function = <0>;
81 qcom,hw-settle-time = <0>;
82 qcom,fast-avg-setup = <0>;
83 qcom,cal-val = <0>;
84 };
85
86 chan@84 {
87 label = "vbat_sns";
88 reg = <0x84>;
89 qcom,decimation = <2>;
90 qcom,pre-div-channel-scaling = <1>;
91 qcom,calibration-type = "absolute";
92 qcom,scale-function = <0>;
93 qcom,hw-settle-time = <0>;
94 qcom,fast-avg-setup = <0>;
95 qcom,cal-val = <0>;
96 };
97
98 chan@6 {
99 label = "die_temp";
100 reg = <6>;
101 qcom,decimation = <2>;
102 qcom,pre-div-channel-scaling = <0>;
103 qcom,calibration-type = "absolute";
104 qcom,scale-function = <19>;
105 qcom,hw-settle-time = <0>;
106 qcom,fast-avg-setup = <0>;
107 qcom,cal-val = <0>;
108 };
109
110 chan@7 {
111 label = "usb_in_i";
112 reg = <7>;
113 qcom,decimation = <2>;
114 qcom,pre-div-channel-scaling = <0>;
115 qcom,calibration-type = "absolute";
116 qcom,scale-function = <21>;
117 qcom,hw-settle-time = <0>;
118 qcom,fast-avg-setup = <0>;
119 qcom,cal-val = <0>;
120 };
121
122 chan@8 {
123 label = "usb_in_v";
124 reg = <8>;
125 qcom,decimation = <2>;
126 qcom,pre-div-channel-scaling = <8>;
127 qcom,calibration-type = "absolute";
128 qcom,scale-function = <0>;
129 qcom,hw-settle-time = <0>;
130 qcom,fast-avg-setup = <0>;
131 qcom,cal-val = <0>;
132 };
133
134 chan@9 {
135 label = "chg_temp";
136 reg = <9>;
137 qcom,decimation = <2>;
138 qcom,pre-div-channel-scaling = <0>;
139 qcom,calibration-type = "absolute";
140 qcom,scale-function = <18>;
141 qcom,hw-settle-time = <0>;
142 qcom,fast-avg-setup = <0>;
143 qcom,cal-val = <0>;
144 };
145
146 chan@4a {
147 label = "bat_therm";
148 reg = <0x4a>;
149 qcom,decimation = <2>;
150 qcom,pre-div-channel-scaling = <0>;
151 qcom,calibration-type = "ratiometric";
152 qcom,scale-function = <17>;
153 qcom,hw-settle-time = <0>;
154 qcom,fast-avg-setup = <0>;
155 qcom,cal-val = <0>;
156 };
157
Jishnu Prakash32dab112018-04-12 15:13:12 +0530158 chan@2a {
159 label = "bat_therm_PU30";
160 reg = <0x2a>;
161 qcom,decimation = <2>;
162 qcom,pre-div-channel-scaling = <0>;
163 qcom,calibration-type = "ratiometric";
164 qcom,scale-function = <24>;
165 qcom,hw-settle-time = <0>;
166 qcom,fast-avg-setup = <0>;
167 qcom,cal-val = <0>;
168 };
169
170 chan@6a {
171 label = "bat_therm_PU400";
172 reg = <0x6a>;
173 qcom,decimation = <2>;
174 qcom,pre-div-channel-scaling = <0>;
175 qcom,calibration-type = "ratiometric";
176 qcom,scale-function = <25>;
177 qcom,hw-settle-time = <0>;
178 qcom,fast-avg-setup = <0>;
179 qcom,cal-val = <0>;
180 };
181
Jishnu Prakash292e28c2018-01-18 11:28:34 +0530182 chan@4b {
183 label = "bat_id";
184 reg = <0x4b>;
185 qcom,decimation = <2>;
186 qcom,pre-div-channel-scaling = <0>;
187 qcom,calibration-type = "ratiometric";
188 qcom,scale-function = <0>;
189 qcom,hw-settle-time = <0>;
190 qcom,fast-avg-setup = <0>;
191 qcom,cal-val = <0>;
192 };
193
194 chan@4c {
195 label = "xo_therm";
196 reg = <0x4c>;
197 qcom,decimation = <2>;
198 qcom,pre-div-channel-scaling = <0>;
199 qcom,calibration-type = "ratiometric";
200 qcom,scale-function = <4>;
201 qcom,hw-settle-time = <8>;
202 qcom,fast-avg-setup = <0>;
203 };
204
205
206 chan@1e {
207 label = "mid_chg";
208 reg = <0x1e>;
209 qcom,decimation = <2>;
210 qcom,pre-div-channel-scaling = <3>;
211 qcom,calibration-type = "absolute";
212 qcom,scale-function = <0>;
213 qcom,hw-settle-time = <0>;
214 qcom,fast-avg-setup = <0>;
215 qcom,cal-val = <0>;
216 };
217
Jishnu Prakash9940b752018-03-15 20:05:12 +0530218 chan@52 {
219 label = "typec_therm";
220 reg = <0x52>;
221 qcom,decimation = <2>;
222 qcom,pre-div-channel-scaling = <0>;
223 qcom,calibration-type = "ratiometric";
224 qcom,scale-function = <2>;
225 qcom,hw-settle-time = <0>;
226 qcom,fast-avg-setup = <0>;
227 qcom,cal-val = <0>;
228 };
229
230 chan@53 {
231 label = "quiet_therm";
232 reg = <0x53>;
233 qcom,decimation = <2>;
234 qcom,pre-div-channel-scaling = <0>;
235 qcom,calibration-type = "ratiometric";
236 qcom,scale-function = <2>;
237 qcom,hw-settle-time = <0>;
238 qcom,fast-avg-setup = <0>;
239 qcom,cal-val = <0>;
240 };
241
242 chan@54 {
243 label = "smb_therm";
244 reg = <0x54>;
245 qcom,decimation = <2>;
246 qcom,pre-div-channel-scaling = <0>;
247 qcom,calibration-type = "ratiometric";
248 qcom,scale-function = <2>;
249 qcom,hw-settle-time = <0>;
250 qcom,fast-avg-setup = <0>;
251 qcom,cal-val = <0>;
252 };
Jishnu Prakash292e28c2018-01-18 11:28:34 +0530253 };
254
Jishnu Prakash097d97d2018-04-04 21:08:27 +0530255 pmi632_adc_tm: vadc@3500 {
Jishnu Prakashfe450a72018-05-04 10:51:15 +0530256 compatible = "qcom,qpnp-adc-tm-hc",
257 "qcom,qpnp-adc-tm-hc-pm5";
Jishnu Prakash097d97d2018-04-04 21:08:27 +0530258 reg = <0x3500 0x100>;
259 #address-cells = <1>;
260 #size-cells = <0>;
261 interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
262 interrupt-names = "eoc-int-en-set";
263 qcom,adc-vdd-reference = <1875>;
264 qcom,adc-full-scale-code = <0x70e4>;
265 qcom,adc_tm-vadc = <&pmi632_vadc>;
266 qcom,decimation = <0>;
267 qcom,fast-avg-setup = <0>;
268 #thermal-sensor-cells = <1>;
269
270 chan@53 {
271 label = "quiet_therm";
272 reg = <0x53>;
273 qcom,pre-div-channel-scaling = <0>;
274 qcom,calibration-type = "ratiometric";
275 qcom,scale-function = <2>;
276 qcom,hw-settle-time = <0>;
277 qcom,btm-channel-number = <0x60>;
278 qcom,thermal-node;
279 };
280
281 };
282
Umang Agrawal16b11602017-12-21 15:32:55 +0530283 pmi632_tz: qcom,temp-alarm@2400 {
284 compatible = "qcom,qpnp-temp-alarm";
285 reg = <0x2400 0x100>;
286 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
287 label = "pmi632_tz";
288 #thermal-sensor-cells = <0>;
289 };
290
291 pmi632_gpios: pinctrl@c000 {
292 compatible = "qcom,spmi-gpio";
293 reg = <0xc000 0x800>;
294 interrupts = <0x2 0xc1 0 IRQ_TYPE_NONE>,
295 <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>;
Umang Agrawal16b11602017-12-21 15:32:55 +0530301 interrupt-names = "pmi632_gpio2", "pmi632_gpio3",
302 "pmi632_gpio4", "pmi632_gpio5",
303 "pmi632_gpio6", "pmi632_gpio7",
304 "pmi632_gpio8";
305 gpio-controller;
306 #gpio-cells = <2>;
307 qcom,gpios-disallowed = <1>;
Jishnu Prakash9940b752018-03-15 20:05:12 +0530308
309 quiet_therm {
310 quiet_therm_default: quiet_therm_default {
311 pins = "gpio3";
312 bias-high-impedance;
313 };
314 };
315
316 smb_therm {
317 smb_therm_default: smb_therm_default {
318 pins = "gpio4";
319 bias-high-impedance;
320 };
321 };
322
Umang Agrawal16b11602017-12-21 15:32:55 +0530323 };
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530324
325 pmi632_charger: qcom,qpnp-smb5 {
326 compatible = "qcom,qpnp-smb5";
327 #address-cells = <1>;
328 #size-cells = <1>;
Manaf Meethalavalappu Pallikunhi585ef212018-02-27 21:10:51 +0530329 #cooling-cells = <2>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530330
331 qcom,pmic-revid = <&pmi632_revid>;
332 dpdm-supply = <&qusb_phy>;
Anirudh Ghayal23fa4a32018-03-08 18:16:23 +0530333 qcom,auto-recharge-soc = <98>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530334
Manaf Meethalavalappu Pallikunhi585ef212018-02-27 21:10:51 +0530335 qcom,thermal-mitigation
336 = <3000000 2500000 2000000 1500000
337 1000000 500000>;
338
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530339 qcom,chgr@1000 {
340 reg = <0x1000 0x100>;
341 interrupts =
342 <0x2 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
343 <0x2 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
344 <0x2 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
345 <0x2 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
346 <0x2 0x10 0x4 IRQ_TYPE_EDGE_RISING>,
347 <0x2 0x10 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530348 <0x2 0x10 0x6 IRQ_TYPE_EDGE_RISING>,
349 <0x2 0x10 0x7 IRQ_TYPE_EDGE_RISING>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530350
351 interrupt-names = "chgr-error",
352 "chg-state-change",
353 "step-chg-state-change",
354 "step-chg-soc-update-fail",
355 "step-chg-soc-update-req",
356 "fg-fvcal-qualified",
357 "vph-alarm",
358 "vph-drop-prechg";
359 };
360
361 qcom,dcdc@1100 {
362 reg = <0x1100 0x100>;
363 interrupts =
364 <0x2 0x11 0x0 IRQ_TYPE_EDGE_RISING>,
365 <0x2 0x11 0x1 IRQ_TYPE_EDGE_RISING>,
366 <0x2 0x11 0x2 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530367 <0x2 0x11 0x3 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530368 <0x2 0x11 0x4 IRQ_TYPE_EDGE_BOTH>,
369 <0x2 0x11 0x5 IRQ_TYPE_EDGE_BOTH>,
370 <0x2 0x11 0x6 IRQ_TYPE_EDGE_RISING>,
371 <0x2 0x11 0x7 IRQ_TYPE_EDGE_BOTH>;
372
373 interrupt-names = "otg-fail",
374 "otg-oc-disable-sw",
375 "otg-oc-hiccup",
376 "bsm-active",
377 "high-duty-cycle",
378 "input-current-limiting",
379 "concurrent-mode-disable",
380 "switcher-power-ok";
381 };
382
383 qcom,batif@1200 {
384 reg = <0x1200 0x100>;
385 interrupts =
386 <0x2 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
387 <0x2 0x12 0x1 IRQ_TYPE_EDGE_RISING>,
388 <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
389 <0x2 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
390 <0x2 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
391 <0x2 0x12 0x5 IRQ_TYPE_EDGE_BOTH>,
392 <0x2 0x12 0x6 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530393 <0x2 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530394
395 interrupt-names = "bat-temp",
396 "all-chnl-conv-done",
397 "bat-ov",
398 "bat-low",
399 "bat-therm-or-id-missing",
400 "bat-terminal-missing",
401 "buck-oc",
402 "vph-ov";
403 };
404
405 qcom,usb@1300 {
406 reg = <0x1300 0x100>;
407 interrupts =
408 <0x2 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
409 <0x2 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
410 <0x2 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
411 <0x2 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530412 <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
413 <0x2 0x13 0x5 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530414 <0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
415 <0x2 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
416
417 interrupt-names = "usbin-collapse",
418 "usbin-vashdn",
419 "usbin-uv",
420 "usbin-ov",
421 "usbin-plugin",
422 "usbin-revi-change",
423 "usbin-src-change",
424 "usbin-icl-change";
425 };
426
427 qcom,typec@1500 {
428 reg = <0x1500 0x100>;
429 interrupts =
430 <0x2 0x15 0x0 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530431 <0x2 0x15 0x1 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530432 <0x2 0x15 0x2 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530433 <0x2 0x15 0x3 IRQ_TYPE_EDGE_RISING>,
434 <0x2 0x15 0x4 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530435 <0x2 0x15 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530436 <0x2 0x15 0x6 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530437 <0x2 0x15 0x7 IRQ_TYPE_EDGE_RISING>;
438
439 interrupt-names = "typec-or-rid-detect-change",
440 "typec-vpd-detect",
441 "typec-cc-state-change",
442 "typec-vconn-oc",
443 "typec-vbus-change",
444 "typec-attach-detach",
445 "typec-legacy-cable-detect",
446 "typec-try-snk-src-detect";
447 };
448
449 qcom,misc@1600 {
450 reg = <0x1600 0x100>;
451 interrupts =
452 <0x2 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
453 <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530454 <0x2 0x16 0x2 IRQ_TYPE_EDGE_RISING>,
455 <0x2 0x16 0x3 IRQ_TYPE_EDGE_RISING>,
456 <0x2 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530457 <0x2 0x16 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530458 <0x2 0x16 0x6 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530459 <0x2 0x16 0x7 IRQ_TYPE_EDGE_RISING>;
460
461 interrupt-names = "wdog-snarl",
462 "wdog-bark",
463 "aicl-fail",
464 "aicl-done",
465 "smb-en",
466 "imp-trigger",
467 "temp-change",
468 "temp-change-smb";
469 };
470
Ashay Jaiswal3ee6df62018-02-19 17:02:16 +0530471 qcom,schgm-flash@a600 {
472 reg = <0xa600 0x100>;
473 interrupts =
474 <0x2 0xa6 0x2 IRQ_TYPE_EDGE_RISING>,
475 <0x2 0xa6 0x5 IRQ_TYPE_EDGE_RISING>,
476 <0x2 0xa6 0x6 IRQ_TYPE_EDGE_RISING>,
477 <0x2 0xa6 0x7 IRQ_TYPE_EDGE_BOTH>;
478
479 interrupt-names = "flash-state-change",
480 "ilim1-s1",
481 "ilim2-s2",
482 "vreg-ok";
483 };
484
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530485 smb5_vbus: qcom,smb5-vbus {
486 regulator-name = "smb5-vbus";
487 };
488 };
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530489
490 pmi632_qg: qpnp,qg {
491 compatible = "qcom,qpnp-qg";
492 #address-cells = <1>;
493 #size-cells = <1>;
494
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530495 qcom,qg-iterm-ma = <100>;
Anirudh Ghayal23fa4a32018-03-08 18:16:23 +0530496 qcom,hold-soc-while-full;
497 qcom,linearize-soc;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530498 qcom,qg-vadc = <&pmi632_vadc>;
499 qcom,pmic-revid = <&pmi632_revid>;
500
501 qcom,qgauge@4800 {
502 status = "okay";
503 reg = <0x4800 0x100>;
Anirudh Ghayalff3660e2018-04-19 10:21:18 +0530504 interrupts =
505 <0x2 0x48 0x0 IRQ_TYPE_EDGE_BOTH>,
506 <0x2 0x48 0x1 IRQ_TYPE_EDGE_BOTH>,
507 <0x2 0x48 0x2 IRQ_TYPE_EDGE_RISING>,
508 <0x2 0x48 0x3 IRQ_TYPE_EDGE_RISING>,
509 <0x2 0x48 0x4 IRQ_TYPE_EDGE_RISING>;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530510 interrupt-names = "qg-batt-missing",
511 "qg-vbat-low",
512 "qg-vbat-empty",
513 "qg-fifo-done",
514 "qg-good-ocv";
515 };
516
517 qcom,qg-sdam@b100 {
518 status = "okay";
519 reg = <0xb100 0x100>;
520 };
521 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530522
523 bcl_sensor: bcl@3d00 {
Manaf Meethalavalappu Pallikunhie49406e2018-03-09 18:34:14 +0530524 compatible = "qcom,bcl-v5";
525 reg = <0x3d00 0x100>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530526 interrupts = <0x2 0x3d 0x0 IRQ_TYPE_NONE>,
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530527 <0x2 0x3d 0x1 IRQ_TYPE_NONE>,
528 <0x2 0x3d 0x0 IRQ_TYPE_NONE>,
529 <0x2 0x3d 0x1 IRQ_TYPE_NONE>,
530 <0x2 0x3d 0x2 IRQ_TYPE_NONE>;
531 interrupt-names = "bcl-ibat-lvl0",
532 "bcl-ibat-lvl1",
533 "bcl-vbat-lvl0",
534 "bcl-vbat-lvl1",
535 "bcl-vbat-lvl2";
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530536 #thermal-sensor-cells = <1>;
537 };
538
539 bcl_soc: bcl-soc {
540 compatible = "qcom,msm-bcl-soc";
541 #thermal-sensor-cells = <0>;
542 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530543 };
544
545 pmi632_3: qcom,pmi632@3 {
546 compatible ="qcom,spmi-pmic";
547 reg = <0x3 SPMI_USID>;
Anirudh Ghayald77f8f62018-03-04 20:05:25 +0530548 #address-cells = <1>;
549 #size-cells = <1>;
Umang Agrawal16b11602017-12-21 15:32:55 +0530550
Tirupathi Reddy08968e82018-01-09 16:58:28 +0530551 pmi632_vib: qcom,vibrator@5700 {
552 compatible = "qcom,qpnp-vibrator-ldo";
553 reg = <0x5700 0x100>;
Tirupathi Reddy398336a2018-02-02 09:01:15 +0530554 qcom,vib-ldo-volt-uv = <3000000>;
Tirupathi Reddy08968e82018-01-09 16:58:28 +0530555 qcom,vib-overdrive-volt-uv = <3544000>;
556 };
557
Fenglin Wu80e87902018-01-24 11:39:47 +0800558 pmi632_pwm: qcom,pwms@b300 {
559 compatible = "qcom,pwm-lpg";
560 reg = <0xb300 0x500>;
561 reg-names = "lpg-base";
Umang Agrawal16b11602017-12-21 15:32:55 +0530562 #pwm-cells = <2>;
Umang Agrawal16b11602017-12-21 15:32:55 +0530563 };
564
Fenglin Wu80e87902018-01-24 11:39:47 +0800565 pmi632_rgb: qcom,leds@d000 {
566 compatible = "qcom,tri-led";
567 reg = <0xd000 0x100>;
568 red {
569 label = "red";
570 pwms = <&pmi632_pwm 0 1000000>;
571 led-sources = <0>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800572 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800573 };
574 green {
575 label = "green";
576 pwms = <&pmi632_pwm 1 1000000>;
577 led-sources = <1>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800578 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800579 };
580 blue {
581 label = "blue";
582 pwms = <&pmi632_pwm 2 1000000>;
583 led-sources = <2>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800584 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800585 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530586 };
Kiran Gunda833a5c72018-01-09 18:34:42 +0530587
588 pmi632_lcdb: qpnp-lcdb@ec00 {
589 compatible = "qcom,qpnp-lcdb-regulator";
590 #address-cells = <1>;
591 #size-cells = <1>;
592 reg = <0xec00 0x100>;
593 interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>;
594 interrupt-names = "sc-irq";
595
596 qcom,pmic-revid = <&pmi632_revid>;
597
598 lcdb_ldo_vreg: ldo {
599 label = "ldo";
600 regulator-name = "lcdb_ldo";
601 regulator-min-microvolt = <4000000>;
602 regulator-max-microvolt = <6000000>;
603 };
604
605 lcdb_ncp_vreg: ncp {
606 label = "ncp";
607 regulator-name = "lcdb_ncp";
608 regulator-min-microvolt = <4000000>;
609 regulator-max-microvolt = <6000000>;
610 };
611 };
Kiran Gunda27259b52018-01-16 15:12:04 +0530612
613 flash_led: qcom,leds@d300 {
614 compatible = "qcom,qpnp-flash-led-v2";
615 status = "okay";
616 reg = <0xd300 0x100>;
617 label = "flash";
618 interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>,
619 <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>,
620 <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>;
621 interrupt-names = "led-fault-irq",
622 "all-ramp-down-done-irq",
623 "all-ramp-up-done-irq";
624 qcom,short-circuit-det;
625 qcom,open-circuit-det;
626 qcom,vph-droop-det;
627 qcom,thermal-derate-en;
628 qcom,thermal-derate-current = <200 500 1000>;
629 qcom,isc-delay = <192>;
630 qcom,pmic-revid = <&pmi632_revid>;
631
632 pmi632_flash0: qcom,flash_0 {
633 label = "flash";
634 qcom,led-name = "led:flash_0";
635 qcom,max-current = <1500>;
636 qcom,default-led-trigger = "flash0_trigger";
637 qcom,id = <0>;
638 qcom,current-ma = <1000>;
639 qcom,duration-ms = <1280>;
640 qcom,ires-ua = <12500>;
641 qcom,hdrm-voltage-mv = <400>;
642 qcom,hdrm-vol-hi-lo-win-mv = <100>;
643 };
644
645 pmi632_flash1: qcom,flash_1 {
646 label = "flash";
647 qcom,led-name = "led:flash_1";
648 qcom,max-current = <1500>;
649 qcom,default-led-trigger = "flash1_trigger";
650 qcom,id = <1>;
651 qcom,current-ma = <1000>;
652 qcom,duration-ms = <1280>;
653 qcom,ires-ua = <12500>;
654 qcom,hdrm-voltage-mv = <400>;
655 qcom,hdrm-vol-hi-lo-win-mv = <100>;
656 };
657
658 pmi632_torch0: qcom,torch_0 {
659 label = "torch";
660 qcom,led-name = "led:torch_0";
661 qcom,max-current = <500>;
662 qcom,default-led-trigger = "torch0_trigger";
663 qcom,id = <0>;
664 qcom,current-ma = <300>;
665 qcom,ires-ua = <12500>;
666 qcom,hdrm-voltage-mv = <400>;
667 qcom,hdrm-vol-hi-lo-win-mv = <100>;
668 };
669
670 pmi632_torch1: qcom,torch_1 {
671 label = "torch";
672 qcom,led-name = "led:torch_1";
673 qcom,max-current = <500>;
674 qcom,default-led-trigger = "torch1_trigger";
675 qcom,id = <1>;
676 qcom,current-ma = <300>;
677 qcom,ires-ua = <12500>;
678 qcom,hdrm-voltage-mv = <400>;
679 qcom,hdrm-vol-hi-lo-win-mv = <100>;
680 };
681
682 pmi632_switch0: qcom,led_switch_0 {
683 label = "switch";
684 qcom,led-name = "led:switch_0";
685 qcom,led-mask = <3>;
686 qcom,default-led-trigger = "switch0_trigger";
687 };
688
689 pmi632_switch1: qcom,led_switch_1 {
690 label = "switch";
691 qcom,led-name = "led:switch_1";
692 qcom,led-mask = <2>;
693 qcom,default-led-trigger = "switch1_trigger";
694 };
695
696 };
697
Umang Agrawal16b11602017-12-21 15:32:55 +0530698 };
699};
Vijay kumar Tumati26fe6282018-02-21 18:40:21 +0530700&soc {
701 led_flash0: qcom,camera-flash {
702 cell-index = <0>;
703 compatible = "qcom,camera-flash";
704 qcom,flash-type = <1>;
705 qcom,flash-source = <&pmi632_flash0 &pmi632_flash1>;
706 qcom,torch-source = <&pmi632_torch0 &pmi632_torch1>;
707 qcom,switch-source = <&pmi632_switch0>;
708 };
709};
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530710
711&thermal_zones {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530712 pmi-ibat-lvl0 {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530713 polling-delay-passive = <100>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530714 polling-delay = <0>;
715 thermal-governor = "step_wise";
716 thermal-sensors = <&bcl_sensor 0>;
717
718 trips {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530719 pmi632_ibat_lvl0: ibat-lvl0 {
720 temperature = <4000>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530721 hysteresis = <200>;
722 type = "passive";
723 };
724 };
725 };
726
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530727 pmi-ibat-lvl1 {
728 polling-delay-passive = <0>;
729 polling-delay = <0>;
730 thermal-governor = "step_wise";
731 thermal-sensors = <&bcl_sensor 1>;
732
733 trips {
734 ibat-lvl1 {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530735 temperature = <4200>;
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530736 hysteresis = <200>;
737 type = "passive";
738 };
739 };
740 };
741
742 pmi-vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530743 polling-delay-passive = <100>;
744 polling-delay = <0>;
745 thermal-governor = "low_limits_cap";
746 thermal-sensors = <&bcl_sensor 2>;
747 tracks-low;
748
749 trips {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530750 pmi632_vbat_lvl0: vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530751 temperature = <3000>;
752 hysteresis = <100>;
753 type = "passive";
754 };
755 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530756 };
757
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530758 pmi-vbat-lvl1 {
759 polling-delay-passive = <0>;
760 polling-delay = <0>;
761 thermal-governor = "low_limits_cap";
762 thermal-sensors = <&bcl_sensor 3>;
763 tracks-low;
764
765 trips {
766 vbat-lvl1 {
767 temperature = <2800>;
768 hysteresis = <100>;
769 type = "passive";
770 };
771 };
772 };
773
774 pmi-vbat-lvl2 {
775 polling-delay-passive = <0>;
776 polling-delay = <0>;
777 thermal-governor = "low_limits_cap";
778 thermal-sensors = <&bcl_sensor 4>;
779 tracks-low;
780
781 trips {
782 vbat-lvl1 {
783 temperature = <2600>;
784 hysteresis = <100>;
785 type = "passive";
786 };
787 };
788 };
789
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530790 soc {
791 polling-delay-passive = <100>;
792 polling-delay = <0>;
793 thermal-governor = "low_limits_cap";
794 thermal-sensors = <&bcl_soc>;
795 tracks-low;
796
797 trips {
798 pmi632_low_soc: low-soc {
799 temperature = <10>;
800 hysteresis = <0>;
801 type = "passive";
802 };
803 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530804 };
Manaf Meethalavalappu Pallikunhiabfcb46b2018-03-15 17:51:29 +0530805
806 pmi632_tz {
807 polling-delay-passive = <0>;
808 polling-delay = <0>;
809 thermal-governor = "step_wise";
810 thermal-sensors = <&pmi632_tz>;
811
812 trips {
813 pmi632_tz_trip0: pmi632-trip0 {
814 temperature = <105000>;
815 hysteresis = <0>;
816 type = "passive";
817 };
818 pmi632_tz_trip1: pmi632-trip1 {
819 temperature = <125000>;
820 hysteresis = <0>;
821 type = "passive";
822 };
823 pmi632_tz_trip2: pmi632-trip2 {
824 temperature = <145000>;
825 hysteresis = <0>;
826 type = "passive";
827 };
828 };
829 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530830};