blob: 9ff2f5472fbc68a7dc6fbaf843e54384aa1ddd9a [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>;
32 qcom,secondary-pon-reset;
33 };
34
Jishnu Prakash292e28c2018-01-18 11:28:34 +053035 pmi632_vadc: vadc@3100 {
36 compatible = "qcom,qpnp-vadc-hc";
37 reg = <0x3100 0x100>;
38 #address-cells = <1>;
39 #size-cells = <0>;
Jishnu Prakash3238aad2018-03-08 10:37:18 +053040 interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
Jishnu Prakash292e28c2018-01-18 11:28:34 +053041 interrupt-names = "eoc-int-en-set";
42 qcom,adc-vdd-reference = <1875>;
43 qcom,adc-full-scale-code = <0x70e4>;
Jishnu Prakash9940b752018-03-15 20:05:12 +053044 pinctrl-names = "default";
45 pinctrl-0 = <&quiet_therm_default &smb_therm_default>;
Jishnu Prakash292e28c2018-01-18 11:28:34 +053046
47 chan@0 {
48 label = "ref_gnd";
49 reg = <0>;
50 qcom,decimation = <2>;
51 qcom,pre-div-channel-scaling = <0>;
52 qcom,calibration-type = "absolute";
53 qcom,scale-function = <0>;
54 qcom,hw-settle-time = <0>;
55 qcom,fast-avg-setup = <0>;
56 qcom,cal-val = <0>;
57 };
58
59 chan@1 {
60 label = "ref_1250v";
61 reg = <1>;
62 qcom,decimation = <2>;
63 qcom,pre-div-channel-scaling = <0>;
64 qcom,calibration-type = "absolute";
65 qcom,scale-function = <0>;
66 qcom,hw-settle-time = <0>;
67 qcom,fast-avg-setup = <0>;
68 qcom,cal-val = <0>;
69 };
70
71 chan@83 {
72 label = "vph_pwr";
73 reg = <0x83>;
74 qcom,decimation = <2>;
75 qcom,pre-div-channel-scaling = <1>;
76 qcom,calibration-type = "absolute";
77 qcom,scale-function = <0>;
78 qcom,hw-settle-time = <0>;
79 qcom,fast-avg-setup = <0>;
80 qcom,cal-val = <0>;
81 };
82
83 chan@84 {
84 label = "vbat_sns";
85 reg = <0x84>;
86 qcom,decimation = <2>;
87 qcom,pre-div-channel-scaling = <1>;
88 qcom,calibration-type = "absolute";
89 qcom,scale-function = <0>;
90 qcom,hw-settle-time = <0>;
91 qcom,fast-avg-setup = <0>;
92 qcom,cal-val = <0>;
93 };
94
95 chan@6 {
96 label = "die_temp";
97 reg = <6>;
98 qcom,decimation = <2>;
99 qcom,pre-div-channel-scaling = <0>;
100 qcom,calibration-type = "absolute";
101 qcom,scale-function = <19>;
102 qcom,hw-settle-time = <0>;
103 qcom,fast-avg-setup = <0>;
104 qcom,cal-val = <0>;
105 };
106
107 chan@7 {
108 label = "usb_in_i";
109 reg = <7>;
110 qcom,decimation = <2>;
111 qcom,pre-div-channel-scaling = <0>;
112 qcom,calibration-type = "absolute";
113 qcom,scale-function = <21>;
114 qcom,hw-settle-time = <0>;
115 qcom,fast-avg-setup = <0>;
116 qcom,cal-val = <0>;
117 };
118
119 chan@8 {
120 label = "usb_in_v";
121 reg = <8>;
122 qcom,decimation = <2>;
123 qcom,pre-div-channel-scaling = <8>;
124 qcom,calibration-type = "absolute";
125 qcom,scale-function = <0>;
126 qcom,hw-settle-time = <0>;
127 qcom,fast-avg-setup = <0>;
128 qcom,cal-val = <0>;
129 };
130
131 chan@9 {
132 label = "chg_temp";
133 reg = <9>;
134 qcom,decimation = <2>;
135 qcom,pre-div-channel-scaling = <0>;
136 qcom,calibration-type = "absolute";
137 qcom,scale-function = <18>;
138 qcom,hw-settle-time = <0>;
139 qcom,fast-avg-setup = <0>;
140 qcom,cal-val = <0>;
141 };
142
143 chan@4a {
144 label = "bat_therm";
145 reg = <0x4a>;
146 qcom,decimation = <2>;
147 qcom,pre-div-channel-scaling = <0>;
148 qcom,calibration-type = "ratiometric";
149 qcom,scale-function = <17>;
150 qcom,hw-settle-time = <0>;
151 qcom,fast-avg-setup = <0>;
152 qcom,cal-val = <0>;
153 };
154
155 chan@4b {
156 label = "bat_id";
157 reg = <0x4b>;
158 qcom,decimation = <2>;
159 qcom,pre-div-channel-scaling = <0>;
160 qcom,calibration-type = "ratiometric";
161 qcom,scale-function = <0>;
162 qcom,hw-settle-time = <0>;
163 qcom,fast-avg-setup = <0>;
164 qcom,cal-val = <0>;
165 };
166
167 chan@4c {
168 label = "xo_therm";
169 reg = <0x4c>;
170 qcom,decimation = <2>;
171 qcom,pre-div-channel-scaling = <0>;
172 qcom,calibration-type = "ratiometric";
173 qcom,scale-function = <4>;
174 qcom,hw-settle-time = <8>;
175 qcom,fast-avg-setup = <0>;
176 };
177
178
179 chan@1e {
180 label = "mid_chg";
181 reg = <0x1e>;
182 qcom,decimation = <2>;
183 qcom,pre-div-channel-scaling = <3>;
184 qcom,calibration-type = "absolute";
185 qcom,scale-function = <0>;
186 qcom,hw-settle-time = <0>;
187 qcom,fast-avg-setup = <0>;
188 qcom,cal-val = <0>;
189 };
190
Jishnu Prakash9940b752018-03-15 20:05:12 +0530191 chan@52 {
192 label = "typec_therm";
193 reg = <0x52>;
194 qcom,decimation = <2>;
195 qcom,pre-div-channel-scaling = <0>;
196 qcom,calibration-type = "ratiometric";
197 qcom,scale-function = <2>;
198 qcom,hw-settle-time = <0>;
199 qcom,fast-avg-setup = <0>;
200 qcom,cal-val = <0>;
201 };
202
203 chan@53 {
204 label = "quiet_therm";
205 reg = <0x53>;
206 qcom,decimation = <2>;
207 qcom,pre-div-channel-scaling = <0>;
208 qcom,calibration-type = "ratiometric";
209 qcom,scale-function = <2>;
210 qcom,hw-settle-time = <0>;
211 qcom,fast-avg-setup = <0>;
212 qcom,cal-val = <0>;
213 };
214
215 chan@54 {
216 label = "smb_therm";
217 reg = <0x54>;
218 qcom,decimation = <2>;
219 qcom,pre-div-channel-scaling = <0>;
220 qcom,calibration-type = "ratiometric";
221 qcom,scale-function = <2>;
222 qcom,hw-settle-time = <0>;
223 qcom,fast-avg-setup = <0>;
224 qcom,cal-val = <0>;
225 };
Jishnu Prakash292e28c2018-01-18 11:28:34 +0530226 };
227
Umang Agrawal16b11602017-12-21 15:32:55 +0530228 pmi632_tz: qcom,temp-alarm@2400 {
229 compatible = "qcom,qpnp-temp-alarm";
230 reg = <0x2400 0x100>;
231 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
232 label = "pmi632_tz";
233 #thermal-sensor-cells = <0>;
234 };
235
236 pmi632_gpios: pinctrl@c000 {
237 compatible = "qcom,spmi-gpio";
238 reg = <0xc000 0x800>;
239 interrupts = <0x2 0xc1 0 IRQ_TYPE_NONE>,
240 <0x2 0xc2 0 IRQ_TYPE_NONE>,
241 <0x2 0xc3 0 IRQ_TYPE_NONE>,
242 <0x2 0xc4 0 IRQ_TYPE_NONE>,
243 <0x2 0xc5 0 IRQ_TYPE_NONE>,
244 <0x2 0xc6 0 IRQ_TYPE_NONE>,
Umang Agrawalfbbfb7f2017-12-29 19:27:01 +0530245 <0x2 0xc7 0 IRQ_TYPE_NONE>;
Umang Agrawal16b11602017-12-21 15:32:55 +0530246 interrupt-names = "pmi632_gpio2", "pmi632_gpio3",
247 "pmi632_gpio4", "pmi632_gpio5",
248 "pmi632_gpio6", "pmi632_gpio7",
249 "pmi632_gpio8";
250 gpio-controller;
251 #gpio-cells = <2>;
252 qcom,gpios-disallowed = <1>;
Jishnu Prakash9940b752018-03-15 20:05:12 +0530253
254 quiet_therm {
255 quiet_therm_default: quiet_therm_default {
256 pins = "gpio3";
257 bias-high-impedance;
258 };
259 };
260
261 smb_therm {
262 smb_therm_default: smb_therm_default {
263 pins = "gpio4";
264 bias-high-impedance;
265 };
266 };
267
Umang Agrawal16b11602017-12-21 15:32:55 +0530268 };
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530269
270 pmi632_charger: qcom,qpnp-smb5 {
271 compatible = "qcom,qpnp-smb5";
272 #address-cells = <1>;
273 #size-cells = <1>;
Manaf Meethalavalappu Pallikunhi585ef212018-02-27 21:10:51 +0530274 #cooling-cells = <2>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530275
276 qcom,pmic-revid = <&pmi632_revid>;
277 dpdm-supply = <&qusb_phy>;
Anirudh Ghayal23fa4a32018-03-08 18:16:23 +0530278 qcom,auto-recharge-soc = <98>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530279
Manaf Meethalavalappu Pallikunhi585ef212018-02-27 21:10:51 +0530280 qcom,thermal-mitigation
281 = <3000000 2500000 2000000 1500000
282 1000000 500000>;
283
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530284 qcom,chgr@1000 {
285 reg = <0x1000 0x100>;
286 interrupts =
287 <0x2 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
288 <0x2 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
289 <0x2 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
290 <0x2 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
291 <0x2 0x10 0x4 IRQ_TYPE_EDGE_RISING>,
292 <0x2 0x10 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530293 <0x2 0x10 0x6 IRQ_TYPE_EDGE_RISING>,
294 <0x2 0x10 0x7 IRQ_TYPE_EDGE_RISING>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530295
296 interrupt-names = "chgr-error",
297 "chg-state-change",
298 "step-chg-state-change",
299 "step-chg-soc-update-fail",
300 "step-chg-soc-update-req",
301 "fg-fvcal-qualified",
302 "vph-alarm",
303 "vph-drop-prechg";
304 };
305
306 qcom,dcdc@1100 {
307 reg = <0x1100 0x100>;
308 interrupts =
309 <0x2 0x11 0x0 IRQ_TYPE_EDGE_RISING>,
310 <0x2 0x11 0x1 IRQ_TYPE_EDGE_RISING>,
311 <0x2 0x11 0x2 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530312 <0x2 0x11 0x3 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530313 <0x2 0x11 0x4 IRQ_TYPE_EDGE_BOTH>,
314 <0x2 0x11 0x5 IRQ_TYPE_EDGE_BOTH>,
315 <0x2 0x11 0x6 IRQ_TYPE_EDGE_RISING>,
316 <0x2 0x11 0x7 IRQ_TYPE_EDGE_BOTH>;
317
318 interrupt-names = "otg-fail",
319 "otg-oc-disable-sw",
320 "otg-oc-hiccup",
321 "bsm-active",
322 "high-duty-cycle",
323 "input-current-limiting",
324 "concurrent-mode-disable",
325 "switcher-power-ok";
326 };
327
328 qcom,batif@1200 {
329 reg = <0x1200 0x100>;
330 interrupts =
331 <0x2 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
332 <0x2 0x12 0x1 IRQ_TYPE_EDGE_RISING>,
333 <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
334 <0x2 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
335 <0x2 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
336 <0x2 0x12 0x5 IRQ_TYPE_EDGE_BOTH>,
337 <0x2 0x12 0x6 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530338 <0x2 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530339
340 interrupt-names = "bat-temp",
341 "all-chnl-conv-done",
342 "bat-ov",
343 "bat-low",
344 "bat-therm-or-id-missing",
345 "bat-terminal-missing",
346 "buck-oc",
347 "vph-ov";
348 };
349
350 qcom,usb@1300 {
351 reg = <0x1300 0x100>;
352 interrupts =
353 <0x2 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
354 <0x2 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
355 <0x2 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
356 <0x2 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530357 <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
358 <0x2 0x13 0x5 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530359 <0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
360 <0x2 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
361
362 interrupt-names = "usbin-collapse",
363 "usbin-vashdn",
364 "usbin-uv",
365 "usbin-ov",
366 "usbin-plugin",
367 "usbin-revi-change",
368 "usbin-src-change",
369 "usbin-icl-change";
370 };
371
372 qcom,typec@1500 {
373 reg = <0x1500 0x100>;
374 interrupts =
375 <0x2 0x15 0x0 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530376 <0x2 0x15 0x1 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530377 <0x2 0x15 0x2 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530378 <0x2 0x15 0x3 IRQ_TYPE_EDGE_RISING>,
379 <0x2 0x15 0x4 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530380 <0x2 0x15 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530381 <0x2 0x15 0x6 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530382 <0x2 0x15 0x7 IRQ_TYPE_EDGE_RISING>;
383
384 interrupt-names = "typec-or-rid-detect-change",
385 "typec-vpd-detect",
386 "typec-cc-state-change",
387 "typec-vconn-oc",
388 "typec-vbus-change",
389 "typec-attach-detach",
390 "typec-legacy-cable-detect",
391 "typec-try-snk-src-detect";
392 };
393
394 qcom,misc@1600 {
395 reg = <0x1600 0x100>;
396 interrupts =
397 <0x2 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
398 <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530399 <0x2 0x16 0x2 IRQ_TYPE_EDGE_RISING>,
400 <0x2 0x16 0x3 IRQ_TYPE_EDGE_RISING>,
401 <0x2 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530402 <0x2 0x16 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530403 <0x2 0x16 0x6 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530404 <0x2 0x16 0x7 IRQ_TYPE_EDGE_RISING>;
405
406 interrupt-names = "wdog-snarl",
407 "wdog-bark",
408 "aicl-fail",
409 "aicl-done",
410 "smb-en",
411 "imp-trigger",
412 "temp-change",
413 "temp-change-smb";
414 };
415
Ashay Jaiswal3ee6df62018-02-19 17:02:16 +0530416 qcom,schgm-flash@a600 {
417 reg = <0xa600 0x100>;
418 interrupts =
419 <0x2 0xa6 0x2 IRQ_TYPE_EDGE_RISING>,
420 <0x2 0xa6 0x5 IRQ_TYPE_EDGE_RISING>,
421 <0x2 0xa6 0x6 IRQ_TYPE_EDGE_RISING>,
422 <0x2 0xa6 0x7 IRQ_TYPE_EDGE_BOTH>;
423
424 interrupt-names = "flash-state-change",
425 "ilim1-s1",
426 "ilim2-s2",
427 "vreg-ok";
428 };
429
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530430 smb5_vbus: qcom,smb5-vbus {
431 regulator-name = "smb5-vbus";
432 };
433 };
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530434
435 pmi632_qg: qpnp,qg {
436 compatible = "qcom,qpnp-qg";
437 #address-cells = <1>;
438 #size-cells = <1>;
439
Anirudh Ghayal23fa4a32018-03-08 18:16:23 +0530440 qcom,vbatt-empty-mv = <3300>;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530441 qcom,vbatt-low-mv = <3500>;
442 qcom,vbatt-cutoff-mv = <3400>;
443 qcom,qg-iterm-ma = <100>;
Anirudh Ghayal23fa4a32018-03-08 18:16:23 +0530444 qcom,hold-soc-while-full;
445 qcom,linearize-soc;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530446 qcom,qg-vadc = <&pmi632_vadc>;
447 qcom,pmic-revid = <&pmi632_revid>;
448
449 qcom,qgauge@4800 {
450 status = "okay";
451 reg = <0x4800 0x100>;
452 interrupts = <0x2 0x48 0x0 IRQ_TYPE_EDGE_BOTH>,
453 <0x2 0x48 0x1 IRQ_TYPE_EDGE_BOTH>,
454 <0x2 0x48 0x2 IRQ_TYPE_EDGE_BOTH>,
455 <0x2 0x48 0x3 IRQ_TYPE_EDGE_BOTH>,
456 <0x2 0x48 0x4 IRQ_TYPE_EDGE_BOTH>;
457 interrupt-names = "qg-batt-missing",
458 "qg-vbat-low",
459 "qg-vbat-empty",
460 "qg-fifo-done",
461 "qg-good-ocv";
462 };
463
464 qcom,qg-sdam@b100 {
465 status = "okay";
466 reg = <0xb100 0x100>;
467 };
468 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530469
470 bcl_sensor: bcl@3d00 {
Manaf Meethalavalappu Pallikunhie49406e2018-03-09 18:34:14 +0530471 compatible = "qcom,bcl-v5";
472 reg = <0x3d00 0x100>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530473 interrupts = <0x2 0x3d 0x0 IRQ_TYPE_NONE>,
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530474 <0x2 0x3d 0x1 IRQ_TYPE_NONE>,
475 <0x2 0x3d 0x0 IRQ_TYPE_NONE>,
476 <0x2 0x3d 0x1 IRQ_TYPE_NONE>,
477 <0x2 0x3d 0x2 IRQ_TYPE_NONE>;
478 interrupt-names = "bcl-ibat-lvl0",
479 "bcl-ibat-lvl1",
480 "bcl-vbat-lvl0",
481 "bcl-vbat-lvl1",
482 "bcl-vbat-lvl2";
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530483 #thermal-sensor-cells = <1>;
484 };
485
486 bcl_soc: bcl-soc {
487 compatible = "qcom,msm-bcl-soc";
488 #thermal-sensor-cells = <0>;
489 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530490 };
491
492 pmi632_3: qcom,pmi632@3 {
493 compatible ="qcom,spmi-pmic";
494 reg = <0x3 SPMI_USID>;
Anirudh Ghayald77f8f62018-03-04 20:05:25 +0530495 #address-cells = <1>;
496 #size-cells = <1>;
Umang Agrawal16b11602017-12-21 15:32:55 +0530497
Tirupathi Reddy08968e82018-01-09 16:58:28 +0530498 pmi632_vib: qcom,vibrator@5700 {
499 compatible = "qcom,qpnp-vibrator-ldo";
500 reg = <0x5700 0x100>;
Tirupathi Reddy398336a2018-02-02 09:01:15 +0530501 qcom,vib-ldo-volt-uv = <3000000>;
Tirupathi Reddy08968e82018-01-09 16:58:28 +0530502 qcom,vib-overdrive-volt-uv = <3544000>;
503 };
504
Fenglin Wu80e87902018-01-24 11:39:47 +0800505 pmi632_pwm: qcom,pwms@b300 {
506 compatible = "qcom,pwm-lpg";
507 reg = <0xb300 0x500>;
508 reg-names = "lpg-base";
Umang Agrawal16b11602017-12-21 15:32:55 +0530509 #pwm-cells = <2>;
Umang Agrawal16b11602017-12-21 15:32:55 +0530510 };
511
Fenglin Wu80e87902018-01-24 11:39:47 +0800512 pmi632_rgb: qcom,leds@d000 {
513 compatible = "qcom,tri-led";
514 reg = <0xd000 0x100>;
515 red {
516 label = "red";
517 pwms = <&pmi632_pwm 0 1000000>;
518 led-sources = <0>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800519 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800520 };
521 green {
522 label = "green";
523 pwms = <&pmi632_pwm 1 1000000>;
524 led-sources = <1>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800525 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800526 };
527 blue {
528 label = "blue";
529 pwms = <&pmi632_pwm 2 1000000>;
530 led-sources = <2>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800531 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800532 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530533 };
Kiran Gunda833a5c72018-01-09 18:34:42 +0530534
535 pmi632_lcdb: qpnp-lcdb@ec00 {
536 compatible = "qcom,qpnp-lcdb-regulator";
537 #address-cells = <1>;
538 #size-cells = <1>;
539 reg = <0xec00 0x100>;
540 interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>;
541 interrupt-names = "sc-irq";
542
543 qcom,pmic-revid = <&pmi632_revid>;
544
545 lcdb_ldo_vreg: ldo {
546 label = "ldo";
547 regulator-name = "lcdb_ldo";
548 regulator-min-microvolt = <4000000>;
549 regulator-max-microvolt = <6000000>;
550 };
551
552 lcdb_ncp_vreg: ncp {
553 label = "ncp";
554 regulator-name = "lcdb_ncp";
555 regulator-min-microvolt = <4000000>;
556 regulator-max-microvolt = <6000000>;
557 };
558 };
Kiran Gunda27259b52018-01-16 15:12:04 +0530559
560 flash_led: qcom,leds@d300 {
561 compatible = "qcom,qpnp-flash-led-v2";
562 status = "okay";
563 reg = <0xd300 0x100>;
564 label = "flash";
565 interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>,
566 <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>,
567 <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>;
568 interrupt-names = "led-fault-irq",
569 "all-ramp-down-done-irq",
570 "all-ramp-up-done-irq";
571 qcom,short-circuit-det;
572 qcom,open-circuit-det;
573 qcom,vph-droop-det;
574 qcom,thermal-derate-en;
575 qcom,thermal-derate-current = <200 500 1000>;
576 qcom,isc-delay = <192>;
577 qcom,pmic-revid = <&pmi632_revid>;
578
579 pmi632_flash0: qcom,flash_0 {
580 label = "flash";
581 qcom,led-name = "led:flash_0";
582 qcom,max-current = <1500>;
583 qcom,default-led-trigger = "flash0_trigger";
584 qcom,id = <0>;
585 qcom,current-ma = <1000>;
586 qcom,duration-ms = <1280>;
587 qcom,ires-ua = <12500>;
588 qcom,hdrm-voltage-mv = <400>;
589 qcom,hdrm-vol-hi-lo-win-mv = <100>;
590 };
591
592 pmi632_flash1: qcom,flash_1 {
593 label = "flash";
594 qcom,led-name = "led:flash_1";
595 qcom,max-current = <1500>;
596 qcom,default-led-trigger = "flash1_trigger";
597 qcom,id = <1>;
598 qcom,current-ma = <1000>;
599 qcom,duration-ms = <1280>;
600 qcom,ires-ua = <12500>;
601 qcom,hdrm-voltage-mv = <400>;
602 qcom,hdrm-vol-hi-lo-win-mv = <100>;
603 };
604
605 pmi632_torch0: qcom,torch_0 {
606 label = "torch";
607 qcom,led-name = "led:torch_0";
608 qcom,max-current = <500>;
609 qcom,default-led-trigger = "torch0_trigger";
610 qcom,id = <0>;
611 qcom,current-ma = <300>;
612 qcom,ires-ua = <12500>;
613 qcom,hdrm-voltage-mv = <400>;
614 qcom,hdrm-vol-hi-lo-win-mv = <100>;
615 };
616
617 pmi632_torch1: qcom,torch_1 {
618 label = "torch";
619 qcom,led-name = "led:torch_1";
620 qcom,max-current = <500>;
621 qcom,default-led-trigger = "torch1_trigger";
622 qcom,id = <1>;
623 qcom,current-ma = <300>;
624 qcom,ires-ua = <12500>;
625 qcom,hdrm-voltage-mv = <400>;
626 qcom,hdrm-vol-hi-lo-win-mv = <100>;
627 };
628
629 pmi632_switch0: qcom,led_switch_0 {
630 label = "switch";
631 qcom,led-name = "led:switch_0";
632 qcom,led-mask = <3>;
633 qcom,default-led-trigger = "switch0_trigger";
634 };
635
636 pmi632_switch1: qcom,led_switch_1 {
637 label = "switch";
638 qcom,led-name = "led:switch_1";
639 qcom,led-mask = <2>;
640 qcom,default-led-trigger = "switch1_trigger";
641 };
642
643 };
644
Umang Agrawal16b11602017-12-21 15:32:55 +0530645 };
646};
Vijay kumar Tumati26fe6282018-02-21 18:40:21 +0530647&soc {
648 led_flash0: qcom,camera-flash {
649 cell-index = <0>;
650 compatible = "qcom,camera-flash";
651 qcom,flash-type = <1>;
652 qcom,flash-source = <&pmi632_flash0 &pmi632_flash1>;
653 qcom,torch-source = <&pmi632_torch0 &pmi632_torch1>;
654 qcom,switch-source = <&pmi632_switch0>;
655 };
656};
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530657
658&thermal_zones {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530659 pmi-ibat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530660 polling-delay-passive = <0>;
661 polling-delay = <0>;
662 thermal-governor = "step_wise";
663 thermal-sensors = <&bcl_sensor 0>;
664
665 trips {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530666 pmi632_ibat:ibat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530667 temperature = <3500>;
668 hysteresis = <200>;
669 type = "passive";
670 };
671 };
672 };
673
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530674 pmi-ibat-lvl1 {
675 polling-delay-passive = <0>;
676 polling-delay = <0>;
677 thermal-governor = "step_wise";
678 thermal-sensors = <&bcl_sensor 1>;
679
680 trips {
681 ibat-lvl1 {
682 temperature = <4000>;
683 hysteresis = <200>;
684 type = "passive";
685 };
686 };
687 };
688
689 pmi-vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530690 polling-delay-passive = <100>;
691 polling-delay = <0>;
692 thermal-governor = "low_limits_cap";
693 thermal-sensors = <&bcl_sensor 2>;
694 tracks-low;
695
696 trips {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530697 pmi632_vbat_lvl0: vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530698 temperature = <3000>;
699 hysteresis = <100>;
700 type = "passive";
701 };
702 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530703 };
704
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530705 pmi-vbat-lvl1 {
706 polling-delay-passive = <0>;
707 polling-delay = <0>;
708 thermal-governor = "low_limits_cap";
709 thermal-sensors = <&bcl_sensor 3>;
710 tracks-low;
711
712 trips {
713 vbat-lvl1 {
714 temperature = <2800>;
715 hysteresis = <100>;
716 type = "passive";
717 };
718 };
719 };
720
721 pmi-vbat-lvl2 {
722 polling-delay-passive = <0>;
723 polling-delay = <0>;
724 thermal-governor = "low_limits_cap";
725 thermal-sensors = <&bcl_sensor 4>;
726 tracks-low;
727
728 trips {
729 vbat-lvl1 {
730 temperature = <2600>;
731 hysteresis = <100>;
732 type = "passive";
733 };
734 };
735 };
736
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530737 soc {
738 polling-delay-passive = <100>;
739 polling-delay = <0>;
740 thermal-governor = "low_limits_cap";
741 thermal-sensors = <&bcl_soc>;
742 tracks-low;
743
744 trips {
745 pmi632_low_soc: low-soc {
746 temperature = <10>;
747 hysteresis = <0>;
748 type = "passive";
749 };
750 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530751 };
752};