blob: a8b826a0c0387e6d66b89f2aec3e4d1f0227f04f [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
Harry Yang67111662017-04-05 15:14:52 -070074 qcom,qpnp-qnovo@1500 {
75 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>,
331 <0x2 0x44 0x2 IRQ_TYPE_EDGE_BOTH>;
332 interrupt-names = "ima-rdy",
333 "mem-xcp",
334 "dma-grant";
335 };
336 };
David Collinsbbed9aa2017-03-10 11:53:10 -0800337 };
338
David Collinsde33ee92017-07-12 11:55:32 -0700339 pmi8998_lsid1: qcom,pmi8998@3 {
David Collinsbbed9aa2017-03-10 11:53:10 -0800340 compatible ="qcom,spmi-pmic";
341 reg = <0x3 SPMI_USID>;
342 #address-cells = <2>;
343 #size-cells = <0>;
344
345 pmi8998_pwm_1: pwm@b100 {
346 compatible = "qcom,qpnp-pwm";
347 reg = <0xb100 0x100>,
348 <0xb042 0x7e>;
349 reg-names = "qpnp-lpg-channel-base",
350 "qpnp-lpg-lut-base";
351 qcom,lpg-lut-size = <0x7e>;
352 qcom,channel-id = <1>;
353 qcom,supported-sizes = <6>, <9>;
354 qcom,ramp-index = <0>;
355 #pwm-cells = <2>;
356 status = "disabled";
357 };
358
359 pmi8998_pwm_2: pwm@b200 {
360 compatible = "qcom,qpnp-pwm";
361 reg = <0xb200 0x100>,
362 <0xb042 0x7e>;
363 reg-names = "qpnp-lpg-channel-base",
364 "qpnp-lpg-lut-base";
365 qcom,lpg-lut-size = <0x7e>;
366 qcom,channel-id = <2>;
367 qcom,supported-sizes = <6>, <9>;
368 qcom,ramp-index = <1>;
369 #pwm-cells = <2>;
370 status = "disabled";
371 };
372
373 pmi8998_pwm_3: pwm@b300 {
374 compatible = "qcom,qpnp-pwm";
375 reg = <0xb300 0x100>,
376 <0xb042 0x7e>;
377 reg-names = "qpnp-lpg-channel-base",
378 "qpnp-lpg-lut-base";
379 qcom,lpg-lut-size = <0x7e>;
380 qcom,channel-id = <3>;
381 qcom,supported-sizes = <6>, <9>;
382 qcom,ramp-index = <2>;
383 #pwm-cells = <2>;
384 };
385
386 pmi8998_pwm_4: pwm@b400 {
387 compatible = "qcom,qpnp-pwm";
388 reg = <0xb400 0x100>,
389 <0xb042 0x7e>;
390 reg-names = "qpnp-lpg-channel-base",
391 "qpnp-lpg-lut-base";
392 qcom,lpg-lut-size = <0x7e>;
393 qcom,channel-id = <4>;
394 qcom,supported-sizes = <6>, <9>;
395 qcom,ramp-index = <3>;
396 #pwm-cells = <2>;
397 };
398
399 pmi8998_pwm_5: pwm@b500 {
400 compatible = "qcom,qpnp-pwm";
401 reg = <0xb500 0x100>,
402 <0xb042 0x7e>;
403 reg-names = "qpnp-lpg-channel-base",
404 "qpnp-lpg-lut-base";
405 qcom,lpg-lut-size = <0x7e>;
406 qcom,channel-id = <5>;
407 qcom,supported-sizes = <6>, <9>;
408 qcom,ramp-index = <4>;
409 #pwm-cells = <2>;
410 };
411
412 pmi8998_pwm_6: pwm@b600 {
413 compatible = "qcom,qpnp-pwm";
414 reg = <0xb600 0x100>,
415 <0xb042 0x7e>;
416 reg-names = "qpnp-lpg-channel-base",
417 "qpnp-lpg-lut-base";
418 qcom,lpg-lut-size = <0x7e>;
419 qcom,channel-id = <6>;
420 qcom,supported-sizes = <6>, <9>;
421 qcom,ramp-index = <5>;
422 #pwm-cells = <2>;
423 status = "disabled";
424 };
425
426 qcom,leds@d000 {
427 compatible = "qcom,leds-qpnp";
428 reg = <0xd000 0x100>;
429 label = "rgb";
430 status = "okay";
431
432 red_led: qcom,rgb_0 {
433 label = "rgb";
434 qcom,id = <3>;
435 qcom,mode = "pwm";
436 pwms = <&pmi8998_pwm_5 0 0>;
437 qcom,pwm-us = <1000>;
438 qcom,max-current = <12>;
439 qcom,default-state = "off";
440 linux,name = "red";
David Collinsbbed9aa2017-03-10 11:53:10 -0800441 };
442
443 green_led: qcom,rgb_1 {
444 label = "rgb";
445 qcom,id = <4>;
446 qcom,mode = "pwm";
447 pwms = <&pmi8998_pwm_4 0 0>;
448 qcom,pwm-us = <1000>;
449 qcom,max-current = <12>;
450 qcom,default-state = "off";
451 linux,name = "green";
David Collinsbbed9aa2017-03-10 11:53:10 -0800452 };
453
454 blue_led: qcom,rgb_2 {
455 label = "rgb";
456 qcom,id = <5>;
457 qcom,mode = "pwm";
458 pwms = <&pmi8998_pwm_3 0 0>;
459 qcom,pwm-us = <1000>;
460 qcom,max-current = <12>;
461 qcom,default-state = "off";
462 linux,name = "blue";
David Collinsbbed9aa2017-03-10 11:53:10 -0800463 };
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;
Anirudh Ghayalf2e640c2017-08-13 06:35:08 +0530567 qcom,auto-calibration-enable;
Subbaraman Narayanamurthy1f92fc12017-03-30 15:41:45 -0700568 status = "disabled";
David Collinsbbed9aa2017-03-10 11:53:10 -0800569 };
570
571 flash_led: qcom,leds@d300 {
572 compatible = "qcom,qpnp-flash-led-v2";
573 status = "okay";
574 reg = <0xd300 0x100>;
575 label = "flash";
576 interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>,
577 <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>,
578 <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>;
579 interrupt-names = "led-fault-irq",
580 "all-ramp-down-done-irq",
581 "all-ramp-up-done-irq";
582 qcom,hdrm-auto-mode;
583 qcom,short-circuit-det;
584 qcom,open-circuit-det;
585 qcom,vph-droop-det;
586 qcom,thermal-derate-en;
587 qcom,thermal-derate-current = <200 500 1000>;
588 qcom,isc-delay = <192>;
589 qcom,pmic-revid = <&pmi8998_revid>;
590
591 pmi8998_flash0: qcom,flash_0 {
592 label = "flash";
593 qcom,led-name = "led:flash_0";
594 qcom,max-current = <1500>;
595 qcom,default-led-trigger = "flash0_trigger";
596 qcom,id = <0>;
597 qcom,current-ma = <1000>;
598 qcom,duration-ms = <1280>;
599 qcom,ires-ua = <12500>;
600 qcom,hdrm-voltage-mv = <325>;
601 qcom,hdrm-vol-hi-lo-win-mv = <100>;
602 };
603
604 pmi8998_flash1: qcom,flash_1 {
605 label = "flash";
606 qcom,led-name = "led:flash_1";
607 qcom,max-current = <1500>;
608 qcom,default-led-trigger = "flash1_trigger";
609 qcom,id = <1>;
610 qcom,current-ma = <1000>;
611 qcom,duration-ms = <1280>;
612 qcom,ires-ua = <12500>;
613 qcom,hdrm-voltage-mv = <325>;
614 qcom,hdrm-vol-hi-lo-win-mv = <100>;
615 };
616
617 pmi8998_flash2: qcom,flash_2 {
618 label = "flash";
619 qcom,led-name = "led:flash_2";
620 qcom,max-current = <750>;
621 qcom,default-led-trigger = "flash2_trigger";
622 qcom,id = <2>;
623 qcom,current-ma = <500>;
624 qcom,duration-ms = <1280>;
625 qcom,ires-ua = <12500>;
626 qcom,hdrm-voltage-mv = <325>;
627 qcom,hdrm-vol-hi-lo-win-mv = <100>;
628 };
629
630 pmi8998_torch0: qcom,torch_0 {
631 label = "torch";
632 qcom,led-name = "led:torch_0";
633 qcom,max-current = <500>;
634 qcom,default-led-trigger = "torch0_trigger";
635 qcom,id = <0>;
636 qcom,current-ma = <300>;
637 qcom,ires-ua = <12500>;
638 qcom,hdrm-voltage-mv = <325>;
639 qcom,hdrm-vol-hi-lo-win-mv = <100>;
640 };
641
642 pmi8998_torch1: qcom,torch_1 {
643 label = "torch";
644 qcom,led-name = "led:torch_1";
645 qcom,max-current = <500>;
646 qcom,default-led-trigger = "torch1_trigger";
647 qcom,id = <1>;
648 qcom,current-ma = <300>;
649 qcom,ires-ua = <12500>;
650 qcom,hdrm-voltage-mv = <325>;
651 qcom,hdrm-vol-hi-lo-win-mv = <100>;
652 };
653
654 pmi8998_torch2: qcom,torch_2 {
655 label = "torch";
656 qcom,led-name = "led:torch_2";
657 qcom,max-current = <500>;
658 qcom,default-led-trigger = "torch2_trigger";
659 qcom,id = <2>;
660 qcom,current-ma = <300>;
661 qcom,ires-ua = <12500>;
662 qcom,hdrm-voltage-mv = <325>;
663 qcom,hdrm-vol-hi-lo-win-mv = <100>;
664 };
665
666 pmi8998_switch0: qcom,led_switch_0 {
667 label = "switch";
668 qcom,led-name = "led:switch_0";
669 qcom,led-mask = <3>;
670 qcom,default-led-trigger = "switch0_trigger";
671 };
672
673 pmi8998_switch1: qcom,led_switch_1 {
674 label = "switch";
675 qcom,led-name = "led:switch_1";
676 qcom,led-mask = <4>;
677 qcom,default-led-trigger = "switch1_trigger";
678 };
679 };
Subbaraman Narayanamurthy4ed0b4b2017-05-15 20:00:12 -0700680
681 pmi8998_haptics: qcom,haptics@c000 {
682 compatible = "qcom,qpnp-haptics";
683 reg = <0xc000 0x100>;
684 interrupts = <0x3 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
685 <0x3 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
686 interrupt-names = "hap-sc-irq", "hap-play-irq";
687 qcom,pmic-revid = <&pmi8998_revid>;
688 qcom,pmic-misc = <&pmi8998_misc>;
689 qcom,misc-clk-trim-error-reg = <0xf3>;
690 qcom,actuator-type = <0>;
691 qcom,play-mode = "direct";
692 qcom,vmax-mv = <3200>;
693 qcom,ilim-ma = <800>;
694 qcom,sc-dbc-cycles = <8>;
695 qcom,wave-play-rate-us = <6667>;
696 qcom,en-brake;
697 qcom,lra-high-z = "opt1";
698 qcom,lra-auto-res-mode = "qwd";
699 qcom,lra-res-cal-period = <4>;
700 status = "disabled";
701 };
David Collinsbbed9aa2017-03-10 11:53:10 -0800702 };
703};
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600704
705&thermal_zones {
706 ibat-high {
707 polling-delay-passive = <0>;
708 polling-delay = <0>;
709 thermal-governor = "step_wise";
710 thermal-sensors = <&bcl_sensor 0>;
711
712 trips {
713 ibat_high: low-ibat {
714 temperature = <4200>;
715 hysteresis = <200>;
716 type = "passive";
717 };
718 };
719 };
720 ibat-vhigh {
721 polling-delay-passive = <0>;
722 polling-delay = <0>;
723 thermal-governor = "step_wise";
724 thermal-sensors = <&bcl_sensor 1>;
725
726 trips {
727 ibat_vhigh: ibat_vhigh {
728 temperature = <4300>;
729 hysteresis = <100>;
730 type = "passive";
731 };
732 };
733 };
734 vbat {
735 polling-delay-passive = <100>;
736 polling-delay = <0>;
737 thermal-governor = "low_limits_cap";
738 thermal-sensors = <&bcl_sensor 2>;
739 tracks-low;
740
741 trips {
742 low_vbat: low-vbat {
743 temperature = <3300>;
744 hysteresis = <100>;
745 type = "passive";
746 };
747 };
748 cooling-maps {
749 vbat_cpu4 {
750 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600751 cooling-device =
752 <&CPU4 THERMAL_MAX_LIMIT
753 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600754 };
755 vbat_cpu5 {
756 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600757 cooling-device =
758 <&CPU5 THERMAL_MAX_LIMIT
759 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600760 };
761 vbat_map6 {
762 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600763 cooling-device =
764 <&CPU6 THERMAL_MAX_LIMIT
765 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600766 };
767 vbat_map7 {
768 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600769 cooling-device =
770 <&CPU7 THERMAL_MAX_LIMIT
771 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600772 };
773 };
774 };
775 vbat_low {
776 polling-delay-passive = <0>;
777 polling-delay = <0>;
778 thermal-governor = "low_limits_cap";
779 thermal-sensors = <&bcl_sensor 3>;
780 tracks-low;
781
782 trips {
783 low-vbat {
784 temperature = <3100>;
785 hysteresis = <0>;
786 type = "passive";
787 };
788 };
789 };
790 vbat_too_low {
791 polling-delay-passive = <0>;
792 polling-delay = <0>;
793 thermal-governor = "low_limits_cap";
794 thermal-sensors = <&bcl_sensor 4>;
795 tracks-low;
796
797 trips {
798 low-vbat {
799 temperature = <2900>;
800 hysteresis = <0>;
801 type = "passive";
802 };
803 };
804 };
805 soc {
806 polling-delay-passive = <100>;
807 polling-delay = <0>;
808 thermal-governor = "low_limits_cap";
809 thermal-sensors = <&bcl_sensor 5>;
810 tracks-low;
811
812 trips {
813 low_soc: low-soc {
814 temperature = <10>;
815 hysteresis = <0>;
816 type = "passive";
817 };
818 };
819 cooling-maps {
820 soc_cpu4 {
821 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600822 cooling-device =
823 <&CPU4 THERMAL_MAX_LIMIT
824 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600825 };
826 soc_cpu5 {
827 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600828 cooling-device =
829 <&CPU5 THERMAL_MAX_LIMIT
830 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600831 };
832 soc_map6 {
833 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600834 cooling-device =
835 <&CPU6 THERMAL_MAX_LIMIT
836 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600837 };
838 soc_map7 {
839 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600840 cooling-device =
841 <&CPU7 THERMAL_MAX_LIMIT
842 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600843 };
844 };
845 };
Ram Chandrasekar9920cf02017-04-21 17:38:51 -0600846
847 pmi8998_tz {
848 polling-delay-passive = <0>;
849 polling-delay = <0>;
850 thermal-sensors = <&pmi8998_tz>;
851
852 trips {
853 pmi8998_trip0: pmi8998-trip0 {
854 temperature = <105000>;
855 hysteresis = <0>;
856 type = "passive";
857 };
858 pmi8998_trip1: pmi8998-trip1 {
859 temperature = <125000>;
860 hysteresis = <0>;
861 type = "passive";
862 };
863 pmi8998_trip2: pmi8998-trip2 {
864 temperature = <145000>;
865 hysteresis = <0>;
866 type = "critical";
867 };
868 };
869 };
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600870};