summaryrefslogtreecommitdiff
path: root/qcom/pm8916.dtsi
blob: 2ceae7330b926a4de47c9c1730b977ec27cd5dbe (plain)
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
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>

&spmi_bus {

	pm8916_0: pm8916@0 {
		compatible = "qcom,pm8916", "qcom,spmi-pmic";
		reg = <0 SPMI_USID>;
		#address-cells = <2>;
		#size-cells = <0>;

		pm8916_revid: qcom,revid@100 {
			compatible = "qcom,qpnp-revid";
			reg = <0x100 0x100>;
		};

		pm8916_pon: qcom,power-on@800 {
			compatible = "qcom,qpnp-power-on";
			reg = <0x800 0x100>;
			interrupts = <0x0 0x8 0x0 IRQ_TYPE_NONE>,
				     <0x0 0x8 0x1 IRQ_TYPE_NONE>;
			interrupt-names = "kpdpwr", "resin";
			qcom,pon-dbc-delay = <15625>;
			qcom,system-reset;
			qcom,clear-warm-reset;
			qcom,store-hard-reset-reason;

			qcom,pon_1 {
				qcom,pon-type = <0>;
				qcom,support-reset = <1>;
				qcom,pull-up = <1>;
				qcom,s1-timer = <10256>;
				qcom,s2-timer = <2000>;
				qcom,s2-type = <1>;
				linux,code = <116>;
			};

			qcom,pon_2 {
				qcom,pon-type = <1>;
				qcom,pull-up = <1>;
				linux,code = <114>;
			};
		};

		pm8916_gpios: pinctrl@c000 {
			compatible = "qcom,pm8916-gpio";
			reg = <0xc000 0x400>;
			gpio-controller;
			#gpio-cells = <2>;
			interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
				     <0 0xc1 0 IRQ_TYPE_NONE>,
				     <0 0xc2 0 IRQ_TYPE_NONE>,
				     <0 0xc3 0 IRQ_TYPE_NONE>;
			interrupt-names = "pm8916_gpio1", "pm8916_gpio2",
					  "pm8916_gpio3", "pm8916_gpio4";
		};

		pm8916_mpps: mpps@a000 {
			compatible = "qcom,pm8916-mpp";
			reg = <0xa000 0x400>;
			gpio-controller;
			#gpio-cells = <2>;
			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
				     <0 0xa1 0 IRQ_TYPE_NONE>,
				     <0 0xa2 0 IRQ_TYPE_NONE>,
				     <0 0xa3 0 IRQ_TYPE_NONE>;
			interrupt-names = "pm8916_mpp1", "pm8916_mpp2",
					  "pm8916_mpp3", "pm8916_mpp4";
		};

		pm8916_rtc: qcom,pm8916_rtc {
			compatible = "qcom,pm8916-rtc";
			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
		};

		pm8916_vadc: vadc@3100 {
			compatible = "qcom,spmi-vadc";
			reg = <0x3100 0x100>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "eoc-int-en-set";
			qcom,adc-bit-resolution = <15>;
			qcom,adc-vdd-reference = <1800>;
			qcom,vadc-poll-eoc;
			qcom,pmic-revid = <&pm8916_revid>;
			#thermal-sensor-cells = <1>;

			chan@8 {
				label = "die_temp";
				reg = <8>;
				qcom,decimation = <0>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "absolute";
				qcom,scale-function = <3>;
				qcom,hw-settle-time = <0>;
				qcom,fast-avg-setup = <0>;
			};

			chan@9 {
				label = "ref_625mv";
				reg = <9>;
				qcom,decimation = <0>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "absolute";
				qcom,scale-function = <0>;
				qcom,hw-settle-time = <0>;
				qcom,fast-avg-setup = <0>;
			};

			chan@a {
				label = "ref_1250v";
				reg = <0xa>;
				qcom,decimation = <0>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "absolute";
				qcom,scale-function = <0>;
				qcom,hw-settle-time = <0>;
				qcom,fast-avg-setup = <0>;
			};
		};

		pm8916_tz: qcom,temp-alarm@2400 {
			compatible = "qcom,spmi-temp-alarm";
			reg = <0x2400 0x100>;
			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
			label = "pm8916_tz";
			qcom,channel-num = <8>;
			qcom,threshold-set = <0>;
			qcom,temp_alarm-vadc = <&pm8916_vadc>;
			#thermal-sensor-cells = <0>;
		};

		pm8916_adc_tm: vadc@3400 {
			compatible = "qcom,adc-tm-rev2";
			reg = <0x3400 0x100>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>,
				     <0x0 0x34 0x3 IRQ_TYPE_EDGE_RISING>,
				     <0x0 0x34 0x4 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "eoc-int-en-set",
					  "high-thr-en-set",
					  "low-thr-en-set";
			qcom,adc-bit-resolution = <15>;
			qcom,adc-vdd-reference = <1800>;
			qcom,adc_tm-vadc = <&pm8916_vadc>;
			qcom,pmic-revid = <&pm8916_revid>;
		};

		pm8916_chg: qcom,charger {
			compatible = "qcom,qpnp-linear-charger";
			#address-cells = <1>;
			#size-cells = <1>;
			#cooling-cells = <2>;

			qcom,vddmax-mv = <4200>;
			qcom,vddsafe-mv = <4200>;
			qcom,vinmin-mv = <4308>;
			qcom,ibatsafe-ma = <1440>;
			qcom,thermal-mitigation = <1440 720 630 0>;
			qcom,cool-bat-decidegc = <100>;
			qcom,warm-bat-decidegc = <450>;
			qcom,cool-bat-mv = <4100>;
			qcom,warm-bat-mv = <4100>;
			qcom,ibatmax-warm-ma = <360>;
			qcom,ibatmax-cool-ma = <360>;
			qcom,batt-hot-percentage = <25>;
			qcom,batt-cold-percentage = <80>;
			qcom,tchg-mins = <232>;
			qcom,resume-soc = <99>;
			qcom,chg-vadc = <&pm8916_vadc>;
			qcom,chg-adc_tm = <&pm8916_adc_tm>;

			status = "disabled";

			qcom,chgr@1000 {
				reg = <0x1000 0x100>;
				interrupts =
					<0x0 0x10 0x7 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x10 0x6 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x10 0x5 IRQ_TYPE_EDGE_BOTH>,
					<0x0 0x10 0x0 IRQ_TYPE_EDGE_FALLING>;
				interrupt-names = "chg-done",
						  "chg-failed",
						  "fast-chg-on",
						  "vbat-det-lo";
			};

			qcom,bat-if@1200 {
				reg = <0x1200 0x100>;
				interrupts = <0x0 0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
					     <0x0 0x12 0x0 IRQ_TYPE_EDGE_BOTH>;
				interrupt-names = "bat-temp-ok",
						  "batt-pres";
			};

			qcom,usb-chgpth@1300 {
				reg = <0x1300 0x100>;
				interrupts =
					<0 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
					<0 0x13 0x2 IRQ_TYPE_EDGE_RISING>,
					<0 0x13 0x1 IRQ_TYPE_EDGE_BOTH>;
				interrupt-names = "usb-over-temp",
						  "chg-gone",
						  "usbin-valid";
			};

			qcom,chg-misc@1600 {
				reg = <0x1600 0x100>;
			};
		};

		pm8916_bms: qcom,vmbms {
			compatible = "qcom,qpnp-vm-bms";
			#address-cells = <1>;
			#size-cells = <1>;
			status = "disabled";

			qcom,v-cutoff-uv = <3400000>;
			qcom,max-voltage-uv = <4200000>;
			qcom,r-conn-mohm = <0>;
			qcom,shutdown-soc-valid-limit = <100>;
			qcom,low-soc-calculate-soc-threshold = <15>;
			qcom,low-voltage-calculate-soc-ms = <1000>;
			qcom,low-soc-calculate-soc-ms = <5000>;
			qcom,calculate-soc-ms = <20000>;
			qcom,volatge-soc-timeout-ms = <60000>;
			qcom,low-voltage-threshold = <3450000>;
			qcom,s3-ocv-tolerence-uv = <1200>;
			qcom,s2-fifo-length = <5>;
			qcom,low-soc-fifo-length = <2>;
			qcom,bms-vadc = <&pm8916_vadc>;
			qcom,bms-adc_tm = <&pm8916_adc_tm>;
			qcom,pmic-revid = <&pm8916_revid>;

			qcom,force-s3-on-suspend;
			qcom,force-s2-in-charging;
			qcom,report-charger-eoc;

			qcom,batt-pres-status@1208 {
				reg = <0x1208 0x1>;
			};

			qcom,qpnp-chg-pres@1008 {
				reg = <0x1008 0x1>;
			};

			qcom,vm-bms@4000 {
				reg = <0x4000 0x100>;
				interrupts = <0x0 0x40 0x0 IRQ_TYPE_NONE>,
					     <0x0 0x40 0x1 IRQ_TYPE_NONE>,
					     <0x0 0x40 0x2 IRQ_TYPE_NONE>,
					     <0x0 0x40 0x3 IRQ_TYPE_NONE>,
					     <0x0 0x40 0x4 IRQ_TYPE_NONE>,
					     <0x0 0x40 0x5 IRQ_TYPE_NONE>;

				interrupt-names = "leave_cv",
						  "enter_cv",
						  "good_ocv",
						  "ocv_thr",
						  "fifo_update_done",
						  "fsm_state_change";
			};
		};

		pm8916_leds: qcom,leds@a100 {
			compatible = "qcom,leds-qpnp";
			reg = <0xa100 0x100>;
			label = "mpp";
		};
	};

	pm8916_1: pm8916@1 {
		compatible = "qcom,pm8916", "qcom,spmi-pmic";
		reg = <1 SPMI_USID>;
		#address-cells = <2>;
		#size-cells = <0>;

		pm8916_pwm: qcom,pwms@bc00 {
			compatible = "qcom,pwm-lpg";
			reg = <0xbc00 0x100>;
			reg-names = "lpg-base";
			#pwm-cells = <2>;
			qcom,num-lpg-channels = <1>;
		};

		pm8916_vib: qcom,vibrator@c000 {
			compatible = "qcom,qpnp-vibrator";
			reg = <0xc000 0x100>;
			label = "vibrator";
			status = "disabled";
		};

		pm8916_tombak_dig: msm8x16_wcd_codec@f000 {
			compatible = "qcom,msm8x16_wcd_codec";
			reg = <0xf000 0x100>;
			interrupt-parent = <&spmi_bus>;
			interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
				     <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
				     <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
				     <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
				     <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
				     <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
				     <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
				     <0x1 0xf0 0x7 IRQ_TYPE_NONE>;
			interrupt-names = "spk_cnp_int",
					  "spk_clip_int",
					  "spk_ocp_int",
					  "ins_rem_det1",
					  "but_rel_det",
					  "but_press_det",
					  "ins_rem_det",
					  "mbhc_int";

			cdc-vdda-cp-supply = <&pm8916_s4>;
			qcom,cdc-vdda-cp-voltage = <1800000 2200000>;
			qcom,cdc-vdda-cp-current = <770000>;

			cdc-vdda-h-supply = <&pm8916_l5>;
			qcom,cdc-vdda-h-voltage = <1800000 1800000>;
			qcom,cdc-vdda-h-current = <20000>;

			cdc-vdd-px-supply = <&pm8916_s4>;
			qcom,cdc-vdd-px-voltage = <1800000 2200000>;
			qcom,cdc-vdd-px-current = <770000>;

			cdc-vdd-pa-supply = <&pm8916_l5>;
			qcom,cdc-vdd-pa-voltage = <1800000 1800000>;
			qcom,cdc-vdd-pa-current = <5000>;

			cdc-vdd-mic-bias-supply = <&pm8916_l13>;
			qcom,cdc-vdd-mic-bias-voltage = <3075000 3075000>;
			qcom,cdc-vdd-mic-bias-current = <25000>;

			qcom,cdc-mclk-clk-rate = <9600000>;

			qcom,cdc-static-supplies = "cdc-vdda-h",
						   "cdc-vdd-px",
						   "cdc-vdd-pa",
						   "cdc-vdda-cp";

			qcom,cdc-on-demand-supplies = "cdc-vdd-mic-bias";
			qcom,subsys-name = "modem";
		};

		pm8916_tombak_analog: msm8x16_wcd_codec@f100 {
			compatible = "qcom,msm8x16_wcd_codec";
			reg = <0xf100 0x100>;
			interrupt-parent = <&spmi_bus>;
			interrupts = <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
				     <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
				     <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
				     <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
				     <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
				     <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
			interrupt-names = "ear_ocp_int",
					  "hphr_ocp_int",
					  "hphl_ocp_det",
					  "ear_cnp_int",
					  "hphr_cnp_int",
					  "hphl_cnp_int";
		};
	};
};