blob: aa6be248d6b299cca8e8bb3237ef81c3dd8b81bc [file] [log] [blame]
Tirupathi Reddy4b983082017-09-04 10:11:15 +05301/* Copyright (c) 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&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
33 /* Enable after the qusb_phy0 device node is added */
34 /* dpdm-supply = <&qusb_phy0>; */
35
36 qcom,thermal-mitigation
37 = <3000000 2500000 2000000 1500000
38 1000000 500000>;
39
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>;
178 qcom,fg-esr-timer-awake = <96 96>;
179 qcom,fg-esr-timer-asleep = <256 256>;
180 qcom,fg-esr-timer-charging = <0 96>;
181 qcom,cycle-counter-en;
182 status = "okay";
183
184 qcom,fg-batt-soc@4000 {
185 status = "okay";
186 reg = <0x4000 0x100>;
187 interrupts = <0x0 0x40 0x0 IRQ_TYPE_EDGE_BOTH>,
188 <0x0 0x40 0x1 IRQ_TYPE_EDGE_BOTH>,
189 <0x0 0x40 0x2
190 IRQ_TYPE_EDGE_RISING>,
191 <0x0 0x40 0x3
192 IRQ_TYPE_EDGE_RISING>,
193 <0x0 0x40 0x4 IRQ_TYPE_EDGE_BOTH>,
194 <0x0 0x40 0x5
195 IRQ_TYPE_EDGE_RISING>,
196 <0x0 0x40 0x6 IRQ_TYPE_EDGE_BOTH>,
197 <0x0 0x40 0x7 IRQ_TYPE_EDGE_BOTH>;
198 interrupt-names = "soc-update",
199 "soc-ready",
200 "bsoc-delta",
201 "msoc-delta",
202 "msoc-low",
203 "msoc-empty",
204 "msoc-high",
205 "msoc-full";
206 };
207
208 qcom,fg-batt-info@4100 {
209 status = "okay";
210 reg = <0x4100 0x100>;
211 interrupts = <0x0 0x41 0x0 IRQ_TYPE_EDGE_BOTH>,
212 <0x0 0x41 0x1 IRQ_TYPE_EDGE_BOTH>,
213 <0x0 0x41 0x2 IRQ_TYPE_EDGE_BOTH>,
214 <0x0 0x41 0x3 IRQ_TYPE_EDGE_BOTH>,
215 <0x0 0x41 0x6 IRQ_TYPE_EDGE_BOTH>;
216 interrupt-names = "vbatt-pred-delta",
217 "vbatt-low",
218 "esr-delta",
219 "batt-missing",
220 "batt-temp-delta";
221 };
222
223 qcom,fg-memif@4400 {
224 status = "okay";
225 reg = <0x4400 0x100>;
226 interrupts = <0x0 0x44 0x0 IRQ_TYPE_EDGE_BOTH>,
227 <0x0 0x44 0x1 IRQ_TYPE_EDGE_BOTH>,
228 <0x0 0x44 0x2 IRQ_TYPE_EDGE_BOTH>;
229 interrupt-names = "ima-rdy",
230 "mem-xcp",
231 "dma-grant";
232 };
233 };
234};
235
236&pm660_1 {
237 pm660_haptics: qcom,haptics@c000 {
238 compatible = "qcom,qpnp-haptics";
239 reg = <0xc000 0x100>;
240 interrupts = <0x1 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
241 <0x1 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
242 interrupt-names = "hap-sc-irq", "hap-play-irq";
243 qcom,pmic-revid = <&pm660_revid>;
244 qcom,pmic-misc = <&pm660_misc>;
245 qcom,misc-clk-trim-error-reg = <0xf3>;
246 qcom,actuator-type = <0>;
247 qcom,play-mode = "direct";
248 qcom,vmax-mv = <3200>;
249 qcom,ilim-ma = <800>;
250 qcom,sc-dbc-cycles = <8>;
251 qcom,wave-play-rate-us = <6667>;
252 qcom,en-brake;
253 qcom,lra-high-z = "opt0";
254 qcom,lra-auto-res-mode = "qwd";
255 qcom,lra-res-cal-period = <4>;
256 };
257};
258
259&pm660l_3 {
260 pm660l_wled: qcom,leds@d800 {
261 compatible = "qcom,qpnp-wled";
262 reg = <0xd800 0x100>,
263 <0xd900 0x100>;
264 reg-names = "qpnp-wled-ctrl-base",
265 "qpnp-wled-sink-base";
266 interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
267 interrupt-names = "ovp-irq";
268 linux,name = "wled";
269 linux,default-trigger = "bkl-trigger";
270 qcom,fdbk-output = "auto";
271 qcom,vref-uv = <127500>;
272 qcom,switch-freq-khz = <800>;
273 qcom,ovp-mv = <29600>;
274 qcom,ilim-ma = <970>;
275 qcom,boost-duty-ns = <26>;
276 qcom,mod-freq-khz = <9600>;
277 qcom,dim-mode = "hybrid";
278 qcom,hyb-thres = <625>;
279 qcom,sync-dly-us = <800>;
280 qcom,fs-curr-ua = <25000>;
281 qcom,cons-sync-write-delay-us = <1000>;
282 qcom,led-strings-list = [00 01 02];
283 qcom,loop-auto-gm-en;
284 qcom,pmic-revid = <&pm660l_revid>;
285 qcom,auto-calibration-enable;
286 status = "ok";
287 };
288
289 pm660l_lcdb: qpnp-lcdb@ec00 {
290 compatible = "qcom,qpnp-lcdb-regulator";
291 #address-cells = <1>;
292 #size-cells = <1>;
293 reg = <0xec00 0x100>;
294 interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>;
295 interrupt-names = "sc-irq";
296
297 qcom,pmic-revid = <&pm660l_revid>;
298
299 lcdb_ldo_vreg: ldo {
300 label = "ldo";
301 regulator-name = "lcdb_ldo";
302 regulator-min-microvolt = <4000000>;
303 regulator-max-microvolt = <6000000>;
304 };
305
306 lcdb_ncp_vreg: ncp {
307 label = "ncp";
308 regulator-name = "lcdb_ncp";
309 regulator-min-microvolt = <4000000>;
310 regulator-max-microvolt = <6000000>;
311 };
312 };
313
314 pm660a_oledb: qpnp-oledb@e000 {
315 compatible = "qcom,qpnp-oledb-regulator";
316 #address-cells = <1>;
317 #size-cells = <1>;
318 qcom,pmic-revid = <&pm660l_revid>;
319 reg = <0xe000 0x100>;
320 qcom,pbs-client = <&pm660l_pbs>;
321
322 label = "oledb";
323 regulator-name = "regulator-oledb";
324 regulator-min-microvolt = <5000000>;
325 regulator-max-microvolt = <8100000>;
326
327 qcom,swire-control;
328 qcom,ext-pin-control;
329 status = "disabled";
330 };
331
332 pm660a_labibb: qpnp-labibb-regulator {
333 compatible = "qcom,qpnp-labibb-regulator";
334 #address-cells = <1>;
335 #size-cells = <1>;
336 qcom,pmic-revid = <&pm660l_revid>;
337 qcom,swire-control;
338 status = "disabled";
339
340 ibb_regulator: qcom,ibb@dc00 {
341 reg = <0xdc00 0x100>;
342 reg-names = "ibb_reg";
343 regulator-name = "ibb_reg";
344
345 regulator-min-microvolt = <4000000>;
346 regulator-max-microvolt = <6300000>;
347
348 qcom,qpnp-ibb-min-voltage = <1400000>;
349 qcom,qpnp-ibb-step-size = <100000>;
350 qcom,qpnp-ibb-slew-rate = <2000000>;
351 qcom,qpnp-ibb-init-voltage = <4000000>;
352 qcom,qpnp-ibb-init-amoled-voltage = <4000000>;
353 };
354
355 lab_regulator: qcom,lab@de00 {
356 reg = <0xde00 0x100>;
357 reg-names = "lab";
358 regulator-name = "lab_reg";
359
360 regulator-min-microvolt = <4600000>;
361 regulator-max-microvolt = <6100000>;
362
363 qcom,qpnp-lab-min-voltage = <4600000>;
364 qcom,qpnp-lab-step-size = <100000>;
365 qcom,qpnp-lab-slew-rate = <5000>;
366 qcom,qpnp-lab-init-voltage = <4600000>;
367 qcom,qpnp-lab-init-amoled-voltage = <4600000>;
368
369 qcom,notify-lab-vreg-ok-sts;
370 };
371 };
372};
373
374&pm660_pdphy {
375 vbus-supply = <&smb2_vbus>;
376 vconn-supply = <&smb2_vconn>;
377};
Pratham Pratap1cb68832017-09-14 15:47:58 +0530378
379&usb0 {
380 extcon = <&pm660_pdphy>, <&pm660_pdphy>, <0> /* <&eud> */;
381};