summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts
blob: e5b8402b1ed65f75480675f71cdf140db2654791 (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
// SPDX-License-Identifier: BSD-3-Clause
/*
 * Copyright (c) 2020, Yassine Oudjana <y.oudjana@protonmail.com>
 */

/dts-v1/;

#include "msm8996-xiaomi-common.dtsi"
#include "pmi8996.dtsi"
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>

/ {
	model = "Xiaomi Mi Note 2";
	compatible = "xiaomi,scorpio", "qcom,msm8996";
	chassis-type = "handset";
	qcom,msm-id = <305 0x10000>;
	qcom,board-id = <34 0>;

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

		framebuffer0: framebuffer@83401000 {
			compatible = "simple-framebuffer";
			reg = <0x00 0x83401000 0x00 (1080 * 1920 * 3)>;
			width = <1080>;
			height = <1920>;
			stride = <(1080 * 3)>;
			format = "r8g8b8";

			/* DSI0 and MDP SMMU clocks */
			clocks = <&mmcc MDSS_MDP_CLK>,
				 <&mmcc MMSS_MMAGIC_AHB_CLK>,
				 <&mmcc MDSS_AHB_CLK>,
				 <&mmcc MDSS_AXI_CLK>,
				 <&mmcc MMSS_MISC_AHB_CLK>,
				 <&mmcc MDSS_BYTE0_CLK>,
				 <&mmcc MDSS_PCLK0_CLK>,
				 <&mmcc MDSS_ESC0_CLK>,
				 <&mmcc SMMU_MDP_AHB_CLK>,
				 <&mmcc SMMU_MDP_AXI_CLK>;

			/* MDSS power domain */
			power-domains = <&mmcc MDSS_GDSC>;
		};
	};

	reserved-memory {
		cont_splash_mem: memory@83401000 {
			reg = <0x0 0x83401000 0x0 (1080 * 1920 * 3)>;
			no-map;
		};
	};
};

&adsp_pil {
	firmware-name = "qcom/msm8996/scorpio/adsp.mbn";
};

&blsp2_i2c6 {
	touchscreen: atmel-mxt-ts@4a {
		compatible = "atmel,maxtouch";
		reg = <0x4a>;
		interrupt-parent = <&tlmm>;
		interrupts = <125 IRQ_TYPE_LEVEL_LOW>;
		vdda-supply = <&vreg_l6a_1p8>;
		vdd-supply = <&vdd_3v2_tp>;
		reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;

		pinctrl-names = "default", "sleep";
		pinctrl-0 = <&touchscreen_default>;
		pinctrl-1 = <&touchscreen_sleep>;
	};
};

&gpu {
	zap-shader {
		firmware-name = "qcom/msm8996/scorpio/a530_zap.mbn";
	};
};

&mdp_smmu {
	/*
	 * Probing this SMMU causes a crash due to writing to some secure
	 * registers. Disable it for now.
	 */
	status = "disabled";
};

&mdss {
	/*
	 * MDSS depends on the MDP SMMU, and probing it alters the bootloader
	 * configured framebuffer used by simplefb. Disable it for now.
	 */
	status = "disabled";
};

&q6asmdai {
	dai@0 {
		reg = <0>;
	};

	dai@1 {
		reg = <1>;
	};

	dai@2 {
		reg = <2>;
	};
};

&sound {
	compatible = "qcom,apq8096-sndcard";
	model = "scorpio";
	audio-routing =	"RX_BIAS", "MCLK";

	mm1-dai-link {
		link-name = "MultiMedia1";
		cpu {
			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
		};
	};

	mm2-dai-link {
		link-name = "MultiMedia2";
		cpu {
			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
		};
	};

	mm3-dai-link {
		link-name = "MultiMedia3";
		cpu {
			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
		};
	};

	slim-dai-link {
		link-name = "SLIM Playback";
		cpu {
			sound-dai = <&q6afedai SLIMBUS_6_RX>;
		};

		platform {
			sound-dai = <&q6routing>;
		};

		codec {
			sound-dai = <&wcd9335 6>;
		};
	};

	slimcap-dai-link {
		link-name = "SLIM Capture";
		cpu {
			sound-dai = <&q6afedai SLIMBUS_0_TX>;
		};

		platform {
			sound-dai = <&q6routing>;
		};

		codec {
			sound-dai = <&wcd9335 1>;
		};
	};
};

