xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/msm8996-xiaomi-natrium.dts (revision c7a063741720ef81d4caa4613242579d12f1d605)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, Alec Su <ae40515@yahoo.com.tw>
4 */
5
6/dts-v1/;
7
8#include "msm8996-xiaomi-common.dtsi"
9#include "pmi8996.dtsi"
10#include <dt-bindings/sound/qcom,q6afe.h>
11#include <dt-bindings/sound/qcom,q6asm.h>
12
13/ {
14	model = "Xiaomi Mi 5s Plus";
15	compatible = "xiaomi,natrium", "qcom,msm8996";
16	chassis-type = "handset";
17	qcom,msm-id = <305 0x10000>;
18	qcom,board-id = <47 0>;
19};
20
21&adsp_pil {
22	firmware-name = "qcom/msm8996/natrium/adsp.mbn";
23};
24
25&blsp2_i2c6 {
26	touchscreen@20 {
27		compatible = "syna,rmi4-i2c";
28		reg = <0x20>;
29		interrupt-parent = <&tlmm>;
30		interrupts = <125 IRQ_TYPE_LEVEL_LOW>;
31		vdd-supply = <&vdd_3v2_tp>;
32		syna,reset-delay-ms = <200>;
33		syna,startup-delay-ms = <5>;
34
35		pinctrl-names = "default", "sleep";
36		pinctrl-0 = <&touchscreen_default>;
37		pinctrl-1 = <&touchscreen_sleep>;
38	};
39};
40
41&dsi0 {
42	status = "okay";
43
44	vdda-supply = <&vreg_l2a_1p25>;
45	vcca-supply = <&vreg_l28a_0p925>;
46
47	pinctrl-names = "default", "sleep";
48	pinctrl-0 = <&mdss_dsi_default &mdss_te_default>;
49	pinctrl-1 = <&mdss_dsi_sleep &mdss_te_sleep>;
50
51	panel: panel@0 {
52		compatible = "jdi,fhd-r63452";
53		reg = <0>;
54		reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
55		backlight = <&pmi8994_wled>;
56
57		port {
58			panel_in: endpoint {
59				remote-endpoint = <&dsi0_out>;
60			};
61		};
62	};
63};
64
65&dsi0_out {
66	remote-endpoint = <&panel_in>;
67};
68
69&gpu {
70	zap-shader {
71		firmware-name = "qcom/msm8996/natrium/a530_zap.mbn";
72	};
73};
74
75&mss_pil {
76	firmware-name = "qcom/msm8996/natrium/mba.mbn",
77			"qcom/msm8996/natrium/modem.mbn";
78};
79
80&pmi8994_wled {
81	status = "okay";
82
83	qcom,enabled-strings = <0 1>;
84	qcom,switching-freq = <600>;
85};
86
87&q6asmdai {
88	dai@0 {
89		reg = <0>;
90	};
91
92	dai@1 {
93		reg = <1>;
94	};
95
96	dai@2 {
97		reg = <2>;
98	};
99};
100
101&slpi_pil {
102	firmware-name = "qcom/msm8996/natrium/slpi.mbn";
103};
104
105&sound {
106	compatible = "qcom,apq8096-sndcard";
107	model = "natrium";
108	audio-routing =	"RX_BIAS", "MCLK";
109
110	mm1-dai-link {
111		link-name = "MultiMedia1";
112		cpu {
113			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
114		};
115	};
116
117	mm2-dai-link {
118		link-name = "MultiMedia2";
119		cpu {
120			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
121		};
122	};
123
124	mm3-dai-link {
125		link-name = "MultiMedia3";
126		cpu {
127			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
128		};
129	};
130
131	slim-dai-link {
132		link-name = "SLIM Playback";
133		cpu {
134			sound-dai = <&q6afedai SLIMBUS_6_RX>;
135		};
136
137		platform {
138			sound-dai = <&q6routing>;
139		};
140
141		codec {
142			sound-dai = <&wcd9335 6>;
143		};
144	};
145
146	slimcap-dai-link {
147		link-name = "SLIM Capture";
148		cpu {
149			sound-dai = <&q6afedai SLIMBUS_0_TX>;
150		};
151
152		platform {
153			sound-dai = <&q6routing>;
154		};
155
156		codec {
157			sound-dai = <&wcd9335 1>;
158		};
159	};
160};
161
162&venus {
163	firmware-name = "qcom/msm8996/natrium/venus.mbn";
164};
165
166&rpm_requests {
167	pm8994-regulators {
168		vreg_l3a_0p875: l3 {
169			regulator-name = "vreg_l3a_0p875";
170			regulator-min-microvolt = <850000>;
171			regulator-max-microvolt = <1300000>;
172		};
173		vreg_l11a_1p1: l11 {
174			regulator-name = "vreg_l11a_1p1";
175			regulator-min-microvolt = <1100000>;
176			regulator-max-microvolt = <1100000>;
177		};
178		vreg_l17a_2p8: l17 {
179			regulator-name = "vreg_l17a_2p8";
180			regulator-min-microvolt = <2800000>;
181			regulator-max-microvolt = <2800000>;
182		};
183		vreg_l18a_2p8: l18 {
184			regulator-name = "vreg_l18a_2p8";
185			regulator-min-microvolt = <2800000>;
186			regulator-max-microvolt = <2800000>;
187		};
188		vreg_l29a_2p8: l29 {
189			regulator-name = "vreg_l29a_2p8";
190			regulator-min-microvolt = <2800000>;
191			regulator-max-microvolt = <2800000>;
192		};
193	};
194};
195
196&pm8994_gpios {
197	gpio-line-names =
198		"NC",			/* GPIO_1  */
199		"VOL_UP_N",		/* GPIO_2  */
200		"SPKR_ID",		/* GPIO_3  */
201		"PWM_HAPTICS",		/* GPIO_4  */
202		"INFARED_DRV",		/* GPIO_5  */
203		"NC",			/* GPIO_6  */
204		"KEYPAD_LED_EN_A",	/* GPIO_7  */
205		"WL_EN",		/* GPIO_8  */
206		"3P3_ENABLE",		/* GPIO_9  */
207		"NC",			/* GPIO_10 */
208		"NC",			/* GPIO_11 */
209		"NC",			/* GPIO_12 */
210		"NC",			/* GPIO_13 */
211		"NC",			/* GPIO_14 */
212		"DIVCLK1_CDC",		/* GPIO_15 */
213		"DIVCLK2_HAPTICS",	/* GPIO_16 */
214		"NC",			/* GPIO_17 */
215		"32KHz_CLK_IN",		/* GPIO_18 */
216		"BT_EN",		/* GPIO_19 */
217		"PMIC_SLB",		/* GPIO_20 */
218		"UIM_BATT_ALARM",	/* GPIO_21 */
219		"NC";			/* GPIO_22 */
220};
221
222&pm8994_mpps {
223	gpio-line-names =
224		"NC",			/* MPP_1 */
225		"CCI_TIMER1",		/* MPP_2 */
226		"PMIC_SLB",		/* MPP_3 */
227		"EXT_FET_WLED_PWR_EN_N",/* MPP_4 */
228		"NC",			/* MPP_5 */
229		"NC",			/* MPP_6 */
230		"NC",			/* MPP_7 */
231		"NC";			/* MPP_8 */
232};
233
234&pmi8994_gpios {
235	gpio-line-names =
236		"NC",			/* GPIO_1  */
237		"SPKR_PA_EN",		/* GPIO_2  */
238		"NC",			/* GPIO_3  */
239		"NC",			/* GPIO_4  */
240		"NC",			/* GPIO_5  */
241		"NC",			/* GPIO_6  */
242		"NC",			/* GPIO_7  */
243		"NC",			/* GPIO_8  */
244		"NC",			/* GPIO_9  */
245		"NC";			/* GPIO_10 */
246};
247
248&tlmm {
249	gpio-line-names =
250		"ESE_SPI_MOSI",		/* GPIO_0   */
251		"ESE_SPI_MISO",		/* GPIO_1   */
252		"NC",			/* GPIO_2   */
253		"ESE_SPI_CLK",		/* GPIO_3   */
254		"MSM_UART_TX",		/* GPIO_4   */
255		"MSM_UART_RX",		/* GPIO_5   */
256		"NFC_I2C_SDA",		/* GPIO_6   */
257		"NFC_I2C_SCL",		/* GPIO_7   */
258		"LCD0_RESET_N",		/* GPIO_8   */
259		"NFC_IRQ",		/* GPIO_9   */
260		"LCD_TE",		/* GPIO_10  */
261		"LCD_ID_DET1",		/* GPIO_11  */
262		"NFC_DISABLE",		/* GPIO_12  */
263		"CAM_MCLK0",		/* GPIO_13  */
264		"CAM_MCLK1",		/* GPIO_14  */
265		"CAM_MCLK2",		/* GPIO_15  */
266		"ESE_PWR_REQ",		/* GPIO_16  */
267		"CCI_I2C_SDA0",		/* GPIO_17  */
268		"CCI_I2C_SCL0",		/* GPIO_18  */
269		"CCI_I2C_SDA1",		/* GPIO_19  */
270		"CCI_I2C_SCL1",		/* GPIO_20  */
271		"NFC_DWL_REQ",		/* GPIO_21  */
272		"CCI_TIMER1",		/* GPIO_22  */
273		"WEBCAM1_RESET_N",	/* GPIO_23  */
274		"ESE_IRQ",		/* GPIO_24  */
275		"NC",			/* GPIO_25  */
276		"WEBCAM1_STANDBY",	/* GPIO_26  */
277		"NC",			/* GPIO_27  */
278		"NC",			/* GPIO_28  */
279		"NC",			/* GPIO_29  */
280		"CAM_VDD_1P2_EN_2",	/* GPIO_30  */
281		"CAM_RESET_0",		/* GPIO_31  */
282		"CAM_RESET_1",		/* GPIO_32  */
283		"NC",			/* GPIO_33  */
284		"NC",			/* GPIO_34  */
285		"PCI_E0_RST_N",		/* GPIO_35  */
286		"PCI_E0_CLKREQ_N",	/* GPIO_36  */
287		"PCI_E0_WAKE",		/* GPIO_37  */
288		"CHARGER_INT",		/* GPIO_38  */
289		"CHARGER_RESET",	/* GPIO_39  */
290		"NC",			/* GPIO_40  */
291		"QCA_UART_TXD",		/* GPIO_41  */
292		"QCA_UART_RXD",		/* GPIO_42  */
293		"QCA_UART_CTS",		/* GPIO_43  */
294		"QCA_UART_RTS",		/* GPIO_44  */
295		"MAWC_UART_TX",		/* GPIO_45  */
296		"MAWC_UART_RX",		/* GPIO_46  */
297		"NC",			/* GPIO_47  */
298		"NC",			/* GPIO_48  */
299		"NC",			/* GPIO_49  */
300		"FP_SPI_RST",		/* GPIO_50  */
301		"TYPEC_I2C_SDA",	/* GPIO_51  */
302		"TYPEC_I2C_SCL",	/* GPIO_52  */
303		"CODEC_INT2_N",		/* GPIO_53  */
304		"CODEC_INT1_N",		/* GPIO_54  */
305		"APPS_I2C7_SDA",	/* GPIO_55  */
306		"APPS_I2C7_SCL",	/* GPIO_56  */
307		"FORCE_USB_BOOT",	/* GPIO_57  */
308		"NC",			/* GPIO_58  */
309		"NC",			/* GPIO_59  */
310		"NC",			/* GPIO_60  */
311		"NC",			/* GPIO_61  */
312		"ESE_RSTN",		/* GPIO_62  */
313		"TYPEC_INT",		/* GPIO_63  */
314		"CODEC_RESET_N",	/* GPIO_64  */
315		"PCM_CLK",		/* GPIO_65  */
316		"PCM_SYNC",		/* GPIO_66  */
317		"PCM_DIN",		/* GPIO_67  */
318		"PCM_DOUT",		/* GPIO_68  */
319		"CDC_44K1_CLK",		/* GPIO_69  */
320		"SLIMBUS_CLK",		/* GPIO_70  */
321		"SLIMBUS_DATA0",	/* GPIO_71  */
322		"SLIMBUS_DATA1",	/* GPIO_72  */
323		"LDO_5V_IN_EN",		/* GPIO_73  */
324		"TYPEC_EN_N",		/* GPIO_74  */
325		"NC",			/* GPIO_75  */
326		"NC",			/* GPIO_76  */
327		"NC",			/* GPIO_77  */
328		"NC",			/* GPIO_78  */
329		"NC",			/* GPIO_79  */
330		"SENSOR_RESET_N",	/* GPIO_80  */
331		"FP_SPI_MOSI",		/* GPIO_81  */
332		"FP_SPI_MISO",		/* GPIO_82  */
333		"FP_SPI_CS_N",		/* GPIO_83  */
334		"FP_SPI_CLK",		/* GPIO_84  */
335		"NC",			/* GPIO_85  */
336		"CAM_VDD_1P2_EN",	/* GPIO_86  */
337		"MSM_TS_I2C_SDA",	/* GPIO_87  */
338		"MSM_TS_I2C_SCL",	/* GPIO_88  */
339		"TS_RESOUT_N",		/* GPIO_89  */
340		"ESE_SPI_CS_N",		/* GPIO_90  */
341		"NC",			/* GPIO_91  */
342		"CAM2_AVDD_EN",		/* GPIO_92  */
343		"CAM2_VCM_EN",		/* GPIO_93  */
344		"NC",			/* GPIO_94  */
345		"NC",			/* GPIO_95  */
346		"NC",			/* GPIO_96  */
347		"GRFC_0",		/* GPIO_97  */
348		"GRFC_1",		/* GPIO_98  */
349		"NC",			/* GPIO_99  */
350		"GRFC_3",		/* GPIO_100 */
351		"GRFC_4",		/* GPIO_101 */
352		"GRFC_5",		/* GPIO_102 */
353		"NC",			/* GPIO_103 */
354		"GRFC_7",		/* GPIO_104 */
355		"UIM2_DATA",		/* GPIO_105 */
356		"UIM2_CLK",		/* GPIO_106 */
357		"UIM2_RESET",		/* GPIO_107 */
358		"UIM2_PRESENT",		/* GPIO_108 */
359		"UIM1_DATA",		/* GPIO_109 */
360		"UIM1_CLK",		/* GPIO_110 */
361		"UIM1_RESET",		/* GPIO_111 */
362		"UIM1_PRESENT",		/* GPIO_112 */
363		"UIM_BATT_ALARM",	/* GPIO_113 */
364		"GRFC_8",		/* GPIO_114 */
365		"GRFC_9",		/* GPIO_115 */
366		"TX_GTR_THRES",		/* GPIO_116 */
367		"ACCEL_INT",		/* GPIO_117 */
368		"GYRO_INT",		/* GPIO_118 */
369		"COMPASS_INT",		/* GPIO_119 */
370		"PROXIMITY_INT_N",	/* GPIO_120 */
371		"FP_IRQ",		/* GPIO_121 */
372		"P_SENSE",		/* GPIO_122 */
373		"HALL_INTR2",		/* GPIO_123 */
374		"HALL_INTR1",		/* GPIO_124 */
375		"TS_INT_N",		/* GPIO_125 */
376		"NC",			/* GPIO_126 */
377		"GRFC_11",		/* GPIO_127 */
378		"NC",			/* GPIO_128 */
379		"EXT_GPS_LNA_EN",	/* GPIO_129 */
380		"NC",			/* GPIO_130 */
381		"LCD_ID_DET2",		/* GPIO_131 */
382		"LCD_TE2",		/* GPIO_132 */
383		"GRFC_14",		/* GPIO_133 */
384		"GSM_TX2_PHASE_D",	/* GPIO_134 */
385		"NC",			/* GPIO_135 */
386		"GRFC_15",		/* GPIO_136 */
387		"RFFE3_DATA",		/* GPIO_137 */
388		"RFFE3_CLK",		/* GPIO_138 */
389		"NC",			/* GPIO_139 */
390		"NC",			/* GPIO_140 */
391		"RFFE5_DATA",		/* GPIO_141 */
392		"RFFE5_CLK",		/* GPIO_142 */
393		"NC",			/* GPIO_143 */
394		"COEX_UART_TX",		/* GPIO_144 */
395		"COEX_UART_RX",		/* GPIO_145 */
396		"RFFE2_DATA",		/* GPIO_146 */
397		"RFFE2_CLK",		/* GPIO_147 */
398		"RFFE1_DATA",		/* GPIO_148 */
399		"RFFE1_CLK";		/* GPIO_149 */
400
401	touchscreen_default: touchscreen-default {
402		pins = "gpio89", "gpio125";
403		function = "gpio";
404		drive-strength = <10>;
405		bias-pull-up;
406	};
407
408	touchscreen_sleep: touchscreen-sleep {
409		pins = "gpio89", "gpio125";
410		function = "gpio";
411		drive-strength = <2>;
412		bias-disable;
413	};
414};
415