msm8996-xiaomi-scorpio.dts (11062B)
1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2020, Yassine Oudjana <y.oudjana@protonmail.com> 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 Note 2"; 15 compatible = "xiaomi,scorpio", "qcom,msm8996"; 16 chassis-type = "handset"; 17 qcom,msm-id = <305 0x10000>; 18 qcom,board-id = <34 0>; 19 20 chosen { 21 #address-cells = <2>; 22 #size-cells = <2>; 23 ranges; 24 25 framebuffer0: framebuffer@83401000 { 26 compatible = "simple-framebuffer"; 27 reg = <0x00 0x83401000 0x00 (1080 * 1920 * 3)>; 28 width = <1080>; 29 height = <1920>; 30 stride = <(1080 * 3)>; 31 format = "r8g8b8"; 32 33 /* DSI0 and MDP SMMU clocks */ 34 clocks = <&mmcc MDSS_MDP_CLK>, 35 <&mmcc MMSS_MMAGIC_AHB_CLK>, 36 <&mmcc MDSS_AHB_CLK>, 37 <&mmcc MDSS_AXI_CLK>, 38 <&mmcc MMSS_MISC_AHB_CLK>, 39 <&mmcc MDSS_BYTE0_CLK>, 40 <&mmcc MDSS_PCLK0_CLK>, 41 <&mmcc MDSS_ESC0_CLK>, 42 <&mmcc SMMU_MDP_AHB_CLK>, 43 <&mmcc SMMU_MDP_AXI_CLK>; 44 45 /* MDSS power domain */ 46 power-domains = <&mmcc MDSS_GDSC>; 47 }; 48 }; 49 50 reserved-memory { 51 cont_splash_mem: memory@83401000 { 52 reg = <0x0 0x83401000 0x0 (1080 * 1920 * 3)>; 53 no-map; 54 }; 55 }; 56}; 57 58&adsp_pil { 59 firmware-name = "qcom/msm8996/scorpio/adsp.mbn"; 60}; 61 62&blsp2_i2c6 { 63 touchkey: touchkey@28 { 64 compatible = "cypress,sf3155"; 65 reg = <0x28>; 66 interrupt-parent = <&tlmm>; 67 interrupts = <77 IRQ_TYPE_EDGE_FALLING>; 68 avdd-supply = <&vreg_l6a_1p8>; 69 vdd-supply = <&vdd_3v2_tp>; 70 linux,keycodes = <KEY_BACK KEY_MENU>; 71 72 pinctrl-names = "default", "sleep"; 73 pinctrl-0 = <&touchkey_default>; 74 pinctrl-1 = <&touchkey_sleep>; 75 }; 76 77 touchscreen: atmel-mxt-ts@4a { 78 compatible = "atmel,maxtouch"; 79 reg = <0x4a>; 80 interrupt-parent = <&tlmm>; 81 interrupts = <125 IRQ_TYPE_LEVEL_LOW>; 82 vdda-supply = <&vreg_l6a_1p8>; 83 vdd-supply = <&vdd_3v2_tp>; 84 reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>; 85 86 pinctrl-names = "default", "sleep"; 87 pinctrl-0 = <&touchscreen_default>; 88 pinctrl-1 = <&touchscreen_sleep>; 89 }; 90}; 91 92&gpu { 93 zap-shader { 94 firmware-name = "qcom/msm8996/scorpio/a530_zap.mbn"; 95 }; 96}; 97 98&mdp_smmu { 99 /* 100 * Probing this SMMU causes a crash due to writing to some secure 101 * registers. Disable it for now. 102 */ 103 status = "disabled"; 104}; 105 106&mdss { 107 /* 108 * MDSS depends on the MDP SMMU, and probing it alters the bootloader 109 * configured framebuffer used by simplefb. Disable it for now. 110 */ 111 status = "disabled"; 112}; 113 114&mss_pil { 115 firmware-name = "qcom/msm8996/scorpio/mba.mbn", 116 "qcom/msm8996/scorpio/modem.mbn"; 117}; 118 119&q6asmdai { 120 dai@0 { 121 reg = <0>; 122 }; 123 124 dai@1 { 125 reg = <1>; 126 }; 127 128 dai@2 { 129 reg = <2>; 130 }; 131}; 132 133&slpi_pil { 134 firmware-name = "qcom/msm8996/scorpio/slpi.mbn"; 135}; 136 137&sound { 138 compatible = "qcom,apq8096-sndcard"; 139 model = "scorpio"; 140 audio-routing = "RX_BIAS", "MCLK"; 141 142 mm1-dai-link { 143 link-name = "MultiMedia1"; 144 cpu { 145 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; 146 }; 147 }; 148 149 mm2-dai-link { 150 link-name = "MultiMedia2"; 151 cpu { 152 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>; 153 }; 154 }; 155 156 mm3-dai-link { 157 link-name = "MultiMedia3"; 158 cpu { 159 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; 160 }; 161 }; 162 163 slim-dai-link { 164 link-name = "SLIM Playback"; 165 cpu { 166 sound-dai = <&q6afedai SLIMBUS_6_RX>; 167 }; 168 169 platform { 170 sound-dai = <&q6routing>; 171 }; 172 173 codec { 174 sound-dai = <&wcd9335 6>; 175 }; 176 }; 177 178 slimcap-dai-link { 179 link-name = "SLIM Capture"; 180 cpu { 181 sound-dai = <&q6afedai SLIMBUS_0_TX>; 182 }; 183 184 platform { 185 sound-dai = <&q6routing>; 186 }; 187 188 codec { 189 sound-dai = <&wcd9335 1>; 190 }; 191 }; 192}; 193 194&venus { 195 firmware-name = "qcom/msm8996/scorpio/venus.mbn"; 196}; 197 198&rpm_requests { 199 pm8994-regulators { 200 vreg_l3a_0p875: l3 { 201 regulator-name = "vreg_l3a_0p875"; 202 regulator-min-microvolt = <850000>; 203 regulator-max-microvolt = <1300000>; 204 }; 205 vreg_l11a_1p1: l11 { 206 regulator-name = "vreg_l11a_1p1"; 207 regulator-min-microvolt = <1100000>; 208 regulator-max-microvolt = <1100000>; 209 }; 210 vreg_l17a_2p8: l17 { 211 regulator-name = "vreg_l17a_2p8"; 212 regulator-min-microvolt = <2800000>; 213 regulator-max-microvolt = <2800000>; 214 }; 215 vreg_l18a_2p8: l18 { 216 regulator-name = "vreg_l18a_2p8"; 217 regulator-min-microvolt = <2800000>; 218 regulator-max-microvolt = <2800000>; 219 }; 220 vreg_l22a_3p0: l22 { 221 regulator-name = "vreg_l22a_3p0"; 222 regulator-min-microvolt = <2950000>; 223 regulator-max-microvolt = <3500000>; 224 }; 225 vreg_l29a_2p7: l29 { 226 regulator-name = "vreg_l29a_2p7"; 227 regulator-min-microvolt = <2700000>; 228 regulator-max-microvolt = <2700000>; 229 }; 230 }; 231}; 232 233&vdd_gfx { 234 regulator-max-microvolt = <1065000>; 235}; 236 237&pm8994_gpios { 238 gpio-line-names = 239 "NC", /* GPIO_1 */ 240 "VOL_UP_N", /* GPIO_2 */ 241 "SPKR_ID", /* GPIO_3 */ 242 "PWM_HAPTICS", /* GPIO_4 */ 243 "INFARED_DRV", /* GPIO_5 */ 244 "NC", /* GPIO_6 */ 245 "KEYPAD_LED_EN_A", /* GPIO_7 */ 246 "WL_EN", /* GPIO_8 */ 247 "3P3_ENABLE", /* GPIO_9 */ 248 "KEYPAD_LED_EN_B", /* GPIO_10 */ 249 "FP_ID", /* GPIO_11 */ 250 "NC", /* GPIO_12 */ 251 "NC", /* GPIO_13 */ 252 "NC", /* GPIO_14 */ 253 "DIVCLK1_CDC", /* GPIO_15 */ 254 "DIVCLK2_HAPTICS", /* GPIO_16 */ 255 "NC", /* GPIO_17 */ 256 "32KHz_CLK_IN", /* GPIO_18 */ 257 "BT_EN", /* GPIO_19 */ 258 "PMIC_SLB", /* GPIO_20 */ 259 "UIM_BATT_ALARM", /* GPIO_21 */ 260 "NC"; /* GPIO_22 */ 261}; 262 263&pm8994_mpps { 264 gpio-line-names = 265 "VREF_SDC_UIM_APC", /* MPP_1 */ 266 "NC", /* MPP_2 */ 267 "VREF_DACX", /* MPP_3 */ 268 "NC", /* MPP_4 */ 269 "NC", /* MPP_5 */ 270 "STAT_SMB1351", /* MPP_6 */ 271 "NC", /* MPP_7 */ 272 "NC"; /* MPP_8 */ 273}; 274 275&pmi8994_gpios { 276 gpio-line-names = 277 "NC", /* GPIO_1 */ 278 "SPKR_PA_RST", /* GPIO_2 */ 279 "NC", /* GPIO_3 */ 280 "NC", /* GPIO_4 */ 281 "NC", /* GPIO_5 */ 282 "NC", /* GPIO_6 */ 283 "NC", /* GPIO_7 */ 284 "NC", /* GPIO_8 */ 285 "NC", /* GPIO_9 */ 286 "NC"; /* GPIO_10 */ 287}; 288 289&tlmm { 290 gpio-line-names = 291 "ESE_SPI_MOSI", /* GPIO_0 */ 292 "ESE_SPI_MISO", /* GPIO_1 */ 293 "NC", /* GPIO_2 */ 294 "ESE_SPI_CLK", /* GPIO_3 */ 295 "MSM_UART_TX", /* GPIO_4 */ 296 "MSM_UART_RX", /* GPIO_5 */ 297 "NFC_I2C_SDA", /* GPIO_6 */ 298 "NFC_I2C_SCL", /* GPIO_7 */ 299 "OLED_RESET_N", /* GPIO_8 */ 300 "NFC_IRQ", /* GPIO_9 */ 301 "OLED_TE", /* GPIO_10 */ 302 "OLED_ID_DET1", /* GPIO_11 */ 303 "NFC_DISABLE", /* GPIO_12 */ 304 "CAM_MCLK0", /* GPIO_13 */ 305 "OLED_ID_DET2", /* GPIO_14 */ 306 "CAM_MCLK2", /* GPIO_15 */ 307 "ESE_PWR_REQ", /* GPIO_16 */ 308 "CCI_I2C_SDA0", /* GPIO_17 */ 309 "CCI_I2C_SCL0", /* GPIO_18 */ 310 "CCI_I2C_SDA1", /* GPIO_19 */ 311 "CCI_I2C_SCL1", /* GPIO_20 */ 312 "NFC_DWL_REQ", /* GPIO_21 */ 313 "CCI_TIMER1", /* GPIO_22 */ 314 "WEBCAM1_RESET_N", /* GPIO_23 */ 315 "ESE_IRQ", /* GPIO_24 */ 316 "NC", /* GPIO_25 */ 317 "WEBCAM1_STANDBY", /* GPIO_26 */ 318 "NC", /* GPIO_27 */ 319 "NC", /* GPIO_28 */ 320 "OLED_ERR_FG", /* GPIO_29 */ 321 "CAM1_RST_N", /* GPIO_30 */ 322 "HIFI_SW_MUTE", /* GPIO_31 */ 323 "NC", /* GPIO_32 */ 324 "NC", /* GPIO_33 */ 325 "FP_DOME_SW", /* GPIO_34 */ 326 "PCI_E0_RST_N", /* GPIO_35 */ 327 "PCI_E0_CLKREQ_N", /* GPIO_36 */ 328 "PCI_E0_WAKE", /* GPIO_37 */ 329 "OV_PWDN", /* GPIO_38 */ 330 "NC", /* GPIO_39 */ 331 "VDDR_1P6_EN", /* GPIO_40 */ 332 "QCA_UART_TXD", /* GPIO_41 */ 333 "QCA_UART_RXD", /* GPIO_42 */ 334 "QCA_UART_CTS", /* GPIO_43 */ 335 "QCA_UART_RTS", /* GPIO_44 */ 336 "MAWC_UART_TX", /* GPIO_45 */ 337 "MAWC_UART_RX", /* GPIO_46 */ 338 "NC", /* GPIO_47 */ 339 "NC", /* GPIO_48 */ 340 "AUDIO_SWITCH_EN", /* GPIO_49 */ 341 "FP_SPI_RST", /* GPIO_50 */ 342 "TYPEC_I2C_SDA", /* GPIO_51 */ 343 "TYPEC_I2C_SCL", /* GPIO_52 */ 344 "CODEC_INT2_N", /* GPIO_53 */ 345 "CODEC_INT1_N", /* GPIO_54 */ 346 "APPS_I2C7_SDA", /* GPIO_55 */ 347 "APPS_I2C7_SCL", /* GPIO_56 */ 348 "FORCE_USB_BOOT", /* GPIO_57 */ 349 "SPKR_I2S_BCK", /* GPIO_58 */ 350 "SPKR_I2S_WS", /* GPIO_59 */ 351 "SPKR_I2S_DOUT", /* GPIO_60 */ 352 "SPKR_I2S_DIN", /* GPIO_61 */ 353 "ESE_RSTN", /* GPIO_62 */ 354 "TYPEC_INT", /* GPIO_63 */ 355 "CODEC_RESET_N", /* GPIO_64 */ 356 "PCM_CLK", /* GPIO_65 */ 357 "PCM_SYNC", /* GPIO_66 */ 358 "PCM_DIN", /* GPIO_67 */ 359 "PCM_DOUT", /* GPIO_68 */ 360 "CDC_44K1_CLK", /* GPIO_69 */ 361 "SLIMBUS_CLK", /* GPIO_70 */ 362 "SLIMBUS_DATA0", /* GPIO_71 */ 363 "SLIMBUS_DATA1", /* GPIO_72 */ 364 "LDO_5V_IN_EN", /* GPIO_73 */ 365 "NC", /* GPIO_74 */ 366 "TSP_RST_N", /* GPIO_75 */ 367 "NC", /* GPIO_76 */ 368 "TOUCHKEY_INT", /* GPIO_77 */ 369 "SPKR_I2S_MCLK", /* GPIO_78 */ 370 "SPKR_PA_INT", /* GPIO_79 */ 371 "SENSOR_RESET_N", /* GPIO_80 */ 372 "FP_SPI_MOSI", /* GPIO_81 */ 373 "FP_SPI_MISO", /* GPIO_82 */ 374 "FP_SPI_CS_N", /* GPIO_83 */ 375 "FP_SPI_CLK", /* GPIO_84 */ 376 "HIFI_SD", /* GPIO_85 */ 377 "CAM_VDD_1P05_EN", /* GPIO_86 */ 378 "MSM_TS_I2C_SDA", /* GPIO_87 */ 379 "MSM_TS_I2C_SCL", /* GPIO_88 */ 380 "NC", /* GPIO_89 */ 381 "ESE_SPI_CS_N", /* GPIO_90 */ 382 "NC", /* GPIO_91 */ 383 "NC", /* GPIO_92 */ 384 "NC", /* GPIO_93 */ 385 "NC", /* GPIO_94 */ 386 "NC", /* GPIO_95 */ 387 "NC", /* GPIO_96 */ 388 "GRFC_0", /* GPIO_97 */ 389 "GRFC_1", /* GPIO_98 */ 390 "NC", /* GPIO_99 */ 391 "GRFC_3", /* GPIO_100 */ 392 "GRFC_4", /* GPIO_101 */ 393 "NC", /* GPIO_102 */ 394 "NC", /* GPIO_103 */ 395 "GRFC_7", /* GPIO_104 */ 396 "UIM2_DATA", /* GPIO_105 */ 397 "UIM2_CLK", /* GPIO_106 */ 398 "UIM2_RESET", /* GPIO_107 */ 399 "UIM2_PRESENT", /* GPIO_108 */ 400 "UIM1_DATA", /* GPIO_109 */ 401 "UIM1_CLK", /* GPIO_110 */ 402 "UIM1_RESET", /* GPIO_111 */ 403 "UIM1_PRESENT", /* GPIO_112 */ 404 "UIM_BATT_ALARM", /* GPIO_113 */ 405 "GRFC_8", /* GPIO_114 */ 406 "GRFC_9", /* GPIO_115 */ 407 "TX_GTR_THRES", /* GPIO_116 */ 408 "ACC_INT", /* GPIO_117 */ 409 "GYRO_INT", /* GPIO_118 */ 410 "COMPASS_INT", /* GPIO_119 */ 411 "PROXIMITY_INT_N", /* GPIO_120 */ 412 "FP_IRQ", /* GPIO_121 */ 413 "TSP_TA", /* GPIO_122 */ 414 "HALL_INTR2", /* GPIO_123 */ 415 "HALL_INTR1", /* GPIO_124 */ 416 "TS_INT_N", /* GPIO_125 */ 417 "NC", /* GPIO_126 */ 418 "GRFC_11", /* GPIO_127 */ 419 "HIFI_PWR_EN", /* GPIO_128 */ 420 "EXT_GPS_LNA_EN", /* GPIO_129 */ 421 "NC", /* GPIO_130 */ 422 "NC", /* GPIO_131 */ 423 "NC", /* GPIO_132 */ 424 "GRFC_14", /* GPIO_133 */ 425 "GSM_TX2_PHASE_D", /* GPIO_134 */ 426 "HIFI_SW_SEL", /* GPIO_135 */ 427 "GRFC_15", /* GPIO_136 */ 428 "RFFE3_DATA", /* GPIO_137 */ 429 "RFFE3_CLK", /* GPIO_138 */ 430 "NC", /* GPIO_139 */ 431 "NC", /* GPIO_140 */ 432 "RFFE5_DATA", /* GPIO_141 */ 433 "RFFE5_CLK", /* GPIO_142 */ 434 "NC", /* GPIO_143 */ 435 "COEX_UART_TX", /* GPIO_144 */ 436 "COEX_UART_RX", /* GPIO_145 */ 437 "RFFE2_DATA", /* GPIO_146 */ 438 "RFFE2_CLK", /* GPIO_147 */ 439 "RFFE1_DATA", /* GPIO_148 */ 440 "RFFE1_CLK"; /* GPIO_149 */ 441 442 touchkey_default: touchkey_default { 443 pins = "gpio77"; 444 function = "gpio"; 445 drive-strength = <16>; 446 bias-pull-up; 447 }; 448 449 touchkey_sleep: touchkey_sleep { 450 pins = "gpio77"; 451 function = "gpio"; 452 drive-strength = <2>; 453 bias-disable; 454 }; 455 456 touchscreen_default: touchscreen_default { 457 pins = "gpio75", "gpio125"; 458 function = "gpio"; 459 drive-strength = <10>; 460 bias-pull-up; 461 }; 462 463 touchscreen_sleep: touchscreen_sleep { 464 pins = "gpio75", "gpio125"; 465 function = "gpio"; 466 drive-strength = <2>; 467 bias-disable; 468 }; 469};