blob: a7aa08ac4cf4247c98510dfc0a9e2d5a86f67805 [file] [log] [blame]
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +05301/*
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +05302 * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +05303 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#include <dt-bindings/msm/power-on.h>
15
16&spmi_bus {
17
18 qcom,pmi8937@2 {
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +053019 compatible ="qcom,spmi-pmic";
20 reg = <0x2 SPMI_USID>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +053021 #address-cells = <1>;
22 #size-cells = <1>;
23
24 pmi8937_revid: qcom,revid@100 {
25 compatible = "qcom,qpnp-revid";
26 reg = <0x100 0x100>;
27 };
28
29 qcom,power-on@800 {
30 compatible = "qcom,qpnp-power-on";
31 reg = <0x800 0x100>;
32 qcom,secondary-pon-reset;
33 qcom,hard-reset-poweroff-type =
34 <PON_POWER_OFF_SHUTDOWN>;
35
36 pon_perph_reg: qcom,pon_perph_reg {
37 regulator-name = "pon_spare_reg";
38 qcom,pon-spare-reg-addr = <0x8c>;
39 qcom,pon-spare-reg-bit = <1>;
40 };
41 };
42
43 pmi8937_vadc: vadc@3100 {
44 compatible = "qcom,qpnp-vadc";
45 reg = <0x3100 0x100>;
46 #address-cells = <1>;
47 #size-cells = <0>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +053048 interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +053049 interrupt-names = "eoc-int-en-set";
50 qcom,adc-bit-resolution = <15>;
51 qcom,adc-vdd-reference = <1800>;
52 qcom,vadc-poll-eoc;
53
54 chan@0 {
55 label = "usbin";
56 reg = <0>;
57 qcom,decimation = <0>;
58 qcom,pre-div-channel-scaling = <4>;
59 qcom,calibration-type = "absolute";
60 qcom,scale-function = <0>;
61 qcom,hw-settle-time = <0>;
62 qcom,fast-avg-setup = <0>;
63 };
64
65 chan@1 {
66 label = "dcin";
67 reg = <1>;
68 qcom,decimation = <0>;
69 qcom,pre-div-channel-scaling = <4>;
70 qcom,calibration-type = "absolute";
71 qcom,scale-function = <0>;
72 qcom,hw-settle-time = <0>;
73 qcom,fast-avg-setup = <0>;
74 };
75
76 chan@3 {
77 label = "vchg_sns";
78 reg = <3>;
79 qcom,decimation = <0>;
80 qcom,pre-div-channel-scaling = <1>;
81 qcom,calibration-type = "absolute";
82 qcom,scale-function = <0>;
83 qcom,hw-settle-time = <0>;
84 qcom,fast-avg-setup = <0>;
85 };
86
87 chan@9 {
88 label = "ref_625mv";
89 reg = <9>;
90 qcom,decimation = <0>;
91 qcom,pre-div-channel-scaling = <0>;
92 qcom,calibration-type = "absolute";
93 qcom,scale-function = <0>;
94 qcom,hw-settle-time = <0>;
95 qcom,fast-avg-setup = <0>;
96 };
97
98 chan@a {
99 label = "ref_1250v";
100 reg = <0xa>;
101 qcom,decimation = <0>;
102 qcom,pre-div-channel-scaling = <0>;
103 qcom,calibration-type = "absolute";
104 qcom,scale-function = <0>;
105 qcom,hw-settle-time = <0>;
106 qcom,fast-avg-setup = <0>;
107 };
108
109 chan@d {
110 label = "chg_temp";
111 reg = <0xd>;
112 qcom,decimation = <0>;
113 qcom,pre-div-channel-scaling = <0>;
114 qcom,calibration-type = "absolute";
115 qcom,scale-function = <16>;
116 qcom,hw-settle-time = <0>;
117 qcom,fast-avg-setup = <0>;
118 };
119
120 chan@43 {
121 label = "usb_dp";
122 reg = <0x43>;
123 qcom,decimation = <0>;
124 qcom,pre-div-channel-scaling = <1>;
125 qcom,calibration-type = "absolute";
126 qcom,scale-function = <0>;
127 qcom,hw-settle-time = <0>;
128 qcom,fast-avg-setup = <0>;
129 };
130
131 chan@44 {
132 label = "usb_dm";
133 reg = <0x44>;
134 qcom,decimation = <0>;
135 qcom,pre-div-channel-scaling = <1>;
136 qcom,calibration-type = "absolute";
137 qcom,scale-function = <0>;
138 qcom,hw-settle-time = <0>;
139 qcom,fast-avg-setup = <0>;
140 };
141 };
142
143 pmi8937_mpps: mpps {
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530144 compatible = "qcom,spmi-mpp";
145 reg = <0xa000 0x400>;
146 interrupts = <0x2 0xa0 0 IRQ_TYPE_NONE>,
147 <0x2 0xa1 0 IRQ_TYPE_NONE>,
148 <0x2 0xa2 0 IRQ_TYPE_NONE>,
149 <0x2 0xa3 0 IRQ_TYPE_NONE>;
150 interrupt-names = "pmi8937_mpp1", "pmi8937_mpp2",
151 "pmi8937_mpp3", "pmi8937_mpp4";
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530152 gpio-controller;
153 #gpio-cells = <2>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530154 };
155
156 pmi8937_charger: qcom,qpnp-smbcharger {
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530157 compatible = "qcom,qpnp-smbcharger";
158 #address-cells = <1>;
159 #size-cells = <1>;
160
161 qcom,iterm-ma = <100>;
162 qcom,float-voltage-mv = <4200>;
163 qcom,resume-delta-mv = <200>;
164 qcom,chg-inhibit-fg;
165 qcom,rparasitic-uohm = <100000>;
166 qcom,bms-psy-name = "bms";
167 qcom,thermal-mitigation = <1500 700 600 0>;
168 qcom,parallel-usb-min-current-ma = <1400>;
169 qcom,parallel-usb-9v-min-current-ma = <900>;
170 qcom,parallel-allowed-lowering-ma = <500>;
171 qcom,pmic-revid = <&pmi8937_revid>;
172 qcom,force-aicl-rerun;
173 qcom,aicl-rerun-period-s = <180>;
174 qcom,autoadjust-vfloat;
175
176 qcom,chgr@1000 {
177 reg = <0x1000 0x100>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530178 interrupts = <0x2 0x10 0x0 IRQ_TYPE_NONE>,
179 <0x2 0x10 0x1 IRQ_TYPE_NONE>,
180 <0x2 0x10 0x2 IRQ_TYPE_NONE>,
181 <0x2 0x10 0x3 IRQ_TYPE_NONE>,
182 <0x2 0x10 0x4 IRQ_TYPE_NONE>,
183 <0x2 0x10 0x5 IRQ_TYPE_NONE>,
184 <0x2 0x10 0x6 IRQ_TYPE_NONE>,
185 <0x2 0x10 0x7 IRQ_TYPE_NONE>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530186
187 interrupt-names = "chg-error",
188 "chg-inhibit",
189 "chg-prechg-sft",
190 "chg-complete-chg-sft",
191 "chg-p2f-thr",
192 "chg-rechg-thr",
193 "chg-taper-thr",
194 "chg-tcc-thr";
195 };
196
197 qcom,otg@1100 {
198 reg = <0x1100 0x100>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530199 interrupts = <0x2 0x11 0x0 IRQ_TYPE_NONE>,
200 <0x2 0x11 0x1 IRQ_TYPE_NONE>,
201 <0x2 0x11 0x3 IRQ_TYPE_NONE>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530202 interrupt-names = "otg-fail",
203 "otg-oc",
204 "usbid-change";
205 };
206
207 qcom,bat-if@1200 {
208 reg = <0x1200 0x100>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530209 interrupts = <0x2 0x12 0x0 IRQ_TYPE_NONE>,
210 <0x2 0x12 0x1 IRQ_TYPE_NONE>,
211 <0x2 0x12 0x2 IRQ_TYPE_NONE>,
212 <0x2 0x12 0x3 IRQ_TYPE_NONE>,
213 <0x2 0x12 0x4 IRQ_TYPE_NONE>,
214 <0x2 0x12 0x5 IRQ_TYPE_NONE>,
215 <0x2 0x12 0x6 IRQ_TYPE_NONE>,
216 <0x2 0x12 0x7 IRQ_TYPE_NONE>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530217
218 interrupt-names = "batt-hot",
219 "batt-warm",
220 "batt-cold",
221 "batt-cool",
222 "batt-ov",
223 "batt-low",
224 "batt-missing",
225 "batt-term-missing";
226 };
227
228 qcom,usb-chgpth@1300 {
229 reg = <0x1300 0x100>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530230 interrupts = <0x2 0x13 0x0 IRQ_TYPE_NONE>,
231 <0x2 0x13 0x1 IRQ_TYPE_NONE>,
232 <0x2 0x13 0x2 IRQ_TYPE_NONE>,
233 <0x2 0x13 0x5 IRQ_TYPE_NONE>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530234
235 interrupt-names = "usbin-uv",
236 "usbin-ov",
237 "usbin-src-det",
238 "aicl-done";
239 };
240
241 qcom,dc-chgpth@1400 {
242 reg = <0x1400 0x100>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530243 interrupts = <0x2 0x14 0x0 IRQ_TYPE_NONE>,
244 <0x2 0x14 0x1 IRQ_TYPE_NONE>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530245 interrupt-names = "dcin-uv",
246 "dcin-ov";
247 };
248
249 qcom,chgr-misc@1600 {
250 reg = <0x1600 0x100>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530251 interrupts = <0x2 0x16 0x0 IRQ_TYPE_NONE>,
252 <0x2 0x16 0x1 IRQ_TYPE_NONE>,
253 <0x2 0x16 0x2 IRQ_TYPE_NONE>,
254 <0x2 0x16 0x3 IRQ_TYPE_NONE>,
255 <0x2 0x16 0x4 IRQ_TYPE_NONE>,
256 <0x2 0x16 0x5 IRQ_TYPE_NONE>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530257
258 interrupt-names = "power-ok",
259 "temp-shutdown",
260 "wdog-timeout",
261 "flash-fail",
262 "otst2",
263 "otst3";
264 };
265
266 smbcharger_charger_otg: qcom,smbcharger-boost-otg {
267 regulator-name = "smbcharger_charger_otg";
268 };
269 };
270
271 pmi8937_fg: qcom,fg {
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530272 compatible = "qcom,qpnp-fg";
273 #address-cells = <1>;
274 #size-cells = <1>;
275 qcom,resume-soc = <95>;
276 status = "okay";
277 qcom,bcl-lm-threshold-ma = <127>;
278 qcom,bcl-mh-threshold-ma = <405>;
279 qcom,fg-iterm-ma = <150>;
280 qcom,fg-chg-iterm-ma = <100>;
281 qcom,pmic-revid = <&pmi8937_revid>;
282 qcom,fg-cutoff-voltage-mv = <3500>;
283 qcom,cycle-counter-en;
284 qcom,capacity-learning-on;
285
286 qcom,fg-soc@4000 {
287 status = "okay";
288 reg = <0x4000 0x100>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530289 interrupts = <0x2 0x40 0x0 IRQ_TYPE_NONE>,
290 <0x2 0x40 0x1 IRQ_TYPE_NONE>,
291 <0x2 0x40 0x2 IRQ_TYPE_NONE>,
292 <0x2 0x40 0x3 IRQ_TYPE_NONE>,
293 <0x2 0x40 0x4 IRQ_TYPE_NONE>,
294 <0x2 0x40 0x5 IRQ_TYPE_NONE>,
295 <0x2 0x40 0x6 IRQ_TYPE_NONE>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530296
297 interrupt-names = "high-soc",
298 "low-soc",
299 "full-soc",
300 "empty-soc",
301 "delta-soc",
302 "first-est-done",
303 "update-soc";
304 };
305
306 qcom,fg-batt@4100 {
307 reg = <0x4100 0x100>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530308 interrupts = <0x2 0x41 0x0 IRQ_TYPE_NONE>,
309 <0x2 0x41 0x1 IRQ_TYPE_NONE>,
310 <0x2 0x41 0x2 IRQ_TYPE_NONE>,
311 <0x2 0x41 0x3 IRQ_TYPE_NONE>,
312 <0x2 0x41 0x4 IRQ_TYPE_NONE>,
313 <0x2 0x41 0x5 IRQ_TYPE_NONE>,
314 <0x2 0x41 0x6 IRQ_TYPE_NONE>,
315 <0x2 0x41 0x7 IRQ_TYPE_NONE>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530316
317 interrupt-names = "soft-cold",
318 "soft-hot",
319 "vbatt-low",
320 "batt-ided",
321 "batt-id-req",
322 "batt-unknown",
323 "batt-missing",
324 "batt-match";
325 };
326
327 qcom,revid-tp-rev@1f1 {
328 reg = <0x1f1 0x1>;
329 };
330
331 qcom,fg-memif@4400 {
332 status = "okay";
333 reg = <0x4400 0x100>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530334 interrupts = <0x2 0x44 0x0 IRQ_TYPE_NONE>,
335 <0x2 0x44 0x2 IRQ_TYPE_NONE>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530336
337 interrupt-names = "mem-avail",
338 "data-rcvry-sug";
339 };
340 };
341
342 bcl@4200 {
343 compatible = "qcom,msm-bcl";
344 reg = <0x4200 0xff>;
345 reg-names = "fg_user_adc";
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530346 interrupts = <0x2 0x42 0x0 IRQ_TYPE_NONE>,
347 <0x2 0x42 0x1 IRQ_TYPE_NONE>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530348 interrupt-names = "bcl-high-ibat-int",
349 "bcl-low-vbat-int";
350 qcom,vbat-scaling-factor = <39000>;
351 qcom,vbat-gain-numerator = <1>;
352 qcom,vbat-gain-denominator = <128>;
353 qcom,vbat-polling-delay-ms = <100>;
354 qcom,ibat-scaling-factor = <39000>;
355 qcom,ibat-gain-numerator = <1>;
356 qcom,ibat-gain-denominator = <128>;
357 qcom,ibat-offset-numerator = <1200>;
358 qcom,ibat-offset-denominator = <1>;
359 qcom,ibat-polling-delay-ms = <100>;
360 };
361
362 qcom,leds@a100 {
363 compatible = "qcom,leds-qpnp";
364 reg = <0xa100 0x100>;
365 label = "mpp";
366 };
367 };
368
369 qcom,pmi8937@3 {
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530370 compatible ="qcom,spmi-pmic";
371 reg = <0x3 SPMI_USID>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530372 #address-cells = <1>;
373 #size-cells = <1>;
374
375 pmi8937_pwm: pwm@b000 {
376 status = "disabled";
377 compatible = "qcom,qpnp-pwm";
378 reg = <0xb000 0x100>;
379 reg-names = "qpnp-lpg-channel-base";
380 qcom,channel-id = <0>;
381 qcom,supported-sizes = <6>, <9>;
382 #pwm-cells = <2>;
383 };
384
385 wled: qcom,leds@d800 {
386 compatible = "qcom,qpnp-wled";
387 reg = <0xd800 0x100>,
388 <0xd900 0x100>;
389 reg-names = "qpnp-wled-ctrl-base",
390 "qpnp-wled-sink-base";
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530391 interrupts = <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530392 interrupt-names = "sc-irq";
393 status = "okay";
394 linux,name = "wled";
395 linux,default-trigger = "bkl-trigger";
396 qcom,fdbk-output = "auto";
397 qcom,vref-mv = <350>;
398 qcom,switch-freq-khz = <800>;
399 qcom,ovp-mv = <29500>;
400 qcom,ilim-ma = <980>;
401 qcom,boost-duty-ns = <26>;
402 qcom,mod-freq-khz = <9600>;
403 qcom,dim-mode = "hybrid";
404 qcom,dim-method = "linear";
405 qcom,hyb-thres = <625>;
406 qcom,sync-dly-us = <800>;
407 qcom,fs-curr-ua = <20000>;
408 qcom,led-strings-list = [00 01];
409 qcom,en-ext-pfet-sc-pro;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530410 qcom,pmic-revid = <&pmi8937_revid>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530411 qcom,cons-sync-write-delay-us = <1000>;
412 };
413
414 flash_led: qcom,leds@d300 {
415 compatible = "qcom,qpnp-flash-led";
416 status = "okay";
417 reg = <0xd300 0x100>;
418 label = "flash";
419 qcom,headroom = <500>;
420 qcom,startup-dly = <128>;
421 qcom,clamp-curr = <200>;
422 qcom,pmic-charger-support;
423 qcom,self-check-enabled;
424 qcom,thermal-derate-enabled;
425 qcom,thermal-derate-threshold = <100>;
426 qcom,thermal-derate-rate = "5_PERCENT";
427 qcom,current-ramp-enabled;
428 qcom,ramp_up_step = "6P7_US";
429 qcom,ramp_dn_step = "6P7_US";
430 qcom,vph-pwr-droop-enabled;
431 qcom,vph-pwr-droop-threshold = <3000>;
432 qcom,vph-pwr-droop-debounce-time = <10>;
433 qcom,headroom-sense-ch0-enabled;
434 qcom,headroom-sense-ch1-enabled;
435 qcom,pmic-revid = <&pmi8937_revid>;
436
437 pmi8937_flash0: qcom,flash_0 {
438 label = "flash";
439 qcom,led-name = "led:flash_0";
440 qcom,default-led-trigger =
441 "flash0_trigger";
442 qcom,max-current = <1000>;
443 qcom,duration = <1280>;
444 qcom,id = <0>;
445 qcom,current = <625>;
446 };
447
448 pmi8937_flash1: qcom,flash_1 {
449 label = "flash";
450 qcom,led-name = "led:flash_1";
451 qcom,default-led-trigger =
452 "flash1_trigger";
453 qcom,max-current = <1000>;
454 qcom,duration = <1280>;
455 qcom,id = <1>;
456 qcom,current = <625>;
457 };
458
459 pmi8937_torch0: qcom,torch_0 {
460 label = "torch";
461 qcom,led-name = "led:torch_0";
462 qcom,default-led-trigger =
463 "torch0_trigger";
464 qcom,max-current = <200>;
465 qcom,id = <0>;
466 qcom,current = <120>;
467 };
468
469 pmi8937_torch1: qcom,torch_1 {
470 label = "torch";
471 qcom,led-name = "led:torch_1";
472 qcom,default-led-trigger =
473 "torch1_trigger";
474 qcom,max-current = <200>;
475 qcom,id = <1>;
476 qcom,current = <120>;
477 };
478
479 pmi8937_switch: qcom,switch {
480 label = "switch";
481 qcom,led-name = "led:switch";
482 qcom,default-led-trigger =
483 "switch_trigger";
484 qcom,max-current = <1000>;
485 qcom,duration = <1280>;
486 qcom,id = <2>;
487 qcom,current = <625>;
488 reg0 {
489 regulator-name = "pon_spare_reg";
490 };
491 };
492 };
493
494 pmi_haptic: qcom,haptic@c000 {
495 compatible = "qcom,qpnp-haptic";
496 reg = <0xc000 0x100>;
Tirupathi Reddyc971c3d2017-12-18 11:48:11 +0530497 interrupts = <0x3 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
498 <0x3 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
Tirupathi Reddy4a9ce7e2017-12-15 16:54:38 +0530499 interrupt-names = "sc-irq", "play-irq";
500 qcom,pmic-revid = <&pmi8937_revid>;
501 vcc_pon-supply = <&pon_perph_reg>;
502 qcom,play-mode = "direct";
503 qcom,wave-play-rate-us = <5263>;
504 qcom,actuator-type = "lra";
505 qcom,wave-shape = "square";
506 qcom,vmax-mv = <2000>;
507 qcom,ilim-ma = <800>;
508 qcom,sc-deb-cycles = <8>;
509 qcom,int-pwm-freq-khz = <505>;
510 qcom,en-brake;
511 qcom,brake-pattern = [03 03 00 00];
512 qcom,use-play-irq;
513 qcom,use-sc-irq;
514 qcom,wave-samples = [3e 3e 3e 3e 3e 3e 3e 3e];
515 qcom,wave-rep-cnt = <1>;
516 qcom,wave-samp-rep-cnt = <1>;
517 qcom,lra-auto-res-mode="qwd";
518 qcom,lra-high-z="opt1";
519 qcom,lra-res-cal-period = <4>;
520 qcom,correct-lra-drive-freq;
521 qcom,misc-trim-error-rc19p2-clk-reg-present;
522 };
523 };
524};