summaryrefslogtreecommitdiffstats
path: root/arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami.dtsi
blob: 0163d41f95f865d0154eb3a551a5ff3c9fd033bb (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
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
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
// SPDX-License-Identifier: BSD-3-Clause
/*
 * Copyright (c) 2020, Konrad Dybcio <konrad.dybcio@somainline.org>
 */

#include "msm8994.dtsi"
#include "pm8994.dtsi"
#include "pmi8994.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/gpio-keys.h>

/ {
	/* required for bootloader to select correct board */

	/*
	 * We support MSM8994 v2 (0x20000) and v2.1 (0x20001).
	 * The V1 chip (0x0 and 0x10000) is significantly different
	 * and requires driver-side changes (including CPR, be warned!!).
	 * Besides that, it's very rare.
	 */
	qcom,msm-id = <207 0x20000>, <207 0x20001>;
	/* We only use pm8994+pmi8994. */
	qcom,pmic-id = <0x10009 0x1000a 0x00 0x00>;
	/* This property is shared across all kitakami devices. */
	qcom,board-id = <8 0>;

	/* Kitakami firmware doesn't support PSCI */
	/delete-node/ psci;

	gpio-keys {
		compatible = "gpio-keys";
		autorepeat;

		button-0 {
			label = "Volume Down";
			gpios = <&pm8994_gpios 2 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_VOLUMEDOWN>;
			wakeup-source;
			debounce-interval = <15>;
		};

		button-1 {
			label = "Volume Up";
			gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_VOLUMEUP>;
			wakeup-source;
			debounce-interval = <15>;
		};

		button-2 {
			label = "Camera Snapshot";
			gpios = <&pm8994_gpios 4 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_CAMERA>;
			wakeup-source;
			debounce-interval = <15>;
		};

		button-3 {
			label = "Camera Focus";
			gpios = <&pm8994_gpios 5 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_VOLUMEUP>;
			wakeup-source;
			debounce-interval = <15>;
		};
	};

	reserved-memory {
		/* This is for getting crash logs using Android downstream kernels */
		ramoops@1fe00000 {
			compatible = "ramoops";
			reg = <0 0x1fe00000 0 0x200000>;
			console-size = <0x100000>;
			record-size = <0x10000>;
			ftrace-size = <0x10000>;
			pmsg-size = <0x80000>;
		};

		fb_region: fb@40000000 {
			reg = <0 0x40000000 0 0x1000000>;
			no-map;
		};

		tzapp: memory@c7800000 {
			reg = <0 0xc7800000 0 0x1900000>;
			no-map;
		};
	};
};

&blsp1_spi1 {
	status = "okay";

	/* FPC fingerprint reader */
};

/* I2C1 is disabled on this board */

&blsp1_i2c2 {
	status = "okay";
	clock-frequency = <355000>;

	/* NXP PN547 NFC */
};

&blsp1_i2c6 {
	status = "okay";
	clock-frequency = <355000>;

	touchscreen: rmi4-i2c-dev@2c {
		compatible = "syna,rmi4-i2c";
		reg = <0x2c>;
		#address-cells = <1>;
		#size-cells = <0>;

		interrupt-parent = <&tlmm>;
		interrupts = <42 IRQ_TYPE_EDGE_FALLING>;

		pinctrl-names = "default";
		pinctrl-0 = <&ts_int_active &ts_reset_active>;

		vdd-supply = <&pm8994_l22>;
		vio-supply = <&pm8994_s4>;

		syna,reset-delay-ms = <220>;
		syna,startup-delay-ms = <220>;

		rmi4-f01@1 {
			reg = <0x01>;
			syna,nosleep-mode = <1>;
		};

		rmi4-f11@11 {
			reg = <0x11>;
			syna,sensor-type = <1>;
		};
	};
};

&blsp1_uart2 {
	status = "okay";
};

&blsp2_i2c5 {
	status = "okay";
	clock-frequency = <355000>;

	/* sii8620 HDMI/MHL bridge */
};

&blsp2_uart2 {
	status = "okay";
};

/*
 * Kitakami bootloader only turns cont_splash on when it detects
 * specific downstream MDSS/backlight nodes in the active DTB.
 * One way to use that framebuffer is to load a secondary instance of
 * LK with the downstream DTB appended and then, only from there, load
 * mainline Linux.
 */
&cont_splash_mem {
	reg = <0 0x03401000 0 0x2200000>;
};

&pmi8994_spmi_regulators {
	/*
	 * Yeah, this one *is* managed by RPMPD, but also needs
	 * to be hacked up as a-o due to the GPU device only accepting a single
	 * power domain.. which still isn't enough and forces us to bind
	 * OXILI_CX and OXILI_GX together!
	 */
	vdd_gfx: s2 {
		regulator-name = "VDD_GFX";
		regulator-min-microvolt = <980000>;
		regulator-max-microvolt = <980000>;

		/* hack until we rig up the gpu consumer */
		regulator-always-on;
	};
};

&rpm_requests {
	/* PMI8994 should probe first, because pmi8994_bby supplies some of PM8994's regulators */
	pmi8994_regulators: regulators-0 {
		compatible = "qcom,rpm-pmi8994-regulators";

		vdd_s1-supply = <&vph_pwr>;
		vdd_bst_byp-supply = <&vph_pwr>;

		pmi8994_s1: s1 {
			regulator-min-microvolt = <1025000>;
			regulator-max-microvolt = <1025000>;
		};

		/* S2 & S3 - VDD_GFX */

		pmi8994_bby: boost-bypass {
			regulator-min-microvolt = <3150000>;
			regulator-max-microvolt = <3600000>;
		};
	};

	pm8994_regulators: regulators-1 {
		compatible = "qcom,rpm-pm8994-regulators";

		vdd_s3-supply = <&vph_pwr>;
		vdd_s4-supply = <&vph_pwr>;
		vdd_s5-supply = <&vph_pwr>;
		vdd_s6-supply = <&vph_pwr>;
		vdd_s7-supply = <&vph_pwr>;
		vdd_l1-supply = <&pmi8994_s1>;
		vdd_l2_l26_l28-supply = <&pm8994_s3>;
		vdd_l3_l11-supply = <&pm8994_s3>;
		vdd_l4_l27_l31-supply = <&pm8994_s3>;
		vdd_l6_l12_l32-supply = <&pm8994_s5>;
		vdd_l8_l16_l30-supply = <&vph_pwr>;
		vdd_l9_l10_l18_l22-supply = <&pmi8994_bby>;
		vdd_l13_l19_l23_l24-supply = <&pmi8994_bby>;
		vdd_l14_l15-supply = <&pm8994_s5>;
		vdd_l17_l29-supply = <&pmi8994_bby>;
		vdd_l20_l21-supply = <&pmi8994_bby>;
		vdd_l25-supply = <&pm8994_s3>;
		vdd_lvs1_2-supply = <&pm8994_s4>;

		/* S1, S2, S6 and S12 are managed by RPMPD */

		pm8994_s3: s3 {
			regulator-min-microvolt = <1300000>;
			regulator-max-microvolt = <1300000>;
		};

		pm8994_s4: s4 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-system-load = <325000>;
			regulator-allow-set-load;
			regulator-always-on;
		};

		pm8994_s5: s5 {
			regulator-min-microvolt = <2150000>;
			regulator-max-microvolt = <2150000>;
		};

		pm8994_s7: s7 {
			regulator-min-microvolt = <1000000>;
			regulator-max-microvolt = <1000000>;
		};

		/*
		 * S8 - SPMI-managed VDD_APC0
		 * S9, S10 and S11 (the main one) - SPMI-managed VDD_APC1
		 */

		pm8994_l1: l1 {
			regulator-min-microvolt = <1000000>;
			regulator-max-microvolt = <1000000>;
		};

		pm8994_l2: l2 {
			regulator-min-microvolt = <1250000>;
			regulator-max-microvolt = <1250000>;
			regulator-system-load = <10000>;
			regulator-allow-set-load;
		};

		pm8994_l3: l3 {
			regulator-min-microvolt = <1100000>;
			regulator-max-microvolt = <1100000>;
			regulator-boot-on;
		};

		pm8994_l4: l4 {
			regulator-min-microvolt = <1225000>;
			regulator-max-microvolt = <1225000>;
		};

		/* L5 is inaccessible from RPM */

		pm8994_l6: l6 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};

		/* L7 is inaccessible from RPM */

		pm8994_l8: l8 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};

		pm8994_l9: l9 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};

		pm8994_l10: l10 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};

		pm8994_l11: l11 {
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
		};

		pm8994_l12: l12 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-system-load = <10000>;
			regulator-allow-set-load;
		};

		pm8994_l13: l13 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <2950000>;
		};

		pm8994_l14: l14 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-system-load = <10000>;
			regulator-allow-set-load;
			regulator-boot-on;
		};

		pm8994_l15: l15 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};

		pm8994_l16: l16 {
			regulator-min-microvolt = <2700000>;
			regulator-max-microvolt = <2700000>;
		};

		pm8994_l17: l17 {
			regulator-min-microvolt = <2200000>;
			regulator-max-microvolt = <2200000>;
			regulator-boot-on;
		};

		pm8994_l18: l18 {
			regulator-min-microvolt = <2850000>;
			regulator-max-microvolt = <2850000>;
			regulator-always-on;
			regulator-boot-on;
		};

		pm8994_l19: l19 {
			regulator-min-microvolt = <2850000>;
			regulator-max-microvolt = <2850000>;
			regulator-boot-on;
		};

		pm8994_l20: l20 {
			regulator-min-microvolt = <2950000>;
			regulator-max-microvolt = <2950000>;
			regulator-system-load = <570000>;
			regulator-allow-set-load;
		};

		pm8994_l21: l21 {
			regulator-min-microvolt = <2950000>;
			regulator-max-microvolt = <2950000>;
			regulator-system-load = <800000>;
			regulator-allow-set-load;
		};

		pm8994_l22: l22 {
			regulator-min-microvolt = <3000000>;
			regulator-max-microvolt = <3000000>;
			regulator-boot-on;
		};

		pm8994_l23: l23 {
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
			regulator-always-on;
			regulator-boot-on;
		};

		pm8994_l24: l24 {
			regulator-min-microvolt = <3075000>;
			regulator-max-microvolt = <3150000>;
		};

		pm8994_l25: l25 {
			regulator-min-microvolt = <1000000>;
			regulator-max-microvolt = <1000000>;
			regulator-boot-on;
		};

		pm8994_l26: l26 {
			regulator-min-microvolt = <987500>;
			regulator-max-microvolt = <987500>;
		};

		pm8994_l27: l27 {
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
			regulator-boot-on;
		};

		pm8994_l28: l28 {
			regulator-min-microvolt = <1000000>;
			regulator-max-microvolt = <1000000>;
			regulator-system-load = <10000>;
			regulator-allow-set-load;
		};

		pm8994_l29: l29 {
			regulator-min-microvolt = <2700000>;
			regulator-max-microvolt = <2700000>;
			regulator-boot-on;
		};

		pm8994_l30: l30 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-boot-on;
		};

		pm8994_l31: l31 {
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
			regulator-system-load = <10000>;
			regulator-allow-set-load;
		};

		pm8994_l32: l32 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};

		pm8994_lvs1: lvs1 {
			regulator-boot-on;
		};
		pm8994_lvs2: lvs2 {
			regulator-boot-on;
		};
	};
};

&sdhc1 {
	/*
	 * There is an issue with the eMMC causing permanent
	 * damage to the card if a quirk isn't addressed.
	 * Until it's fixed, disable the MMC so as not to brick
	 * devices.
	 */
	status = "disabled";

	/*
	 * Downstream pushes 2.95V to the sdhci device,
	 * but upstream driver REALLY wants to make vmmc 1.8v
	 * cause of the hs400-1_8v mode. MMC works fine without
	 * that regulator, so let's not use it for now.
	 * vqmmc is also disabled cause driver stll complains.
	 *
	 * vmmc-supply = <&pm8994_l20>;
	 * vqmmc-supply = <&pm8994_s4>;
	 */
};

&sdhc2 {
	status = "okay";

	cd-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>;
	vmmc-supply = <&pm8994_l21>;
	vqmmc-supply = <&pm8994_l13>;
};

&tlmm {
	ts_int_active: ts-int-active-state {
		pins = "gpio42";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};

	ts_reset_active: ts-reset-active-state {
		pins = "gpio109";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
		output-low;
	};
};