blob: 923804f49148ab36567e1fb2f18fd4bd538a9cad [file] [log] [blame]
David Collinsbbed9aa2017-03-10 11:53:10 -08001/* Copyright (c) 2016-2017, 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/spmi/spmi.h>
14#include <dt-bindings/interrupt-controller/irq.h>
15
16&spmi_bus {
17 qcom,pmi8998@2 {
18 compatible = "qcom,spmi-pmic";
19 reg = <0x2 SPMI_USID>;
20 #address-cells = <2>;
21 #size-cells = <0>;
22
23 pmi8998_revid: qcom,revid@100 {
24 compatible = "qcom,qpnp-revid";
25 reg = <0x100 0x100>;
26 qcom,fab-id-valid;
27 };
28
29 qcom,power-on@800 {
30 compatible = "qcom,qpnp-power-on";
31 reg = <0x800 0x100>;
32 };
33
34 qcom,temp-alarm@2400 {
35 compatible = "qcom,qpnp-temp-alarm";
36 reg = <0x2400 0x100>;
37 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
38 label = "pmi8998_tz";
39 };
40
Fenglin Wu5a50fc82017-03-22 12:27:31 +080041 pmi8998_gpios: pinctrl@c000 {
42 compatible = "qcom,spmi-gpio";
43 reg = <0xc000 0xe00>;
44 interrupts = <0x2 0xc0 0 IRQ_TYPE_NONE>,
45 <0x2 0xc1 0 IRQ_TYPE_NONE>,
46 <0x2 0xc2 0 IRQ_TYPE_NONE>,
47 <0x2 0xc4 0 IRQ_TYPE_NONE>,
48 <0x2 0xc5 0 IRQ_TYPE_NONE>,
49 <0x2 0xc7 0 IRQ_TYPE_NONE>,
50 <0x2 0xc8 0 IRQ_TYPE_NONE>,
51 <0x2 0xc9 0 IRQ_TYPE_NONE>,
52 <0x2 0xca 0 IRQ_TYPE_NONE>,
53 <0x2 0xcb 0 IRQ_TYPE_NONE>,
54 <0x2 0xcd 0 IRQ_TYPE_NONE>;
55 interrupt-names = "pmi8998_gpio1", "pmi8998_gpio2",
56 "pmi8998_gpio3", "pmi8998_gpio5",
57 "pmi8998_gpio6", "pmi8998_gpio8",
58 "pmi8998_gpio9", "pmi8998_gpio10",
59 "pmi8998_gpio11", "pmi8998_gpio12",
60 "pmi8998_gpio14";
David Collinsbbed9aa2017-03-10 11:53:10 -080061 gpio-controller;
62 #gpio-cells = <2>;
Fenglin Wu5a50fc82017-03-22 12:27:31 +080063 qcom,gpios-disallowed = <4 7 13>;
David Collinsbbed9aa2017-03-10 11:53:10 -080064 };
65
Harry Yang67111662017-04-05 15:14:52 -070066 qcom,qpnp-qnovo@1500 {
67 compatible = "qcom,qpnp-qnovo";
68 reg = <0x1500 0x100>;
69 interrupts = <0x2 0x15 0x0 IRQ_TYPE_NONE>;
70 interrupt-names = "ptrain-done";
71 qcom,pmic-revid = <&pmi8998_revid>;
72 };
73
74 pmi8998_charger: qcom,qpnp-smb2 {
75 compatible = "qcom,qpnp-smb2";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 qcom,pmic-revid = <&pmi8998_revid>;
80
81 io-channels = <&pmi8998_rradc 8>,
82 <&pmi8998_rradc 10>,
83 <&pmi8998_rradc 3>,
84 <&pmi8998_rradc 4>;
85 io-channel-names = "charger_temp",
86 "charger_temp_max",
87 "usbin_i",
88 "usbin_v";
89
90 qcom,boost-threshold-ua = <100000>;
91 qcom,wipower-max-uw = <5000000>;
92
93 qcom,thermal-mitigation
94 = <3000000 1500000 1000000 500000>;
95
96 qcom,chgr@1000 {
97 reg = <0x1000 0x100>;
98 interrupts =
99 <0x2 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
100 <0x2 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
101 <0x2 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
102 <0x2 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
103 <0x2 0x10 0x4 IRQ_TYPE_EDGE_RISING>;
104
105 interrupt-names = "chg-error",
106 "chg-state-change",
107 "step-chg-state-change",
108 "step-chg-soc-update-fail",
109 "step-chg-soc-update-request";
110 };
111
112 qcom,otg@1100 {
113 reg = <0x1100 0x100>;
114 interrupts = <0x2 0x11 0x0 IRQ_TYPE_EDGE_BOTH>,
115 <0x2 0x11 0x1 IRQ_TYPE_EDGE_BOTH>,
116 <0x2 0x11 0x2 IRQ_TYPE_EDGE_BOTH>,
117 <0x2 0x11 0x3 IRQ_TYPE_EDGE_BOTH>;
118
119 interrupt-names = "otg-fail",
120 "otg-overcurrent",
121 "otg-oc-dis-sw-sts",
122 "testmode-change-detect";
123 };
124
125 qcom,bat-if@1200 {
126 reg = <0x1200 0x100>;
127 interrupts =
128 <0x2 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
129 <0x2 0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
130 <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
131 <0x2 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
132 <0x2 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
133 <0x2 0x12 0x5 IRQ_TYPE_EDGE_BOTH>;
134
135 interrupt-names = "bat-temp",
136 "bat-ocp",
137 "bat-ov",
138 "bat-low",
139 "bat-therm-or-id-missing",
140 "bat-terminal-missing";
141 };
142
143 qcom,usb-chgpth@1300 {
144 reg = <0x1300 0x100>;
145 interrupts =
146 <0x2 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
147 <0x2 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
148 <0x2 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
149 <0x2 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
150 <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
151 <0x2 0x13 0x5 IRQ_TYPE_EDGE_RISING>,
152 <0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
153 <0x2 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
154
155 interrupt-names = "usbin-collapse",
156 "usbin-lt-3p6v",
157 "usbin-uv",
158 "usbin-ov",
159 "usbin-plugin",
160 "usbin-src-change",
161 "usbin-icl-change",
162 "type-c-change";
163 };
164
165 qcom,dc-chgpth@1400 {
166 reg = <0x1400 0x100>;
167 interrupts =
168 <0x2 0x14 0x0 IRQ_TYPE_EDGE_BOTH>,
169 <0x2 0x14 0x1 IRQ_TYPE_EDGE_BOTH>,
170 <0x2 0x14 0x2 IRQ_TYPE_EDGE_BOTH>,
171 <0x2 0x14 0x3 IRQ_TYPE_EDGE_BOTH>,
172 <0x2 0x14 0x4 IRQ_TYPE_EDGE_BOTH>,
173 <0x2 0x14 0x5 IRQ_TYPE_EDGE_BOTH>,
174 <0x2 0x14 0x6 IRQ_TYPE_EDGE_RISING>;
175
176 interrupt-names = "dcin-collapse",
177 "dcin-lt-3p6v",
178 "dcin-uv",
179 "dcin-ov",
180 "dcin-plugin",
181 "div2-en-dg",
182 "dcin-icl-change";
183 };
184
185 qcom,chgr-misc@1600 {
186 reg = <0x1600 0x100>;
187 interrupts =
188 <0x2 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
189 <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
190 <0x2 0x16 0x2 IRQ_TYPE_EDGE_BOTH>,
191 <0x2 0x16 0x3 IRQ_TYPE_EDGE_BOTH>,
192 <0x2 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
193 <0x2 0x16 0x5 IRQ_TYPE_EDGE_BOTH>,
194 <0x2 0x16 0x6 IRQ_TYPE_EDGE_FALLING>,
195 <0x2 0x16 0x7 IRQ_TYPE_EDGE_BOTH>;
196
197 interrupt-names = "wdog-snarl",
198 "wdog-bark",
199 "aicl-fail",
200 "aicl-done",
201 "high-duty-cycle",
202 "input-current-limiting",
203 "temperature-change",
204 "switcher-power-ok";
205 };
206 };
207
Jack Phamaf5edc82017-03-30 17:26:02 -0700208 pmi8998_pdphy: qcom,usb-pdphy@1700 {
209 compatible = "qcom,qpnp-pdphy";
210 reg = <0x1700 0x100>;
211 vdd-pdphy-supply = <&pm8998_l24>;
212 vbus-supply = <&smb2_vbus>;
213 vconn-supply = <&smb2_vconn>;
214 interrupts = <0x2 0x17 0x0 IRQ_TYPE_EDGE_RISING>,
215 <0x2 0x17 0x1 IRQ_TYPE_EDGE_RISING>,
216 <0x2 0x17 0x2 IRQ_TYPE_EDGE_RISING>,
217 <0x2 0x17 0x3 IRQ_TYPE_EDGE_RISING>,
218 <0x2 0x17 0x4 IRQ_TYPE_EDGE_RISING>,
219 <0x2 0x17 0x5 IRQ_TYPE_EDGE_RISING>,
220 <0x2 0x17 0x6 IRQ_TYPE_EDGE_RISING>;
221
222 interrupt-names = "sig-tx",
223 "sig-rx",
224 "msg-tx",
225 "msg-rx",
226 "msg-tx-failed",
227 "msg-tx-discarded",
228 "msg-rx-discarded";
229
230 qcom,default-sink-caps = <5000 3000>, /* 5V @ 3A */
231 <9000 3000>, /* 9V @ 3A */
232 <12000 2250>; /* 12V @ 2.25A */
233 };
234
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600235 bcl_sensor: bcl@4200 {
236 compatible = "qcom,msm-bcl-lmh";
237 reg = <0x4200 0xff>,
238 <0x4300 0xff>;
239 reg-names = "fg_user_adc",
240 "fg_lmh";
241 interrupts = <0x2 0x42 0x0 IRQ_TYPE_NONE>,
242 <0x2 0x42 0x1 IRQ_TYPE_NONE>,
243 <0x2 0x42 0x2 IRQ_TYPE_NONE>,
244 <0x2 0x42 0x3 IRQ_TYPE_NONE>,
245 <0x2 0x42 0x4 IRQ_TYPE_NONE>;
246 interrupt-names = "bcl-high-ibat",
247 "bcl-very-high-ibat",
248 "bcl-low-vbat",
249 "bcl-very-low-vbat",
250 "bcl-crit-low-vbat";
251 #thermal-sensor-cells = <1>;
252 };
253
David Collinsbbed9aa2017-03-10 11:53:10 -0800254 pmi8998_rradc: rradc@4500 {
255 compatible = "qcom,rradc";
256 reg = <0x4500 0x100>;
257 #address-cells = <1>;
258 #size-cells = <0>;
259 #io-channel-cells = <1>;
260 qcom,pmic-revid = <&pmi8998_revid>;
261 };
Harry Yang67111662017-04-05 15:14:52 -0700262
263 pmi8998_fg: qpnp,fg {
264 compatible = "qcom,fg-gen3";
265 #address-cells = <1>;
266 #size-cells = <1>;
267 qcom,pmic-revid = <&pmi8998_revid>;
268 io-channels = <&pmi8998_rradc 0>;
269 io-channel-names = "rradc_batt_id";
270 qcom,rradc-base = <0x4500>;
271 qcom,fg-esr-timer-awake = <96>;
272 qcom,fg-esr-timer-asleep = <256>;
273 qcom,cycle-counter-en;
274 status = "okay";
275
276 qcom,fg-batt-soc@4000 {
277 status = "okay";
278 reg = <0x4000 0x100>;
279 interrupts = <0x2 0x40 0x0 IRQ_TYPE_EDGE_BOTH>,
280 <0x2 0x40 0x1 IRQ_TYPE_EDGE_BOTH>,
281 <0x2 0x40 0x2
282 IRQ_TYPE_EDGE_RISING>,
283 <0x2 0x40 0x3
284 IRQ_TYPE_EDGE_RISING>,
285 <0x2 0x40 0x4 IRQ_TYPE_EDGE_BOTH>,
286 <0x2 0x40 0x5
287 IRQ_TYPE_EDGE_RISING>,
288 <0x2 0x40 0x6 IRQ_TYPE_EDGE_BOTH>,
289 <0x2 0x40 0x7 IRQ_TYPE_EDGE_BOTH>;
290 interrupt-names = "soc-update",
291 "soc-ready",
292 "bsoc-delta",
293 "msoc-delta",
294 "msoc-low",
295 "msoc-empty",
296 "msoc-high",
297 "msoc-full";
298 };
299
300 qcom,fg-batt-info@4100 {
301 status = "okay";
302 reg = <0x4100 0x100>;
303 interrupts = <0x2 0x41 0x0 IRQ_TYPE_EDGE_BOTH>,
304 <0x2 0x41 0x1 IRQ_TYPE_EDGE_BOTH>,
305 <0x2 0x41 0x2 IRQ_TYPE_EDGE_BOTH>,
306 <0x2 0x41 0x3 IRQ_TYPE_EDGE_BOTH>,
307 <0x2 0x41 0x6 IRQ_TYPE_EDGE_BOTH>;
308 interrupt-names = "vbatt-pred-delta",
309 "vbatt-low",
310 "esr-delta",
311 "batt-missing",
312 "batt-temp-delta";
313 };
314
315 qcom,fg-memif@4400 {
316 status = "okay";
317 reg = <0x4400 0x100>;
318 interrupts = <0x2 0x44 0x0 IRQ_TYPE_EDGE_BOTH>,
319 <0x2 0x44 0x1 IRQ_TYPE_EDGE_BOTH>,
320 <0x2 0x44 0x2 IRQ_TYPE_EDGE_BOTH>;
321 interrupt-names = "ima-rdy",
322 "mem-xcp",
323 "dma-grant";
324 };
325 };
David Collinsbbed9aa2017-03-10 11:53:10 -0800326 };
327
328 qcom,pmi8998@3 {
329 compatible ="qcom,spmi-pmic";
330 reg = <0x3 SPMI_USID>;
331 #address-cells = <2>;
332 #size-cells = <0>;
333
334 pmi8998_pwm_1: pwm@b100 {
335 compatible = "qcom,qpnp-pwm";
336 reg = <0xb100 0x100>,
337 <0xb042 0x7e>;
338 reg-names = "qpnp-lpg-channel-base",
339 "qpnp-lpg-lut-base";
340 qcom,lpg-lut-size = <0x7e>;
341 qcom,channel-id = <1>;
342 qcom,supported-sizes = <6>, <9>;
343 qcom,ramp-index = <0>;
344 #pwm-cells = <2>;
345 status = "disabled";
346 };
347
348 pmi8998_pwm_2: pwm@b200 {
349 compatible = "qcom,qpnp-pwm";
350 reg = <0xb200 0x100>,
351 <0xb042 0x7e>;
352 reg-names = "qpnp-lpg-channel-base",
353 "qpnp-lpg-lut-base";
354 qcom,lpg-lut-size = <0x7e>;
355 qcom,channel-id = <2>;
356 qcom,supported-sizes = <6>, <9>;
357 qcom,ramp-index = <1>;
358 #pwm-cells = <2>;
359 status = "disabled";
360 };
361
362 pmi8998_pwm_3: pwm@b300 {
363 compatible = "qcom,qpnp-pwm";
364 reg = <0xb300 0x100>,
365 <0xb042 0x7e>;
366 reg-names = "qpnp-lpg-channel-base",
367 "qpnp-lpg-lut-base";
368 qcom,lpg-lut-size = <0x7e>;
369 qcom,channel-id = <3>;
370 qcom,supported-sizes = <6>, <9>;
371 qcom,ramp-index = <2>;
372 #pwm-cells = <2>;
373 };
374
375 pmi8998_pwm_4: pwm@b400 {
376 compatible = "qcom,qpnp-pwm";
377 reg = <0xb400 0x100>,
378 <0xb042 0x7e>;
379 reg-names = "qpnp-lpg-channel-base",
380 "qpnp-lpg-lut-base";
381 qcom,lpg-lut-size = <0x7e>;
382 qcom,channel-id = <4>;
383 qcom,supported-sizes = <6>, <9>;
384 qcom,ramp-index = <3>;
385 #pwm-cells = <2>;
386 };
387
388 pmi8998_pwm_5: pwm@b500 {
389 compatible = "qcom,qpnp-pwm";
390 reg = <0xb500 0x100>,
391 <0xb042 0x7e>;
392 reg-names = "qpnp-lpg-channel-base",
393 "qpnp-lpg-lut-base";
394 qcom,lpg-lut-size = <0x7e>;
395 qcom,channel-id = <5>;
396 qcom,supported-sizes = <6>, <9>;
397 qcom,ramp-index = <4>;
398 #pwm-cells = <2>;
399 };
400
401 pmi8998_pwm_6: pwm@b600 {
402 compatible = "qcom,qpnp-pwm";
403 reg = <0xb600 0x100>,
404 <0xb042 0x7e>;
405 reg-names = "qpnp-lpg-channel-base",
406 "qpnp-lpg-lut-base";
407 qcom,lpg-lut-size = <0x7e>;
408 qcom,channel-id = <6>;
409 qcom,supported-sizes = <6>, <9>;
410 qcom,ramp-index = <5>;
411 #pwm-cells = <2>;
412 status = "disabled";
413 };
414
415 qcom,leds@d000 {
416 compatible = "qcom,leds-qpnp";
417 reg = <0xd000 0x100>;
418 label = "rgb";
419 status = "okay";
420
421 red_led: qcom,rgb_0 {
422 label = "rgb";
423 qcom,id = <3>;
424 qcom,mode = "pwm";
425 pwms = <&pmi8998_pwm_5 0 0>;
426 qcom,pwm-us = <1000>;
427 qcom,max-current = <12>;
428 qcom,default-state = "off";
429 linux,name = "red";
430 linux,default-trigger = "battery-charging";
431 };
432
433 green_led: qcom,rgb_1 {
434 label = "rgb";
435 qcom,id = <4>;
436 qcom,mode = "pwm";
437 pwms = <&pmi8998_pwm_4 0 0>;
438 qcom,pwm-us = <1000>;
439 qcom,max-current = <12>;
440 qcom,default-state = "off";
441 linux,name = "green";
442 linux,default-trigger = "battery-full";
443 };
444
445 blue_led: qcom,rgb_2 {
446 label = "rgb";
447 qcom,id = <5>;
448 qcom,mode = "pwm";
449 pwms = <&pmi8998_pwm_3 0 0>;
450 qcom,pwm-us = <1000>;
451 qcom,max-current = <12>;
452 qcom,default-state = "off";
453 linux,name = "blue";
454 linux,default-trigger = "boot-indication";
455 };
456 };
457
458 labibb: qpnp-labibb-regulator {
459 compatible = "qcom,qpnp-labibb-regulator";
460 #address-cells = <1>;
461 #size-cells = <1>;
462 qcom,pmic-revid = <&pmi8998_revid>;
463 status = "disabled";
464
465 ibb_regulator: qcom,ibb@dc00 {
466 reg = <0xdc00 0x100>;
467 reg-names = "ibb_reg";
468 regulator-name = "ibb_reg";
469
470 regulator-min-microvolt = <4600000>;
471 regulator-max-microvolt = <6000000>;
472
473 qcom,qpnp-ibb-min-voltage = <1400000>;
474 qcom,qpnp-ibb-step-size = <100000>;
475 qcom,qpnp-ibb-slew-rate = <2000000>;
476 qcom,qpnp-ibb-use-default-voltage;
477 qcom,qpnp-ibb-init-voltage = <5500000>;
478 qcom,qpnp-ibb-init-amoled-voltage = <4000000>;
479 qcom,qpnp-ibb-init-lcd-voltage = <5500000>;
480
481 qcom,qpnp-ibb-soft-start = <1000>;
482
483 qcom,qpnp-ibb-lab-pwrup-delay = <8000>;
484 qcom,qpnp-ibb-lab-pwrdn-delay = <8000>;
485 qcom,qpnp-ibb-en-discharge;
486
487 qcom,qpnp-ibb-full-pull-down;
488 qcom,qpnp-ibb-pull-down-enable;
489 qcom,qpnp-ibb-switching-clock-frequency =
490 <1480>;
491 qcom,qpnp-ibb-limit-maximum-current = <1550>;
492 qcom,qpnp-ibb-debounce-cycle = <16>;
493 qcom,qpnp-ibb-limit-max-current-enable;
494 qcom,qpnp-ibb-ps-enable;
495 };
496
497 lab_regulator: qcom,lab@de00 {
498 reg = <0xde00 0x100>;
499 reg-names = "lab";
500 regulator-name = "lab_reg";
501
502 regulator-min-microvolt = <4600000>;
503 regulator-max-microvolt = <6000000>;
504
505 interrupts = <0x3 0xde 0x0
506 IRQ_TYPE_EDGE_RISING>;
507 interrupt-names = "lab-vreg-ok";
508 qcom,qpnp-lab-min-voltage = <4600000>;
509 qcom,qpnp-lab-step-size = <100000>;
510 qcom,qpnp-lab-slew-rate = <5000>;
511 qcom,qpnp-lab-use-default-voltage;
512 qcom,qpnp-lab-init-voltage = <5500000>;
513 qcom,qpnp-lab-init-amoled-voltage = <4600000>;
514 qcom,qpnp-lab-init-lcd-voltage = <5500000>;
515
516 qcom,qpnp-lab-soft-start = <800>;
517
518 qcom,qpnp-lab-full-pull-down;
519 qcom,qpnp-lab-pull-down-enable;
520 qcom,qpnp-lab-switching-clock-frequency =
521 <1600>;
522 qcom,qpnp-lab-limit-maximum-current = <1600>;
523 qcom,qpnp-lab-limit-max-current-enable;
524 qcom,qpnp-lab-ps-threshold = <20>;
525 qcom,qpnp-lab-ps-enable;
526 qcom,qpnp-lab-nfet-size = <100>;
527 qcom,qpnp-lab-pfet-size = <100>;
528 qcom,qpnp-lab-max-precharge-time = <500>;
529 };
530 };
531
532 pmi8998_wled: qcom,leds@d800 {
533 compatible = "qcom,qpnp-wled";
534 reg = <0xd800 0x100>,
535 <0xd900 0x100>;
536 reg-names = "qpnp-wled-ctrl-base",
537 "qpnp-wled-sink-base";
538 interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>,
539 <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
540 interrupt-names = "ovp-irq", "sc-irq";
541 linux,name = "wled";
542 linux,default-trigger = "bkl-trigger";
543 qcom,fdbk-output = "auto";
544 qcom,vref-uv = <127500>;
545 qcom,switch-freq-khz = <800>;
546 qcom,ovp-mv = <29600>;
547 qcom,ilim-ma = <970>;
548 qcom,boost-duty-ns = <26>;
549 qcom,mod-freq-khz = <9600>;
550 qcom,dim-mode = "hybrid";
551 qcom,hyb-thres = <625>;
552 qcom,sync-dly-us = <800>;
553 qcom,fs-curr-ua = <25000>;
554 qcom,cons-sync-write-delay-us = <1000>;
555 qcom,led-strings-list = [00 01 02 03];
556 qcom,en-ext-pfet-sc-pro;
557 qcom,pmic-revid = <&pmi8998_revid>;
558 qcom,loop-auto-gm-en;
Subbaraman Narayanamurthy1f92fc12017-03-30 15:41:45 -0700559 status = "disabled";
David Collinsbbed9aa2017-03-10 11:53:10 -0800560 };
561
562 flash_led: qcom,leds@d300 {
563 compatible = "qcom,qpnp-flash-led-v2";
564 status = "okay";
565 reg = <0xd300 0x100>;
566 label = "flash";
567 interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>,
568 <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>,
569 <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>;
570 interrupt-names = "led-fault-irq",
571 "all-ramp-down-done-irq",
572 "all-ramp-up-done-irq";
573 qcom,hdrm-auto-mode;
574 qcom,short-circuit-det;
575 qcom,open-circuit-det;
576 qcom,vph-droop-det;
577 qcom,thermal-derate-en;
578 qcom,thermal-derate-current = <200 500 1000>;
579 qcom,isc-delay = <192>;
580 qcom,pmic-revid = <&pmi8998_revid>;
581
582 pmi8998_flash0: qcom,flash_0 {
583 label = "flash";
584 qcom,led-name = "led:flash_0";
585 qcom,max-current = <1500>;
586 qcom,default-led-trigger = "flash0_trigger";
587 qcom,id = <0>;
588 qcom,current-ma = <1000>;
589 qcom,duration-ms = <1280>;
590 qcom,ires-ua = <12500>;
591 qcom,hdrm-voltage-mv = <325>;
592 qcom,hdrm-vol-hi-lo-win-mv = <100>;
593 };
594
595 pmi8998_flash1: qcom,flash_1 {
596 label = "flash";
597 qcom,led-name = "led:flash_1";
598 qcom,max-current = <1500>;
599 qcom,default-led-trigger = "flash1_trigger";
600 qcom,id = <1>;
601 qcom,current-ma = <1000>;
602 qcom,duration-ms = <1280>;
603 qcom,ires-ua = <12500>;
604 qcom,hdrm-voltage-mv = <325>;
605 qcom,hdrm-vol-hi-lo-win-mv = <100>;
606 };
607
608 pmi8998_flash2: qcom,flash_2 {
609 label = "flash";
610 qcom,led-name = "led:flash_2";
611 qcom,max-current = <750>;
612 qcom,default-led-trigger = "flash2_trigger";
613 qcom,id = <2>;
614 qcom,current-ma = <500>;
615 qcom,duration-ms = <1280>;
616 qcom,ires-ua = <12500>;
617 qcom,hdrm-voltage-mv = <325>;
618 qcom,hdrm-vol-hi-lo-win-mv = <100>;
619 };
620
621 pmi8998_torch0: qcom,torch_0 {
622 label = "torch";
623 qcom,led-name = "led:torch_0";
624 qcom,max-current = <500>;
625 qcom,default-led-trigger = "torch0_trigger";
626 qcom,id = <0>;
627 qcom,current-ma = <300>;
628 qcom,ires-ua = <12500>;
629 qcom,hdrm-voltage-mv = <325>;
630 qcom,hdrm-vol-hi-lo-win-mv = <100>;
631 };
632
633 pmi8998_torch1: qcom,torch_1 {
634 label = "torch";
635 qcom,led-name = "led:torch_1";
636 qcom,max-current = <500>;
637 qcom,default-led-trigger = "torch1_trigger";
638 qcom,id = <1>;
639 qcom,current-ma = <300>;
640 qcom,ires-ua = <12500>;
641 qcom,hdrm-voltage-mv = <325>;
642 qcom,hdrm-vol-hi-lo-win-mv = <100>;
643 };
644
645 pmi8998_torch2: qcom,torch_2 {
646 label = "torch";
647 qcom,led-name = "led:torch_2";
648 qcom,max-current = <500>;
649 qcom,default-led-trigger = "torch2_trigger";
650 qcom,id = <2>;
651 qcom,current-ma = <300>;
652 qcom,ires-ua = <12500>;
653 qcom,hdrm-voltage-mv = <325>;
654 qcom,hdrm-vol-hi-lo-win-mv = <100>;
655 };
656
657 pmi8998_switch0: qcom,led_switch_0 {
658 label = "switch";
659 qcom,led-name = "led:switch_0";
660 qcom,led-mask = <3>;
661 qcom,default-led-trigger = "switch0_trigger";
662 };
663
664 pmi8998_switch1: qcom,led_switch_1 {
665 label = "switch";
666 qcom,led-name = "led:switch_1";
667 qcom,led-mask = <4>;
668 qcom,default-led-trigger = "switch1_trigger";
669 };
670 };
671 };
672};
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600673
674&thermal_zones {
675 ibat-high {
676 polling-delay-passive = <0>;
677 polling-delay = <0>;
678 thermal-governor = "step_wise";
679 thermal-sensors = <&bcl_sensor 0>;
680
681 trips {
682 ibat_high: low-ibat {
683 temperature = <4200>;
684 hysteresis = <200>;
685 type = "passive";
686 };
687 };
688 };
689 ibat-vhigh {
690 polling-delay-passive = <0>;
691 polling-delay = <0>;
692 thermal-governor = "step_wise";
693 thermal-sensors = <&bcl_sensor 1>;
694
695 trips {
696 ibat_vhigh: ibat_vhigh {
697 temperature = <4300>;
698 hysteresis = <100>;
699 type = "passive";
700 };
701 };
702 };
703 vbat {
704 polling-delay-passive = <100>;
705 polling-delay = <0>;
706 thermal-governor = "low_limits_cap";
707 thermal-sensors = <&bcl_sensor 2>;
708 tracks-low;
709
710 trips {
711 low_vbat: low-vbat {
712 temperature = <3300>;
713 hysteresis = <100>;
714 type = "passive";
715 };
716 };
717 cooling-maps {
718 vbat_cpu4 {
719 trip = <&low_vbat>;
720 cooling-device = <&CPU4 22 22>;
721 };
722 vbat_cpu5 {
723 trip = <&low_vbat>;
724 cooling-device = <&CPU5 22 22>;
725 };
726 vbat_map6 {
727 trip = <&low_vbat>;
728 cooling-device = <&CPU6 22 22>;
729 };
730 vbat_map7 {
731 trip = <&low_vbat>;
732 cooling-device = <&CPU7 22 22>;
733 };
734 };
735 };
736 vbat_low {
737 polling-delay-passive = <0>;
738 polling-delay = <0>;
739 thermal-governor = "low_limits_cap";
740 thermal-sensors = <&bcl_sensor 3>;
741 tracks-low;
742
743 trips {
744 low-vbat {
745 temperature = <3100>;
746 hysteresis = <0>;
747 type = "passive";
748 };
749 };
750 };
751 vbat_too_low {
752 polling-delay-passive = <0>;
753 polling-delay = <0>;
754 thermal-governor = "low_limits_cap";
755 thermal-sensors = <&bcl_sensor 4>;
756 tracks-low;
757
758 trips {
759 low-vbat {
760 temperature = <2900>;
761 hysteresis = <0>;
762 type = "passive";
763 };
764 };
765 };
766 soc {
767 polling-delay-passive = <100>;
768 polling-delay = <0>;
769 thermal-governor = "low_limits_cap";
770 thermal-sensors = <&bcl_sensor 5>;
771 tracks-low;
772
773 trips {
774 low_soc: low-soc {
775 temperature = <10>;
776 hysteresis = <0>;
777 type = "passive";
778 };
779 };
780 cooling-maps {
781 soc_cpu4 {
782 trip = <&low_soc>;
783 cooling-device = <&CPU4 22 22>;
784 };
785 soc_cpu5 {
786 trip = <&low_soc>;
787 cooling-device = <&CPU5 22 22>;
788 };
789 soc_map6 {
790 trip = <&low_soc>;
791 cooling-device = <&CPU6 22 22>;
792 };
793 soc_map7 {
794 trip = <&low_soc>;
795 cooling-device = <&CPU7 22 22>;
796 };
797 };
798 };
799};