-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdm670-pmic-overlay.dtsi
426 lines (381 loc) · 10.8 KB
/
sdm670-pmic-overlay.dtsi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <dt-bindings/interrupt-controller/arm-gic.h>
&pm660_0{
pm660_charger: qcom,qpnp-smb2 {
compatible = "qcom,qpnp-smb2";
#address-cells = <1>;
#size-cells = <1>;
#cooling-cells = <2>;
qcom,pmic-revid = <&pm660_revid>;
io-channels = <&pm660_rradc 8>,
<&pm660_rradc 10>,
<&pm660_rradc 3>,
<&pm660_rradc 4>;
io-channel-names = "charger_temp",
"charger_temp_max",
"usbin_i",
"usbin_v";
qcom,wipower-max-uw = <5000000>;
dpdm-supply = <&qusb_phy0>;
qcom,thermal-mitigation
= <3000000 2500000 2000000 1500000
1000000 500000>;
qcom,auto-recharge-soc;
qcom,chgr@1000 {
reg = <0x1000 0x100>;
interrupts =
<0x0 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
<0x0 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
<0x0 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
<0x0 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
<0x0 0x10 0x4 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "chg-error",
"chg-state-change",
"step-chg-state-change",
"step-chg-soc-update-fail",
"step-chg-soc-update-request";
};
qcom,otg@1100 {
reg = <0x1100 0x100>;
interrupts = <0x0 0x11 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x11 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x11 0x2 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x11 0x3 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "otg-fail",
"otg-overcurrent",
"otg-oc-dis-sw-sts",
"testmode-change-detect";
};
qcom,bat-if@1200 {
reg = <0x1200 0x100>;
interrupts =
<0x0 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
<0x0 0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x12 0x5 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "bat-temp",
"bat-ocp",
"bat-ov",
"bat-low",
"bat-therm-or-id-missing",
"bat-terminal-missing";
};
qcom,usb-chgpth@1300 {
reg = <0x1300 0x100>;
interrupts =
<0x0 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 0x5 IRQ_TYPE_EDGE_RISING>,
<0x0 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
<0x0 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "usbin-collapse",
"usbin-lt-3p6v",
"usbin-uv",
"usbin-ov",
"usbin-plugin",
"usbin-src-change",
"usbin-icl-change",
"type-c-change";
};
qcom,dc-chgpth@1400 {
reg = <0x1400 0x100>;
interrupts =
<0x0 0x14 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x14 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x14 0x2 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x14 0x3 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x14 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x14 0x5 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x14 0x6 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "dcin-collapse",
"dcin-lt-3p6v",
"dcin-uv",
"dcin-ov",
"dcin-plugin",
"div2-en-dg",
"dcin-icl-change";
};
qcom,chgr-misc@1600 {
reg = <0x1600 0x100>;
interrupts =
<0x0 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
<0x0 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
<0x0 0x16 0x2 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x16 0x3 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x16 0x5 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x16 0x6 IRQ_TYPE_EDGE_FALLING>,
<0x0 0x16 0x7 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "wdog-snarl",
"wdog-bark",
"aicl-fail",
"aicl-done",
"high-duty-cycle",
"input-current-limiting",
"temperature-change",
"switcher-power-ok";
};
smb2_vbus: qcom,smb2-vbus {
regulator-name = "smb2-vbus";
};
smb2_vconn: qcom,smb2-vconn {
regulator-name = "smb2-vconn";
};
};
pm660_rradc: rradc@4500 {
compatible = "qcom,rradc";
reg = <0x4500 0x100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
qcom,pmic-revid = <&pm660_revid>;
};
pm660_fg: qpnp,fg {
compatible = "qcom,fg-gen3";
#address-cells = <1>;
#size-cells = <1>;
qcom,pmic-revid = <&pm660_revid>;
io-channels = <&pm660_rradc 0>,
<&pm660_rradc 7>;
io-channel-names = "rradc_batt_id",
"rradc_die_temp";
qcom,rradc-base = <0x4500>;
qcom,fg-esr-timer-awake = <64 96>;
qcom,fg-esr-timer-asleep = <224 256>;
qcom,fg-esr-timer-charging = <0 96>;
qcom,cycle-counter-en;
qcom,hold-soc-while-full;
qcom,fg-auto-recharge-soc;
qcom,fg-recharge-soc-thr = <98>;
status = "okay";
qcom,fg-batt-soc@4000 {
status = "okay";
reg = <0x4000 0x100>;
interrupts = <0x0 0x40 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x40 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x40 0x2
IRQ_TYPE_EDGE_RISING>,
<0x0 0x40 0x3
IRQ_TYPE_EDGE_RISING>,
<0x0 0x40 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x40 0x5
IRQ_TYPE_EDGE_RISING>,
<0x0 0x40 0x6 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x40 0x7 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "soc-update",
"soc-ready",
"bsoc-delta",
"msoc-delta",
"msoc-low",
"msoc-empty",
"msoc-high",
"msoc-full";
};
qcom,fg-batt-info@4100 {
status = "okay";
reg = <0x4100 0x100>;
interrupts = <0x0 0x41 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x41 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x41 0x2 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x41 0x3 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x41 0x6 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "vbatt-pred-delta",
"vbatt-low",
"esr-delta",
"batt-missing",
"batt-temp-delta";
};
qcom,fg-memif@4400 {
status = "okay";
reg = <0x4400 0x100>;
interrupts = <0x0 0x44 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x44 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x44 0x2 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "ima-rdy",
"mem-xcp",
"dma-grant";
};
};
};
&pm660_1 {
pm660_haptics: qcom,haptics@c000 {
compatible = "qcom,pm660-haptics";
reg = <0xc000 0x100>;
interrupts = <0x1 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x1 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "hap-sc-irq", "hap-play-irq";
qcom,actuator-type = "lra";
qcom,vmax-mv = <3200>;
qcom,play-rate-us = <6667>;
qcom,lra-resonance-sig-shape = "sine";
qcom,lra-auto-resonance-mode = "qwd";
qcom,lra-allow-variable-play-rate;
wf_0 {
/* CLICK */
qcom,effect-id = <0>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [3e 3e 3e];
qcom,wf-play-rate-us = <6667>;
qcom,wf-brake-pattern = [01 00 00 00];
qcom,lra-auto-resonance-disable;
};
wf_1 {
/* DOUBLE CLICK */
qcom,effect-id = <1>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [7e 7e 02 02 02 02 02 02];
qcom,wf-play-rate-us = <7143>;
qcom,wf-repeat-count = <2>;
qcom,wf-s-repeat-count = <1>;
qcom,lra-auto-resonance-disable;
};
wf_2 {
/* TICK */
qcom,effect-id = <2>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [7e 7e];
qcom,wf-play-rate-us = <4000>;
qcom,lra-auto-resonance-disable;
};
wf_3 {
/* THUD */
qcom,effect-id = <3>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [7e 7e 7e];
qcom,wf-play-rate-us = <6667>;
qcom,lra-auto-resonance-disable;
};
wf_4 {
/* POP */
qcom,effect-id = <4>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [7e 7e];
qcom,wf-play-rate-us = <5000>;
qcom,lra-auto-resonance-disable;
};
wf_5 {
/* HEAVY CLICK */
qcom,effect-id = <5>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [7e 7e 7e];
qcom,wf-play-rate-us = <6667>;
qcom,wf-brake-pattern = [03 00 00 00];
qcom,lra-auto-resonance-disable;
};
};
};
&pm660l_3 {
pm660l_wled: qcom,leds@d800 {
compatible = "qcom,pm660l-spmi-wled";
reg = <0xd800 0x100>,
<0xd900 0x100>;
reg-names = "wled-ctrl-base",
"wled-sink-base";
interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "ovp-irq";
label = "backlight";
qcom,fs-current-limit = <25000>;
qcom,boost-current-limit = <970>;
qcom,switching-freq = <800>;
qcom,ovp = <29600>;
qcom,sync-dly = <800>;
qcom,string-cfg = <7>;
qcom,pmic-revid = <&pm660l_revid>;
qcom,auto-calibration;
status = "ok";
};
pm660l_lcdb: qpnp-lcdb@ec00 {
compatible = "qcom,qpnp-lcdb-regulator";
#address-cells = <1>;
#size-cells = <1>;
reg = <0xec00 0x100>;
interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "sc-irq";
qcom,pmic-revid = <&pm660l_revid>;
lcdb_ldo_vreg: ldo {
label = "ldo";
regulator-name = "lcdb_ldo";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <6000000>;
};
lcdb_ncp_vreg: ncp {
label = "ncp";
regulator-name = "lcdb_ncp";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <6000000>;
};
};
pm660a_oledb: qpnp-oledb@e000 {
compatible = "qcom,qpnp-oledb-regulator";
#address-cells = <1>;
#size-cells = <1>;
qcom,pmic-revid = <&pm660l_revid>;
reg = <0xe000 0x100>;
qcom,pbs-client = <&pm660l_pbs>;
label = "oledb";
regulator-name = "regulator-oledb";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <8100000>;
qcom,swire-control;
qcom,ext-pin-control;
status = "disabled";
};
pm660a_labibb: qpnp-labibb-regulator {
compatible = "qcom,qpnp-labibb-regulator";
#address-cells = <1>;
#size-cells = <1>;
qcom,pmic-revid = <&pm660l_revid>;
qcom,swire-control;
status = "disabled";
ibb_regulator: qcom,ibb@dc00 {
reg = <0xdc00 0x100>;
reg-names = "ibb_reg";
regulator-name = "ibb_reg";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <6300000>;
qcom,qpnp-ibb-min-voltage = <1400000>;
qcom,qpnp-ibb-step-size = <100000>;
qcom,qpnp-ibb-slew-rate = <2000000>;
qcom,qpnp-ibb-init-voltage = <4000000>;
qcom,qpnp-ibb-init-amoled-voltage = <4000000>;
};
lab_regulator: qcom,lab@de00 {
reg = <0xde00 0x100>;
reg-names = "lab";
regulator-name = "lab_reg";
regulator-min-microvolt = <4600000>;
regulator-max-microvolt = <6100000>;
qcom,qpnp-lab-min-voltage = <4600000>;
qcom,qpnp-lab-step-size = <100000>;
qcom,qpnp-lab-slew-rate = <5000>;
qcom,qpnp-lab-init-voltage = <4600000>;
qcom,qpnp-lab-init-amoled-voltage = <4600000>;
qcom,notify-lab-vreg-ok-sts;
};
};
};
&pm660_pdphy {
vbus-supply = <&smb2_vbus>;
vconn-supply = <&smb2_vconn>;
};
&usb0 {
extcon = <&pm660_pdphy>, <&pm660_pdphy>, <&eud>,
<&pm660_charger>, <&pm660_charger>;
vbus_dwc3-supply = <&smb2_vbus>;
qcom,no-vbus-vote-with-type-C;
};