summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi
blob: 849900e8b80ed9ed20a592701de8487b625dc673 (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
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
// SPDX-License-Identifier: BSD-3-Clause
/*
 * Copyright (c) 2020, Konrad Dybcio <konrad.dybcio@somainline.org>
 * Copyright (c) 2020, AngeloGioacchino Del Regno
 *                     <angelogioacchino.delregno@somainline.org>
 */

#include "pm660.dtsi"
#include "pm660l.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/input/gpio-keys.h>

/ {
	/* required for bootloader to select correct board */
	qcom,msm-id = <318 0>;
	qcom,board-id = <8 1>;
	qcom,pmic-id = <0x1001b 0x101011a 0x00 0x00 0x1001b 0x201011a 0x00 0x00>;

	/* This part enables graphical output via bootloader-enabled display */
	chosen {
		bootargs = "earlycon=tty0 console=tty0";

		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		stdout-path = "framebuffer0";

		framebuffer0: framebuffer@9d400000 {
			compatible = "simple-framebuffer";
			reg = <0 0x9d400000 0 (1920 * 1080 * 4)>;
			width = <1080>;
			height = <1920>;
			stride = <(1080 * 4)>;
			format = "a8r8g8b8";
			status= "okay";
		};
	};

	board_vbat: vbat-regulator {
		compatible = "regulator-fixed";
		regulator-name = "VBAT";

		regulator-min-microvolt = <4000000>;
		regulator-max-microvolt = <4000000>;
		regulator-always-on;
		regulator-boot-on;
	};

	vph_pwr: vph-pwr-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vph_pwr";

		regulator-always-on;
		regulator-boot-on;
	};

	cam_vdig_imx300_219_vreg: cam_vdig_imx300_219_vreg {
		compatible = "regulator-fixed";
		regulator-name = "cam_vdig_imx300_219_vreg";
		startup-delay-us = <0>;
		enable-active-high;
		gpio = <&tlmm 52 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&cam_vdig_default>;
	};

	cam_vana_front_vreg: cam_vana_front_vreg {
		compatible = "regulator-fixed";
		regulator-name = "cam_vana_front_vreg";
		startup-delay-us = <0>;
		enable-active-high;
		gpio = <&tlmm 51 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&imx219_vana_default>;
	};

	cam_vana_rear_vreg: cam_vana_rear_vreg {
		compatible = "regulator-fixed";
		regulator-name = "cam_vana_rear_vreg";
		startup-delay-us = <0>;
		enable-active-high;
		gpio = <&tlmm 50 GPIO_ACTIVE_HIGH>;
		regulator-always-on;
		pinctrl-names = "default";
		pinctrl-0 = <&imx300_vana_default>;
	};

	gpio_keys {
		status = "okay";
		compatible = "gpio-keys";
		input-name = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;

		camera_focus {
			label = "Camera Focus";
			gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_CAMERA_FOCUS>;
			debounce-interval = <15>;
		};

		camera_snapshot {
			label = "Camera Snapshot";
			gpios = <&tlmm 113 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_CAMERA>;
			debounce-interval = <15>;
		};

		vol_down {
			label = "Volume Down";
			gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
			linux,input-type = <1>;
			linux,code = <KEY_VOLUMEDOWN>;
			gpio-key,wakeup;
			debounce-interval = <15>;
		};
	};

	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		ramoops@ffc00000 {
			compatible = "ramoops";
			reg = <0x0 0xffc00000 0x0 0x100000>;
			record-size = <0x10000>;
			console-size = <0x60000>;
			ftrace-size = <0x10000>;
			pmsg-size = <0x20000>;
			ecc-size = <16>;
			status = "okay";
		};

		debug_region@ffb00000 {
			reg = <0x00 0xffb00000 0x00 0x100000>;
			no-map;
		};

		removed_region@85800000 {
			reg = <0x00 0x85800000 0x00 0x3700000>;
			no-map;
		};
	};

	/*
	 * Until we hook up type-c detection, we
	 * have to stick with this. But it works.
	 */
	extcon_usb: extcon-usb {
		compatible = "linux,extcon-usb-gpio";
		id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
	};
};

&adsp_pil {
	firmware-name = "adsp.mdt";
};

