1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2021, Raffaele Tranquillini <raffaele.tranquillini@gmail.com>
8 #include "msm8996.dtsi"
9 #include "msm8996-xiaomi-common.dtsi"
10 #include <dt-bindings/sound/qcom,q6afe.h>
11 #include <dt-bindings/sound/qcom,q6asm.h>
12 #include <dt-bindings/sound/qcom,wcd9335.h>
13 #include <dt-bindings/input/ti-drv260x.h>
16 model = "Xiaomi Mi 5";
17 compatible = "xiaomi,gemini", "qcom,msm8996";
18 chassis-type = "handset";
19 qcom,msm-id = <246 0x30001>;
20 qcom,pmic-id = <0x20009 0x2000a 0x00 0x00>;
21 qcom,board-id = <31 0>;
24 divclk2_haptics: divclk2 {
25 compatible = "fixed-clock";
27 clock-frequency = <32768>;
28 clock-output-names = "divclk2";
30 pinctrl-names = "default";
31 pinctrl-0 = <&divclk2_pin_a>;
37 firmware-name = "qcom/msm8996/gemini/adsp.mbn";
42 compatible = "ti,drv2604";
44 enable-gpio = <&tlmm 93 0x00>;
45 mode = <DRV260X_LRA_MODE>;
46 library-sel = <DRV260X_LIB_LRA>;
47 pinctrl-names = "default","sleep";
48 pinctrl-0 = <&vibrator_default>;
49 pinctrl-1 = <&vibrator_sleep>;
53 compatible = "ti,lp5562";
57 enable-gpios = <&pm8994_gpios 7 1>;
58 clock-mode = /bits/8 <2>;
59 label = "button-backlight";
63 chan-name = "button-backlight";
64 led-cur = /bits/ 8 <0x32>;
65 max-cur = /bits/ 8 <0xc8>;
70 chan-name = "button-backlight1";
71 led-cur = /bits/ 8 <0x32>;
72 max-cur = /bits/ 8 <0xc8>;
79 compatible = "syna,rmi4-i2c";
83 interrupt-parent = <&tlmm>;
84 interrupts = <125 IRQ_TYPE_LEVEL_LOW>;
85 vio-supply = <&vreg_l6a_1p8>;
86 vdd-supply = <&vdd_3v2_tp>;
87 reset-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>;
89 pinctrl-names = "default", "sleep";
90 pinctrl-0 = <&touchscreen_default>;
91 pinctrl-1 = <&touchscreen_sleep>;
98 firmware-name = "qcom/msm8996/gemini/a530_zap.mbn";
105 vdd-supply = <&vreg_l2a_1p25>;
106 vdda-supply = <&vreg_l19a_3p3>;
107 vddio-supply = <&vreg_l14a_1p8>;
109 pinctrl-names = "default", "sleep";
110 pinctrl-0 = <&mdss_dsi_default &mdss_te_default>;
111 pinctrl-1 = <&mdss_dsi_sleep &mdss_te_sleep>;
114 compatible = "jdi,fhd-r63452";
116 reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
117 backlight = <&pmi8994_wled>;
121 remote-endpoint = <&mdss_dsi0_out>;
128 remote-endpoint = <&panel_in>;
136 firmware-name = "qcom/msm8996/gemini/mba.mbn",
137 "qcom/msm8996/gemini/modem.mbn";
155 firmware-name = "qcom/msm8996/gemini/slpi.mbn";
159 compatible = "qcom,apq8096-sndcard";
161 audio-routing = "RX_BIAS", "MCLK",
162 "MM_DL1", "MultiMedia1 Playback",
163 "MM_DL2", "MultiMedia2 Playback",
164 "MultiMedia3 Capture", "MM_UL3";
167 link-name = "MultiMedia1";
169 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
174 link-name = "MultiMedia2";
176 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
181 link-name = "MultiMedia3";
183 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
188 link-name = "SLIM Playback";
190 sound-dai = <&q6afedai SLIMBUS_6_RX>;
194 sound-dai = <&q6routing>;
198 sound-dai = <&wcd9335 AIF4_PB>;
203 link-name = "SLIM Capture";
205 sound-dai = <&q6afedai SLIMBUS_0_TX>;
209 sound-dai = <&q6routing>;
213 sound-dai = <&wcd9335 AIF1_CAP>;
219 firmware-name = "qcom/msm8996/gemini/venus.mbn";
225 regulator-name = "vreg_l17a_2p8";
226 regulator-min-microvolt = <2500000>;
227 regulator-max-microvolt = <2500000>;
230 regulator-name = "vreg_l29a_2p7";
231 regulator-min-microvolt = <2800000>;
232 regulator-max-microvolt = <2800000>;
240 "VOL_UP_N", /* GPIO_2 */
241 "SPKR_ID", /* GPIO_3 */
242 "PWM_HAPTICS", /* GPIO_4 */
243 "INFARED_DRV", /* GPIO_5 */
245 "KEYPAD_LED_EN", /* GPIO_7 */
246 "WL_EN", /* GPIO_8 */
247 "3P3_ENABLE", /* GPIO_9 */
248 "FP_ID", /* GPIO_10 */
253 "DIVCLK1_CDC", /* GPIO_15 */
254 "DIVCLK2_HAPTICS", /* GPIO_16 */
256 "32KHz_CLK_IN", /* GPIO_18 */
257 "BT_EN", /* GPIO_19 */
258 "PMIC_SLB", /* GPIO_20 */
259 "UIM_BATT_ALARM", /* GPIO_21 */
262 divclk2_pin_a: divclk2-state {
264 function = PMIC_GPIO_FUNC_FUNC2;
266 power-source = <PM8994_GPIO_S4>;
273 "CCI_TIMER1", /* MPP_2 */
274 "PMIC_SLB", /* MPP_3 */
275 "EXT_FET_WLED_PWR_EN_N",/* MPP_4 */
285 "SPKR_PA_RST", /* GPIO_2 */
298 "ESE_SPI_MOSI", /* GPIO_0 */
299 "ESE_SPI_MISO", /* GPIO_1 */
300 "ERR_INT_N", /* GPIO_2 */
301 "ESE_SPI_CLK", /* GPIO_3 */
302 "MSM_UART_TX", /* GPIO_4 */
303 "MSM_UART_RX", /* GPIO_5 */
304 "NFC_I2C_SDA", /* GPIO_6 */
305 "NFC_I2C_SCL", /* GPIO_7 */
306 "LCD0_RESET_N", /* GPIO_8 */
307 "NFC_IRQ", /* GPIO_9 */
308 "LCD_TE", /* GPIO_10 */
309 "LCD_ID_DET1", /* GPIO_11 */
310 "NFC_DISABLE", /* GPIO_12 */
311 "CAM_MCLK0", /* GPIO_13 */
313 "CAM_MCLK2", /* GPIO_15 */
314 "ESE_PWR_REQ", /* GPIO_16 */
315 "CCI_I2C_SDA0", /* GPIO_17 */
316 "CCI_I2C_SCL0", /* GPIO_18 */
317 "CCI_I2C_SDA1", /* GPIO_19 */
318 "CCI_I2C_SCL1", /* GPIO_20 */
319 "NFC_DWL_REQ", /* GPIO_21 */
320 "CCI_TIMER1", /* GPIO_22 */
321 "WEBCAM1_RESET_N", /* GPIO_23 */
322 "ESE_IRQ", /* GPIO_24 */
324 "WEBCAM1_STANDBY", /* GPIO_26 */
328 "CAM1_RST_N", /* GPIO_30 */
332 "FP_DOME_SW", /* GPIO_34 */
333 "PCI_E0_RST_N", /* GPIO_35 */
334 "PCI_E0_CLKREQ_N", /* GPIO_36 */
335 "PCI_E0_WAKE", /* GPIO_37 */
336 "FM_INT_N", /* GPIO_38 */
337 "FM_RESET_N", /* GPIO_39 */
339 "QCA_UART_TXD", /* GPIO_41 */
340 "QCA_UART_RXD", /* GPIO_42 */
341 "QCA_UART_CTS", /* GPIO_43 */
342 "QCA_UART_RTS", /* GPIO_44 */
343 "MAWC_UART_TX", /* GPIO_45 */
344 "MAWC_UART_RX", /* GPIO_46 */
347 "AUDIO_SWITCH_EN", /* GPIO_49 */
348 "FP_SPI_RST", /* GPIO_50 */
349 "TYPEC_I2C_SDA", /* GPIO_51 */
350 "TYPEC_I2C_SCL", /* GPIO_52 */
351 "CODEC_INT2_N", /* GPIO_53 */
352 "CODEC_INT1_N", /* GPIO_54 */
353 "APPS_I2C7_SDA", /* GPIO_55 */
354 "APPS_I2C7_SCL", /* GPIO_56 */
355 "FORCE_USB_BOOT", /* GPIO_57 */
356 "SPKR_I2S_BCK", /* GPIO_58 */
357 "SPKR_I2S_WS", /* GPIO_59 */
358 "SPKR_I2S_DOUT", /* GPIO_60 */
359 "SPKR_I2S_DIN", /* GPIO_61 */
360 "ESE_RSTN", /* GPIO_62 */
361 "TYPEC_INT", /* GPIO_63 */
362 "CODEC_RESET_N", /* GPIO_64 */
363 "PCM_CLK", /* GPIO_65 */
364 "PCM_SYNC", /* GPIO_66 */
365 "PCM_DIN", /* GPIO_67 */
366 "PCM_DOUT", /* GPIO_68 */
367 "HIFI_CLK", /* GPIO_69 */
368 "SLIMBUS_CLK", /* GPIO_70 */
369 "SLIMBUS_DATA0", /* GPIO_71 */
370 "SLIMBUS_DATA1", /* GPIO_72 */
371 "LDO_5V_IN_EN", /* GPIO_73 */
373 "FM_I2S_CLK", /* GPIO_75 */
374 "FM_I2S_SYNC", /* GPIO_76 */
375 "FM_I2S_DATA", /* GPIO_77 */
376 "FM_STATUS", /* GPIO_78 */
378 "SENSOR_RESET_N", /* GPIO_80 */
379 "FP_SPI_MOSI", /* GPIO_81 */
380 "FP_SPI_MISO", /* GPIO_82 */
381 "FP_SPI_CS_N", /* GPIO_83 */
382 "FP_SPI_CLK", /* GPIO_84 */
384 "CAM_VDD_1P05_EN", /* GPIO_86 */
385 "MSM_TS_I2C_SDA", /* GPIO_87 */
386 "MSM_TS_I2C_SCL", /* GPIO_88 */
387 "TS_RESOUT_N", /* GPIO_89 */
388 "ESE_SPI_CS_N", /* GPIO_90 */
391 "HAPTICS_EN", /* GPIO_93 */
396 "GRFC_1", /* GPIO_98 */
398 "GRFC_3", /* GPIO_100 */
399 "GRFC_4", /* GPIO_101 */
402 "GRFC_7", /* GPIO_104 */
403 "UIM2_DATA", /* GPIO_105 */
404 "UIM2_CLK", /* GPIO_106 */
405 "UIM2_RESET", /* GPIO_107 */
406 "UIM2_PRESENT", /* GPIO_108 */
407 "UIM1_DATA", /* GPIO_109 */
408 "UIM1_CLK", /* GPIO_110 */
409 "UIM1_RESET", /* GPIO_111 */
410 "UIM1_PRESENT", /* GPIO_112 */
411 "UIM_BATT_ALARM", /* GPIO_113 */
412 "GRFC_8", /* GPIO_114 */
413 "GRFC_9", /* GPIO_115 */
414 "TX_GTR_THRES", /* GPIO_116 */
415 "ACCEL_INT", /* GPIO_117 */
416 "GYRO_INT", /* GPIO_118 */
417 "COMPASS_INT", /* GPIO_119 */
418 "PROXIMITY_INT_N", /* GPIO_120 */
419 "FP_IRQ", /* GPIO_121 */
421 "HALL_INTR2", /* GPIO_123 */
422 "HALL_INTR1", /* GPIO_124 */
423 "TS_INT_N", /* GPIO_125 */
425 "GRFC_11", /* GPIO_127 */
427 "EXT_GPS_LNA_EN", /* GPIO_129 */
431 "GRFC_14", /* GPIO_133 */
432 "GSM_TX2_PHASE_D", /* GPIO_134 */
435 "RFFE3_DATA", /* GPIO_137 */
436 "RFFE3_CLK", /* GPIO_138 */
439 "RFFE5_DATA", /* GPIO_141 */
440 "RFFE5_CLK", /* GPIO_142 */
442 "COEX_UART_TX", /* GPIO_144 */
443 "COEX_UART_RX", /* GPIO_145 */
444 "RFFE2_DATA", /* GPIO_146 */
445 "RFFE2_CLK", /* GPIO_147 */
446 "RFFE1_DATA", /* GPIO_148 */
447 "RFFE1_CLK"; /* GPIO_149 */
449 touchscreen_default: touchscreen-default-state {
450 pins = "gpio89", "gpio125";
452 drive-strength = <10>;
456 touchscreen_sleep: touchscreen-sleep-state {
457 pins = "gpio89", "gpio125";
459 drive-strength = <2>;
463 vibrator_default: vibrator-default-state {
466 drive-strength = <8>;
470 vibrator_sleep: vibrator-sleep-state {
473 drive-strength = <2>;