blob: 53147eb4427452a8ee96db73846f1733f6e04f5c [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>;
47
48 chan@0 {
49 label = "ref_gnd";
50 reg = <0>;
51 qcom,decimation = <2>;
52 qcom,pre-div-channel-scaling = <0>;
53 qcom,calibration-type = "absolute";
54 qcom,scale-function = <0>;
55 qcom,hw-settle-time = <0>;
56 qcom,fast-avg-setup = <0>;
57 qcom,cal-val = <0>;
58 };
59
60 chan@1 {
61 label = "ref_1250v";
62 reg = <1>;
63 qcom,decimation = <2>;
64 qcom,pre-div-channel-scaling = <0>;
65 qcom,calibration-type = "absolute";
66 qcom,scale-function = <0>;
67 qcom,hw-settle-time = <0>;
68 qcom,fast-avg-setup = <0>;
69 qcom,cal-val = <0>;
70 };
71
72 chan@83 {
73 label = "vph_pwr";
74 reg = <0x83>;
75 qcom,decimation = <2>;
76 qcom,pre-div-channel-scaling = <1>;
77 qcom,calibration-type = "absolute";
78 qcom,scale-function = <0>;
79 qcom,hw-settle-time = <0>;
80 qcom,fast-avg-setup = <0>;
81 qcom,cal-val = <0>;
82 };
83
84 chan@84 {
85 label = "vbat_sns";
86 reg = <0x84>;
87 qcom,decimation = <2>;
88 qcom,pre-div-channel-scaling = <1>;
89 qcom,calibration-type = "absolute";
90 qcom,scale-function = <0>;
91 qcom,hw-settle-time = <0>;
92 qcom,fast-avg-setup = <0>;
93 qcom,cal-val = <0>;
94 };
95
96 chan@6 {
97 label = "die_temp";
98 reg = <6>;
99 qcom,decimation = <2>;
100 qcom,pre-div-channel-scaling = <0>;
101 qcom,calibration-type = "absolute";
102 qcom,scale-function = <19>;
103 qcom,hw-settle-time = <0>;
104 qcom,fast-avg-setup = <0>;
105 qcom,cal-val = <0>;
106 };
107
108 chan@7 {
109 label = "usb_in_i";
110 reg = <7>;
111 qcom,decimation = <2>;
112 qcom,pre-div-channel-scaling = <0>;
113 qcom,calibration-type = "absolute";
114 qcom,scale-function = <21>;
115 qcom,hw-settle-time = <0>;
116 qcom,fast-avg-setup = <0>;
117 qcom,cal-val = <0>;
118 };
119
120 chan@8 {
121 label = "usb_in_v";
122 reg = <8>;
123 qcom,decimation = <2>;
124 qcom,pre-div-channel-scaling = <8>;
125 qcom,calibration-type = "absolute";
126 qcom,scale-function = <0>;
127 qcom,hw-settle-time = <0>;
128 qcom,fast-avg-setup = <0>;
129 qcom,cal-val = <0>;
130 };
131
132 chan@9 {
133 label = "chg_temp";
134 reg = <9>;
135 qcom,decimation = <2>;
136 qcom,pre-div-channel-scaling = <0>;
137 qcom,calibration-type = "absolute";
138 qcom,scale-function = <18>;
139 qcom,hw-settle-time = <0>;
140 qcom,fast-avg-setup = <0>;
141 qcom,cal-val = <0>;
142 };
143
144 chan@4a {
145 label = "bat_therm";
146 reg = <0x4a>;
147 qcom,decimation = <2>;
148 qcom,pre-div-channel-scaling = <0>;
149 qcom,calibration-type = "ratiometric";
150 qcom,scale-function = <17>;
151 qcom,hw-settle-time = <0>;
152 qcom,fast-avg-setup = <0>;
153 qcom,cal-val = <0>;
154 };
155
Jishnu Prakash32dab112018-04-12 15:13:12 +0530156 chan@2a {
157 label = "bat_therm_PU30";
158 reg = <0x2a>;
159 qcom,decimation = <2>;
160 qcom,pre-div-channel-scaling = <0>;
161 qcom,calibration-type = "ratiometric";
162 qcom,scale-function = <24>;
163 qcom,hw-settle-time = <0>;
164 qcom,fast-avg-setup = <0>;
165 qcom,cal-val = <0>;
166 };
167
168 chan@6a {
169 label = "bat_therm_PU400";
170 reg = <0x6a>;
171 qcom,decimation = <2>;
172 qcom,pre-div-channel-scaling = <0>;
173 qcom,calibration-type = "ratiometric";
174 qcom,scale-function = <25>;
175 qcom,hw-settle-time = <0>;
176 qcom,fast-avg-setup = <0>;
177 qcom,cal-val = <0>;
178 };
179
Jishnu Prakash292e28c2018-01-18 11:28:34 +0530180 chan@4b {
181 label = "bat_id";
182 reg = <0x4b>;
183 qcom,decimation = <2>;
184 qcom,pre-div-channel-scaling = <0>;
185 qcom,calibration-type = "ratiometric";
186 qcom,scale-function = <0>;
187 qcom,hw-settle-time = <0>;
188 qcom,fast-avg-setup = <0>;
189 qcom,cal-val = <0>;
190 };
191
192 chan@4c {
193 label = "xo_therm";
194 reg = <0x4c>;
195 qcom,decimation = <2>;
196 qcom,pre-div-channel-scaling = <0>;
197 qcom,calibration-type = "ratiometric";
198 qcom,scale-function = <4>;
199 qcom,hw-settle-time = <8>;
200 qcom,fast-avg-setup = <0>;
201 };
202
203
204 chan@1e {
205 label = "mid_chg";
206 reg = <0x1e>;
207 qcom,decimation = <2>;
208 qcom,pre-div-channel-scaling = <3>;
209 qcom,calibration-type = "absolute";
210 qcom,scale-function = <0>;
211 qcom,hw-settle-time = <0>;
212 qcom,fast-avg-setup = <0>;
213 qcom,cal-val = <0>;
214 };
215
Jishnu Prakash9940b752018-03-15 20:05:12 +0530216 chan@52 {
217 label = "typec_therm";
218 reg = <0x52>;
219 qcom,decimation = <2>;
220 qcom,pre-div-channel-scaling = <0>;
221 qcom,calibration-type = "ratiometric";
222 qcom,scale-function = <2>;
223 qcom,hw-settle-time = <0>;
224 qcom,fast-avg-setup = <0>;
225 qcom,cal-val = <0>;
226 };
227
228 chan@53 {
229 label = "quiet_therm";
230 reg = <0x53>;
231 qcom,decimation = <2>;
232 qcom,pre-div-channel-scaling = <0>;
233 qcom,calibration-type = "ratiometric";
234 qcom,scale-function = <2>;
235 qcom,hw-settle-time = <0>;
236 qcom,fast-avg-setup = <0>;
237 qcom,cal-val = <0>;
238 };
239
240 chan@54 {
241 label = "smb_therm";
242 reg = <0x54>;
243 qcom,decimation = <2>;
244 qcom,pre-div-channel-scaling = <0>;
245 qcom,calibration-type = "ratiometric";
246 qcom,scale-function = <2>;
247 qcom,hw-settle-time = <0>;
248 qcom,fast-avg-setup = <0>;
249 qcom,cal-val = <0>;
250 };
Jishnu Prakash292e28c2018-01-18 11:28:34 +0530251 };
252
Jishnu Prakash097d97d2018-04-04 21:08:27 +0530253 pmi632_adc_tm: vadc@3500 {
Jishnu Prakashfe450a72018-05-04 10:51:15 +0530254 compatible = "qcom,qpnp-adc-tm-hc",
255 "qcom,qpnp-adc-tm-hc-pm5";
Jishnu Prakash097d97d2018-04-04 21:08:27 +0530256 reg = <0x3500 0x100>;
257 #address-cells = <1>;
258 #size-cells = <0>;
259 interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
260 interrupt-names = "eoc-int-en-set";
261 qcom,adc-vdd-reference = <1875>;
262 qcom,adc-full-scale-code = <0x70e4>;
263 qcom,adc_tm-vadc = <&pmi632_vadc>;
264 qcom,decimation = <0>;
265 qcom,fast-avg-setup = <0>;
266 #thermal-sensor-cells = <1>;
267
268 chan@53 {
269 label = "quiet_therm";
270 reg = <0x53>;
271 qcom,pre-div-channel-scaling = <0>;
272 qcom,calibration-type = "ratiometric";
273 qcom,scale-function = <2>;
274 qcom,hw-settle-time = <0>;
275 qcom,btm-channel-number = <0x60>;
276 qcom,thermal-node;
277 };
278
279 };
280
Umang Agrawal16b11602017-12-21 15:32:55 +0530281 pmi632_tz: qcom,temp-alarm@2400 {
282 compatible = "qcom,qpnp-temp-alarm";
283 reg = <0x2400 0x100>;
284 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
285 label = "pmi632_tz";
286 #thermal-sensor-cells = <0>;
287 };
288
289 pmi632_gpios: pinctrl@c000 {
290 compatible = "qcom,spmi-gpio";
291 reg = <0xc000 0x800>;
Ashay Jaiswal15d3c8f2018-06-14 21:27:45 +0530292 interrupts = <0x2 0xc0 0 IRQ_TYPE_NONE>,
293 <0x2 0xc1 0 IRQ_TYPE_NONE>,
Umang Agrawal16b11602017-12-21 15:32:55 +0530294 <0x2 0xc2 0 IRQ_TYPE_NONE>,
295 <0x2 0xc3 0 IRQ_TYPE_NONE>,
296 <0x2 0xc4 0 IRQ_TYPE_NONE>,
297 <0x2 0xc5 0 IRQ_TYPE_NONE>,
298 <0x2 0xc6 0 IRQ_TYPE_NONE>,
Umang Agrawalfbbfb7f2017-12-29 19:27:01 +0530299 <0x2 0xc7 0 IRQ_TYPE_NONE>;
Ashay Jaiswal15d3c8f2018-06-14 21:27:45 +0530300 interrupt-names = "pmi632_gpio1", "pmi632_gpio2",
301 "pmi632_gpio3", "pmi632_gpio4",
302 "pmi632_gpio5", "pmi632_gpio6",
303 "pmi632_gpio7", "pmi632_gpio8";
Umang Agrawal16b11602017-12-21 15:32:55 +0530304 gpio-controller;
305 #gpio-cells = <2>;
Umang Agrawal16b11602017-12-21 15:32:55 +0530306 };
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530307
308 pmi632_charger: qcom,qpnp-smb5 {
309 compatible = "qcom,qpnp-smb5";
310 #address-cells = <1>;
311 #size-cells = <1>;
Manaf Meethalavalappu Pallikunhi585ef212018-02-27 21:10:51 +0530312 #cooling-cells = <2>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530313
314 qcom,pmic-revid = <&pmi632_revid>;
315 dpdm-supply = <&qusb_phy>;
Anirudh Ghayal23fa4a32018-03-08 18:16:23 +0530316 qcom,auto-recharge-soc = <98>;
Ashay Jaiswal338858c2018-04-20 11:55:38 +0530317 qcom,chg-vadc = <&pmi632_vadc>;
Kiran Gunda7d7830d2018-05-23 16:58:58 +0530318 qcom,flash-disable-soc = <10>;
Ashay Jaiswalb6fc5802018-05-31 14:40:08 +0530319 qcom,sw-jeita-enable;
320 qcom,step-charging-enable;
Ashay Jaiswal15d3c8f2018-06-14 21:27:45 +0530321 qcom,hw-die-temp-mitigation;
322 qcom,hw-connector-mitigation;
323 qcom,connector-internal-pull-kohm = <100>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530324
Manaf Meethalavalappu Pallikunhi585ef212018-02-27 21:10:51 +0530325 qcom,thermal-mitigation
326 = <3000000 2500000 2000000 1500000
327 1000000 500000>;
328
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530329 qcom,chgr@1000 {
330 reg = <0x1000 0x100>;
331 interrupts =
332 <0x2 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
333 <0x2 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
334 <0x2 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
335 <0x2 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
336 <0x2 0x10 0x4 IRQ_TYPE_EDGE_RISING>,
337 <0x2 0x10 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530338 <0x2 0x10 0x6 IRQ_TYPE_EDGE_RISING>,
339 <0x2 0x10 0x7 IRQ_TYPE_EDGE_RISING>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530340
341 interrupt-names = "chgr-error",
342 "chg-state-change",
343 "step-chg-state-change",
344 "step-chg-soc-update-fail",
345 "step-chg-soc-update-req",
346 "fg-fvcal-qualified",
347 "vph-alarm",
348 "vph-drop-prechg";
349 };
350
351 qcom,dcdc@1100 {
352 reg = <0x1100 0x100>;
353 interrupts =
354 <0x2 0x11 0x0 IRQ_TYPE_EDGE_RISING>,
355 <0x2 0x11 0x1 IRQ_TYPE_EDGE_RISING>,
356 <0x2 0x11 0x2 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530357 <0x2 0x11 0x3 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530358 <0x2 0x11 0x4 IRQ_TYPE_EDGE_BOTH>,
359 <0x2 0x11 0x5 IRQ_TYPE_EDGE_BOTH>,
360 <0x2 0x11 0x6 IRQ_TYPE_EDGE_RISING>,
361 <0x2 0x11 0x7 IRQ_TYPE_EDGE_BOTH>;
362
363 interrupt-names = "otg-fail",
364 "otg-oc-disable-sw",
365 "otg-oc-hiccup",
366 "bsm-active",
367 "high-duty-cycle",
368 "input-current-limiting",
369 "concurrent-mode-disable",
370 "switcher-power-ok";
371 };
372
373 qcom,batif@1200 {
374 reg = <0x1200 0x100>;
375 interrupts =
376 <0x2 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
377 <0x2 0x12 0x1 IRQ_TYPE_EDGE_RISING>,
378 <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
379 <0x2 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
380 <0x2 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
381 <0x2 0x12 0x5 IRQ_TYPE_EDGE_BOTH>,
382 <0x2 0x12 0x6 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530383 <0x2 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530384
385 interrupt-names = "bat-temp",
386 "all-chnl-conv-done",
387 "bat-ov",
388 "bat-low",
389 "bat-therm-or-id-missing",
390 "bat-terminal-missing",
391 "buck-oc",
392 "vph-ov";
393 };
394
395 qcom,usb@1300 {
396 reg = <0x1300 0x100>;
397 interrupts =
398 <0x2 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
399 <0x2 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
400 <0x2 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
401 <0x2 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530402 <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
403 <0x2 0x13 0x5 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530404 <0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
405 <0x2 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
406
407 interrupt-names = "usbin-collapse",
408 "usbin-vashdn",
409 "usbin-uv",
410 "usbin-ov",
411 "usbin-plugin",
412 "usbin-revi-change",
413 "usbin-src-change",
414 "usbin-icl-change";
415 };
416
417 qcom,typec@1500 {
418 reg = <0x1500 0x100>;
419 interrupts =
420 <0x2 0x15 0x0 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530421 <0x2 0x15 0x1 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530422 <0x2 0x15 0x2 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530423 <0x2 0x15 0x3 IRQ_TYPE_EDGE_RISING>,
424 <0x2 0x15 0x4 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530425 <0x2 0x15 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530426 <0x2 0x15 0x6 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530427 <0x2 0x15 0x7 IRQ_TYPE_EDGE_RISING>;
428
429 interrupt-names = "typec-or-rid-detect-change",
430 "typec-vpd-detect",
431 "typec-cc-state-change",
432 "typec-vconn-oc",
433 "typec-vbus-change",
434 "typec-attach-detach",
435 "typec-legacy-cable-detect",
436 "typec-try-snk-src-detect";
437 };
438
439 qcom,misc@1600 {
440 reg = <0x1600 0x100>;
441 interrupts =
442 <0x2 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
443 <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530444 <0x2 0x16 0x2 IRQ_TYPE_EDGE_RISING>,
445 <0x2 0x16 0x3 IRQ_TYPE_EDGE_RISING>,
446 <0x2 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530447 <0x2 0x16 0x5 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal9d3f1192018-03-07 19:05:59 +0530448 <0x2 0x16 0x6 IRQ_TYPE_EDGE_RISING>,
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530449 <0x2 0x16 0x7 IRQ_TYPE_EDGE_RISING>;
450
451 interrupt-names = "wdog-snarl",
452 "wdog-bark",
453 "aicl-fail",
454 "aicl-done",
455 "smb-en",
456 "imp-trigger",
457 "temp-change",
458 "temp-change-smb";
459 };
460
Ashay Jaiswal3ee6df62018-02-19 17:02:16 +0530461 qcom,schgm-flash@a600 {
462 reg = <0xa600 0x100>;
463 interrupts =
464 <0x2 0xa6 0x2 IRQ_TYPE_EDGE_RISING>,
465 <0x2 0xa6 0x5 IRQ_TYPE_EDGE_RISING>,
466 <0x2 0xa6 0x6 IRQ_TYPE_EDGE_RISING>,
467 <0x2 0xa6 0x7 IRQ_TYPE_EDGE_BOTH>;
468
469 interrupt-names = "flash-state-change",
470 "ilim1-s1",
471 "ilim2-s2",
472 "vreg-ok";
473 };
474
Ashay Jaiswal4e9d1d12018-02-11 14:56:48 +0530475 smb5_vbus: qcom,smb5-vbus {
476 regulator-name = "smb5-vbus";
477 };
478 };
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530479
480 pmi632_qg: qpnp,qg {
481 compatible = "qcom,qpnp-qg";
482 #address-cells = <1>;
483 #size-cells = <1>;
484
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530485 qcom,qg-iterm-ma = <100>;
Anirudh Ghayal23fa4a32018-03-08 18:16:23 +0530486 qcom,hold-soc-while-full;
487 qcom,linearize-soc;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530488 qcom,qg-vadc = <&pmi632_vadc>;
489 qcom,pmic-revid = <&pmi632_revid>;
490
491 qcom,qgauge@4800 {
492 status = "okay";
493 reg = <0x4800 0x100>;
Anirudh Ghayalff3660e2018-04-19 10:21:18 +0530494 interrupts =
495 <0x2 0x48 0x0 IRQ_TYPE_EDGE_BOTH>,
496 <0x2 0x48 0x1 IRQ_TYPE_EDGE_BOTH>,
497 <0x2 0x48 0x2 IRQ_TYPE_EDGE_RISING>,
498 <0x2 0x48 0x3 IRQ_TYPE_EDGE_RISING>,
499 <0x2 0x48 0x4 IRQ_TYPE_EDGE_RISING>;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +0530500 interrupt-names = "qg-batt-missing",
501 "qg-vbat-low",
502 "qg-vbat-empty",
503 "qg-fifo-done",
504 "qg-good-ocv";
505 };
506
507 qcom,qg-sdam@b100 {
508 status = "okay";
509 reg = <0xb100 0x100>;
510 };
511 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530512
513 bcl_sensor: bcl@3d00 {
Manaf Meethalavalappu Pallikunhie49406e2018-03-09 18:34:14 +0530514 compatible = "qcom,bcl-v5";
515 reg = <0x3d00 0x100>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530516 interrupts = <0x2 0x3d 0x0 IRQ_TYPE_NONE>,
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530517 <0x2 0x3d 0x1 IRQ_TYPE_NONE>,
518 <0x2 0x3d 0x0 IRQ_TYPE_NONE>,
519 <0x2 0x3d 0x1 IRQ_TYPE_NONE>,
520 <0x2 0x3d 0x2 IRQ_TYPE_NONE>;
521 interrupt-names = "bcl-ibat-lvl0",
522 "bcl-ibat-lvl1",
523 "bcl-vbat-lvl0",
524 "bcl-vbat-lvl1",
525 "bcl-vbat-lvl2";
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530526 #thermal-sensor-cells = <1>;
527 };
528
529 bcl_soc: bcl-soc {
530 compatible = "qcom,msm-bcl-soc";
531 #thermal-sensor-cells = <0>;
532 };
Fenglin Wub17f2452018-06-06 13:57:47 +0800533
534 pmi632_pbs_client3: qcom,pbs@7400 {
535 compatible = "qcom,qpnp-pbs";
536 reg = <0x7400 0x100>;
537 };
538
539 pmi632_sdam7: qcom,sdam@b600 {
540 compatible = "qcom,spmi-sdam";
541 reg = <0xb600 0x100>;
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 Reddyab95bea2018-06-18 14:06:42 +0530555 qcom,disable-overdrive;
Tirupathi Reddy08968e82018-01-09 16:58:28 +0530556 };
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>;
Fenglin Wub17f2452018-06-06 13:57:47 +0800563 nvmem-names = "ppg_sdam";
564 nvmem = <&pmi632_sdam7>;
565 qcom,pbs-client = <&pmi632_pbs_client3>;
566 qcom,lut-sdam-base = <0x80>;
567 qcom,lut-patterns = <0 0 0 14 28 42 56 70 84 100
568 100 84 70 56 42 28 14 0 0 0>;
569 lpg@1 {
570 qcom,lpg-chan-id = <1>;
571 qcom,ramp-step-ms = <200>;
572 qcom,ramp-low-index = <0>;
573 qcom,ramp-high-index = <19>;
574 qcom,ramp-pattern-repeat;
575 qcom,lpg-sdam-base = <0x48>;
576 };
577 lpg@2 {
578 qcom,lpg-chan-id = <2>;
579 qcom,ramp-step-ms = <200>;
580 qcom,ramp-low-index = <0>;
581 qcom,ramp-high-index = <19>;
582 qcom,ramp-pattern-repeat;
583 qcom,lpg-sdam-base = <0x56>;
584 };
585 lpg@3 {
586 qcom,lpg-chan-id = <3>;
587 qcom,ramp-step-ms = <200>;
588 qcom,ramp-low-index = <0>;
589 qcom,ramp-high-index = <19>;
590 qcom,ramp-pattern-repeat;
591 qcom,lpg-sdam-base = <0x64>;
592 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530593 };
594
Fenglin Wu80e87902018-01-24 11:39:47 +0800595 pmi632_rgb: qcom,leds@d000 {
596 compatible = "qcom,tri-led";
597 reg = <0xd000 0x100>;
598 red {
599 label = "red";
600 pwms = <&pmi632_pwm 0 1000000>;
601 led-sources = <0>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800602 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800603 };
604 green {
605 label = "green";
606 pwms = <&pmi632_pwm 1 1000000>;
607 led-sources = <1>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800608 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800609 };
610 blue {
611 label = "blue";
612 pwms = <&pmi632_pwm 2 1000000>;
613 led-sources = <2>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800614 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800615 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530616 };
Kiran Gunda833a5c72018-01-09 18:34:42 +0530617
618 pmi632_lcdb: qpnp-lcdb@ec00 {
619 compatible = "qcom,qpnp-lcdb-regulator";
620 #address-cells = <1>;
621 #size-cells = <1>;
622 reg = <0xec00 0x100>;
623 interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>;
624 interrupt-names = "sc-irq";
625
626 qcom,pmic-revid = <&pmi632_revid>;
627
628 lcdb_ldo_vreg: ldo {
629 label = "ldo";
630 regulator-name = "lcdb_ldo";
631 regulator-min-microvolt = <4000000>;
632 regulator-max-microvolt = <6000000>;
633 };
634
635 lcdb_ncp_vreg: ncp {
636 label = "ncp";
637 regulator-name = "lcdb_ncp";
638 regulator-min-microvolt = <4000000>;
639 regulator-max-microvolt = <6000000>;
640 };
641 };
Kiran Gunda27259b52018-01-16 15:12:04 +0530642
643 flash_led: qcom,leds@d300 {
644 compatible = "qcom,qpnp-flash-led-v2";
645 status = "okay";
646 reg = <0xd300 0x100>;
647 label = "flash";
648 interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>,
649 <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>,
650 <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>;
651 interrupt-names = "led-fault-irq",
652 "all-ramp-down-done-irq",
653 "all-ramp-up-done-irq";
654 qcom,short-circuit-det;
655 qcom,open-circuit-det;
656 qcom,vph-droop-det;
657 qcom,thermal-derate-en;
658 qcom,thermal-derate-current = <200 500 1000>;
659 qcom,isc-delay = <192>;
660 qcom,pmic-revid = <&pmi632_revid>;
661
662 pmi632_flash0: qcom,flash_0 {
663 label = "flash";
664 qcom,led-name = "led:flash_0";
665 qcom,max-current = <1500>;
666 qcom,default-led-trigger = "flash0_trigger";
667 qcom,id = <0>;
668 qcom,current-ma = <1000>;
669 qcom,duration-ms = <1280>;
670 qcom,ires-ua = <12500>;
671 qcom,hdrm-voltage-mv = <400>;
672 qcom,hdrm-vol-hi-lo-win-mv = <100>;
673 };
674
675 pmi632_flash1: qcom,flash_1 {
676 label = "flash";
677 qcom,led-name = "led:flash_1";
678 qcom,max-current = <1500>;
679 qcom,default-led-trigger = "flash1_trigger";
680 qcom,id = <1>;
681 qcom,current-ma = <1000>;
682 qcom,duration-ms = <1280>;
683 qcom,ires-ua = <12500>;
684 qcom,hdrm-voltage-mv = <400>;
685 qcom,hdrm-vol-hi-lo-win-mv = <100>;
686 };
687
688 pmi632_torch0: qcom,torch_0 {
689 label = "torch";
690 qcom,led-name = "led:torch_0";
691 qcom,max-current = <500>;
692 qcom,default-led-trigger = "torch0_trigger";
693 qcom,id = <0>;
694 qcom,current-ma = <300>;
695 qcom,ires-ua = <12500>;
696 qcom,hdrm-voltage-mv = <400>;
697 qcom,hdrm-vol-hi-lo-win-mv = <100>;
698 };
699
700 pmi632_torch1: qcom,torch_1 {
701 label = "torch";
702 qcom,led-name = "led:torch_1";
703 qcom,max-current = <500>;
704 qcom,default-led-trigger = "torch1_trigger";
705 qcom,id = <1>;
706 qcom,current-ma = <300>;
707 qcom,ires-ua = <12500>;
708 qcom,hdrm-voltage-mv = <400>;
709 qcom,hdrm-vol-hi-lo-win-mv = <100>;
710 };
711
712 pmi632_switch0: qcom,led_switch_0 {
713 label = "switch";
714 qcom,led-name = "led:switch_0";
715 qcom,led-mask = <3>;
716 qcom,default-led-trigger = "switch0_trigger";
717 };
718
719 pmi632_switch1: qcom,led_switch_1 {
720 label = "switch";
721 qcom,led-name = "led:switch_1";
722 qcom,led-mask = <2>;
723 qcom,default-led-trigger = "switch1_trigger";
724 };
725
726 };
727
Umang Agrawal16b11602017-12-21 15:32:55 +0530728 };
729};
Vijay kumar Tumati26fe6282018-02-21 18:40:21 +0530730&soc {
731 led_flash0: qcom,camera-flash {
732 cell-index = <0>;
733 compatible = "qcom,camera-flash";
734 qcom,flash-type = <1>;
735 qcom,flash-source = <&pmi632_flash0 &pmi632_flash1>;
736 qcom,torch-source = <&pmi632_torch0 &pmi632_torch1>;
737 qcom,switch-source = <&pmi632_switch0>;
738 };
739};
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530740
741&thermal_zones {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530742 pmi-ibat-lvl0 {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530743 polling-delay-passive = <100>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530744 polling-delay = <0>;
745 thermal-governor = "step_wise";
746 thermal-sensors = <&bcl_sensor 0>;
747
748 trips {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530749 pmi632_ibat_lvl0: ibat-lvl0 {
750 temperature = <4000>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530751 hysteresis = <200>;
752 type = "passive";
753 };
754 };
755 };
756
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530757 pmi-ibat-lvl1 {
758 polling-delay-passive = <0>;
759 polling-delay = <0>;
760 thermal-governor = "step_wise";
761 thermal-sensors = <&bcl_sensor 1>;
762
763 trips {
764 ibat-lvl1 {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530765 temperature = <4200>;
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530766 hysteresis = <200>;
767 type = "passive";
768 };
769 };
770 };
771
772 pmi-vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530773 polling-delay-passive = <100>;
774 polling-delay = <0>;
775 thermal-governor = "low_limits_cap";
776 thermal-sensors = <&bcl_sensor 2>;
777 tracks-low;
778
779 trips {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530780 pmi632_vbat_lvl0: vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530781 temperature = <3000>;
782 hysteresis = <100>;
783 type = "passive";
784 };
785 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530786 };
787
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530788 pmi-vbat-lvl1 {
789 polling-delay-passive = <0>;
790 polling-delay = <0>;
791 thermal-governor = "low_limits_cap";
792 thermal-sensors = <&bcl_sensor 3>;
793 tracks-low;
794
795 trips {
796 vbat-lvl1 {
797 temperature = <2800>;
798 hysteresis = <100>;
799 type = "passive";
800 };
801 };
802 };
803
804 pmi-vbat-lvl2 {
805 polling-delay-passive = <0>;
806 polling-delay = <0>;
807 thermal-governor = "low_limits_cap";
808 thermal-sensors = <&bcl_sensor 4>;
809 tracks-low;
810
811 trips {
812 vbat-lvl1 {
813 temperature = <2600>;
814 hysteresis = <100>;
815 type = "passive";
816 };
817 };
818 };
819
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530820 soc {
821 polling-delay-passive = <100>;
822 polling-delay = <0>;
823 thermal-governor = "low_limits_cap";
824 thermal-sensors = <&bcl_soc>;
825 tracks-low;
826
827 trips {
828 pmi632_low_soc: low-soc {
829 temperature = <10>;
830 hysteresis = <0>;
831 type = "passive";
832 };
833 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530834 };
Manaf Meethalavalappu Pallikunhiabfcb46b2018-03-15 17:51:29 +0530835
836 pmi632_tz {
837 polling-delay-passive = <0>;
838 polling-delay = <0>;
839 thermal-governor = "step_wise";
840 thermal-sensors = <&pmi632_tz>;
841
842 trips {
843 pmi632_tz_trip0: pmi632-trip0 {
844 temperature = <105000>;
845 hysteresis = <0>;
846 type = "passive";
847 };
848 pmi632_tz_trip1: pmi632-trip1 {
849 temperature = <125000>;
850 hysteresis = <0>;
851 type = "passive";
852 };
853 pmi632_tz_trip2: pmi632-trip2 {
854 temperature = <145000>;
855 hysteresis = <0>;
856 type = "passive";
857 };
858 };
859 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530860};