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>;
23 divclk2_haptics: divclk2 {
24 compatible = "fixed-clock";
26 clock-frequency = <32768>;
27 clock-output-names = "divclk2";
29 pinctrl-names = "default";
30 pinctrl-0 = <&divclk2_pin_a>;
35 firmware-name = "qcom/msm8996/gemini/adsp.mbn";
40 compatible = "ti,drv2604";
42 enable-gpio = <&tlmm 93 0x00>;
43 mode = <DRV260X_LRA_MODE>;
44 library-sel = <DRV260X_LIB_LRA>;
45 pinctrl-names = "default","sleep";
46 pinctrl-0 = <&vibrator_default>;
47 pinctrl-1 = <&vibrator_sleep>;
51 compatible = "ti,lp5562";
55 enable-gpios = <&pm8994_gpios 7 1>;
56 clock-mode = /bits/8 <2>;
57 label = "button-backlight";
61 chan-name = "button-backlight";
62 led-cur = /bits/ 8 <0x32>;
63 max-cur = /bits/ 8 <0xc8>;
68 chan-name = "button-backlight1";
69 led-cur = /bits/ 8 <0x32>;
70 max-cur = /bits/ 8 <0xc8>;
77 compatible = "syna,rmi4-i2c";
81 interrupt-parent = <&tlmm>;
82 interrupts = <125 IRQ_TYPE_LEVEL_LOW>;
83 vio-supply = <&vreg_l6a_1p8>;
84 vdd-supply = <&vdd_3v2_tp>;
85 reset-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>;
87 pinctrl-names = "default", "sleep";
88 pinctrl-0 = <&touchscreen_default>;
89 pinctrl-1 = <&touchscreen_sleep>;
96 firmware-name = "qcom/msm8996/gemini/a530_zap.mbn";
103 vdd-supply = <&vreg_l2a_1p25>;
104 vdda-supply = <&vreg_l19a_3p3>;
105 vddio-supply = <&vreg_l14a_1p8>;
107 pinctrl-names = "default", "sleep";
108 pinctrl-0 = <&mdss_dsi_default &mdss_te_default>;
109 pinctrl-1 = <&mdss_dsi_sleep &mdss_te_sleep>;
112 compatible = "jdi,fhd-r63452";
114 reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
115 backlight = <&pmi8994_wled>;
119 remote-endpoint = <&mdss_dsi0_out>;
126 remote-endpoint = <&panel_in>;
134 firmware-name = "qcom/msm8996/gemini/mba.mbn",
135 "qcom/msm8996/gemini/modem.mbn";
153 firmware-name = "qcom/msm8996/gemini/slpi.mbn";
157 compatible = "qcom,apq8096-sndcard";
159 audio-routing = "RX_BIAS", "MCLK",
160 "MM_DL1", "MultiMedia1 Playback",
161 "MM_DL2", "MultiMedia2 Playback",
162 "MultiMedia3 Capture", "MM_UL3";
165 link-name = "MultiMedia1";
167 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
172 link-name = "MultiMedia2";
174 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
179 link-name = "MultiMedia3";
181 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
186 link-name = "SLIM Playback";
188 sound-dai = <&q6afedai SLIMBUS_6_RX>;
192 sound-dai = <&q6routing>;
196 sound-dai = <&wcd9335 AIF4_PB>;
201 link-name = "SLIM Capture";
203 sound-dai = <&q6afedai SLIMBUS_0_TX>;
207 sound-dai = <&q6routing>;
211 sound-dai = <&wcd9335 AIF1_CAP>;
217 firmware-name = "qcom/msm8996/gemini/venus.mbn";
223 regulator-name = "vreg_l17a_2p8";
224 regulator-min-microvolt = <2500000>;
225 regulator-max-microvolt = <2500000>;
228 regulator-name = "vreg_l29a_2p7";
229 regulator-min-microvolt = <2800000>;
230 regulator-max-microvolt = <2800000>;
238 "VOL_UP_N", /* GPIO_2 */
239 "SPKR_ID", /* GPIO_3 */
240 "PWM_HAPTICS", /* GPIO_4 */
241 "INFARED_DRV", /* GPIO_5 */
243 "KEYPAD_LED_EN", /* GPIO_7 */
244 "WL_EN", /* GPIO_8 */
245 "3P3_ENABLE", /* GPIO_9 */
246 "FP_ID", /* GPIO_10 */
251 "DIVCLK1_CDC", /* GPIO_15 */
252 "DIVCLK2_HAPTICS", /* GPIO_16 */
254 "32KHz_CLK_IN", /* GPIO_18 */
255 "BT_EN", /* GPIO_19 */
256 "PMIC_SLB", /* GPIO_20 */
257 "UIM_BATT_ALARM", /* GPIO_21 */
260 divclk2_pin_a: divclk2-state {
262 function = PMIC_GPIO_FUNC_FUNC2;
264 power-source = <PM8994_GPIO_S4>;
271 "CCI_TIMER1", /* MPP_2 */
272 "PMIC_SLB", /* MPP_3 */
273 "EXT_FET_WLED_PWR_EN_N",/* MPP_4 */
283 "SPKR_PA_RST", /* GPIO_2 */
296 "ESE_SPI_MOSI", /* GPIO_0 */
297 "ESE_SPI_MISO", /* GPIO_1 */
298 "ERR_INT_N", /* GPIO_2 */
299 "ESE_SPI_CLK", /* GPIO_3 */
300 "MSM_UART_TX", /* GPIO_4 */
301 "MSM_UART_RX", /* GPIO_5 */
302 "NFC_I2C_SDA", /* GPIO_6 */
303 "NFC_I2C_SCL", /* GPIO_7 */
304 "LCD0_RESET_N", /* GPIO_8 */
305 "NFC_IRQ", /* GPIO_9 */
306 "LCD_TE", /* GPIO_10 */
307 "LCD_ID_DET1", /* GPIO_11 */
308 "NFC_DISABLE", /* GPIO_12 */
309 "CAM_MCLK0", /* GPIO_13 */
311 "CAM_MCLK2", /* GPIO_15 */
312 "ESE_PWR_REQ", /* GPIO_16 */
313 "CCI_I2C_SDA0", /* GPIO_17 */
314 "CCI_I2C_SCL0", /* GPIO_18 */
315 "CCI_I2C_SDA1", /* GPIO_19 */
316 "CCI_I2C_SCL1", /* GPIO_20 */
317 "NFC_DWL_REQ", /* GPIO_21 */
318 "CCI_TIMER1", /* GPIO_22 */
319 "WEBCAM1_RESET_N", /* GPIO_23 */
320 "ESE_IRQ", /* GPIO_24 */
322 "WEBCAM1_STANDBY", /* GPIO_26 */
326 "CAM1_RST_N", /* GPIO_30 */
330 "FP_DOME_SW", /* GPIO_34 */
331 "PCI_E0_RST_N", /* GPIO_35 */
332 "PCI_E0_CLKREQ_N", /* GPIO_36 */
333 "PCI_E0_WAKE", /* GPIO_37 */
334 "FM_INT_N", /* GPIO_38 */
335 "FM_RESET_N", /* GPIO_39 */
337 "QCA_UART_TXD", /* GPIO_41 */
338 "QCA_UART_RXD", /* GPIO_42 */
339 "QCA_UART_CTS", /* GPIO_43 */
340 "QCA_UART_RTS", /* GPIO_44 */
341 "MAWC_UART_TX", /* GPIO_45 */
342 "MAWC_UART_RX", /* GPIO_46 */
345 "AUDIO_SWITCH_EN", /* GPIO_49 */
346 "FP_SPI_RST", /* GPIO_50 */
347 "TYPEC_I2C_SDA", /* GPIO_51 */
348 "TYPEC_I2C_SCL", /* GPIO_52 */
349 "CODEC_INT2_N", /* GPIO_53 */
350 "CODEC_INT1_N", /* GPIO_54 */
351 "APPS_I2C7_SDA", /* GPIO_55 */
352 "APPS_I2C7_SCL", /* GPIO_56 */
353 "FORCE_USB_BOOT", /* GPIO_57 */
354 "SPKR_I2S_BCK", /* GPIO_58 */
355 "SPKR_I2S_WS", /* GPIO_59 */
356 "SPKR_I2S_DOUT", /* GPIO_60 */
357 "SPKR_I2S_DIN", /* GPIO_61 */
358 "ESE_RSTN", /* GPIO_62 */
359 "TYPEC_INT", /* GPIO_63 */
360 "CODEC_RESET_N", /* GPIO_64 */
361 "PCM_CLK", /* GPIO_65 */
362 "PCM_SYNC", /* GPIO_66 */
363 "PCM_DIN", /* GPIO_67 */
364 "PCM_DOUT", /* GPIO_68 */
365 "HIFI_CLK", /* GPIO_69 */
366 "SLIMBUS_CLK", /* GPIO_70 */
367 "SLIMBUS_DATA0", /* GPIO_71 */
368 "SLIMBUS_DATA1", /* GPIO_72 */
369 "LDO_5V_IN_EN", /* GPIO_73 */
371 "FM_I2S_CLK", /* GPIO_75 */
372 "FM_I2S_SYNC", /* GPIO_76 */
373 "FM_I2S_DATA", /* GPIO_77 */
374 "FM_STATUS", /* GPIO_78 */
376 "SENSOR_RESET_N", /* GPIO_80 */
377 "FP_SPI_MOSI", /* GPIO_81 */
378 "FP_SPI_MISO", /* GPIO_82 */
379 "FP_SPI_CS_N", /* GPIO_83 */
380 "FP_SPI_CLK", /* GPIO_84 */
382 "CAM_VDD_1P05_EN", /* GPIO_86 */
383 "MSM_TS_I2C_SDA", /* GPIO_87 */
384 "MSM_TS_I2C_SCL", /* GPIO_88 */
385 "TS_RESOUT_N", /* GPIO_89 */
386 "ESE_SPI_CS_N", /* GPIO_90 */
389 "HAPTICS_EN", /* GPIO_93 */
394 "GRFC_1", /* GPIO_98 */
396 "GRFC_3", /* GPIO_100 */
397 "GRFC_4", /* GPIO_101 */
400 "GRFC_7", /* GPIO_104 */
401 "UIM2_DATA", /* GPIO_105 */
402 "UIM2_CLK", /* GPIO_106 */
403 "UIM2_RESET", /* GPIO_107 */
404 "UIM2_PRESENT", /* GPIO_108 */
405 "UIM1_DATA", /* GPIO_109 */
406 "UIM1_CLK", /* GPIO_110 */
407 "UIM1_RESET", /* GPIO_111 */
408 "UIM1_PRESENT", /* GPIO_112 */
409 "UIM_BATT_ALARM", /* GPIO_113 */
410 "GRFC_8", /* GPIO_114 */
411 "GRFC_9", /* GPIO_115 */
412 "TX_GTR_THRES", /* GPIO_116 */
413 "ACCEL_INT", /* GPIO_117 */
414 "GYRO_INT", /* GPIO_118 */
415 "COMPASS_INT", /* GPIO_119 */
416 "PROXIMITY_INT_N", /* GPIO_120 */
417 "FP_IRQ", /* GPIO_121 */
419 "HALL_INTR2", /* GPIO_123 */
420 "HALL_INTR1", /* GPIO_124 */
421 "TS_INT_N", /* GPIO_125 */
423 "GRFC_11", /* GPIO_127 */
425 "EXT_GPS_LNA_EN", /* GPIO_129 */
429 "GRFC_14", /* GPIO_133 */
430 "GSM_TX2_PHASE_D", /* GPIO_134 */
433 "RFFE3_DATA", /* GPIO_137 */
434 "RFFE3_CLK", /* GPIO_138 */
437 "RFFE5_DATA", /* GPIO_141 */
438 "RFFE5_CLK", /* GPIO_142 */
440 "COEX_UART_TX", /* GPIO_144 */
441 "COEX_UART_RX", /* GPIO_145 */
442 "RFFE2_DATA", /* GPIO_146 */
443 "RFFE2_CLK", /* GPIO_147 */
444 "RFFE1_DATA", /* GPIO_148 */
445 "RFFE1_CLK"; /* GPIO_149 */
447 touchscreen_default: touchscreen-default-state {
448 pins = "gpio89", "gpio125";
450 drive-strength = <10>;
454 touchscreen_sleep: touchscreen-sleep-state {
455 pins = "gpio89", "gpio125";
457 drive-strength = <2>;
461 vibrator_default: vibrator-default-state {
464 drive-strength = <8>;
468 vibrator_sleep: vibrator-sleep-state {
471 drive-strength = <2>;