&venus {
	firmware-name = "qcom/msm8996/scorpio/venus.mbn";
};

&rpm_requests {
	pm8994-regulators {
		vreg_l3a_0p875: l3 {
			regulator-name = "vreg_l3a_0p875";
			regulator-min-microvolt = <850000>;
			regulator-max-microvolt = <1300000>;
		};
		vreg_l11a_1p1: l11 {
			regulator-name = "vreg_l11a_1p1";
			regulator-min-microvolt = <1100000>;
			regulator-max-microvolt = <1100000>;
		};
		vreg_l17a_2p8: l17 {
			regulator-name = "vreg_l17a_2p8";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
		};
		vreg_l18a_2p8: l18 {
			regulator-name = "vreg_l18a_2p8";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
		};
		vreg_l22a_3p0: l22 {
			regulator-name = "vreg_l22a_3p0";
			regulator-min-microvolt = <2950000>;
			regulator-max-microvolt = <3500000>;
		};
		vreg_l29a_2p7: l29 {
			regulator-name = "vreg_l29a_2p7";
			regulator-min-microvolt = <2700000>;
			regulator-max-microvolt = <2700000>;
		};
	};
};

&vdd_gfx {
	regulator-max-microvolt = <1065000>;
};

&pm8994_gpios {
	gpio-line-names =
		"NC",			/* GPIO_1  */
		"VOL_UP_N",		/* GPIO_2  */
		"SPKR_ID",		/* GPIO_3  */
		"PWM_HAPTICS",		/* GPIO_4  */
		"INFARED_DRV",		/* GPIO_5  */
		"NC",			/* GPIO_6  */
		"KEYPAD_LED_EN_A",	/* GPIO_7  */
		"WL_EN",		/* GPIO_8  */
		"3P3_ENABLE",		/* GPIO_9  */
		"KEYPAD_LED_EN_B",	/* GPIO_10 */
		"FP_ID",		/* GPIO_11 */
		"NC",			/* GPIO_12 */
		"NC",			/* GPIO_13 */
		"NC",			/* GPIO_14 */
		"DIVCLK1_CDC",		/* GPIO_15 */
		"DIVCLK2_HAPTICS",	/* GPIO_16 */
		"NC",			/* GPIO_17 */
		"32KHz_CLK_IN",		/* GPIO_18 */
		"BT_EN",		/* GPIO_19 */
		"PMIC_SLB",		/* GPIO_20 */
		"UIM_BATT_ALARM",	/* GPIO_21 */
		"NC";			/* GPIO_22 */
};

&pm8994_mpps {
	gpio-line-names =
		"VREF_SDC_UIM_APC",	/* MPP_1 */
		"NC",			/* MPP_2 */
		"VREF_DACX",		/* MPP_3 */
		"NC",			/* MPP_4 */
		"NC",			/* MPP_5 */
		"STAT_SMB1351",		/* MPP_6 */
		"NC",			/* MPP_7 */
		"NC";			/* MPP_8 */
};

&pmi8994_gpios {
	gpio-line-names =
		"NC",			/* GPIO_1  */
		"SPKR_PA_RST",		/* GPIO_2  */
		"NC",			/* GPIO_3  */
		"NC",			/* GPIO_4  */
		"NC",			/* GPIO_5  */
		"NC",			/* GPIO_6  */
		"NC",			/* GPIO_7  */
		"NC",			/* GPIO_8  */
		"NC",			/* GPIO_9  */
		"NC";			/* GPIO_10 */
};

