blob: 007081a917e35ddb079fcbd0768e2384315b44b5 [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>;
Subbaraman Narayanamurthye6193aa2017-10-26 13:43:30 -0700105 qcom,auto-recharge-soc;
Harry Yang67111662017-04-05 15:14:52 -0700106
107 qcom,chgr@1000 {
108 reg = <0x1000 0x100>;
109 interrupts =
110 <0x2 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
111 <0x2 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
112 <0x2 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
113 <0x2 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
114 <0x2 0x10 0x4 IRQ_TYPE_EDGE_RISING>;
115
116 interrupt-names = "chg-error",
117 "chg-state-change",
118 "step-chg-state-change",
119 "step-chg-soc-update-fail",
120 "step-chg-soc-update-request";
121 };
122
123 qcom,otg@1100 {
124 reg = <0x1100 0x100>;
125 interrupts = <0x2 0x11 0x0 IRQ_TYPE_EDGE_BOTH>,
126 <0x2 0x11 0x1 IRQ_TYPE_EDGE_BOTH>,
127 <0x2 0x11 0x2 IRQ_TYPE_EDGE_BOTH>,
128 <0x2 0x11 0x3 IRQ_TYPE_EDGE_BOTH>;
129
130 interrupt-names = "otg-fail",
131 "otg-overcurrent",
132 "otg-oc-dis-sw-sts",
133 "testmode-change-detect";
134 };
135
136 qcom,bat-if@1200 {
137 reg = <0x1200 0x100>;
138 interrupts =
139 <0x2 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
140 <0x2 0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
141 <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
142 <0x2 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
143 <0x2 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
144 <0x2 0x12 0x5 IRQ_TYPE_EDGE_BOTH>;
145
146 interrupt-names = "bat-temp",
147 "bat-ocp",
148 "bat-ov",
149 "bat-low",
150 "bat-therm-or-id-missing",
151 "bat-terminal-missing";
152 };
153
154 qcom,usb-chgpth@1300 {
155 reg = <0x1300 0x100>;
156 interrupts =
157 <0x2 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
158 <0x2 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
159 <0x2 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
160 <0x2 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
161 <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
162 <0x2 0x13 0x5 IRQ_TYPE_EDGE_RISING>,
163 <0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
164 <0x2 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
165
166 interrupt-names = "usbin-collapse",
167 "usbin-lt-3p6v",
168 "usbin-uv",
169 "usbin-ov",
170 "usbin-plugin",
171 "usbin-src-change",
172 "usbin-icl-change",
173 "type-c-change";
174 };
175
176 qcom,dc-chgpth@1400 {
177 reg = <0x1400 0x100>;
178 interrupts =
179 <0x2 0x14 0x0 IRQ_TYPE_EDGE_BOTH>,
180 <0x2 0x14 0x1 IRQ_TYPE_EDGE_BOTH>,
181 <0x2 0x14 0x2 IRQ_TYPE_EDGE_BOTH>,
182 <0x2 0x14 0x3 IRQ_TYPE_EDGE_BOTH>,
183 <0x2 0x14 0x4 IRQ_TYPE_EDGE_BOTH>,
184 <0x2 0x14 0x5 IRQ_TYPE_EDGE_BOTH>,
185 <0x2 0x14 0x6 IRQ_TYPE_EDGE_RISING>;
186
187 interrupt-names = "dcin-collapse",
188 "dcin-lt-3p6v",
189 "dcin-uv",
190 "dcin-ov",
191 "dcin-plugin",
192 "div2-en-dg",
193 "dcin-icl-change";
194 };
195
196 qcom,chgr-misc@1600 {
197 reg = <0x1600 0x100>;
198 interrupts =
199 <0x2 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
200 <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
201 <0x2 0x16 0x2 IRQ_TYPE_EDGE_BOTH>,
202 <0x2 0x16 0x3 IRQ_TYPE_EDGE_BOTH>,
203 <0x2 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
204 <0x2 0x16 0x5 IRQ_TYPE_EDGE_BOTH>,
205 <0x2 0x16 0x6 IRQ_TYPE_EDGE_FALLING>,
206 <0x2 0x16 0x7 IRQ_TYPE_EDGE_BOTH>;
207
208 interrupt-names = "wdog-snarl",
209 "wdog-bark",
210 "aicl-fail",
211 "aicl-done",
212 "high-duty-cycle",
213 "input-current-limiting",
214 "temperature-change",
215 "switcher-power-ok";
216 };
217 };
218
Jack Phamaf5edc82017-03-30 17:26:02 -0700219 pmi8998_pdphy: qcom,usb-pdphy@1700 {
220 compatible = "qcom,qpnp-pdphy";
221 reg = <0x1700 0x100>;
222 vdd-pdphy-supply = <&pm8998_l24>;
Harry Yang4c05d3e42017-05-09 16:18:17 -0700223 vbus-supply = <&ext_5v_boost>;
Jack Phamaf5edc82017-03-30 17:26:02 -0700224 vconn-supply = <&smb2_vconn>;
225 interrupts = <0x2 0x17 0x0 IRQ_TYPE_EDGE_RISING>,
226 <0x2 0x17 0x1 IRQ_TYPE_EDGE_RISING>,
227 <0x2 0x17 0x2 IRQ_TYPE_EDGE_RISING>,
228 <0x2 0x17 0x3 IRQ_TYPE_EDGE_RISING>,
229 <0x2 0x17 0x4 IRQ_TYPE_EDGE_RISING>,
230 <0x2 0x17 0x5 IRQ_TYPE_EDGE_RISING>,
231 <0x2 0x17 0x6 IRQ_TYPE_EDGE_RISING>;
232
233 interrupt-names = "sig-tx",
234 "sig-rx",
235 "msg-tx",
236 "msg-rx",
237 "msg-tx-failed",
238 "msg-tx-discarded",
239 "msg-rx-discarded";
240
241 qcom,default-sink-caps = <5000 3000>, /* 5V @ 3A */
242 <9000 3000>, /* 9V @ 3A */
243 <12000 2250>; /* 12V @ 2.25A */
244 };
245
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600246 bcl_sensor: bcl@4200 {
247 compatible = "qcom,msm-bcl-lmh";
248 reg = <0x4200 0xff>,
249 <0x4300 0xff>;
250 reg-names = "fg_user_adc",
251 "fg_lmh";
252 interrupts = <0x2 0x42 0x0 IRQ_TYPE_NONE>,
253 <0x2 0x42 0x1 IRQ_TYPE_NONE>,
254 <0x2 0x42 0x2 IRQ_TYPE_NONE>,
255 <0x2 0x42 0x3 IRQ_TYPE_NONE>,
256 <0x2 0x42 0x4 IRQ_TYPE_NONE>;
257 interrupt-names = "bcl-high-ibat",
258 "bcl-very-high-ibat",
259 "bcl-low-vbat",
260 "bcl-very-low-vbat",
261 "bcl-crit-low-vbat";
262 #thermal-sensor-cells = <1>;
263 };
264
David Collinsbbed9aa2017-03-10 11:53:10 -0800265 pmi8998_rradc: rradc@4500 {
266 compatible = "qcom,rradc";
267 reg = <0x4500 0x100>;
268 #address-cells = <1>;
269 #size-cells = <0>;
270 #io-channel-cells = <1>;
271 qcom,pmic-revid = <&pmi8998_revid>;
272 };
Harry Yang67111662017-04-05 15:14:52 -0700273
274 pmi8998_fg: qpnp,fg {
275 compatible = "qcom,fg-gen3";
276 #address-cells = <1>;
277 #size-cells = <1>;
278 qcom,pmic-revid = <&pmi8998_revid>;
279 io-channels = <&pmi8998_rradc 0>;
280 io-channel-names = "rradc_batt_id";
281 qcom,rradc-base = <0x4500>;
Subbaraman Narayanamurthy784bd5b2017-05-17 17:43:22 -0700282 qcom,fg-esr-timer-awake = <96 96>;
283 qcom,fg-esr-timer-asleep = <256 256>;
284 qcom,fg-esr-timer-charging = <0 96>;
Harry Yang67111662017-04-05 15:14:52 -0700285 qcom,cycle-counter-en;
Subbaraman Narayanamurthye6193aa2017-10-26 13:43:30 -0700286 qcom,hold-soc-while-full;
287 qcom,fg-auto-recharge-soc;
288 qcom,fg-recharge-soc-thr = <98>;
Harry Yang67111662017-04-05 15:14:52 -0700289 status = "okay";
290
291 qcom,fg-batt-soc@4000 {
292 status = "okay";
293 reg = <0x4000 0x100>;
294 interrupts = <0x2 0x40 0x0 IRQ_TYPE_EDGE_BOTH>,
295 <0x2 0x40 0x1 IRQ_TYPE_EDGE_BOTH>,
296 <0x2 0x40 0x2
297 IRQ_TYPE_EDGE_RISING>,
298 <0x2 0x40 0x3
299 IRQ_TYPE_EDGE_RISING>,
300 <0x2 0x40 0x4 IRQ_TYPE_EDGE_BOTH>,
301 <0x2 0x40 0x5
302 IRQ_TYPE_EDGE_RISING>,
303 <0x2 0x40 0x6 IRQ_TYPE_EDGE_BOTH>,
304 <0x2 0x40 0x7 IRQ_TYPE_EDGE_BOTH>;
305 interrupt-names = "soc-update",
306 "soc-ready",
307 "bsoc-delta",
308 "msoc-delta",
309 "msoc-low",
310 "msoc-empty",
311 "msoc-high",
312 "msoc-full";
313 };
314
315 qcom,fg-batt-info@4100 {
316 status = "okay";
317 reg = <0x4100 0x100>;
318 interrupts = <0x2 0x41 0x0 IRQ_TYPE_EDGE_BOTH>,
319 <0x2 0x41 0x1 IRQ_TYPE_EDGE_BOTH>,
320 <0x2 0x41 0x2 IRQ_TYPE_EDGE_BOTH>,
321 <0x2 0x41 0x3 IRQ_TYPE_EDGE_BOTH>,
322 <0x2 0x41 0x6 IRQ_TYPE_EDGE_BOTH>;
323 interrupt-names = "vbatt-pred-delta",
324 "vbatt-low",
325 "esr-delta",
326 "batt-missing",
327 "batt-temp-delta";
328 };
329
330 qcom,fg-memif@4400 {
331 status = "okay";
332 reg = <0x4400 0x100>;
333 interrupts = <0x2 0x44 0x0 IRQ_TYPE_EDGE_BOTH>,
334 <0x2 0x44 0x1 IRQ_TYPE_EDGE_BOTH>,
Subbaraman Narayanamurthy2d385062017-09-14 20:23:13 -0700335 <0x2 0x44 0x2
336 IRQ_TYPE_EDGE_RISING>;
Harry Yang67111662017-04-05 15:14:52 -0700337 interrupt-names = "ima-rdy",
338 "mem-xcp",
339 "dma-grant";
340 };
341 };
David Collinsbbed9aa2017-03-10 11:53:10 -0800342 };
343
David Collinsde33ee92017-07-12 11:55:32 -0700344 pmi8998_lsid1: qcom,pmi8998@3 {
David Collinsbbed9aa2017-03-10 11:53:10 -0800345 compatible ="qcom,spmi-pmic";
346 reg = <0x3 SPMI_USID>;
347 #address-cells = <2>;
348 #size-cells = <0>;
349
350 pmi8998_pwm_1: pwm@b100 {
351 compatible = "qcom,qpnp-pwm";
352 reg = <0xb100 0x100>,
353 <0xb042 0x7e>;
354 reg-names = "qpnp-lpg-channel-base",
355 "qpnp-lpg-lut-base";
356 qcom,lpg-lut-size = <0x7e>;
357 qcom,channel-id = <1>;
358 qcom,supported-sizes = <6>, <9>;
359 qcom,ramp-index = <0>;
360 #pwm-cells = <2>;
361 status = "disabled";
362 };
363
364 pmi8998_pwm_2: pwm@b200 {
365 compatible = "qcom,qpnp-pwm";
366 reg = <0xb200 0x100>,
367 <0xb042 0x7e>;
368 reg-names = "qpnp-lpg-channel-base",
369 "qpnp-lpg-lut-base";
370 qcom,lpg-lut-size = <0x7e>;
371 qcom,channel-id = <2>;
372 qcom,supported-sizes = <6>, <9>;
373 qcom,ramp-index = <1>;
374 #pwm-cells = <2>;
375 status = "disabled";
376 };
377
378 pmi8998_pwm_3: pwm@b300 {
379 compatible = "qcom,qpnp-pwm";
380 reg = <0xb300 0x100>,
381 <0xb042 0x7e>;
382 reg-names = "qpnp-lpg-channel-base",
383 "qpnp-lpg-lut-base";
384 qcom,lpg-lut-size = <0x7e>;
385 qcom,channel-id = <3>;
386 qcom,supported-sizes = <6>, <9>;
387 qcom,ramp-index = <2>;
388 #pwm-cells = <2>;
389 };
390
391 pmi8998_pwm_4: pwm@b400 {
392 compatible = "qcom,qpnp-pwm";
393 reg = <0xb400 0x100>,
394 <0xb042 0x7e>;
395 reg-names = "qpnp-lpg-channel-base",
396 "qpnp-lpg-lut-base";
397 qcom,lpg-lut-size = <0x7e>;
398 qcom,channel-id = <4>;
399 qcom,supported-sizes = <6>, <9>;
400 qcom,ramp-index = <3>;
401 #pwm-cells = <2>;
402 };
403
404 pmi8998_pwm_5: pwm@b500 {
405 compatible = "qcom,qpnp-pwm";
406 reg = <0xb500 0x100>,
407 <0xb042 0x7e>;
408 reg-names = "qpnp-lpg-channel-base",
409 "qpnp-lpg-lut-base";
410 qcom,lpg-lut-size = <0x7e>;
411 qcom,channel-id = <5>;
412 qcom,supported-sizes = <6>, <9>;
413 qcom,ramp-index = <4>;
414 #pwm-cells = <2>;
415 };
416
417 pmi8998_pwm_6: pwm@b600 {
418 compatible = "qcom,qpnp-pwm";
419 reg = <0xb600 0x100>,
420 <0xb042 0x7e>;
421 reg-names = "qpnp-lpg-channel-base",
422 "qpnp-lpg-lut-base";
423 qcom,lpg-lut-size = <0x7e>;
424 qcom,channel-id = <6>;
425 qcom,supported-sizes = <6>, <9>;
426 qcom,ramp-index = <5>;
427 #pwm-cells = <2>;
428 status = "disabled";
429 };
430
431 qcom,leds@d000 {
432 compatible = "qcom,leds-qpnp";
433 reg = <0xd000 0x100>;
434 label = "rgb";
435 status = "okay";
436
437 red_led: qcom,rgb_0 {
438 label = "rgb";
439 qcom,id = <3>;
440 qcom,mode = "pwm";
441 pwms = <&pmi8998_pwm_5 0 0>;
442 qcom,pwm-us = <1000>;
443 qcom,max-current = <12>;
444 qcom,default-state = "off";
445 linux,name = "red";
David Collinsbbed9aa2017-03-10 11:53:10 -0800446 };
447
448 green_led: qcom,rgb_1 {
449 label = "rgb";
450 qcom,id = <4>;
451 qcom,mode = "pwm";
452 pwms = <&pmi8998_pwm_4 0 0>;
453 qcom,pwm-us = <1000>;
454 qcom,max-current = <12>;
455 qcom,default-state = "off";
456 linux,name = "green";
David Collinsbbed9aa2017-03-10 11:53:10 -0800457 };
458
459 blue_led: qcom,rgb_2 {
460 label = "rgb";
461 qcom,id = <5>;
462 qcom,mode = "pwm";
463 pwms = <&pmi8998_pwm_3 0 0>;
464 qcom,pwm-us = <1000>;
465 qcom,max-current = <12>;
466 qcom,default-state = "off";
467 linux,name = "blue";
David Collinsbbed9aa2017-03-10 11:53:10 -0800468 };
469 };
470
471 labibb: qpnp-labibb-regulator {
472 compatible = "qcom,qpnp-labibb-regulator";
473 #address-cells = <1>;
474 #size-cells = <1>;
475 qcom,pmic-revid = <&pmi8998_revid>;
476 status = "disabled";
477
478 ibb_regulator: qcom,ibb@dc00 {
479 reg = <0xdc00 0x100>;
480 reg-names = "ibb_reg";
481 regulator-name = "ibb_reg";
482
483 regulator-min-microvolt = <4600000>;
484 regulator-max-microvolt = <6000000>;
485
Fenglin Wu1b188562017-05-19 14:20:04 +0800486 interrupts = <0x3 0xdc 0x2
487 IRQ_TYPE_EDGE_RISING>;
488 interrupt-names = "ibb-sc-err";
489
David Collinsbbed9aa2017-03-10 11:53:10 -0800490 qcom,qpnp-ibb-min-voltage = <1400000>;
491 qcom,qpnp-ibb-step-size = <100000>;
492 qcom,qpnp-ibb-slew-rate = <2000000>;
493 qcom,qpnp-ibb-use-default-voltage;
494 qcom,qpnp-ibb-init-voltage = <5500000>;
495 qcom,qpnp-ibb-init-amoled-voltage = <4000000>;
496 qcom,qpnp-ibb-init-lcd-voltage = <5500000>;
497
498 qcom,qpnp-ibb-soft-start = <1000>;
499
500 qcom,qpnp-ibb-lab-pwrup-delay = <8000>;
501 qcom,qpnp-ibb-lab-pwrdn-delay = <8000>;
502 qcom,qpnp-ibb-en-discharge;
503
504 qcom,qpnp-ibb-full-pull-down;
505 qcom,qpnp-ibb-pull-down-enable;
506 qcom,qpnp-ibb-switching-clock-frequency =
507 <1480>;
508 qcom,qpnp-ibb-limit-maximum-current = <1550>;
509 qcom,qpnp-ibb-debounce-cycle = <16>;
510 qcom,qpnp-ibb-limit-max-current-enable;
511 qcom,qpnp-ibb-ps-enable;
512 };
513
514 lab_regulator: qcom,lab@de00 {
515 reg = <0xde00 0x100>;
516 reg-names = "lab";
517 regulator-name = "lab_reg";
518
519 regulator-min-microvolt = <4600000>;
520 regulator-max-microvolt = <6000000>;
521
522 interrupts = <0x3 0xde 0x0
Fenglin Wu1b188562017-05-19 14:20:04 +0800523 IRQ_TYPE_EDGE_RISING>,
524 <0x3 0xde 0x1
David Collinsbbed9aa2017-03-10 11:53:10 -0800525 IRQ_TYPE_EDGE_RISING>;
Fenglin Wu1b188562017-05-19 14:20:04 +0800526 interrupt-names = "lab-vreg-ok", "lab-sc-err";
527
David Collinsbbed9aa2017-03-10 11:53:10 -0800528 qcom,qpnp-lab-min-voltage = <4600000>;
529 qcom,qpnp-lab-step-size = <100000>;
530 qcom,qpnp-lab-slew-rate = <5000>;
531 qcom,qpnp-lab-use-default-voltage;
532 qcom,qpnp-lab-init-voltage = <5500000>;
533 qcom,qpnp-lab-init-amoled-voltage = <4600000>;
534 qcom,qpnp-lab-init-lcd-voltage = <5500000>;
535
536 qcom,qpnp-lab-soft-start = <800>;
537
538 qcom,qpnp-lab-full-pull-down;
539 qcom,qpnp-lab-pull-down-enable;
540 qcom,qpnp-lab-switching-clock-frequency =
541 <1600>;
542 qcom,qpnp-lab-limit-maximum-current = <1600>;
543 qcom,qpnp-lab-limit-max-current-enable;
Subbaraman Narayanamurthy66e37072017-10-02 11:58:12 -0700544 qcom,qpnp-lab-ps-threshold = <70>;
David Collinsbbed9aa2017-03-10 11:53:10 -0800545 qcom,qpnp-lab-ps-enable;
546 qcom,qpnp-lab-nfet-size = <100>;
547 qcom,qpnp-lab-pfet-size = <100>;
548 qcom,qpnp-lab-max-precharge-time = <500>;
549 };
550 };
551
552 pmi8998_wled: qcom,leds@d800 {
553 compatible = "qcom,qpnp-wled";
554 reg = <0xd800 0x100>,
555 <0xd900 0x100>;
556 reg-names = "qpnp-wled-ctrl-base",
557 "qpnp-wled-sink-base";
558 interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>,
559 <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
560 interrupt-names = "ovp-irq", "sc-irq";
561 linux,name = "wled";
562 linux,default-trigger = "bkl-trigger";
563 qcom,fdbk-output = "auto";
564 qcom,vref-uv = <127500>;
565 qcom,switch-freq-khz = <800>;
566 qcom,ovp-mv = <29600>;
567 qcom,ilim-ma = <970>;
568 qcom,boost-duty-ns = <26>;
569 qcom,mod-freq-khz = <9600>;
570 qcom,dim-mode = "hybrid";
571 qcom,hyb-thres = <625>;
572 qcom,sync-dly-us = <800>;
573 qcom,fs-curr-ua = <25000>;
574 qcom,cons-sync-write-delay-us = <1000>;
575 qcom,led-strings-list = [00 01 02 03];
576 qcom,en-ext-pfet-sc-pro;
577 qcom,pmic-revid = <&pmi8998_revid>;
578 qcom,loop-auto-gm-en;
Anirudh Ghayalf2e640c2017-08-13 06:35:08 +0530579 qcom,auto-calibration-enable;
Subbaraman Narayanamurthy1f92fc12017-03-30 15:41:45 -0700580 status = "disabled";
David Collinsbbed9aa2017-03-10 11:53:10 -0800581 };
582
583 flash_led: qcom,leds@d300 {
584 compatible = "qcom,qpnp-flash-led-v2";
585 status = "okay";
586 reg = <0xd300 0x100>;
587 label = "flash";
588 interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>,
589 <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>,
590 <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>;
591 interrupt-names = "led-fault-irq",
592 "all-ramp-down-done-irq",
593 "all-ramp-up-done-irq";
594 qcom,hdrm-auto-mode;
595 qcom,short-circuit-det;
596 qcom,open-circuit-det;
597 qcom,vph-droop-det;
598 qcom,thermal-derate-en;
599 qcom,thermal-derate-current = <200 500 1000>;
600 qcom,isc-delay = <192>;
601 qcom,pmic-revid = <&pmi8998_revid>;
602
603 pmi8998_flash0: qcom,flash_0 {
604 label = "flash";
605 qcom,led-name = "led:flash_0";
606 qcom,max-current = <1500>;
607 qcom,default-led-trigger = "flash0_trigger";
608 qcom,id = <0>;
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_flash1: qcom,flash_1 {
617 label = "flash";
618 qcom,led-name = "led:flash_1";
619 qcom,max-current = <1500>;
620 qcom,default-led-trigger = "flash1_trigger";
621 qcom,id = <1>;
622 qcom,current-ma = <1000>;
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_flash2: qcom,flash_2 {
630 label = "flash";
631 qcom,led-name = "led:flash_2";
632 qcom,max-current = <750>;
633 qcom,default-led-trigger = "flash2_trigger";
634 qcom,id = <2>;
635 qcom,current-ma = <500>;
636 qcom,duration-ms = <1280>;
637 qcom,ires-ua = <12500>;
638 qcom,hdrm-voltage-mv = <325>;
639 qcom,hdrm-vol-hi-lo-win-mv = <100>;
640 };
641
642 pmi8998_torch0: qcom,torch_0 {
643 label = "torch";
644 qcom,led-name = "led:torch_0";
645 qcom,max-current = <500>;
646 qcom,default-led-trigger = "torch0_trigger";
647 qcom,id = <0>;
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_torch1: qcom,torch_1 {
655 label = "torch";
656 qcom,led-name = "led:torch_1";
657 qcom,max-current = <500>;
658 qcom,default-led-trigger = "torch1_trigger";
659 qcom,id = <1>;
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_torch2: qcom,torch_2 {
667 label = "torch";
668 qcom,led-name = "led:torch_2";
669 qcom,max-current = <500>;
670 qcom,default-led-trigger = "torch2_trigger";
671 qcom,id = <2>;
672 qcom,current-ma = <300>;
673 qcom,ires-ua = <12500>;
674 qcom,hdrm-voltage-mv = <325>;
675 qcom,hdrm-vol-hi-lo-win-mv = <100>;
676 };
677
678 pmi8998_switch0: qcom,led_switch_0 {
679 label = "switch";
680 qcom,led-name = "led:switch_0";
681 qcom,led-mask = <3>;
682 qcom,default-led-trigger = "switch0_trigger";
683 };
684
685 pmi8998_switch1: qcom,led_switch_1 {
686 label = "switch";
687 qcom,led-name = "led:switch_1";
688 qcom,led-mask = <4>;
689 qcom,default-led-trigger = "switch1_trigger";
690 };
Jilai Wangf4d78a22017-11-10 17:05:47 -0500691
692 pmi8998_switch2: qcom,led_switch_2 {
693 label = "switch";
694 qcom,led-name = "led:switch_2";
695 qcom,led-mask = <4>;
696 qcom,default-led-trigger = "switch2_trigger";
697 };
698
David Collinsbbed9aa2017-03-10 11:53:10 -0800699 };
Subbaraman Narayanamurthy4ed0b4b2017-05-15 20:00:12 -0700700
701 pmi8998_haptics: qcom,haptics@c000 {
702 compatible = "qcom,qpnp-haptics";
703 reg = <0xc000 0x100>;
704 interrupts = <0x3 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
705 <0x3 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
706 interrupt-names = "hap-sc-irq", "hap-play-irq";
707 qcom,pmic-revid = <&pmi8998_revid>;
708 qcom,pmic-misc = <&pmi8998_misc>;
709 qcom,misc-clk-trim-error-reg = <0xf3>;
710 qcom,actuator-type = <0>;
711 qcom,play-mode = "direct";
712 qcom,vmax-mv = <3200>;
713 qcom,ilim-ma = <800>;
714 qcom,sc-dbc-cycles = <8>;
715 qcom,wave-play-rate-us = <6667>;
716 qcom,en-brake;
717 qcom,lra-high-z = "opt1";
718 qcom,lra-auto-res-mode = "qwd";
719 qcom,lra-res-cal-period = <4>;
720 status = "disabled";
721 };
David Collinsbbed9aa2017-03-10 11:53:10 -0800722 };
723};
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600724
725&thermal_zones {
726 ibat-high {
727 polling-delay-passive = <0>;
728 polling-delay = <0>;
729 thermal-governor = "step_wise";
730 thermal-sensors = <&bcl_sensor 0>;
731
732 trips {
733 ibat_high: low-ibat {
Ram Chandrasekar04f06ba2017-12-06 09:37:11 -0700734 temperature = <5000>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600735 hysteresis = <200>;
736 type = "passive";
737 };
738 };
739 };
740 ibat-vhigh {
741 polling-delay-passive = <0>;
742 polling-delay = <0>;
743 thermal-governor = "step_wise";
744 thermal-sensors = <&bcl_sensor 1>;
745
746 trips {
747 ibat_vhigh: ibat_vhigh {
Ram Chandrasekar04f06ba2017-12-06 09:37:11 -0700748 temperature = <6000>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600749 hysteresis = <100>;
750 type = "passive";
751 };
752 };
753 };
754 vbat {
755 polling-delay-passive = <100>;
756 polling-delay = <0>;
757 thermal-governor = "low_limits_cap";
758 thermal-sensors = <&bcl_sensor 2>;
759 tracks-low;
760
761 trips {
762 low_vbat: low-vbat {
Ram Chandrasekar04f06ba2017-12-06 09:37:11 -0700763 temperature = <3200>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600764 hysteresis = <100>;
765 type = "passive";
766 };
767 };
768 cooling-maps {
769 vbat_cpu4 {
770 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600771 cooling-device =
772 <&CPU4 THERMAL_MAX_LIMIT
773 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600774 };
775 vbat_cpu5 {
776 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600777 cooling-device =
778 <&CPU5 THERMAL_MAX_LIMIT
779 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600780 };
781 vbat_map6 {
782 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600783 cooling-device =
784 <&CPU6 THERMAL_MAX_LIMIT
785 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600786 };
787 vbat_map7 {
788 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600789 cooling-device =
790 <&CPU7 THERMAL_MAX_LIMIT
791 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600792 };
793 };
794 };
795 vbat_low {
796 polling-delay-passive = <0>;
797 polling-delay = <0>;
798 thermal-governor = "low_limits_cap";
799 thermal-sensors = <&bcl_sensor 3>;
800 tracks-low;
801
802 trips {
803 low-vbat {
Ram Chandrasekar04f06ba2017-12-06 09:37:11 -0700804 temperature = <2800>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600805 hysteresis = <0>;
806 type = "passive";
807 };
808 };
809 };
810 vbat_too_low {
811 polling-delay-passive = <0>;
812 polling-delay = <0>;
813 thermal-governor = "low_limits_cap";
814 thermal-sensors = <&bcl_sensor 4>;
815 tracks-low;
816
817 trips {
818 low-vbat {
Ram Chandrasekar04f06ba2017-12-06 09:37:11 -0700819 temperature = <2600>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600820 hysteresis = <0>;
821 type = "passive";
822 };
823 };
824 };
825 soc {
826 polling-delay-passive = <100>;
827 polling-delay = <0>;
828 thermal-governor = "low_limits_cap";
829 thermal-sensors = <&bcl_sensor 5>;
830 tracks-low;
831
832 trips {
833 low_soc: low-soc {
834 temperature = <10>;
835 hysteresis = <0>;
836 type = "passive";
837 };
838 };
839 cooling-maps {
840 soc_cpu4 {
841 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600842 cooling-device =
843 <&CPU4 THERMAL_MAX_LIMIT
844 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600845 };
846 soc_cpu5 {
847 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600848 cooling-device =
849 <&CPU5 THERMAL_MAX_LIMIT
850 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600851 };
852 soc_map6 {
853 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600854 cooling-device =
855 <&CPU6 THERMAL_MAX_LIMIT
856 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600857 };
858 soc_map7 {
859 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600860 cooling-device =
861 <&CPU7 THERMAL_MAX_LIMIT
862 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600863 };
864 };
865 };
Ram Chandrasekar9920cf02017-04-21 17:38:51 -0600866
867 pmi8998_tz {
868 polling-delay-passive = <0>;
869 polling-delay = <0>;
870 thermal-sensors = <&pmi8998_tz>;
871
872 trips {
873 pmi8998_trip0: pmi8998-trip0 {
874 temperature = <105000>;
875 hysteresis = <0>;
876 type = "passive";
877 };
878 pmi8998_trip1: pmi8998-trip1 {
879 temperature = <125000>;
880 hysteresis = <0>;
881 type = "passive";
882 };
883 pmi8998_trip2: pmi8998-trip2 {
884 temperature = <145000>;
885 hysteresis = <0>;
Ram Chandrasekar514fe712017-12-06 10:27:04 -0700886 type = "passive";
Ram Chandrasekar9920cf02017-04-21 17:38:51 -0600887 };
888 };
889 };
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600890};