blob: b39f85518d95abf348a3b6cd170441d53f598011 [file] [log] [blame]
Manaf Meethalavalappu Pallikunhicb0f1792019-02-06 16:58:35 +05301/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
Tirupathi Reddy4b983082017-09-04 10:11:15 +05302 *
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
Teng Fei Fan2b6cd282018-05-18 18:10:01 +080013#include <dt-bindings/interrupt-controller/arm-gic.h>
14
Tirupathi Reddy4b983082017-09-04 10:11:15 +053015&pm660_0{
16 pm660_charger: qcom,qpnp-smb2 {
17 compatible = "qcom,qpnp-smb2";
18 #address-cells = <1>;
19 #size-cells = <1>;
Manaf Meethalavalappu Pallikunhi7ccd9f22017-08-24 17:58:11 +053020 #cooling-cells = <2>;
Tirupathi Reddy4b983082017-09-04 10:11:15 +053021
22 qcom,pmic-revid = <&pm660_revid>;
23
24 io-channels = <&pm660_rradc 8>,
25 <&pm660_rradc 10>,
26 <&pm660_rradc 3>,
27 <&pm660_rradc 4>;
28 io-channel-names = "charger_temp",
29 "charger_temp_max",
30 "usbin_i",
31 "usbin_v";
32
33 qcom,wipower-max-uw = <5000000>;
34
Ashay Jaiswal4a5448b2017-10-10 23:17:31 +053035 dpdm-supply = <&qusb_phy0>;
Tirupathi Reddy4b983082017-09-04 10:11:15 +053036
37 qcom,thermal-mitigation
38 = <3000000 2500000 2000000 1500000
39 1000000 500000>;
Subbaraman Narayanamurthy1c1d92b2017-10-26 13:48:08 -070040 qcom,auto-recharge-soc;
Tirupathi Reddy4b983082017-09-04 10:11:15 +053041
42 qcom,chgr@1000 {
43 reg = <0x1000 0x100>;
44 interrupts =
45 <0x0 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
46 <0x0 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
47 <0x0 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
48 <0x0 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
49 <0x0 0x10 0x4 IRQ_TYPE_EDGE_RISING>;
50
51 interrupt-names = "chg-error",
52 "chg-state-change",
53 "step-chg-state-change",
54 "step-chg-soc-update-fail",
55 "step-chg-soc-update-request";
56 };
57
58 qcom,otg@1100 {
59 reg = <0x1100 0x100>;
60 interrupts = <0x0 0x11 0x0 IRQ_TYPE_EDGE_BOTH>,
61 <0x0 0x11 0x1 IRQ_TYPE_EDGE_BOTH>,
62 <0x0 0x11 0x2 IRQ_TYPE_EDGE_BOTH>,
63 <0x0 0x11 0x3 IRQ_TYPE_EDGE_BOTH>;
64
65 interrupt-names = "otg-fail",
66 "otg-overcurrent",
67 "otg-oc-dis-sw-sts",
68 "testmode-change-detect";
69 };
70
71 qcom,bat-if@1200 {
72 reg = <0x1200 0x100>;
73 interrupts =
74 <0x0 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
75 <0x0 0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
76 <0x0 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
77 <0x0 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
78 <0x0 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
79 <0x0 0x12 0x5 IRQ_TYPE_EDGE_BOTH>;
80
81 interrupt-names = "bat-temp",
82 "bat-ocp",
83 "bat-ov",
84 "bat-low",
85 "bat-therm-or-id-missing",
86 "bat-terminal-missing";
87 };
88
89 qcom,usb-chgpth@1300 {
90 reg = <0x1300 0x100>;
91 interrupts =
92 <0x0 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
93 <0x0 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
94 <0x0 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
95 <0x0 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
96 <0x0 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
97 <0x0 0x13 0x5 IRQ_TYPE_EDGE_RISING>,
98 <0x0 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
99 <0x0 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
100
101 interrupt-names = "usbin-collapse",
102 "usbin-lt-3p6v",
103 "usbin-uv",
104 "usbin-ov",
105 "usbin-plugin",
106 "usbin-src-change",
107 "usbin-icl-change",
108 "type-c-change";
109 };
110
111 qcom,dc-chgpth@1400 {
112 reg = <0x1400 0x100>;
113 interrupts =
114 <0x0 0x14 0x0 IRQ_TYPE_EDGE_BOTH>,
115 <0x0 0x14 0x1 IRQ_TYPE_EDGE_BOTH>,
116 <0x0 0x14 0x2 IRQ_TYPE_EDGE_BOTH>,
117 <0x0 0x14 0x3 IRQ_TYPE_EDGE_BOTH>,
118 <0x0 0x14 0x4 IRQ_TYPE_EDGE_BOTH>,
119 <0x0 0x14 0x5 IRQ_TYPE_EDGE_BOTH>,
120 <0x0 0x14 0x6 IRQ_TYPE_EDGE_RISING>;
121
122 interrupt-names = "dcin-collapse",
123 "dcin-lt-3p6v",
124 "dcin-uv",
125 "dcin-ov",
126 "dcin-plugin",
127 "div2-en-dg",
128 "dcin-icl-change";
129 };
130
131 qcom,chgr-misc@1600 {
132 reg = <0x1600 0x100>;
133 interrupts =
134 <0x0 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
135 <0x0 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
136 <0x0 0x16 0x2 IRQ_TYPE_EDGE_BOTH>,
137 <0x0 0x16 0x3 IRQ_TYPE_EDGE_BOTH>,
138 <0x0 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
139 <0x0 0x16 0x5 IRQ_TYPE_EDGE_BOTH>,
140 <0x0 0x16 0x6 IRQ_TYPE_EDGE_FALLING>,
141 <0x0 0x16 0x7 IRQ_TYPE_EDGE_BOTH>;
142
143 interrupt-names = "wdog-snarl",
144 "wdog-bark",
145 "aicl-fail",
146 "aicl-done",
147 "high-duty-cycle",
148 "input-current-limiting",
149 "temperature-change",
150 "switcher-power-ok";
151 };
152 smb2_vbus: qcom,smb2-vbus {
153 regulator-name = "smb2-vbus";
154 };
155
156 smb2_vconn: qcom,smb2-vconn {
157 regulator-name = "smb2-vconn";
158 };
159 };
160
Rama Krishna Phani A48d38a22017-09-14 23:10:59 +0530161 pm660_rradc: rradc@4500 {
162 compatible = "qcom,rradc";
163 reg = <0x4500 0x100>;
164 #address-cells = <1>;
165 #size-cells = <0>;
166 #io-channel-cells = <1>;
167 qcom,pmic-revid = <&pm660_revid>;
168 };
169
Tirupathi Reddy4b983082017-09-04 10:11:15 +0530170 pm660_fg: qpnp,fg {
171 compatible = "qcom,fg-gen3";
172 #address-cells = <1>;
173 #size-cells = <1>;
174 qcom,pmic-revid = <&pm660_revid>;
175 io-channels = <&pm660_rradc 0>,
176 <&pm660_rradc 7>;
177 io-channel-names = "rradc_batt_id",
178 "rradc_die_temp";
179 qcom,rradc-base = <0x4500>;
Subbaraman Narayanamurthy03f58c92018-01-11 12:29:43 -0800180 qcom,fg-esr-timer-awake = <64 96>;
181 qcom,fg-esr-timer-asleep = <224 256>;
Tirupathi Reddy4b983082017-09-04 10:11:15 +0530182 qcom,fg-esr-timer-charging = <0 96>;
183 qcom,cycle-counter-en;
Subbaraman Narayanamurthy1c1d92b2017-10-26 13:48:08 -0700184 qcom,hold-soc-while-full;
185 qcom,fg-auto-recharge-soc;
186 qcom,fg-recharge-soc-thr = <98>;
Tirupathi Reddy4b983082017-09-04 10:11:15 +0530187 status = "okay";
188
189 qcom,fg-batt-soc@4000 {
190 status = "okay";
191 reg = <0x4000 0x100>;
192 interrupts = <0x0 0x40 0x0 IRQ_TYPE_EDGE_BOTH>,
193 <0x0 0x40 0x1 IRQ_TYPE_EDGE_BOTH>,
194 <0x0 0x40 0x2
195 IRQ_TYPE_EDGE_RISING>,
196 <0x0 0x40 0x3
197 IRQ_TYPE_EDGE_RISING>,
198 <0x0 0x40 0x4 IRQ_TYPE_EDGE_BOTH>,
199 <0x0 0x40 0x5
200 IRQ_TYPE_EDGE_RISING>,
201 <0x0 0x40 0x6 IRQ_TYPE_EDGE_BOTH>,
202 <0x0 0x40 0x7 IRQ_TYPE_EDGE_BOTH>;
203 interrupt-names = "soc-update",
204 "soc-ready",
205 "bsoc-delta",
206 "msoc-delta",
207 "msoc-low",
208 "msoc-empty",
209 "msoc-high",
210 "msoc-full";
211 };
212
213 qcom,fg-batt-info@4100 {
214 status = "okay";
215 reg = <0x4100 0x100>;
216 interrupts = <0x0 0x41 0x0 IRQ_TYPE_EDGE_BOTH>,
217 <0x0 0x41 0x1 IRQ_TYPE_EDGE_BOTH>,
218 <0x0 0x41 0x2 IRQ_TYPE_EDGE_BOTH>,
219 <0x0 0x41 0x3 IRQ_TYPE_EDGE_BOTH>,
220 <0x0 0x41 0x6 IRQ_TYPE_EDGE_BOTH>;
221 interrupt-names = "vbatt-pred-delta",
222 "vbatt-low",
223 "esr-delta",
224 "batt-missing",
225 "batt-temp-delta";
226 };
227
228 qcom,fg-memif@4400 {
229 status = "okay";
230 reg = <0x4400 0x100>;
231 interrupts = <0x0 0x44 0x0 IRQ_TYPE_EDGE_BOTH>,
232 <0x0 0x44 0x1 IRQ_TYPE_EDGE_BOTH>,
233 <0x0 0x44 0x2 IRQ_TYPE_EDGE_BOTH>;
234 interrupt-names = "ima-rdy",
235 "mem-xcp",
236 "dma-grant";
237 };
238 };
239};
240
241&pm660_1 {
242 pm660_haptics: qcom,haptics@c000 {
243 compatible = "qcom,qpnp-haptics";
244 reg = <0xc000 0x100>;
245 interrupts = <0x1 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
246 <0x1 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
247 interrupt-names = "hap-sc-irq", "hap-play-irq";
248 qcom,pmic-revid = <&pm660_revid>;
249 qcom,pmic-misc = <&pm660_misc>;
250 qcom,misc-clk-trim-error-reg = <0xf3>;
251 qcom,actuator-type = <0>;
252 qcom,play-mode = "direct";
253 qcom,vmax-mv = <3200>;
254 qcom,ilim-ma = <800>;
255 qcom,sc-dbc-cycles = <8>;
256 qcom,wave-play-rate-us = <6667>;
257 qcom,en-brake;
258 qcom,lra-high-z = "opt0";
259 qcom,lra-auto-res-mode = "qwd";
260 qcom,lra-res-cal-period = <4>;
261 };
262};
263
264&pm660l_3 {
265 pm660l_wled: qcom,leds@d800 {
266 compatible = "qcom,qpnp-wled";
267 reg = <0xd800 0x100>,
268 <0xd900 0x100>;
269 reg-names = "qpnp-wled-ctrl-base",
270 "qpnp-wled-sink-base";
271 interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
272 interrupt-names = "ovp-irq";
273 linux,name = "wled";
274 linux,default-trigger = "bkl-trigger";
275 qcom,fdbk-output = "auto";
276 qcom,vref-uv = <127500>;
277 qcom,switch-freq-khz = <800>;
278 qcom,ovp-mv = <29600>;
279 qcom,ilim-ma = <970>;
280 qcom,boost-duty-ns = <26>;
281 qcom,mod-freq-khz = <9600>;
282 qcom,dim-mode = "hybrid";
283 qcom,hyb-thres = <625>;
284 qcom,sync-dly-us = <800>;
285 qcom,fs-curr-ua = <25000>;
286 qcom,cons-sync-write-delay-us = <1000>;
287 qcom,led-strings-list = [00 01 02];
288 qcom,loop-auto-gm-en;
289 qcom,pmic-revid = <&pm660l_revid>;
290 qcom,auto-calibration-enable;
291 status = "ok";
292 };
293
294 pm660l_lcdb: qpnp-lcdb@ec00 {
295 compatible = "qcom,qpnp-lcdb-regulator";
296 #address-cells = <1>;
297 #size-cells = <1>;
298 reg = <0xec00 0x100>;
299 interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>;
300 interrupt-names = "sc-irq";
301
302 qcom,pmic-revid = <&pm660l_revid>;
303
304 lcdb_ldo_vreg: ldo {
305 label = "ldo";
306 regulator-name = "lcdb_ldo";
307 regulator-min-microvolt = <4000000>;
308 regulator-max-microvolt = <6000000>;
309 };
310
311 lcdb_ncp_vreg: ncp {
312 label = "ncp";
313 regulator-name = "lcdb_ncp";
314 regulator-min-microvolt = <4000000>;
315 regulator-max-microvolt = <6000000>;
316 };
317 };
318
319 pm660a_oledb: qpnp-oledb@e000 {
320 compatible = "qcom,qpnp-oledb-regulator";
321 #address-cells = <1>;
322 #size-cells = <1>;
323 qcom,pmic-revid = <&pm660l_revid>;
324 reg = <0xe000 0x100>;
325 qcom,pbs-client = <&pm660l_pbs>;
326
327 label = "oledb";
328 regulator-name = "regulator-oledb";
329 regulator-min-microvolt = <5000000>;
330 regulator-max-microvolt = <8100000>;
331
332 qcom,swire-control;
333 qcom,ext-pin-control;
334 status = "disabled";
335 };
336
337 pm660a_labibb: qpnp-labibb-regulator {
338 compatible = "qcom,qpnp-labibb-regulator";
339 #address-cells = <1>;
340 #size-cells = <1>;
341 qcom,pmic-revid = <&pm660l_revid>;
342 qcom,swire-control;
343 status = "disabled";
344
345 ibb_regulator: qcom,ibb@dc00 {
346 reg = <0xdc00 0x100>;
347 reg-names = "ibb_reg";
348 regulator-name = "ibb_reg";
349
350 regulator-min-microvolt = <4000000>;
351 regulator-max-microvolt = <6300000>;
352
353 qcom,qpnp-ibb-min-voltage = <1400000>;
354 qcom,qpnp-ibb-step-size = <100000>;
355 qcom,qpnp-ibb-slew-rate = <2000000>;
356 qcom,qpnp-ibb-init-voltage = <4000000>;
357 qcom,qpnp-ibb-init-amoled-voltage = <4000000>;
358 };
359
360 lab_regulator: qcom,lab@de00 {
361 reg = <0xde00 0x100>;
362 reg-names = "lab";
363 regulator-name = "lab_reg";
364
365 regulator-min-microvolt = <4600000>;
366 regulator-max-microvolt = <6100000>;
367
368 qcom,qpnp-lab-min-voltage = <4600000>;
369 qcom,qpnp-lab-step-size = <100000>;
370 qcom,qpnp-lab-slew-rate = <5000>;
371 qcom,qpnp-lab-init-voltage = <4600000>;
372 qcom,qpnp-lab-init-amoled-voltage = <4600000>;
373
374 qcom,notify-lab-vreg-ok-sts;
375 };
376 };
377};
378
379&pm660_pdphy {
380 vbus-supply = <&smb2_vbus>;
381 vconn-supply = <&smb2_vconn>;
382};
Pratham Pratap1cb68832017-09-14 15:47:58 +0530383
384&usb0 {
Pratham Pratap25fdad42017-11-14 20:41:56 +0530385 extcon = <&pm660_pdphy>, <&pm660_pdphy>, <&eud>,
386 <&pm660_charger>, <&pm660_charger>;
387 vbus_dwc3-supply = <&smb2_vbus>;
388 qcom,no-vbus-vote-with-type-C;
Pratham Pratap1cb68832017-09-14 15:47:58 +0530389};
Manaf Meethalavalappu Pallikunhi01985c72017-12-06 18:39:40 +0530390
391&thermal_zones {
Manaf Meethalavalappu Pallikunhi4273bf72018-03-13 22:59:13 +0530392 xo-therm-step {
Manaf Meethalavalappu Pallikunhi01985c72017-12-06 18:39:40 +0530393 trips {
394 batt_trip1: batt-trip1 {
Manaf Meethalavalappu Pallikunhib942ff22018-02-06 18:29:25 +0530395 temperature = <50000>;
396 hysteresis = <4000>;
Manaf Meethalavalappu Pallikunhi01985c72017-12-06 18:39:40 +0530397 type = "passive";
398 };
399 batt_trip2: batt-trip2 {
Manaf Meethalavalappu Pallikunhib942ff22018-02-06 18:29:25 +0530400 temperature = <52000>;
Manaf Meethalavalappu Pallikunhi01985c72017-12-06 18:39:40 +0530401 hysteresis = <2000>;
402 type = "passive";
403 };
404 batt_trip3: batt-trip3 {
Manaf Meethalavalappu Pallikunhib942ff22018-02-06 18:29:25 +0530405 temperature = <54000>;
Manaf Meethalavalappu Pallikunhi01985c72017-12-06 18:39:40 +0530406 hysteresis = <2000>;
407 type = "passive";
408 };
Manaf Meethalavalappu Pallikunhib942ff22018-02-06 18:29:25 +0530409 batt_trip4: batt-trip4 {
410 temperature = <56000>;
Manaf Meethalavalappu Pallikunhi01985c72017-12-06 18:39:40 +0530411 hysteresis = <2000>;
412 type = "passive";
413 };
414 };
415
416 cooling-maps {
417 battery_lvl1 {
418 trip = <&batt_trip1>;
419 cooling-device = <&pm660_charger 1 1>;
420 };
421 battery_lvl2 {
422 trip = <&batt_trip2>;
423 cooling-device = <&pm660_charger 2 2>;
424 };
425 battery_lvl3 {
426 trip = <&batt_trip3>;
Manaf Meethalavalappu Pallikunhib942ff22018-02-06 18:29:25 +0530427 cooling-device = <&pm660_charger 4 4>;
Manaf Meethalavalappu Pallikunhi01985c72017-12-06 18:39:40 +0530428 };
429 battery_lvl4 {
430 trip = <&batt_trip4>;
Manaf Meethalavalappu Pallikunhi01985c72017-12-06 18:39:40 +0530431 cooling-device = <&pm660_charger 5 5>;
432 };
433 };
434 };
Manaf Meethalavalappu Pallikunhicb0f1792019-02-06 16:58:35 +0530435
436 xo-therm-605-step {
437 trips {
438 qcs605_batt_trip1: qcs605-batt-trip1 {
439 temperature = <42000>;
440 hysteresis = <4000>;
441 type = "passive";
442 };
443 qcs605_batt_trip2: qcs605-batt-trip2 {
444 temperature = <44000>;
445 hysteresis = <2000>;
446 type = "passive";
447 };
448 qcs605_batt_trip3: qcs605-batt-trip3 {
449 temperature = <46000>;
450 hysteresis = <2000>;
451 type = "passive";
452 };
453 qcs605_batt_trip4: qcs605-batt-trip4 {
454 temperature = <48000>;
455 hysteresis = <2000>;
456 type = "passive";
457 };
458 };
459 cooling-maps {
460 battery_lvl1 {
461 trip = <&qcs605_batt_trip1>;
462 cooling-device = <&pm660_charger 1 1>;
463 };
464 battery_lvl2 {
465 trip = <&qcs605_batt_trip2>;
466 cooling-device = <&pm660_charger 2 2>;
467 };
468 battery_lvl3 {
469 trip = <&qcs605_batt_trip3>;
470 cooling-device = <&pm660_charger 3 3>;
471 };
472 battery_lvl4 {
473 trip = <&qcs605_batt_trip4>;
474 cooling-device = <&pm660_charger 4 4>;
475 };
476 };
477 };
Manaf Meethalavalappu Pallikunhi01985c72017-12-06 18:39:40 +0530478};