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