blob: d2b16882d90572619b48c0409d27810d5c897fb4 [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>;
yutingshih81a73512020-04-21 16:03:55 +0800568 //<2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][]Modified for breath ramp and timing.
569 #if 1
570 qcom,lut-patterns = <0 0 0 0 0 0 0 0 2 16 30 44 58 72 86 96 100 100
571 100 100 96 86 72 58 44 30 16 2 0 0 0 0 0 0 0 0>;
572 #else
573 /* Code default */
Fenglin Wub17f2452018-06-06 13:57:47 +0800574 qcom,lut-patterns = <0 0 0 14 28 42 56 70 84 100
575 100 84 70 56 42 28 14 0 0 0>;
yutingshih81a73512020-04-21 16:03:55 +0800576 #endif
577 //>2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][].
Fenglin Wub17f2452018-06-06 13:57:47 +0800578 lpg@1 {
579 qcom,lpg-chan-id = <1>;
yutingshih81a73512020-04-21 16:03:55 +0800580 //<2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][]Modified for breath ramp and timing.
581 #if 1
582 qcom,ramp-step-ms = <60>;
583 qcom,ramp-pause-hi-count = <80>;
584 qcom,ramp-pause-lo-count = <80>;
585 qcom,ramp-low-index = <0>;
586 qcom,ramp-high-index = <35>;
587 //qcom,ramp-toggle; /* ramp from high to low */
588 //qcom,ramp-from-low-to-high;
589 qcom,ramp-pattern-repeat;
590 #else
591 /* Code default */
Fenglin Wub17f2452018-06-06 13:57:47 +0800592 qcom,ramp-step-ms = <200>;
593 qcom,ramp-low-index = <0>;
594 qcom,ramp-high-index = <19>;
595 qcom,ramp-pattern-repeat;
yutingshih81a73512020-04-21 16:03:55 +0800596 #endif
597 //>2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][].
Fenglin Wub17f2452018-06-06 13:57:47 +0800598 qcom,lpg-sdam-base = <0x48>;
599 };
600 lpg@2 {
601 qcom,lpg-chan-id = <2>;
yutingshih81a73512020-04-21 16:03:55 +0800602 //<2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][]Modified for breath ramp and timing.
603 #if 1
604 qcom,ramp-step-ms = <60>;
605 qcom,ramp-pause-hi-count = <80>;
606 qcom,ramp-pause-lo-count = <80>;
607 qcom,ramp-low-index = <0>;
608 qcom,ramp-high-index = <35>;
609 //qcom,ramp-toggle; /* ramp from high to low */
610 //qcom,ramp-from-low-to-high;
611 qcom,ramp-pattern-repeat;
612 #else
613 /* Code default */
Fenglin Wub17f2452018-06-06 13:57:47 +0800614 qcom,ramp-step-ms = <200>;
615 qcom,ramp-low-index = <0>;
616 qcom,ramp-high-index = <19>;
617 qcom,ramp-pattern-repeat;
yutingshih81a73512020-04-21 16:03:55 +0800618 #endif
619 //>2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][].
Fenglin Wub17f2452018-06-06 13:57:47 +0800620 qcom,lpg-sdam-base = <0x56>;
621 };
622 lpg@3 {
623 qcom,lpg-chan-id = <3>;
yutingshih81a73512020-04-21 16:03:55 +0800624 //<2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][]Modified for breath ramp and timing.
625 #if 1
626 qcom,ramp-step-ms = <60>;
627 qcom,ramp-pause-hi-count = <80>;
628 qcom,ramp-pause-lo-count = <80>;
629 qcom,ramp-low-index = <0>;
630 qcom,ramp-high-index = <35>;
631 //qcom,ramp-toggle; /* ramp from high to low */
632 //qcom,ramp-from-low-to-high;
633 qcom,ramp-pattern-repeat;
634 #else
635 /* Code default */
Fenglin Wub17f2452018-06-06 13:57:47 +0800636 qcom,ramp-step-ms = <200>;
637 qcom,ramp-low-index = <0>;
638 qcom,ramp-high-index = <19>;
639 qcom,ramp-pattern-repeat;
yutingshih81a73512020-04-21 16:03:55 +0800640 #endif
641 //>2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][].
Fenglin Wub17f2452018-06-06 13:57:47 +0800642 qcom,lpg-sdam-base = <0x64>;
643 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530644 };
645
Fenglin Wu80e87902018-01-24 11:39:47 +0800646 pmi632_rgb: qcom,leds@d000 {
647 compatible = "qcom,tri-led";
648 reg = <0xd000 0x100>;
649 red {
650 label = "red";
651 pwms = <&pmi632_pwm 0 1000000>;
652 led-sources = <0>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800653 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800654 };
655 green {
656 label = "green";
657 pwms = <&pmi632_pwm 1 1000000>;
658 led-sources = <1>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800659 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800660 };
661 blue {
662 label = "blue";
663 pwms = <&pmi632_pwm 2 1000000>;
664 led-sources = <2>;
Fenglin Wuc6759002018-02-28 10:46:19 +0800665 linux,default-trigger = "timer";
Fenglin Wu80e87902018-01-24 11:39:47 +0800666 };
Umang Agrawal16b11602017-12-21 15:32:55 +0530667 };
Kiran Gunda833a5c72018-01-09 18:34:42 +0530668
669 pmi632_lcdb: qpnp-lcdb@ec00 {
670 compatible = "qcom,qpnp-lcdb-regulator";
671 #address-cells = <1>;
672 #size-cells = <1>;
673 reg = <0xec00 0x100>;
674 interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>;
675 interrupt-names = "sc-irq";
676
677 qcom,pmic-revid = <&pmi632_revid>;
Kiran Gunda440f9eb2018-09-12 14:57:29 +0530678 qcom,voltage-step-ramp;
Kiran Gunda833a5c72018-01-09 18:34:42 +0530679
680 lcdb_ldo_vreg: ldo {
681 label = "ldo";
682 regulator-name = "lcdb_ldo";
683 regulator-min-microvolt = <4000000>;
684 regulator-max-microvolt = <6000000>;
685 };
686
687 lcdb_ncp_vreg: ncp {
688 label = "ncp";
689 regulator-name = "lcdb_ncp";
690 regulator-min-microvolt = <4000000>;
691 regulator-max-microvolt = <6000000>;
692 };
Kiran Gunda777182b2018-09-07 17:19:59 +0530693
694 lcdb_bst_vreg: bst {
695 label = "bst";
696 regulator-name = "lcdb_bst";
697 regulator-min-microvolt = <4700000>;
698 regulator-max-microvolt = <6275000>;
699 };
Kiran Gunda833a5c72018-01-09 18:34:42 +0530700 };
Kiran Gunda27259b52018-01-16 15:12:04 +0530701
702 flash_led: qcom,leds@d300 {
703 compatible = "qcom,qpnp-flash-led-v2";
704 status = "okay";
705 reg = <0xd300 0x100>;
706 label = "flash";
707 interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>,
708 <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>,
709 <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>;
710 interrupt-names = "led-fault-irq",
711 "all-ramp-down-done-irq",
712 "all-ramp-up-done-irq";
713 qcom,short-circuit-det;
714 qcom,open-circuit-det;
715 qcom,vph-droop-det;
716 qcom,thermal-derate-en;
717 qcom,thermal-derate-current = <200 500 1000>;
718 qcom,isc-delay = <192>;
719 qcom,pmic-revid = <&pmi632_revid>;
720
721 pmi632_flash0: qcom,flash_0 {
722 label = "flash";
723 qcom,led-name = "led:flash_0";
724 qcom,max-current = <1500>;
725 qcom,default-led-trigger = "flash0_trigger";
726 qcom,id = <0>;
727 qcom,current-ma = <1000>;
728 qcom,duration-ms = <1280>;
729 qcom,ires-ua = <12500>;
730 qcom,hdrm-voltage-mv = <400>;
731 qcom,hdrm-vol-hi-lo-win-mv = <100>;
732 };
733
734 pmi632_flash1: qcom,flash_1 {
735 label = "flash";
736 qcom,led-name = "led:flash_1";
737 qcom,max-current = <1500>;
738 qcom,default-led-trigger = "flash1_trigger";
739 qcom,id = <1>;
740 qcom,current-ma = <1000>;
741 qcom,duration-ms = <1280>;
742 qcom,ires-ua = <12500>;
743 qcom,hdrm-voltage-mv = <400>;
744 qcom,hdrm-vol-hi-lo-win-mv = <100>;
745 };
746
747 pmi632_torch0: qcom,torch_0 {
748 label = "torch";
749 qcom,led-name = "led:torch_0";
750 qcom,max-current = <500>;
751 qcom,default-led-trigger = "torch0_trigger";
752 qcom,id = <0>;
753 qcom,current-ma = <300>;
754 qcom,ires-ua = <12500>;
755 qcom,hdrm-voltage-mv = <400>;
756 qcom,hdrm-vol-hi-lo-win-mv = <100>;
757 };
758
759 pmi632_torch1: qcom,torch_1 {
760 label = "torch";
761 qcom,led-name = "led:torch_1";
762 qcom,max-current = <500>;
763 qcom,default-led-trigger = "torch1_trigger";
764 qcom,id = <1>;
765 qcom,current-ma = <300>;
766 qcom,ires-ua = <12500>;
767 qcom,hdrm-voltage-mv = <400>;
768 qcom,hdrm-vol-hi-lo-win-mv = <100>;
769 };
770
771 pmi632_switch0: qcom,led_switch_0 {
772 label = "switch";
773 qcom,led-name = "led:switch_0";
774 qcom,led-mask = <3>;
775 qcom,default-led-trigger = "switch0_trigger";
776 };
777
778 pmi632_switch1: qcom,led_switch_1 {
779 label = "switch";
780 qcom,led-name = "led:switch_1";
781 qcom,led-mask = <2>;
782 qcom,default-led-trigger = "switch1_trigger";
783 };
784
785 };
786
Umang Agrawal16b11602017-12-21 15:32:55 +0530787 };
788};
Vijay kumar Tumati26fe6282018-02-21 18:40:21 +0530789&soc {
790 led_flash0: qcom,camera-flash {
791 cell-index = <0>;
792 compatible = "qcom,camera-flash";
793 qcom,flash-type = <1>;
794 qcom,flash-source = <&pmi632_flash0 &pmi632_flash1>;
795 qcom,torch-source = <&pmi632_torch0 &pmi632_torch1>;
796 qcom,switch-source = <&pmi632_switch0>;
797 };
798};
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530799
800&thermal_zones {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530801 pmi-ibat-lvl0 {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530802 polling-delay-passive = <100>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530803 polling-delay = <0>;
804 thermal-governor = "step_wise";
805 thermal-sensors = <&bcl_sensor 0>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530806 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530807
808 trips {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530809 pmi632_ibat_lvl0: ibat-lvl0 {
810 temperature = <4000>;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530811 hysteresis = <200>;
812 type = "passive";
813 };
814 };
815 };
816
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530817 pmi-ibat-lvl1 {
818 polling-delay-passive = <0>;
819 polling-delay = <0>;
820 thermal-governor = "step_wise";
821 thermal-sensors = <&bcl_sensor 1>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530822 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530823
824 trips {
825 ibat-lvl1 {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530826 temperature = <4200>;
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530827 hysteresis = <200>;
828 type = "passive";
829 };
830 };
831 };
832
833 pmi-vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530834 polling-delay-passive = <100>;
835 polling-delay = <0>;
836 thermal-governor = "low_limits_cap";
837 thermal-sensors = <&bcl_sensor 2>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530838 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530839 tracks-low;
840
841 trips {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530842 pmi632_vbat_lvl0: vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530843 temperature = <3000>;
844 hysteresis = <100>;
845 type = "passive";
846 };
847 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530848 };
849
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530850 pmi-vbat-lvl1 {
851 polling-delay-passive = <0>;
852 polling-delay = <0>;
853 thermal-governor = "low_limits_cap";
854 thermal-sensors = <&bcl_sensor 3>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530855 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530856 tracks-low;
857
858 trips {
859 vbat-lvl1 {
860 temperature = <2800>;
861 hysteresis = <100>;
862 type = "passive";
863 };
864 };
865 };
866
867 pmi-vbat-lvl2 {
868 polling-delay-passive = <0>;
869 polling-delay = <0>;
870 thermal-governor = "low_limits_cap";
871 thermal-sensors = <&bcl_sensor 4>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530872 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530873 tracks-low;
874
875 trips {
876 vbat-lvl1 {
877 temperature = <2600>;
878 hysteresis = <100>;
879 type = "passive";
880 };
881 };
882 };
883
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530884 soc {
885 polling-delay-passive = <100>;
886 polling-delay = <0>;
887 thermal-governor = "low_limits_cap";
888 thermal-sensors = <&bcl_soc>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530889 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530890 tracks-low;
891
892 trips {
893 pmi632_low_soc: low-soc {
894 temperature = <10>;
895 hysteresis = <0>;
896 type = "passive";
897 };
898 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530899 };
Manaf Meethalavalappu Pallikunhiabfcb46b2018-03-15 17:51:29 +0530900
901 pmi632_tz {
902 polling-delay-passive = <0>;
903 polling-delay = <0>;
904 thermal-governor = "step_wise";
905 thermal-sensors = <&pmi632_tz>;
Manaf Meethalavalappu Pallikunhi72554b12019-07-30 22:24:45 +0530906 wake-capable-sensor;
Manaf Meethalavalappu Pallikunhiabfcb46b2018-03-15 17:51:29 +0530907
908 trips {
909 pmi632_tz_trip0: pmi632-trip0 {
910 temperature = <105000>;
911 hysteresis = <0>;
912 type = "passive";
913 };
914 pmi632_tz_trip1: pmi632-trip1 {
915 temperature = <125000>;
916 hysteresis = <0>;
917 type = "passive";
918 };
919 pmi632_tz_trip2: pmi632-trip2 {
920 temperature = <145000>;
921 hysteresis = <0>;
922 type = "passive";
923 };
924 };
925 };
Manaf Meethalavalappu Pallikunhi0c5f0162018-02-24 01:55:58 +0530926};