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