summaryrefslogtreecommitdiff
path: root/qcom/pm8953.dtsi
blob: ba8b0711e65e65adad0f6f2e2e4f015a877f66a3 (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
366
367
368
369
370
371
372
373
374
375
376
377
378
379
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>

&spmi_bus {

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

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

		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>,
				<0x0 0x8 0x4 IRQ_TYPE_NONE>,
				<0x0 0x8 0x5 IRQ_TYPE_NONE>;
			interrupt-names = "kpdpwr", "resin",
				"resin-bark", "kpdpwr-resin-bark";
			qcom,pon-dbc-delay = <15625>;
			qcom,system-reset;
			qcom,store-hard-reset-reason;

			qcom,pon_1 {
				qcom,pon-type = <0>;
				qcom,pull-up = <1>;
				linux,code = <116>;
			};

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

		pm8953_tz: qcom,temp-alarm@2400 {
			compatible = "qcom,spmi-temp-alarm";
			reg = <0x2400 0x100>;
			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
			io-channels = <&pm8953_vadc VADC_DIE_TEMP>;
			io-channel-names = "thermal";
			#thermal-sensor-cells = <0>;
		};

		pm8953_mpps: mpps {
			compatible = "qcom,spmi-mpp";
			reg = <0xa000 0x400>;

			interrupts = <0x0 0xa0 0 IRQ_TYPE_NONE>,
				<0x0 0xa1 0 IRQ_TYPE_NONE>,
				<0x0 0xa2 0 IRQ_TYPE_NONE>,
				<0x0 0xa3 0 IRQ_TYPE_NONE>;
			interrupt-names = "pm8953_mpp1", "pm8953_mpp2",
					"pm8953_mpp3", "pm8953_mpp4";

			gpio-controller;
			#gpio-cells = <2>;

			case_therm {
				cas_therm_default: cas_therm_default {
					pins = "mpp4";
					function = "analog";
					input-enable;
					qcom,amux-route = <3>;
				};
			};

			pa_therm1 {
				pa_therm1_default: pa_therm1_default {
					pins = "mpp2";
					function = "analog";
					input-enable;
					qcom,amux-route = <1>;
				};
			};
		};

		pm8953_gpios: gpios {
			compatible = "qcom,spmi-gpio";
			reg = <0xc000 0x800>;

			interrupts = <0x0 0xc0 0 IRQ_TYPE_NONE>,
				<0x0 0xc1 0 IRQ_TYPE_NONE>,
				<0x0 0xc3 0 IRQ_TYPE_NONE>,
				<0x0 0xc4 0 IRQ_TYPE_NONE>,
				<0x0 0xc6 0 IRQ_TYPE_NONE>,
				<0x0 0xc7 0 IRQ_TYPE_NONE>;
			interrupt-names = "pm8953_gpio1", "pm8953_gpio2",
					"pm8953_gpio4", "pm8953_gpio5",
					"pm8953_gpio7", "pm8953_gpio8";

			gpio-controller;
			#gpio-cells = <2>;
			qcom,gpios-disallowed = <3 6>;
		};

		pm8953_vadc: vadc@3100 {
			compatible = "qcom,spmi-vadc";
			reg = <0x3100 0x100>;
			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
			#address-cells = <1>;
			#size-cells = <0>;
			#io-channel-cells = <1>;
			io-channel-ranges;
			pinctrl-names = "default";
			pinctrl-0 = <&pa_therm1_default &cas_therm_default>;

			/* Channel nodes */
			vcoin {
				reg = <VADC_VCOIN>;
				label = "vcoin";
				qcom,pre-scaling = <1 3>;
			};

			vph_pwr {
				reg = <VADC_VSYS>;
				label = "vph_pwr";
				qcom,pre-scaling = <1 3>;
			};

			die_temp {
				reg = <VADC_DIE_TEMP>;
				label = "die_temp";
				qcom,pre-scaling = <1 1>;
			};

			ref_625mv {
				reg = <VADC_REF_625MV>;
				label = "ref_625mv";
				qcom,pre-scaling = <1 1>;
			};

			ref_1250v {
				reg = <VADC_REF_1250MV>;
				label = "ref_1250v";
				qcom,pre-scaling = <1 1>;
			};

			ref_buf_625mv {
				reg = <VADC_SPARE1>;
				label = "ref_buf_625mv";
				qcom,pre-scaling = <1 1>;
			};

			ref_vdd {
				reg = <VADC_VDD_VADC>;
				label = "ref_vdd";
				qcom,pre-scaling = <1 1>;
			};

			ref_gnd {
				reg = <VADC_GND_REF>;
				label = "ref_gnd";
				qcom,pre-scaling = <1 1>;
			};

			pa_therm0 {
				reg = <VADC_LR_MUX7_HW_ID>;
				label = "pa_therm0";
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
				qcom,pre-scaling = <1 1>;
			};

			pa_therm1 {
				reg = <VADC_P_MUX2_1_1>;
				label = "pa_therm1";
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
				qcom,pre-scaling = <1 1>;
			};

			xo_therm {
				reg = <VADC_LR_MUX3_XO_THERM>;
				label = "xo_therm";
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
				qcom,pre-scaling = <1 1>;
			};

			xo_therm_buf {
				reg = <VADC_LR_MUX3_BUF_XO_THERM>;
				label = "xo_therm_buf";
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
				qcom,pre-scaling = <1 1>;
			};

			case_therm {
				reg = <VADC_P_MUX4_1_1>;
				label = "case_therm";
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
				qcom,pre-scaling = <1 1>;
			};
		};

		pm8953_adc_tm_iio: adc_tm_iio {
			compatible = "qcom,adc-tm5-iio";
			reg = <0x3500 0x100>;
			#thermal-sensor-cells = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			io-channels = <&pm8953_vadc VADC_LR_MUX3_BUF_XO_THERM>;

			xo_therm_buf {
				reg = <VADC_LR_MUX3_BUF_XO_THERM>;
				label = "xo_therm_buf";
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
				qcom,pre-scaling = <1 1>;
			};
		};

		pm8953_adc_tm: vadc@3400 {
			compatible = "qcom,qpnp-adc-tm";
			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";
			#thermal-sensor-cells = <1>;
			qcom,adc-vdd-reference = <1800>;
			io-channels = <&pm8953_vadc VADC_REF_625MV>,
					<&pm8953_vadc VADC_REF_1250MV>,
					<&pm8953_vadc VADC_VDD_VADC>,
					<&pm8953_vadc VADC_GND_REF>;
			io-channel-names = "ref_625mv", "ref_1250v", "ref_vdd",
						"ref_gnd";

			pa_therm0 {
				label = "pa_therm0";
				reg = <VADC_LR_MUX7_HW_ID>;
				io-channels = <&pm8953_vadc VADC_LR_MUX7_HW_ID>;
				io-channel-names = "pa_therm0";
				qcom,pre-div-channel-scaling = <0>;
				qcom,decimation = <0>;
				qcom,ratiometric;
				qcom,scale-fn-type = <2>;
				qcom,hw-settle-time = <2>;
				qcom,btm-channel-number = <0x48>;
				qcom,fast-avg-setup = <0>;
				qcom,thermal-node;
			};

			xo_therm {
				label = "xo_therm";
				reg = <VADC_LR_MUX3_XO_THERM>;
				io-channels = <&pm8953_vadc
							VADC_LR_MUX3_XO_THERM>;
				io-channel-names = "xo_therm";
				qcom,pre-div-channel-scaling = <0>;
				qcom,decimation = <0>;
				qcom,ratiometric;
				qcom,scale-fn-type = <4>;
				qcom,hw-settle-time = <2>;
				qcom,btm-channel-number = <0x68>;
				qcom,fast-avg-setup = <0>;
				qcom,thermal-node;
			};
		};

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

		pm8953_typec: qcom,pm8953_typec@bf00 {
			compatible = "qcom,qpnp-typec";
			reg = <0xbf00 0x100>;
			interrupts =    <0x0 0xbf 0x0 IRQ_TYPE_EDGE_RISING>,
					<0x0 0xbf 0x1 IRQ_TYPE_EDGE_RISING>,
					<0x0 0xbf 0x2 IRQ_TYPE_EDGE_RISING>,
					<0x0 0xbf 0x3 IRQ_TYPE_EDGE_RISING>,
					<0x0 0xbf 0x4 IRQ_TYPE_EDGE_RISING>,
					<0x0 0xbf 0x6 IRQ_TYPE_EDGE_RISING>,
					<0x0 0xbf 0x7 IRQ_TYPE_EDGE_RISING>;

			interrupt-names =       "vrd-change",
						"ufp-detect",
						"ufp-detach",
						"dfp-detect",
						"dfp-detach",
						"vbus-err",
						"vconn-oc";
		};
	};

	pm8953_1: qcom,pm8953@1 {
		compatible = "qcom,spmi-pmic";
		reg = <1 SPMI_USID>;
		#address-cells = <1>;
		#size-cells = <1>;

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

&thermal_zones {
	xo-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm8953_adc_tm VADC_LR_MUX3_XO_THERM>;
		thermal-governor = "user_space";
		wake-capable-sensor;

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	xo-therm-buf-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm8953_adc_tm_iio
					VADC_LR_MUX3_BUF_XO_THERM>;
		thermal-governor = "user_space";
		wake-capable-sensor;

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	pm8953_temp_alarm: pm8953_tz {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8953_tz>;
		wake-capable-sensor;

		trips {
			pm8953_trip0: pm8953-trip0 {
				temperature = <105000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8953_trip1: pm8953-trip1 {
				temperature = <125000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8953_trip2: pm8953-trip2 {
				temperature = <145000>;
				hysteresis = <0>;
				type = "passive";
			};
		};
	};
};