0001 // SPDX-License-Identifier: BSD-3-Clause
0002 /*
0003 * Copyright (c) 2022, Alec Su <ae40515@yahoo.com.tw>
0004 */
0005
0006 /dts-v1/;
0007
0008 #include "msm8996-xiaomi-common.dtsi"
0009 #include "pmi8996.dtsi"
0010 #include <dt-bindings/sound/qcom,q6afe.h>
0011 #include <dt-bindings/sound/qcom,q6asm.h>
0012
0013 / {
0014 model = "Xiaomi Mi 5s Plus";
0015 compatible = "xiaomi,natrium", "qcom,msm8996";
0016 chassis-type = "handset";
0017 qcom,msm-id = <305 0x10000>;
0018 qcom,board-id = <47 0>;
0019 };
0020
0021 &adsp_pil {
0022 firmware-name = "qcom/msm8996/natrium/adsp.mbn";
0023 };
0024
0025 &blsp2_i2c6 {
0026 touchscreen@20 {
0027 compatible = "syna,rmi4-i2c";
0028 reg = <0x20>;
0029 interrupt-parent = <&tlmm>;
0030 interrupts = <125 IRQ_TYPE_LEVEL_LOW>;
0031 vdd-supply = <&vdd_3v2_tp>;
0032 syna,reset-delay-ms = <200>;
0033 syna,startup-delay-ms = <5>;
0034
0035 pinctrl-names = "default", "sleep";
0036 pinctrl-0 = <&touchscreen_default>;
0037 pinctrl-1 = <&touchscreen_sleep>;
0038 };
0039 };
0040
0041 &dsi0 {
0042 status = "okay";
0043
0044 vdda-supply = <&vreg_l2a_1p25>;
0045 vcca-supply = <&vreg_l28a_0p925>;
0046
0047 pinctrl-names = "default", "sleep";
0048 pinctrl-0 = <&mdss_dsi_default &mdss_te_default>;
0049 pinctrl-1 = <&mdss_dsi_sleep &mdss_te_sleep>;
0050
0051 panel: panel@0 {
0052 compatible = "jdi,fhd-r63452";
0053 reg = <0>;
0054 reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
0055 backlight = <&pmi8994_wled>;
0056
0057 port {
0058 panel_in: endpoint {
0059 remote-endpoint = <&dsi0_out>;
0060 };
0061 };
0062 };
0063 };
0064
0065 &dsi0_out {
0066 remote-endpoint = <&panel_in>;
0067 };
0068
0069 &gpu {
0070 zap-shader {
0071 firmware-name = "qcom/msm8996/natrium/a530_zap.mbn";
0072 };
0073 };
0074
0075 &mss_pil {
0076 firmware-name = "qcom/msm8996/natrium/mba.mbn",
0077 "qcom/msm8996/natrium/modem.mbn";
0078 };
0079
0080 &pmi8994_wled {
0081 status = "okay";
0082
0083 qcom,enabled-strings = <0 1>;
0084 qcom,switching-freq = <600>;
0085 };
0086
0087 &q6asmdai {
0088 dai@0 {
0089 reg = <0>;
0090 };
0091
0092 dai@1 {
0093 reg = <1>;
0094 };
0095
0096 dai@2 {
0097 reg = <2>;
0098 };
0099 };
0100
0101 &slpi_pil {
0102 firmware-name = "qcom/msm8996/natrium/slpi.mbn";
0103 };
0104
0105 &sound {
0106 compatible = "qcom,apq8096-sndcard";
0107 model = "natrium";
0108 audio-routing = "RX_BIAS", "MCLK";
0109
0110 mm1-dai-link {
0111 link-name = "MultiMedia1";
0112 cpu {
0113 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
0114 };
0115 };
0116
0117 mm2-dai-link {
0118 link-name = "MultiMedia2";
0119 cpu {
0120 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
0121 };
0122 };
0123
0124 mm3-dai-link {
0125 link-name = "MultiMedia3";
0126 cpu {
0127 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
0128 };
0129 };
0130
0131 slim-dai-link {
0132 link-name = "SLIM Playback";
0133 cpu {
0134 sound-dai = <&q6afedai SLIMBUS_6_RX>;
0135 };
0136
0137 platform {
0138 sound-dai = <&q6routing>;
0139 };
0140
0141 codec {
0142 sound-dai = <&wcd9335 6>;
0143 };
0144 };
0145
0146 slimcap-dai-link {
0147 link-name = "SLIM Capture";
0148 cpu {
0149 sound-dai = <&q6afedai SLIMBUS_0_TX>;
0150 };
0151
0152 platform {
0153 sound-dai = <&q6routing>;
0154 };
0155
0156 codec {
0157 sound-dai = <&wcd9335 1>;
0158 };
0159 };
0160 };
0161
0162 &venus {
0163 firmware-name = "qcom/msm8996/natrium/venus.mbn";
0164 };
0165
0166 &rpm_requests {
0167 pm8994-regulators {
0168 vreg_l3a_0p875: l3 {
0169 regulator-name = "vreg_l3a_0p875";
0170 regulator-min-microvolt = <850000>;
0171 regulator-max-microvolt = <1300000>;
0172 };
0173 vreg_l11a_1p1: l11 {
0174 regulator-name = "vreg_l11a_1p1";
0175 regulator-min-microvolt = <1100000>;
0176 regulator-max-microvolt = <1100000>;
0177 };
0178 vreg_l17a_2p8: l17 {
0179 regulator-name = "vreg_l17a_2p8";
0180 regulator-min-microvolt = <2800000>;
0181 regulator-max-microvolt = <2800000>;
0182 };
0183 vreg_l18a_2p8: l18 {
0184 regulator-name = "vreg_l18a_2p8";
0185 regulator-min-microvolt = <2800000>;
0186 regulator-max-microvolt = <2800000>;
0187 };
0188 vreg_l29a_2p8: l29 {
0189 regulator-name = "vreg_l29a_2p8";
0190 regulator-min-microvolt = <2800000>;
0191 regulator-max-microvolt = <2800000>;
0192 };
0193 };
0194 };
0195
0196 &pm8994_gpios {
0197 gpio-line-names =
0198 "NC", /* GPIO_1 */
0199 "VOL_UP_N", /* GPIO_2 */
0200 "SPKR_ID", /* GPIO_3 */
0201 "PWM_HAPTICS", /* GPIO_4 */
0202 "INFARED_DRV", /* GPIO_5 */
0203 "NC", /* GPIO_6 */
0204 "KEYPAD_LED_EN_A", /* GPIO_7 */
0205 "WL_EN", /* GPIO_8 */
0206 "3P3_ENABLE", /* GPIO_9 */
0207 "NC", /* GPIO_10 */
0208 "NC", /* GPIO_11 */
0209 "NC", /* GPIO_12 */
0210 "NC", /* GPIO_13 */
0211 "NC", /* GPIO_14 */
0212 "DIVCLK1_CDC", /* GPIO_15 */
0213 "DIVCLK2_HAPTICS", /* GPIO_16 */
0214 "NC", /* GPIO_17 */
0215 "32KHz_CLK_IN", /* GPIO_18 */
0216 "BT_EN", /* GPIO_19 */
0217 "PMIC_SLB", /* GPIO_20 */
0218 "UIM_BATT_ALARM", /* GPIO_21 */
0219 "NC"; /* GPIO_22 */
0220 };
0221
0222 &pm8994_mpps {
0223 gpio-line-names =
0224 "NC", /* MPP_1 */
0225 "CCI_TIMER1", /* MPP_2 */
0226 "PMIC_SLB", /* MPP_3 */
0227 "EXT_FET_WLED_PWR_EN_N",/* MPP_4 */
0228 "NC", /* MPP_5 */
0229 "NC", /* MPP_6 */
0230 "NC", /* MPP_7 */
0231 "NC"; /* MPP_8 */
0232 };
0233
0234 &pmi8994_gpios {
0235 gpio-line-names =
0236 "NC", /* GPIO_1 */
0237 "SPKR_PA_EN", /* GPIO_2 */
0238 "NC", /* GPIO_3 */
0239 "NC", /* GPIO_4 */
0240 "NC", /* GPIO_5 */
0241 "NC", /* GPIO_6 */
0242 "NC", /* GPIO_7 */
0243 "NC", /* GPIO_8 */
0244 "NC", /* GPIO_9 */
0245 "NC"; /* GPIO_10 */
0246 };
0247
0248 &tlmm {
0249 gpio-line-names =
0250 "ESE_SPI_MOSI", /* GPIO_0 */
0251 "ESE_SPI_MISO", /* GPIO_1 */
0252 "NC", /* GPIO_2 */
0253 "ESE_SPI_CLK", /* GPIO_3 */
0254 "MSM_UART_TX", /* GPIO_4 */
0255 "MSM_UART_RX", /* GPIO_5 */
0256 "NFC_I2C_SDA", /* GPIO_6 */
0257 "NFC_I2C_SCL", /* GPIO_7 */
0258 "LCD0_RESET_N", /* GPIO_8 */
0259 "NFC_IRQ", /* GPIO_9 */
0260 "LCD_TE", /* GPIO_10 */
0261 "LCD_ID_DET1", /* GPIO_11 */
0262 "NFC_DISABLE", /* GPIO_12 */
0263 "CAM_MCLK0", /* GPIO_13 */
0264 "CAM_MCLK1", /* GPIO_14 */
0265 "CAM_MCLK2", /* GPIO_15 */
0266 "ESE_PWR_REQ", /* GPIO_16 */
0267 "CCI_I2C_SDA0", /* GPIO_17 */
0268 "CCI_I2C_SCL0", /* GPIO_18 */
0269 "CCI_I2C_SDA1", /* GPIO_19 */
0270 "CCI_I2C_SCL1", /* GPIO_20 */
0271 "NFC_DWL_REQ", /* GPIO_21 */
0272 "CCI_TIMER1", /* GPIO_22 */
0273 "WEBCAM1_RESET_N", /* GPIO_23 */
0274 "ESE_IRQ", /* GPIO_24 */
0275 "NC", /* GPIO_25 */
0276 "WEBCAM1_STANDBY", /* GPIO_26 */
0277 "NC", /* GPIO_27 */
0278 "NC", /* GPIO_28 */
0279 "NC", /* GPIO_29 */
0280 "CAM_VDD_1P2_EN_2", /* GPIO_30 */
0281 "CAM_RESET_0", /* GPIO_31 */
0282 "CAM_RESET_1", /* GPIO_32 */
0283 "NC", /* GPIO_33 */
0284 "NC", /* GPIO_34 */
0285 "PCI_E0_RST_N", /* GPIO_35 */
0286 "PCI_E0_CLKREQ_N", /* GPIO_36 */
0287 "PCI_E0_WAKE", /* GPIO_37 */
0288 "CHARGER_INT", /* GPIO_38 */
0289 "CHARGER_RESET", /* GPIO_39 */
0290 "NC", /* GPIO_40 */
0291 "QCA_UART_TXD", /* GPIO_41 */
0292 "QCA_UART_RXD", /* GPIO_42 */
0293 "QCA_UART_CTS", /* GPIO_43 */
0294 "QCA_UART_RTS", /* GPIO_44 */
0295 "MAWC_UART_TX", /* GPIO_45 */
0296 "MAWC_UART_RX", /* GPIO_46 */
0297 "NC", /* GPIO_47 */
0298 "NC", /* GPIO_48 */
0299 "NC", /* GPIO_49 */
0300 "FP_SPI_RST", /* GPIO_50 */
0301 "TYPEC_I2C_SDA", /* GPIO_51 */
0302 "TYPEC_I2C_SCL", /* GPIO_52 */
0303 "CODEC_INT2_N", /* GPIO_53 */
0304 "CODEC_INT1_N", /* GPIO_54 */
0305 "APPS_I2C7_SDA", /* GPIO_55 */
0306 "APPS_I2C7_SCL", /* GPIO_56 */
0307 "FORCE_USB_BOOT", /* GPIO_57 */
0308 "NC", /* GPIO_58 */
0309 "NC", /* GPIO_59 */
0310 "NC", /* GPIO_60 */
0311 "NC", /* GPIO_61 */
0312 "ESE_RSTN", /* GPIO_62 */
0313 "TYPEC_INT", /* GPIO_63 */
0314 "CODEC_RESET_N", /* GPIO_64 */
0315 "PCM_CLK", /* GPIO_65 */
0316 "PCM_SYNC", /* GPIO_66 */
0317 "PCM_DIN", /* GPIO_67 */
0318 "PCM_DOUT", /* GPIO_68 */
0319 "CDC_44K1_CLK", /* GPIO_69 */
0320 "SLIMBUS_CLK", /* GPIO_70 */
0321 "SLIMBUS_DATA0", /* GPIO_71 */
0322 "SLIMBUS_DATA1", /* GPIO_72 */
0323 "LDO_5V_IN_EN", /* GPIO_73 */
0324 "TYPEC_EN_N", /* GPIO_74 */
0325 "NC", /* GPIO_75 */
0326 "NC", /* GPIO_76 */
0327 "NC", /* GPIO_77 */
0328 "NC", /* GPIO_78 */
0329 "NC", /* GPIO_79 */
0330 "SENSOR_RESET_N", /* GPIO_80 */
0331 "FP_SPI_MOSI", /* GPIO_81 */
0332 "FP_SPI_MISO", /* GPIO_82 */
0333 "FP_SPI_CS_N", /* GPIO_83 */
0334 "FP_SPI_CLK", /* GPIO_84 */
0335 "NC", /* GPIO_85 */
0336 "CAM_VDD_1P2_EN", /* GPIO_86 */
0337 "MSM_TS_I2C_SDA", /* GPIO_87 */
0338 "MSM_TS_I2C_SCL", /* GPIO_88 */
0339 "TS_RESOUT_N", /* GPIO_89 */
0340 "ESE_SPI_CS_N", /* GPIO_90 */
0341 "NC", /* GPIO_91 */
0342 "CAM2_AVDD_EN", /* GPIO_92 */
0343 "CAM2_VCM_EN", /* GPIO_93 */
0344 "NC", /* GPIO_94 */
0345 "NC", /* GPIO_95 */
0346 "NC", /* GPIO_96 */
0347 "GRFC_0", /* GPIO_97 */
0348 "GRFC_1", /* GPIO_98 */
0349 "NC", /* GPIO_99 */
0350 "GRFC_3", /* GPIO_100 */
0351 "GRFC_4", /* GPIO_101 */
0352 "GRFC_5", /* GPIO_102 */
0353 "NC", /* GPIO_103 */
0354 "GRFC_7", /* GPIO_104 */
0355 "UIM2_DATA", /* GPIO_105 */
0356 "UIM2_CLK", /* GPIO_106 */
0357 "UIM2_RESET", /* GPIO_107 */
0358 "UIM2_PRESENT", /* GPIO_108 */
0359 "UIM1_DATA", /* GPIO_109 */
0360 "UIM1_CLK", /* GPIO_110 */
0361 "UIM1_RESET", /* GPIO_111 */
0362 "UIM1_PRESENT", /* GPIO_112 */
0363 "UIM_BATT_ALARM", /* GPIO_113 */
0364 "GRFC_8", /* GPIO_114 */
0365 "GRFC_9", /* GPIO_115 */
0366 "TX_GTR_THRES", /* GPIO_116 */
0367 "ACCEL_INT", /* GPIO_117 */
0368 "GYRO_INT", /* GPIO_118 */
0369 "COMPASS_INT", /* GPIO_119 */
0370 "PROXIMITY_INT_N", /* GPIO_120 */
0371 "FP_IRQ", /* GPIO_121 */
0372 "P_SENSE", /* GPIO_122 */
0373 "HALL_INTR2", /* GPIO_123 */
0374 "HALL_INTR1", /* GPIO_124 */
0375 "TS_INT_N", /* GPIO_125 */
0376 "NC", /* GPIO_126 */
0377 "GRFC_11", /* GPIO_127 */
0378 "NC", /* GPIO_128 */
0379 "EXT_GPS_LNA_EN", /* GPIO_129 */
0380 "NC", /* GPIO_130 */
0381 "LCD_ID_DET2", /* GPIO_131 */
0382 "LCD_TE2", /* GPIO_132 */
0383 "GRFC_14", /* GPIO_133 */
0384 "GSM_TX2_PHASE_D", /* GPIO_134 */
0385 "NC", /* GPIO_135 */
0386 "GRFC_15", /* GPIO_136 */
0387 "RFFE3_DATA", /* GPIO_137 */
0388 "RFFE3_CLK", /* GPIO_138 */
0389 "NC", /* GPIO_139 */
0390 "NC", /* GPIO_140 */
0391 "RFFE5_DATA", /* GPIO_141 */
0392 "RFFE5_CLK", /* GPIO_142 */
0393 "NC", /* GPIO_143 */
0394 "COEX_UART_TX", /* GPIO_144 */
0395 "COEX_UART_RX", /* GPIO_145 */
0396 "RFFE2_DATA", /* GPIO_146 */
0397 "RFFE2_CLK", /* GPIO_147 */
0398 "RFFE1_DATA", /* GPIO_148 */
0399 "RFFE1_CLK"; /* GPIO_149 */
0400
0401 touchscreen_default: touchscreen-default {
0402 pins = "gpio89", "gpio125";
0403 function = "gpio";
0404 drive-strength = <10>;
0405 bias-pull-up;
0406 };
0407
0408 touchscreen_sleep: touchscreen-sleep {
0409 pins = "gpio89", "gpio125";
0410 function = "gpio";
0411 drive-strength = <2>;
0412 bias-disable;
0413 };
0414 };