blob: 5204137e75eb173af07d00b5e121e62cde757a68 [file] [log] [blame]
Sundara Vinayagambde65ab2018-03-19 14:27:33 +05301/* Copyright (c) 2013-2014, 2016-2018, 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
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030013#include <dt-bindings/interrupt-controller/irq.h>
14#include <dt-bindings/spmi/spmi.h>
15
16&spmi_bus {
17
Stephen Boyd2bce84c2015-11-20 15:31:19 -080018 pm8916_0: pm8916@0 {
19 compatible = "qcom,pm8916", "qcom,spmi-pmic";
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030020 reg = <0x0 SPMI_USID>;
21 #address-cells = <1>;
Sundara Vinayagambde65ab2018-03-19 14:27:33 +053022 #size-cells = <1>;
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030023
Sundara Vinayagambde65ab2018-03-19 14:27:33 +053024 pm8916_revid: qcom,revid@100 {
25 compatible = "qcom,qpnp-revid";
26 reg = <0x100 0x100>;
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030027 };
28
Sundara Vinayagambde65ab2018-03-19 14:27:33 +053029 pm8916_pon: qcom,power-on@800 {
30 compatible = "qcom,qpnp-power-on";
31 reg = <0x800 0x100>;
32 interrupts = <0x0 0x8 0x0 IRQ_TYPE_NONE>,
33 <0x0 0x8 0x1 IRQ_TYPE_NONE>;
34 interrupt-names = "kpdpwr", "resin";
35 qcom,pon-dbc-delay = <15625>;
36 qcom,system-reset;
37 qcom,clear-warm-reset;
38 qcom,store-hard-reset-reason;
39
40 qcom,pon_1 {
41 qcom,pon-type = <0>;
42 qcom,support-reset = <1>;
43 qcom,pull-up = <1>;
44 qcom,s1-timer = <10256>;
45 qcom,s2-timer = <2000>;
46 qcom,s2-type = <1>;
47 linux,code = <116>;
48 };
49
50 qcom,pon_2 {
51 qcom,pon-type = <1>;
52 qcom,pull-up = <1>;
53 linux,code = <114>;
54 };
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030055 };
56
Sundara Vinayagambde65ab2018-03-19 14:27:33 +053057 pm8916_gpios: pinctrl@c000 {
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030058 compatible = "qcom,pm8916-gpio";
Sundara Vinayagambde65ab2018-03-19 14:27:33 +053059 reg = <0xc000 0x400>;
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030060 gpio-controller;
61 #gpio-cells = <2>;
62 interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
63 <0 0xc1 0 IRQ_TYPE_NONE>,
64 <0 0xc2 0 IRQ_TYPE_NONE>,
65 <0 0xc3 0 IRQ_TYPE_NONE>;
Sundara Vinayagambde65ab2018-03-19 14:27:33 +053066 interrupt-names = "pm8916_gpio1", "pm8916_gpio2",
67 "pm8916_gpio3", "pm8916_gpio4";
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030068 };
69
70 pm8916_mpps: mpps@a000 {
71 compatible = "qcom,pm8916-mpp";
Sundara Vinayagambde65ab2018-03-19 14:27:33 +053072 reg = <0xa000 0x400>;
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030073 gpio-controller;
74 #gpio-cells = <2>;
75 interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
76 <0 0xa1 0 IRQ_TYPE_NONE>,
77 <0 0xa2 0 IRQ_TYPE_NONE>,
78 <0 0xa3 0 IRQ_TYPE_NONE>;
Sundara Vinayagambde65ab2018-03-19 14:27:33 +053079 interrupt-names = "pm8916_mpp1", "pm8916_mpp2",
80 "pm8916_mpp3", "pm8916_mpp4";
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030081 };
82
Sundara Vinayagambde65ab2018-03-19 14:27:33 +053083 pm8916_rtc: qcom,pm8916_rtc {
84 compatible = "qcom,qpnp-rtc";
85 #address-cells = <1>;
86 #size-cells = <1>;
87 qcom,qpnp-rtc-write = <0>;
88 qcom,qpnp-rtc-alarm-pwrup = <0>;
89
90 qcom,pm8916_rtc_rw@6000 {
91 reg = <0x6000 0x100>;
92 };
93 qcom,pm8916_rtc_alarm@6100 {
94 reg = <0x6100 0x100>;
95 interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
96 };
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +030097 };
98
99 pm8916_vadc: vadc@3100 {
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530100 compatible = "qcom,qpnp-vadc";
101 reg = <0x3100 0x100>;
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +0300102 #address-cells = <1>;
103 #size-cells = <0>;
Arulpandiyan Vadivel9c32e5c2018-06-09 18:11:25 +0530104 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530105 interrupt-names = "eoc-int-en-set";
106 qcom,adc-bit-resolution = <15>;
107 qcom,adc-vdd-reference = <1800>;
108 qcom,vadc-poll-eoc;
109 qcom,pmic-revid = <&pm8916_revid>;
Arulpandiyan Vadivel9c32e5c2018-06-09 18:11:25 +0530110 #thermal-sensor-cells = <1>;
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +0300111
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530112 chan@8 {
113 label = "die_temp";
114 reg = <8>;
115 qcom,decimation = <0>;
116 qcom,pre-div-channel-scaling = <0>;
117 qcom,calibration-type = "absolute";
118 qcom,scale-function = <3>;
119 qcom,hw-settle-time = <0>;
120 qcom,fast-avg-setup = <0>;
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +0300121 };
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530122
123 chan@9 {
124 label = "ref_625mv";
125 reg = <9>;
126 qcom,decimation = <0>;
127 qcom,pre-div-channel-scaling = <0>;
128 qcom,calibration-type = "absolute";
129 qcom,scale-function = <0>;
130 qcom,hw-settle-time = <0>;
131 qcom,fast-avg-setup = <0>;
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +0300132 };
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530133
134 chan@a {
135 label = "ref_1250v";
136 reg = <0xa>;
137 qcom,decimation = <0>;
138 qcom,pre-div-channel-scaling = <0>;
139 qcom,calibration-type = "absolute";
140 qcom,scale-function = <0>;
141 qcom,hw-settle-time = <0>;
142 qcom,fast-avg-setup = <0>;
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +0300143 };
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530144 };
145
146 pm8916_tz: qcom,temp-alarm@2400 {
147 compatible = "qcom,qpnp-temp-alarm";
148 reg = <0x2400 0x100>;
Arulpandiyan Vadivel9c32e5c2018-06-09 18:11:25 +0530149 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530150 label = "pm8916_tz";
151 qcom,channel-num = <8>;
152 qcom,threshold-set = <0>;
153 qcom,temp_alarm-vadc = <&pm8916_vadc>;
Arulpandiyan Vadivel9c32e5c2018-06-09 18:11:25 +0530154 #thermal-sensor-cells = <0>;
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530155 };
156
157 pm8916_adc_tm: vadc@3400 {
158 compatible = "qcom,qpnp-adc-tm";
159 reg = <0x3400 0x100>;
160 #address-cells = <1>;
161 #size-cells = <0>;
Arulpandiyan Vadivel9c32e5c2018-06-09 18:11:25 +0530162 interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>,
163 <0x0 0x34 0x3 IRQ_TYPE_EDGE_RISING>,
164 <0x0 0x34 0x4 IRQ_TYPE_EDGE_RISING>;
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530165 interrupt-names = "eoc-int-en-set",
166 "high-thr-en-set",
167 "low-thr-en-set";
168 qcom,adc-bit-resolution = <15>;
169 qcom,adc-vdd-reference = <1800>;
170 qcom,adc_tm-vadc = <&pm8916_vadc>;
171 qcom,pmic-revid = <&pm8916_revid>;
172 };
173
Arulpandiyan Vadiveld90fd062018-04-19 12:13:40 +0530174 pm8916_chg: qcom,charger {
175 compatible = "qcom,qpnp-linear-charger";
176 #address-cells = <1>;
177 #size-cells = <1>;
178
179 qcom,vddmax-mv = <4200>;
180 qcom,vddsafe-mv = <4200>;
181 qcom,vinmin-mv = <4308>;
182 qcom,ibatsafe-ma = <1440>;
183 qcom,thermal-mitigation = <1440 720 630 0>;
184 qcom,cool-bat-decidegc = <100>;
185 qcom,warm-bat-decidegc = <450>;
186 qcom,cool-bat-mv = <4100>;
187 qcom,warm-bat-mv = <4100>;
188 qcom,ibatmax-warm-ma = <360>;
189 qcom,ibatmax-cool-ma = <360>;
190 qcom,batt-hot-percentage = <25>;
191 qcom,batt-cold-percentage = <80>;
192 qcom,tchg-mins = <232>;
193 qcom,resume-soc = <99>;
194 qcom,chg-vadc = <&pm8916_vadc>;
195 qcom,chg-adc_tm = <&pm8916_adc_tm>;
196
197 status = "disabled";
198
199 qcom,chgr@1000 {
200 reg = <0x1000 0x100>;
201 interrupts =
202 <0x0 0x10 0x7 IRQ_TYPE_EDGE_RISING>,
203 <0x0 0x10 0x6 IRQ_TYPE_EDGE_RISING>,
204 <0x0 0x10 0x5 IRQ_TYPE_EDGE_BOTH>,
205 <0x0 0x10 0x0 IRQ_TYPE_EDGE_FALLING>;
206 interrupt-names = "chg-done",
207 "chg-failed",
208 "fast-chg-on",
209 "vbat-det-lo";
210 };
211
212 qcom,bat-if@1200 {
213 reg = <0x1200 0x100>;
214 interrupts = <0x0 0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
215 <0x0 0x12 0x0 IRQ_TYPE_EDGE_BOTH>;
216 interrupt-names = "bat-temp-ok",
217 "batt-pres";
218 };
219
220 qcom,usb-chgpth@1300 {
221 reg = <0x1300 0x100>;
222 interrupts =
223 <0 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
224 <0 0x13 0x2 IRQ_TYPE_EDGE_RISING>,
225 <0 0x13 0x1 IRQ_TYPE_EDGE_BOTH>;
226 interrupt-names = "usb-over-temp",
227 "chg-gone",
228 "usbin-valid";
229 };
230
231 qcom,chg-misc@1600 {
232 reg = <0x1600 0x100>;
233 };
234 };
235
236 pm8916_bms: qcom,vmbms {
237 compatible = "qcom,qpnp-vm-bms";
238 #address-cells = <1>;
239 #size-cells = <1>;
240 status = "disabled";
241
242 qcom,v-cutoff-uv = <3400000>;
243 qcom,max-voltage-uv = <4200000>;
244 qcom,r-conn-mohm = <0>;
245 qcom,shutdown-soc-valid-limit = <100>;
246 qcom,low-soc-calculate-soc-threshold = <15>;
247 qcom,low-voltage-calculate-soc-ms = <1000>;
248 qcom,low-soc-calculate-soc-ms = <5000>;
249 qcom,calculate-soc-ms = <20000>;
250 qcom,volatge-soc-timeout-ms = <60000>;
251 qcom,low-voltage-threshold = <3450000>;
252 qcom,s3-ocv-tolerence-uv = <1200>;
253 qcom,s2-fifo-length = <5>;
254 qcom,low-soc-fifo-length = <2>;
255 qcom,bms-vadc = <&pm8916_vadc>;
256 qcom,bms-adc_tm = <&pm8916_adc_tm>;
257 qcom,pmic-revid = <&pm8916_revid>;
258
259 qcom,force-s3-on-suspend;
260 qcom,force-s2-in-charging;
261 qcom,report-charger-eoc;
262
263 qcom,batt-pres-status@1208 {
264 reg = <0x1208 0x1>;
265 };
266
267 qcom,qpnp-chg-pres@1008 {
268 reg = <0x1008 0x1>;
269 };
270
271 qcom,vm-bms@4000 {
272 reg = <0x4000 0x100>;
273 interrupts = <0x0 0x40 0x0 IRQ_TYPE_NONE>,
274 <0x0 0x40 0x1 IRQ_TYPE_NONE>,
275 <0x0 0x40 0x2 IRQ_TYPE_NONE>,
276 <0x0 0x40 0x3 IRQ_TYPE_NONE>,
277 <0x0 0x40 0x4 IRQ_TYPE_NONE>,
278 <0x0 0x40 0x5 IRQ_TYPE_NONE>;
279
280 interrupt-names = "leave_cv",
281 "enter_cv",
282 "good_ocv",
283 "ocv_thr",
284 "fifo_update_done",
285 "fsm_state_change";
286 };
287 };
288
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530289 pm8916_leds: qcom,leds@a100 {
290 compatible = "qcom,leds-qpnp";
291 reg = <0xa100 0x100>;
292 label = "mpp";
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +0300293 };
294 };
295
Stephen Boyd2bce84c2015-11-20 15:31:19 -0800296 pm8916_1: pm8916@1 {
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530297 compatible = "qcom,pm8916", "qcom,spmi-pmic";
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +0300298 reg = <0x1 SPMI_USID>;
299 #address-cells = <1>;
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530300 #size-cells = <1>;
301
302 pm8916_pwm: pwm@bc00 {
303 compatible = "qcom,qpnp-pwm";
304 reg = <0xbc00 0x100>;
305 reg-names = "qpnp-lpg-channel-base";
306 qcom,channel-id = <0>;
307 qcom,supported-sizes = <6>, <9>;
308 #pwm-cells = <2>;
309 };
310
311 pm8916_vib: qcom,vibrator@c000 {
312 compatible = "qcom,qpnp-vibrator";
313 reg = <0xc000 0x100>;
314 label = "vibrator";
315 status = "disabled";
316 };
317
318 pm8916_tombak_dig: msm8x16_wcd_codec@f000{
319 compatible = "qcom,msm8x16_wcd_codec";
320 reg = <0xf000 0x100>;
321 interrupt-parent = <&spmi_bus>;
322 interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
323 <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
324 <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
325 <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
326 <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
327 <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
328 <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
329 <0x1 0xf0 0x7 IRQ_TYPE_NONE>;
330 interrupt-names = "spk_cnp_int",
331 "spk_clip_int",
332 "spk_ocp_int",
333 "ins_rem_det1",
334 "but_rel_det",
335 "but_press_det",
336 "ins_rem_det",
337 "mbhc_int";
338
339 cdc-vdda-cp-supply = <&pm8916_s4>;
340 qcom,cdc-vdda-cp-voltage = <1800000 2200000>;
341 qcom,cdc-vdda-cp-current = <770000>;
342
343 cdc-vdda-h-supply = <&pm8916_l5>;
344 qcom,cdc-vdda-h-voltage = <1800000 1800000>;
345 qcom,cdc-vdda-h-current = <20000>;
346
347 cdc-vdd-px-supply = <&pm8916_s4>;
348 qcom,cdc-vdd-px-voltage = <1800000 2200000>;
349 qcom,cdc-vdd-px-current = <770000>;
350
351 cdc-vdd-pa-supply = <&pm8916_l5>;
352 qcom,cdc-vdd-pa-voltage = <1800000 1800000>;
353 qcom,cdc-vdd-pa-current = <5000>;
354
355 cdc-vdd-mic-bias-supply = <&pm8916_l13>;
356 qcom,cdc-vdd-mic-bias-voltage = <3075000 3075000>;
357 qcom,cdc-vdd-mic-bias-current = <25000>;
358
359 qcom,cdc-mclk-clk-rate = <9600000>;
360
361 qcom,cdc-static-supplies = "cdc-vdda-h",
362 "cdc-vdd-px",
363 "cdc-vdd-pa",
364 "cdc-vdda-cp";
365
366 qcom,cdc-on-demand-supplies = "cdc-vdd-mic-bias";
367 qcom,subsys-name = "modem";
368 };
369
370 pm8916_tombak_analog: msm8x16_wcd_codec@f100{
371 compatible = "qcom,msm8x16_wcd_codec";
372 reg = <0xf100 0x100>;
373 interrupt-parent = <&spmi_bus>;
374 interrupts = <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
375 <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
376 <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
377 <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
378 <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
379 <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
380 interrupt-names = "ear_ocp_int",
381 "hphr_ocp_int",
382 "hphl_ocp_det",
383 "ear_cnp_int",
384 "hphr_cnp_int",
385 "hphl_cnp_int";
386 };
Ivan T. Ivanov729ee9c2015-04-20 10:45:39 +0300387 };
388};