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