blob: 12b469ccfb0eda254b8ecd291e85f15ac797b564 [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 Collins0b6fa762017-05-03 17:59:13 -070040 compatible = "qcom,spmi-temp-alarm";
David Collinsbbed9aa2017-03-10 11:53:10 -080041 reg = <0x2400 0x100>;
42 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
David Collins0b6fa762017-05-03 17:59:13 -070043 io-channels = <&pmi8998_rradc 7>;
44 io-channel-names = "thermal";
Ram Chandrasekar9920cf02017-04-21 17:38:51 -060045 #thermal-sensor-cells = <0>;
David Collinsbbed9aa2017-03-10 11:53:10 -080046 };
47
Fenglin Wu5a50fc82017-03-22 12:27:31 +080048 pmi8998_gpios: pinctrl@c000 {
49 compatible = "qcom,spmi-gpio";
50 reg = <0xc000 0xe00>;
51 interrupts = <0x2 0xc0 0 IRQ_TYPE_NONE>,
52 <0x2 0xc1 0 IRQ_TYPE_NONE>,
53 <0x2 0xc2 0 IRQ_TYPE_NONE>,
54 <0x2 0xc4 0 IRQ_TYPE_NONE>,
55 <0x2 0xc5 0 IRQ_TYPE_NONE>,
56 <0x2 0xc7 0 IRQ_TYPE_NONE>,
57 <0x2 0xc8 0 IRQ_TYPE_NONE>,
58 <0x2 0xc9 0 IRQ_TYPE_NONE>,
59 <0x2 0xca 0 IRQ_TYPE_NONE>,
60 <0x2 0xcb 0 IRQ_TYPE_NONE>,
61 <0x2 0xcd 0 IRQ_TYPE_NONE>;
62 interrupt-names = "pmi8998_gpio1", "pmi8998_gpio2",
63 "pmi8998_gpio3", "pmi8998_gpio5",
64 "pmi8998_gpio6", "pmi8998_gpio8",
65 "pmi8998_gpio9", "pmi8998_gpio10",
66 "pmi8998_gpio11", "pmi8998_gpio12",
67 "pmi8998_gpio14";
David Collinsbbed9aa2017-03-10 11:53:10 -080068 gpio-controller;
69 #gpio-cells = <2>;
Fenglin Wu5a50fc82017-03-22 12:27:31 +080070 qcom,gpios-disallowed = <4 7 13>;
David Collinsbbed9aa2017-03-10 11:53:10 -080071 };
72
Harry Yang67111662017-04-05 15:14:52 -070073 qcom,qpnp-qnovo@1500 {
74 compatible = "qcom,qpnp-qnovo";
75 reg = <0x1500 0x100>;
76 interrupts = <0x2 0x15 0x0 IRQ_TYPE_NONE>;
77 interrupt-names = "ptrain-done";
78 qcom,pmic-revid = <&pmi8998_revid>;
79 };
80
81 pmi8998_charger: qcom,qpnp-smb2 {
82 compatible = "qcom,qpnp-smb2";
83 #address-cells = <1>;
84 #size-cells = <1>;
Ram Chandrasekar977f8442017-05-11 13:48:53 -060085 #cooling-cells = <2>;
Harry Yang67111662017-04-05 15:14:52 -070086
87 qcom,pmic-revid = <&pmi8998_revid>;
88
89 io-channels = <&pmi8998_rradc 8>,
90 <&pmi8998_rradc 10>,
91 <&pmi8998_rradc 3>,
92 <&pmi8998_rradc 4>;
93 io-channel-names = "charger_temp",
94 "charger_temp_max",
95 "usbin_i",
96 "usbin_v";
97
98 qcom,boost-threshold-ua = <100000>;
99 qcom,wipower-max-uw = <5000000>;
Harry Yang08c3b022017-07-19 14:51:05 -0700100 dpdm-supply = <&qusb_phy0>;
Harry Yang67111662017-04-05 15:14:52 -0700101
102 qcom,thermal-mitigation
103 = <3000000 1500000 1000000 500000>;
104
105 qcom,chgr@1000 {
106 reg = <0x1000 0x100>;
107 interrupts =
108 <0x2 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
109 <0x2 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
110 <0x2 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
111 <0x2 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
112 <0x2 0x10 0x4 IRQ_TYPE_EDGE_RISING>;
113
114 interrupt-names = "chg-error",
115 "chg-state-change",
116 "step-chg-state-change",
117 "step-chg-soc-update-fail",
118 "step-chg-soc-update-request";
119 };
120
121 qcom,otg@1100 {
122 reg = <0x1100 0x100>;
123 interrupts = <0x2 0x11 0x0 IRQ_TYPE_EDGE_BOTH>,
124 <0x2 0x11 0x1 IRQ_TYPE_EDGE_BOTH>,
125 <0x2 0x11 0x2 IRQ_TYPE_EDGE_BOTH>,
126 <0x2 0x11 0x3 IRQ_TYPE_EDGE_BOTH>;
127
128 interrupt-names = "otg-fail",
129 "otg-overcurrent",
130 "otg-oc-dis-sw-sts",
131 "testmode-change-detect";
132 };
133
134 qcom,bat-if@1200 {
135 reg = <0x1200 0x100>;
136 interrupts =
137 <0x2 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
138 <0x2 0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
139 <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
140 <0x2 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
141 <0x2 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
142 <0x2 0x12 0x5 IRQ_TYPE_EDGE_BOTH>;
143
144 interrupt-names = "bat-temp",
145 "bat-ocp",
146 "bat-ov",
147 "bat-low",
148 "bat-therm-or-id-missing",
149 "bat-terminal-missing";
150 };
151
152 qcom,usb-chgpth@1300 {
153 reg = <0x1300 0x100>;
154 interrupts =
155 <0x2 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
156 <0x2 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
157 <0x2 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
158 <0x2 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
159 <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
160 <0x2 0x13 0x5 IRQ_TYPE_EDGE_RISING>,
161 <0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
162 <0x2 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
163
164 interrupt-names = "usbin-collapse",
165 "usbin-lt-3p6v",
166 "usbin-uv",
167 "usbin-ov",
168 "usbin-plugin",
169 "usbin-src-change",
170 "usbin-icl-change",
171 "type-c-change";
172 };
173
174 qcom,dc-chgpth@1400 {
175 reg = <0x1400 0x100>;
176 interrupts =
177 <0x2 0x14 0x0 IRQ_TYPE_EDGE_BOTH>,
178 <0x2 0x14 0x1 IRQ_TYPE_EDGE_BOTH>,
179 <0x2 0x14 0x2 IRQ_TYPE_EDGE_BOTH>,
180 <0x2 0x14 0x3 IRQ_TYPE_EDGE_BOTH>,
181 <0x2 0x14 0x4 IRQ_TYPE_EDGE_BOTH>,
182 <0x2 0x14 0x5 IRQ_TYPE_EDGE_BOTH>,
183 <0x2 0x14 0x6 IRQ_TYPE_EDGE_RISING>;
184
185 interrupt-names = "dcin-collapse",
186 "dcin-lt-3p6v",
187 "dcin-uv",
188 "dcin-ov",
189 "dcin-plugin",
190 "div2-en-dg",
191 "dcin-icl-change";
192 };
193
194 qcom,chgr-misc@1600 {
195 reg = <0x1600 0x100>;
196 interrupts =
197 <0x2 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
198 <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
199 <0x2 0x16 0x2 IRQ_TYPE_EDGE_BOTH>,
200 <0x2 0x16 0x3 IRQ_TYPE_EDGE_BOTH>,
201 <0x2 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
202 <0x2 0x16 0x5 IRQ_TYPE_EDGE_BOTH>,
203 <0x2 0x16 0x6 IRQ_TYPE_EDGE_FALLING>,
204 <0x2 0x16 0x7 IRQ_TYPE_EDGE_BOTH>;
205
206 interrupt-names = "wdog-snarl",
207 "wdog-bark",
208 "aicl-fail",
209 "aicl-done",
210 "high-duty-cycle",
211 "input-current-limiting",
212 "temperature-change",
213 "switcher-power-ok";
214 };
215 };
216
Jack Phamaf5edc82017-03-30 17:26:02 -0700217 pmi8998_pdphy: qcom,usb-pdphy@1700 {
218 compatible = "qcom,qpnp-pdphy";
219 reg = <0x1700 0x100>;
220 vdd-pdphy-supply = <&pm8998_l24>;
Harry Yang4c05d3e42017-05-09 16:18:17 -0700221 vbus-supply = <&ext_5v_boost>;
Jack Phamaf5edc82017-03-30 17:26:02 -0700222 vconn-supply = <&smb2_vconn>;
223 interrupts = <0x2 0x17 0x0 IRQ_TYPE_EDGE_RISING>,
224 <0x2 0x17 0x1 IRQ_TYPE_EDGE_RISING>,
225 <0x2 0x17 0x2 IRQ_TYPE_EDGE_RISING>,
226 <0x2 0x17 0x3 IRQ_TYPE_EDGE_RISING>,
227 <0x2 0x17 0x4 IRQ_TYPE_EDGE_RISING>,
228 <0x2 0x17 0x5 IRQ_TYPE_EDGE_RISING>,
229 <0x2 0x17 0x6 IRQ_TYPE_EDGE_RISING>;
230
231 interrupt-names = "sig-tx",
232 "sig-rx",
233 "msg-tx",
234 "msg-rx",
235 "msg-tx-failed",
236 "msg-tx-discarded",
237 "msg-rx-discarded";
238
239 qcom,default-sink-caps = <5000 3000>, /* 5V @ 3A */
240 <9000 3000>, /* 9V @ 3A */
241 <12000 2250>; /* 12V @ 2.25A */
242 };
243
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600244 bcl_sensor: bcl@4200 {
245 compatible = "qcom,msm-bcl-lmh";
246 reg = <0x4200 0xff>,
247 <0x4300 0xff>;
248 reg-names = "fg_user_adc",
249 "fg_lmh";
250 interrupts = <0x2 0x42 0x0 IRQ_TYPE_NONE>,
251 <0x2 0x42 0x1 IRQ_TYPE_NONE>,
252 <0x2 0x42 0x2 IRQ_TYPE_NONE>,
253 <0x2 0x42 0x3 IRQ_TYPE_NONE>,
254 <0x2 0x42 0x4 IRQ_TYPE_NONE>;
255 interrupt-names = "bcl-high-ibat",
256 "bcl-very-high-ibat",
257 "bcl-low-vbat",
258 "bcl-very-low-vbat",
259 "bcl-crit-low-vbat";
260 #thermal-sensor-cells = <1>;
261 };
262
David Collinsbbed9aa2017-03-10 11:53:10 -0800263 pmi8998_rradc: rradc@4500 {
264 compatible = "qcom,rradc";
265 reg = <0x4500 0x100>;
266 #address-cells = <1>;
267 #size-cells = <0>;
268 #io-channel-cells = <1>;
269 qcom,pmic-revid = <&pmi8998_revid>;
270 };
Harry Yang67111662017-04-05 15:14:52 -0700271
272 pmi8998_fg: qpnp,fg {
273 compatible = "qcom,fg-gen3";
274 #address-cells = <1>;
275 #size-cells = <1>;
276 qcom,pmic-revid = <&pmi8998_revid>;
277 io-channels = <&pmi8998_rradc 0>;
278 io-channel-names = "rradc_batt_id";
279 qcom,rradc-base = <0x4500>;
Subbaraman Narayanamurthy784bd5b2017-05-17 17:43:22 -0700280 qcom,fg-esr-timer-awake = <96 96>;
281 qcom,fg-esr-timer-asleep = <256 256>;
282 qcom,fg-esr-timer-charging = <0 96>;
Harry Yang67111662017-04-05 15:14:52 -0700283 qcom,cycle-counter-en;
284 status = "okay";
285
286 qcom,fg-batt-soc@4000 {
287 status = "okay";
288 reg = <0x4000 0x100>;
289 interrupts = <0x2 0x40 0x0 IRQ_TYPE_EDGE_BOTH>,
290 <0x2 0x40 0x1 IRQ_TYPE_EDGE_BOTH>,
291 <0x2 0x40 0x2
292 IRQ_TYPE_EDGE_RISING>,
293 <0x2 0x40 0x3
294 IRQ_TYPE_EDGE_RISING>,
295 <0x2 0x40 0x4 IRQ_TYPE_EDGE_BOTH>,
296 <0x2 0x40 0x5
297 IRQ_TYPE_EDGE_RISING>,
298 <0x2 0x40 0x6 IRQ_TYPE_EDGE_BOTH>,
299 <0x2 0x40 0x7 IRQ_TYPE_EDGE_BOTH>;
300 interrupt-names = "soc-update",
301 "soc-ready",
302 "bsoc-delta",
303 "msoc-delta",
304 "msoc-low",
305 "msoc-empty",
306 "msoc-high",
307 "msoc-full";
308 };
309
310 qcom,fg-batt-info@4100 {
311 status = "okay";
312 reg = <0x4100 0x100>;
313 interrupts = <0x2 0x41 0x0 IRQ_TYPE_EDGE_BOTH>,
314 <0x2 0x41 0x1 IRQ_TYPE_EDGE_BOTH>,
315 <0x2 0x41 0x2 IRQ_TYPE_EDGE_BOTH>,
316 <0x2 0x41 0x3 IRQ_TYPE_EDGE_BOTH>,
317 <0x2 0x41 0x6 IRQ_TYPE_EDGE_BOTH>;
318 interrupt-names = "vbatt-pred-delta",
319 "vbatt-low",
320 "esr-delta",
321 "batt-missing",
322 "batt-temp-delta";
323 };
324
325 qcom,fg-memif@4400 {
326 status = "okay";
327 reg = <0x4400 0x100>;
328 interrupts = <0x2 0x44 0x0 IRQ_TYPE_EDGE_BOTH>,
329 <0x2 0x44 0x1 IRQ_TYPE_EDGE_BOTH>,
330 <0x2 0x44 0x2 IRQ_TYPE_EDGE_BOTH>;
331 interrupt-names = "ima-rdy",
332 "mem-xcp",
333 "dma-grant";
334 };
335 };
David Collinsbbed9aa2017-03-10 11:53:10 -0800336 };
337
338 qcom,pmi8998@3 {
339 compatible ="qcom,spmi-pmic";
340 reg = <0x3 SPMI_USID>;
341 #address-cells = <2>;
342 #size-cells = <0>;
343
344 pmi8998_pwm_1: pwm@b100 {
345 compatible = "qcom,qpnp-pwm";
346 reg = <0xb100 0x100>,
347 <0xb042 0x7e>;
348 reg-names = "qpnp-lpg-channel-base",
349 "qpnp-lpg-lut-base";
350 qcom,lpg-lut-size = <0x7e>;
351 qcom,channel-id = <1>;
352 qcom,supported-sizes = <6>, <9>;
353 qcom,ramp-index = <0>;
354 #pwm-cells = <2>;
355 status = "disabled";
356 };
357
358 pmi8998_pwm_2: pwm@b200 {
359 compatible = "qcom,qpnp-pwm";
360 reg = <0xb200 0x100>,
361 <0xb042 0x7e>;
362 reg-names = "qpnp-lpg-channel-base",
363 "qpnp-lpg-lut-base";
364 qcom,lpg-lut-size = <0x7e>;
365 qcom,channel-id = <2>;
366 qcom,supported-sizes = <6>, <9>;
367 qcom,ramp-index = <1>;
368 #pwm-cells = <2>;
369 status = "disabled";
370 };
371
372 pmi8998_pwm_3: pwm@b300 {
373 compatible = "qcom,qpnp-pwm";
374 reg = <0xb300 0x100>,
375 <0xb042 0x7e>;
376 reg-names = "qpnp-lpg-channel-base",
377 "qpnp-lpg-lut-base";
378 qcom,lpg-lut-size = <0x7e>;
379 qcom,channel-id = <3>;
380 qcom,supported-sizes = <6>, <9>;
381 qcom,ramp-index = <2>;
382 #pwm-cells = <2>;
383 };
384
385 pmi8998_pwm_4: pwm@b400 {
386 compatible = "qcom,qpnp-pwm";
387 reg = <0xb400 0x100>,
388 <0xb042 0x7e>;
389 reg-names = "qpnp-lpg-channel-base",
390 "qpnp-lpg-lut-base";
391 qcom,lpg-lut-size = <0x7e>;
392 qcom,channel-id = <4>;
393 qcom,supported-sizes = <6>, <9>;
394 qcom,ramp-index = <3>;
395 #pwm-cells = <2>;
396 };
397
398 pmi8998_pwm_5: pwm@b500 {
399 compatible = "qcom,qpnp-pwm";
400 reg = <0xb500 0x100>,
401 <0xb042 0x7e>;
402 reg-names = "qpnp-lpg-channel-base",
403 "qpnp-lpg-lut-base";
404 qcom,lpg-lut-size = <0x7e>;
405 qcom,channel-id = <5>;
406 qcom,supported-sizes = <6>, <9>;
407 qcom,ramp-index = <4>;
408 #pwm-cells = <2>;
409 };
410
411 pmi8998_pwm_6: pwm@b600 {
412 compatible = "qcom,qpnp-pwm";
413 reg = <0xb600 0x100>,
414 <0xb042 0x7e>;
415 reg-names = "qpnp-lpg-channel-base",
416 "qpnp-lpg-lut-base";
417 qcom,lpg-lut-size = <0x7e>;
418 qcom,channel-id = <6>;
419 qcom,supported-sizes = <6>, <9>;
420 qcom,ramp-index = <5>;
421 #pwm-cells = <2>;
422 status = "disabled";
423 };
424
425 qcom,leds@d000 {
426 compatible = "qcom,leds-qpnp";
427 reg = <0xd000 0x100>;
428 label = "rgb";
429 status = "okay";
430
431 red_led: qcom,rgb_0 {
432 label = "rgb";
433 qcom,id = <3>;
434 qcom,mode = "pwm";
435 pwms = <&pmi8998_pwm_5 0 0>;
436 qcom,pwm-us = <1000>;
437 qcom,max-current = <12>;
438 qcom,default-state = "off";
439 linux,name = "red";
David Collinsbbed9aa2017-03-10 11:53:10 -0800440 };
441
442 green_led: qcom,rgb_1 {
443 label = "rgb";
444 qcom,id = <4>;
445 qcom,mode = "pwm";
446 pwms = <&pmi8998_pwm_4 0 0>;
447 qcom,pwm-us = <1000>;
448 qcom,max-current = <12>;
449 qcom,default-state = "off";
450 linux,name = "green";
David Collinsbbed9aa2017-03-10 11:53:10 -0800451 };
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";
David Collinsbbed9aa2017-03-10 11:53:10 -0800462 };
463 };
464
465 labibb: qpnp-labibb-regulator {
466 compatible = "qcom,qpnp-labibb-regulator";
467 #address-cells = <1>;
468 #size-cells = <1>;
469 qcom,pmic-revid = <&pmi8998_revid>;
470 status = "disabled";
471
472 ibb_regulator: qcom,ibb@dc00 {
473 reg = <0xdc00 0x100>;
474 reg-names = "ibb_reg";
475 regulator-name = "ibb_reg";
476
477 regulator-min-microvolt = <4600000>;
478 regulator-max-microvolt = <6000000>;
479
480 qcom,qpnp-ibb-min-voltage = <1400000>;
481 qcom,qpnp-ibb-step-size = <100000>;
482 qcom,qpnp-ibb-slew-rate = <2000000>;
483 qcom,qpnp-ibb-use-default-voltage;
484 qcom,qpnp-ibb-init-voltage = <5500000>;
485 qcom,qpnp-ibb-init-amoled-voltage = <4000000>;
486 qcom,qpnp-ibb-init-lcd-voltage = <5500000>;
487
488 qcom,qpnp-ibb-soft-start = <1000>;
489
490 qcom,qpnp-ibb-lab-pwrup-delay = <8000>;
491 qcom,qpnp-ibb-lab-pwrdn-delay = <8000>;
492 qcom,qpnp-ibb-en-discharge;
493
494 qcom,qpnp-ibb-full-pull-down;
495 qcom,qpnp-ibb-pull-down-enable;
496 qcom,qpnp-ibb-switching-clock-frequency =
497 <1480>;
498 qcom,qpnp-ibb-limit-maximum-current = <1550>;
499 qcom,qpnp-ibb-debounce-cycle = <16>;
500 qcom,qpnp-ibb-limit-max-current-enable;
501 qcom,qpnp-ibb-ps-enable;
502 };
503
504 lab_regulator: qcom,lab@de00 {
505 reg = <0xde00 0x100>;
506 reg-names = "lab";
507 regulator-name = "lab_reg";
508
509 regulator-min-microvolt = <4600000>;
510 regulator-max-microvolt = <6000000>;
511
512 interrupts = <0x3 0xde 0x0
513 IRQ_TYPE_EDGE_RISING>;
514 interrupt-names = "lab-vreg-ok";
515 qcom,qpnp-lab-min-voltage = <4600000>;
516 qcom,qpnp-lab-step-size = <100000>;
517 qcom,qpnp-lab-slew-rate = <5000>;
518 qcom,qpnp-lab-use-default-voltage;
519 qcom,qpnp-lab-init-voltage = <5500000>;
520 qcom,qpnp-lab-init-amoled-voltage = <4600000>;
521 qcom,qpnp-lab-init-lcd-voltage = <5500000>;
522
523 qcom,qpnp-lab-soft-start = <800>;
524
525 qcom,qpnp-lab-full-pull-down;
526 qcom,qpnp-lab-pull-down-enable;
527 qcom,qpnp-lab-switching-clock-frequency =
528 <1600>;
529 qcom,qpnp-lab-limit-maximum-current = <1600>;
530 qcom,qpnp-lab-limit-max-current-enable;
531 qcom,qpnp-lab-ps-threshold = <20>;
532 qcom,qpnp-lab-ps-enable;
533 qcom,qpnp-lab-nfet-size = <100>;
534 qcom,qpnp-lab-pfet-size = <100>;
535 qcom,qpnp-lab-max-precharge-time = <500>;
536 };
537 };
538
539 pmi8998_wled: qcom,leds@d800 {
540 compatible = "qcom,qpnp-wled";
541 reg = <0xd800 0x100>,
542 <0xd900 0x100>;
543 reg-names = "qpnp-wled-ctrl-base",
544 "qpnp-wled-sink-base";
545 interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>,
546 <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
547 interrupt-names = "ovp-irq", "sc-irq";
548 linux,name = "wled";
549 linux,default-trigger = "bkl-trigger";
550 qcom,fdbk-output = "auto";
551 qcom,vref-uv = <127500>;
552 qcom,switch-freq-khz = <800>;
553 qcom,ovp-mv = <29600>;
554 qcom,ilim-ma = <970>;
555 qcom,boost-duty-ns = <26>;
556 qcom,mod-freq-khz = <9600>;
557 qcom,dim-mode = "hybrid";
558 qcom,hyb-thres = <625>;
559 qcom,sync-dly-us = <800>;
560 qcom,fs-curr-ua = <25000>;
561 qcom,cons-sync-write-delay-us = <1000>;
562 qcom,led-strings-list = [00 01 02 03];
563 qcom,en-ext-pfet-sc-pro;
564 qcom,pmic-revid = <&pmi8998_revid>;
565 qcom,loop-auto-gm-en;
Anirudh Ghayalf2e640c2017-08-13 06:35:08 +0530566 qcom,auto-calibration-enable;
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>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600750 cooling-device =
751 <&CPU4 THERMAL_MAX_LIMIT
752 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600753 };
754 vbat_cpu5 {
755 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600756 cooling-device =
757 <&CPU5 THERMAL_MAX_LIMIT
758 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600759 };
760 vbat_map6 {
761 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600762 cooling-device =
763 <&CPU6 THERMAL_MAX_LIMIT
764 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600765 };
766 vbat_map7 {
767 trip = <&low_vbat>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600768 cooling-device =
769 <&CPU7 THERMAL_MAX_LIMIT
770 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600771 };
772 };
773 };
774 vbat_low {
775 polling-delay-passive = <0>;
776 polling-delay = <0>;
777 thermal-governor = "low_limits_cap";
778 thermal-sensors = <&bcl_sensor 3>;
779 tracks-low;
780
781 trips {
782 low-vbat {
783 temperature = <3100>;
784 hysteresis = <0>;
785 type = "passive";
786 };
787 };
788 };
789 vbat_too_low {
790 polling-delay-passive = <0>;
791 polling-delay = <0>;
792 thermal-governor = "low_limits_cap";
793 thermal-sensors = <&bcl_sensor 4>;
794 tracks-low;
795
796 trips {
797 low-vbat {
798 temperature = <2900>;
799 hysteresis = <0>;
800 type = "passive";
801 };
802 };
803 };
804 soc {
805 polling-delay-passive = <100>;
806 polling-delay = <0>;
807 thermal-governor = "low_limits_cap";
808 thermal-sensors = <&bcl_sensor 5>;
809 tracks-low;
810
811 trips {
812 low_soc: low-soc {
813 temperature = <10>;
814 hysteresis = <0>;
815 type = "passive";
816 };
817 };
818 cooling-maps {
819 soc_cpu4 {
820 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600821 cooling-device =
822 <&CPU4 THERMAL_MAX_LIMIT
823 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600824 };
825 soc_cpu5 {
826 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600827 cooling-device =
828 <&CPU5 THERMAL_MAX_LIMIT
829 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600830 };
831 soc_map6 {
832 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600833 cooling-device =
834 <&CPU6 THERMAL_MAX_LIMIT
835 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600836 };
837 soc_map7 {
838 trip = <&low_soc>;
Ram Chandrasekar543a0b12017-06-12 17:49:50 -0600839 cooling-device =
840 <&CPU7 THERMAL_MAX_LIMIT
841 THERMAL_MAX_LIMIT>;
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600842 };
843 };
844 };
Ram Chandrasekar9920cf02017-04-21 17:38:51 -0600845
846 pmi8998_tz {
847 polling-delay-passive = <0>;
848 polling-delay = <0>;
849 thermal-sensors = <&pmi8998_tz>;
850
851 trips {
852 pmi8998_trip0: pmi8998-trip0 {
853 temperature = <105000>;
854 hysteresis = <0>;
855 type = "passive";
856 };
857 pmi8998_trip1: pmi8998-trip1 {
858 temperature = <125000>;
859 hysteresis = <0>;
860 type = "passive";
861 };
862 pmi8998_trip2: pmi8998-trip2 {
863 temperature = <145000>;
864 hysteresis = <0>;
865 type = "critical";
866 };
867 };
868 };
Ram Chandrasekar61ede0c2017-04-17 17:12:56 -0600869};