&tlmm {
	gpio-line-names =
		"ESE_SPI_MOSI",		/* GPIO_0   */
		"ESE_SPI_MISO",		/* GPIO_1   */
		"NC",			/* GPIO_2   */
		"ESE_SPI_CLK",		/* GPIO_3   */
		"MSM_UART_TX",		/* GPIO_4   */
		"MSM_UART_RX",		/* GPIO_5   */
		"NFC_I2C_SDA",		/* GPIO_6   */
		"NFC_I2C_SCL",		/* GPIO_7   */
		"OLED_RESET_N",		/* GPIO_8   */
		"NFC_IRQ",		/* GPIO_9   */
		"OLED_TE",		/* GPIO_10  */
		"OLED_ID_DET1",		/* GPIO_11  */
		"NFC_DISABLE",		/* GPIO_12  */
		"CAM_MCLK0",		/* GPIO_13  */
		"OLED_ID_DET2",		/* GPIO_14  */
		"CAM_MCLK2",		/* GPIO_15  */
		"ESE_PWR_REQ",		/* GPIO_16  */
		"CCI_I2C_SDA0",		/* GPIO_17  */
		"CCI_I2C_SCL0",		/* GPIO_18  */
		"CCI_I2C_SDA1",		/* GPIO_19  */
		"CCI_I2C_SCL1",		/* GPIO_20  */
		"NFC_DWL_REQ",		/* GPIO_21  */
		"CCI_TIMER1",		/* GPIO_22  */
		"WEBCAM1_RESET_N",	/* GPIO_23  */
		"ESE_IRQ",		/* GPIO_24  */
		"NC",			/* GPIO_25  */
		"WEBCAM1_STANDBY",	/* GPIO_26  */
		"NC",			/* GPIO_27  */
		"NC",			/* GPIO_28  */
		"OLED_ERR_FG",		/* GPIO_29  */
		"CAM1_RST_N",		/* GPIO_30  */
		"HIFI_SW_MUTE",		/* GPIO_31  */
		"NC",			/* GPIO_32  */
		"NC",			/* GPIO_33  */
		"FP_DOME_SW",		/* GPIO_34  */
		"PCI_E0_RST_N",		/* GPIO_35  */
		"PCI_E0_CLKREQ_N",	/* GPIO_36  */
		"PCI_E0_WAKE",		/* GPIO_37  */
		"OV_PWDN",		/* GPIO_38  */
		"NC",			/* GPIO_39  */
		"VDDR_1P6_EN",		/* GPIO_40  */
		"QCA_UART_TXD",		/* GPIO_41  */
		"QCA_UART_RXD",		/* GPIO_42  */
		"QCA_UART_CTS",		/* GPIO_43  */
		"QCA_UART_RTS",		/* GPIO_44  */
		"MAWC_UART_TX",		/* GPIO_45  */
		"MAWC_UART_RX",		/* GPIO_46  */
		"NC",			/* GPIO_47  */
		"NC",			/* GPIO_48  */
		"AUDIO_SWITCH_EN",	/* GPIO_49  */
		"FP_SPI_RST",		/* GPIO_50  */
		"TYPEC_I2C_SDA",	/* GPIO_51  */
		"TYPEC_I2C_SCL",	/* GPIO_52  */
		"CODEC_INT2_N",		/* GPIO_53  */
		"CODEC_INT1_N",		/* GPIO_54  */
		"APPS_I2C7_SDA",	/* GPIO_55  */
		"APPS_I2C7_SCL",	/* GPIO_56  */
		"FORCE_USB_BOOT",	/* GPIO_57  */
		"SPKR_I2S_BCK",		/* GPIO_58  */
		"SPKR_I2S_WS",		/* GPIO_59  */
		"SPKR_I2S_DOUT",	/* GPIO_60  */
		"SPKR_I2S_DIN",		/* GPIO_61  */
		"ESE_RSTN",		/* GPIO_62  */
		"TYPEC_INT",		/* GPIO_63  */
		"CODEC_RESET_N",	/* GPIO_64  */
		"PCM_CLK",		/* GPIO_65  */
		"PCM_SYNC",		/* GPIO_66  */
		"PCM_DIN",		/* GPIO_67  */
		"PCM_DOUT",		/* GPIO_68  */
		"CDC_44K1_CLK",		/* GPIO_69  */
		"SLIMBUS_CLK",		/* GPIO_70  */
		"SLIMBUS_DATA0",	/* GPIO_71  */
		"SLIMBUS_DATA1",	/* GPIO_72  */
		"LDO_5V_IN_EN",		/* GPIO_73  */
		"NC",			/* GPIO_74  */
		"TSP_RST_N",		/* GPIO_75  */
		"NC",			/* GPIO_76  */
		"TOUCHKEY_INT",		/* GPIO_77  */
		"SPKR_I2S_MCLK",	/* GPIO_78  */
		"SPKR_PA_INT",		/* GPIO_79  */
		"SENSOR_RESET_N",	/* GPIO_80  */
		"FP_SPI_MOSI",		/* GPIO_81  */
		"FP_SPI_MISO",		/* GPIO_82  */
		"FP_SPI_CS_N",		/* GPIO_83  */
		"FP_SPI_CLK",		/* GPIO_84  */
		"HIFI_SD",		/* GPIO_85  */
		"CAM_VDD_1P05_EN",	/* GPIO_86  */
		"MSM_TS_I2C_SDA",	/* GPIO_87  */
		"MSM_TS_I2C_SCL",	/* GPIO_88  */
		"NC",			/* GPIO_89  */
		"ESE_SPI_CS_N",		/* GPIO_90  */
		"NC",			/* GPIO_91  */
		"NC",			/* GPIO_92  */
		"NC",			/* GPIO_93  */
		"NC",			/* GPIO_94  */
		"NC",			/* GPIO_95  */
		"NC",			/* GPIO_96  */
		"GRFC_0",		/* GPIO_97  */
		"GRFC_1",		/* GPIO_98  */
		"NC",			/* GPIO_99  */
		"GRFC_3",		/* GPIO_100 */
		"GRFC_4",		/* GPIO_101 */
		"NC",			/* GPIO_102 */
		"NC",			/* GPIO_103 */
		"GRFC_7",		/* GPIO_104 */
		"UIM2_DATA",		/* GPIO_105 */
		"UIM2_CLK",		/* GPIO_106 */
		"UIM2_RESET",		/* GPIO_107 */
		"UIM2_PRESENT",		/* GPIO_108 */
		"UIM1_DATA",		/* GPIO_109 */
		"UIM1_CLK",		/* GPIO_110 */
		"UIM1_RESET",		/* GPIO_111 */
		"UIM1_PRESENT",		/* GPIO_112 */
		"UIM_BATT_ALARM",	/* GPIO_113 */
		"GRFC_8",		/* GPIO_114 */
		"GRFC_9",		/* GPIO_115 */
		"TX_GTR_THRES",		/* GPIO_116 */
		"ACC_INT",		/* GPIO_117 */
		"GYRO_INT",		/* GPIO_118 */
		"COMPASS_INT",		/* GPIO_119 */
		"PROXIMITY_INT_N",	/* GPIO_120 */
		"FP_IRQ",		/* GPIO_121 */
		"TSP_TA",		/* GPIO_122 */
		"HALL_INTR2",		/* GPIO_123 */
		"HALL_INTR1",		/* GPIO_124 */
		"TS_INT_N",		/* GPIO_125 */
		"NC",			/* GPIO_126 */
		"GRFC_11",		/* GPIO_127 */
		"HIFI_PWR_EN",		/* GPIO_128 */
		"EXT_GPS_LNA_EN",	/* GPIO_129 */
		"NC",			/* GPIO_130 */
		"NC",			/* GPIO_131 */
		"NC",			/* GPIO_132 */
		"GRFC_14",		/* GPIO_133 */
		"GSM_TX2_PHASE_D",	/* GPIO_134 */
		"HIFI_SW_SEL",		/* GPIO_135 */
		"GRFC_15",		/* GPIO_136 */
		"RFFE3_DATA",		/* GPIO_137 */
		"RFFE3_CLK",		/* GPIO_138 */
		"NC",			/* GPIO_139 */
		"NC",			/* GPIO_140 */
		"RFFE5_DATA",		/* GPIO_141 */
		"RFFE5_CLK",		/* GPIO_142 */
		"NC",			/* GPIO_143 */
		"COEX_UART_TX",		/* GPIO_144 */
		"COEX_UART_RX",		/* GPIO_145 */
		"RFFE2_DATA",		/* GPIO_146 */
		"RFFE2_CLK",		/* GPIO_147 */
		"RFFE1_DATA",		/* GPIO_148 */
		"RFFE1_CLK";		/* GPIO_149 */

	touchscreen_default: touchscreen_default {
		pins = "gpio75", "gpio125";
		function = "gpio";
		drive-strength = <10>;
		bias-pull-up;
	};

	touchscreen_sleep: touchscreen_sleep {
		pins = "gpio75", "gpio125";
		function = "gpio";
		drive-strength = <2>;
		bias-disable;
	};
};