&blsp_i2c1 {
	status = "okay";

	touchscreen: synaptics-rmi4-i2c@70 {
		compatible = "syna,rmi4-i2c";
		reg = <0x70>;
		#address-cells = <1>;
		#size-cells = <0>;
		interrupts-extended = <&tlmm 45 0x2008>;

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

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

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

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

&blsp_i2c2 {
	status = "okay";

	/* SMB1351 charger */
};

/* I2C3, 4, 5, 7 and 8 are disabled on this board. */

&blsp_i2c6 {
	status = "okay";

	/* NXP NFC */
};

&blsp1_uart2 {
	status = "okay";

	/* MSM serial console */
};

&blsp2_uart1 {
	status = "okay";

	/* HCI Bluetooth */
};

&pon {
	volup {
		compatible = "qcom,pm8941-resin";
		interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
		debounce = <15625>;
		bias-pull-up;
		linux,code = <KEY_VOLUMEUP>;
	};
};

&qusb2phy {
	status = "okay";

	vdd-supply = <&vreg_l1b_0p925>;
	vdda-pll-supply = <&vreg_l10a_1p8>;
	vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
};

&rpm_requests {
	pm660l-regulators {
		compatible = "qcom,rpm-pm660l-regulators";

		vdd_s1-supply = <&vph_pwr>;
		vdd_s2-supply = <&vph_pwr>;
		vdd_s3_s4-supply = <&vph_pwr>;
		vdd_s5-supply = <&vph_pwr>;
		vdd_s6-supply = <&vph_pwr>;

		vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
		vdd_l2-supply = <&vreg_bob>;
		vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
		vdd_l4_l6-supply = <&vreg_bob>;
		vdd_bob-supply = <&vph_pwr>;

		vreg_s1b_1p125: s1 {
			regulator-min-microvolt = <1125000>;
			regulator-max-microvolt = <1125000>;
			regulator-enable-ramp-delay = <200>;
			regulator-ramp-delay = <0>;
		};

		vreg_s2b_1p05: s2 {
			regulator-min-microvolt = <1050000>;
			regulator-max-microvolt = <1050000>;
			regulator-enable-ramp-delay = <200>;
			regulator-ramp-delay = <0>;
		};

		/*
		 * At least on Nile's configuration, S3B/S4B (VDD_CX) and
		 * S5B (VDD_MX) are managed only through RPM Power Domains.
		 * Trying to set a voltage on the main supply will create
		 * havoc and freeze the SoC.
		 * In any case, reference voltages for these regulators are:
		 * S3B/S4B: 0.870V
		 * S5B: 0.915V
		 */

		/* LDOs */
		vreg_l1b_0p925: l1 {
			regulator-min-microvolt = <920000>;
			regulator-max-microvolt = <928000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
			regulator-allow-set-load;
		};

		vreg_l2b_2p95: l2 {
			/*
			 * This regulator supports 1.648 - 3.104V on this board
			 * but we set a max voltage of anything less than 2.7V
			 * to satisfy a condition in sdhci.c that will disable
			 * 3.3V SDHCI signaling, which happens to be not really
			 * supported on the Xperia Nile/Ganges platform.
			 */
			regulator-min-microvolt = <1648000>;
			regulator-max-microvolt = <2696000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
			regulator-allow-set-load;
		};

		vreg_l3b_3p0: l3 {
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
			regulator-min-microamp = <200>;
			regulator-max-microamp = <600000>;
			regulator-system-load = <100000>;
			regulator-allow-set-load;
		};

		vreg_l4b_29p5: l4 {
			regulator-min-microvolt = <2944000>;
			regulator-max-microvolt = <2952000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;

			regulator-min-microamp = <200>;
			regulator-max-microamp = <600000>;
			regulator-system-load = <570000>;
			regulator-allow-set-load;
		};

		/*
		 * Downstream specifies a range of 1721-3600mV,
		 * but the only assigned consumers are SDHCI2 VMMC
		 * and Coresight QPDI that both request pinned 2.95V.
		 * Tighten the range to 1.8-3.328 (closest to 3.3) to
		 * make the mmc driver happy.
		 */
		vreg_l5b_29p5: l5 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <3328000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
			regulator-allow-set-load;
			regulator-system-load = <800000>;
		};

		vreg_l6b_3p3: l6 {
			regulator-min-microvolt = <1704000>;
			regulator-max-microvolt = <3312000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		vreg_l7b_3p125: l7 {
			regulator-min-microvolt = <2704000>;
			regulator-max-microvolt = <3128000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		vreg_l8b_3p3: l8 {
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <3400000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		/* L9B (870mV) is currently unused */
		/* L10B (915mV) is currently unused */

		vreg_bob: bob {
			regulator-min-microvolt = <3304000>;
			regulator-max-microvolt = <3624000>;
			regulator-enable-ramp-delay = <500>;
			regulator-ramp-delay = <0>;
		};
	};

	pm660-regulators {
		compatible = "qcom,rpm-pm660-regulators";

		vdd_s1-supply = <&vph_pwr>;
		vdd_s2-supply = <&vph_pwr>;
		vdd_s3-supply = <&vph_pwr>;
		vdd_s4-supply = <&vph_pwr>;
		vdd_s5-supply = <&vph_pwr>;
		vdd_s6-supply = <&vph_pwr>;

		vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>;
		vdd_l2_l3-supply = <&vreg_s2b_1p05>;
		vdd_l5-supply = <&vreg_s2b_1p05>;
		vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
		vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;

		/*
		 * S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
		 * by the Core Power Reduction hardened (CPRh) and the
		 * Operating State Manager (OSM) HW automatically.
		 */

		vreg_s4a_2p04: s4 {
			regulator-min-microvolt = <2040000>;
			regulator-max-microvolt = <2040000>;
			regulator-enable-ramp-delay = <200>;
			regulator-ramp-delay = <0>;
			regulator-always-on;
		};

		vreg_s5a_1p35: s5 {
			regulator-min-microvolt = <1224000>;
			regulator-max-microvolt = <1350000>;
			regulator-enable-ramp-delay = <200>;
			regulator-ramp-delay = <0>;
		};

		vreg_s6a_0p87: s6 {
			regulator-min-microvolt = <504000>;
			regulator-max-microvolt = <992000>;
			regulator-enable-ramp-delay = <150>;
			regulator-ramp-delay = <0>;
		};

		/* LDOs */
		vreg_l1a_1p225: l1 {
			regulator-min-microvolt = <1226000>;
			regulator-max-microvolt = <1250000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
			regulator-allow-set-load;
		};

		vreg_l2a_1p0: l2 {
			regulator-min-microvolt = <944000>;
			regulator-max-microvolt = <1008000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		vreg_l3a_1p0: l3 {
			regulator-min-microvolt = <944000>;
			regulator-max-microvolt = <1008000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		vreg_l5a_0p848: l5 {
			regulator-min-microvolt = <800000>;
			regulator-max-microvolt = <952000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		vreg_l6a_1p3: l6 {
			regulator-min-microvolt = <1304000>;
			regulator-max-microvolt = <1368000>;
			regulator-allow-set-load;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		vreg_l7a_1p2: l7 {
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		vreg_l8a_1p8: l8 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
			regulator-system-load = <325000>;
			regulator-allow-set-load;
		};

		vreg_l9a_1p8: l9 {
			regulator-min-microvolt = <1804000>;
			regulator-max-microvolt = <1896000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
			regulator-allow-set-load;
		};

		vreg_l10a_1p8: l10 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1944000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
			regulator-allow-set-load;
		};

		vreg_l11a_1p8: l11 {
			regulator-min-microvolt = <1784000>;
			regulator-max-microvolt = <1944000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		vreg_l12a_1p8: l12 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1944000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		/* This gives power to the LPDDR4: never turn it off! */
		vreg_l13a_1p8: l13 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1944000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
			regulator-boot-on;
			regulator-always-on;
		};

		vreg_l14a_1p8: l14 {
			regulator-min-microvolt = <1710000>;
			regulator-max-microvolt = <1904000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		vreg_l15a_1p8: l15 {
			regulator-min-microvolt = <1648000>;
			regulator-max-microvolt = <2952000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		/* L16A (2.70V) is unused */

		vreg_l17a_1p8: l17 {
			regulator-min-microvolt = <1648000>;
			regulator-max-microvolt = <2952000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
		};

		vreg_l18a_1v8: l18 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <10>;
			regulator-min-microamp = <200>;
			regulator-max-microamp = <50000>;
			regulator-system-load = <10000>;
			regulator-allow-set-load;
		};

		vreg_l19a_3p3: l19 {
			regulator-min-microvolt = <3312000>;
			regulator-max-microvolt = <3400000>;
			regulator-enable-ramp-delay = <250>;
			regulator-ramp-delay = <0>;
			regulator-allow-set-load;
		};
	};
};

&sdhc_1 {
	status = "okay";
	supports-cqe;

	/* SoMC Nile platform's eMMC doesn't support HS200 mode */
	mmc-ddr-1_8v;
	mmc-hs400-1_8v;
	mmc-hs400-enhanced-strobe;

	vmmc-supply = <&vreg_l4b_29p5>;
	vqmmc-supply = <&vreg_l8a_1p8>;
};

&sdhc_2 {
	status = "okay";

	vmmc-supply = <&vreg_l5b_29p5>;
	vqmmc-supply = <&vreg_l2b_2p95>;
};

&tlmm {
	gpio-reserved-ranges = <8 4>;

	ts_int_active: ts-int-active {
		pins = "gpio45";
		drive-strength = <8>;
		bias-pull-up;
	};

	ts_lcd_id_active: ts-lcd-id-active {
		pins = "gpio56";
		drive-strength = <8>;
		bias-disable;
	};

	imx300_vana_default: imx300-vana-default {
		pins = "gpio50";
		function = "gpio";
		bias-disable;
		drive-strength = <2>;
	};

	imx219_vana_default: imx219-vana-default {
		pins = "gpio51";
		function = "gpio";
		bias-disable;
		drive-strength = <2>;
	};

	cam_vdig_default: cam-vdig-default {
		pins = "gpio52";
		function = "gpio";
		bias-disable;
		drive-strength = <2>;
	};
};

&usb3 {
	status = "okay";
};

&usb3_dwc3 {
	dr_mode = "peripheral";
	extcon = <&extcon_usb>;
};