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