1 // SPDX-License-Identifier: BSD-3-Clause 1 // SPDX-License-Identifier: BSD-3-Clause 2 /* 2 /* 3 * Copyright (c) 2020, Konrad Dybcio <konrad.dy !! 3 * Copyright (c) 2020, Konrad Dybcio 4 */ 4 */ 5 5 6 #include "msm8994.dtsi" 6 #include "msm8994.dtsi" 7 #include "pm8994.dtsi" 7 #include "pm8994.dtsi" 8 #include "pmi8994.dtsi" 8 #include "pmi8994.dtsi" 9 #include <dt-bindings/gpio/gpio.h> 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/input/gpio-keys.h> 10 #include <dt-bindings/input/gpio-keys.h> 11 11 12 / { 12 / { 13 /* required for bootloader to select c 13 /* required for bootloader to select correct board */ 14 !! 14 qcom,msm-id = <0xcf 0x20001>; 15 /* << 16 * We support MSM8994 v2 (0x20000) and << 17 * The V1 chip (0x0 and 0x10000) is si << 18 * and requires driver-side changes (i << 19 * Besides that, it's very rare. << 20 */ << 21 qcom,msm-id = <207 0x20000>, <207 0x20 << 22 /* We only use pm8994+pmi8994. */ << 23 qcom,pmic-id = <0x10009 0x1000a 0x00 0 15 qcom,pmic-id = <0x10009 0x1000a 0x00 0x00>; 24 /* This property is shared across all << 25 qcom,board-id = <8 0>; 16 qcom,board-id = <8 0>; 26 17 27 /* Kitakami firmware doesn't support P 18 /* Kitakami firmware doesn't support PSCI */ 28 /delete-node/ psci; 19 /delete-node/ psci; 29 20 30 gpio-keys { !! 21 gpio_keys { 31 compatible = "gpio-keys"; 22 compatible = "gpio-keys"; >> 23 input-name = "gpio-keys"; >> 24 #address-cells = <1>; >> 25 #size-cells = <0>; 32 autorepeat; 26 autorepeat; 33 27 34 button-0 { !! 28 button@0 { 35 label = "Volume Down"; 29 label = "Volume Down"; 36 gpios = <&pm8994_gpios 30 gpios = <&pm8994_gpios 2 GPIO_ACTIVE_LOW>; 37 linux,input-type = <1> 31 linux,input-type = <1>; 38 linux,code = <KEY_VOLU 32 linux,code = <KEY_VOLUMEDOWN>; 39 wakeup-source; 33 wakeup-source; 40 debounce-interval = <1 34 debounce-interval = <15>; 41 }; 35 }; 42 36 43 button-1 { !! 37 button@1 { 44 label = "Volume Up"; 38 label = "Volume Up"; 45 gpios = <&pm8994_gpios 39 gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>; 46 linux,input-type = <1> 40 linux,input-type = <1>; 47 linux,code = <KEY_VOLU 41 linux,code = <KEY_VOLUMEUP>; 48 wakeup-source; 42 wakeup-source; 49 debounce-interval = <1 43 debounce-interval = <15>; 50 }; 44 }; 51 45 52 button-2 { !! 46 button@2 { 53 label = "Camera Snapsh 47 label = "Camera Snapshot"; 54 gpios = <&pm8994_gpios 48 gpios = <&pm8994_gpios 4 GPIO_ACTIVE_LOW>; 55 linux,input-type = <1> 49 linux,input-type = <1>; 56 linux,code = <KEY_CAME 50 linux,code = <KEY_CAMERA>; 57 wakeup-source; 51 wakeup-source; 58 debounce-interval = <1 52 debounce-interval = <15>; 59 }; 53 }; 60 54 61 button-3 { !! 55 button@3 { 62 label = "Camera Focus" 56 label = "Camera Focus"; 63 gpios = <&pm8994_gpios 57 gpios = <&pm8994_gpios 5 GPIO_ACTIVE_LOW>; 64 linux,input-type = <1> 58 linux,input-type = <1>; 65 linux,code = <KEY_VOLU 59 linux,code = <KEY_VOLUMEUP>; 66 wakeup-source; 60 wakeup-source; 67 debounce-interval = <1 61 debounce-interval = <15>; 68 }; 62 }; 69 }; 63 }; 70 64 71 reserved-memory { 65 reserved-memory { >> 66 #address-cells = <2>; >> 67 #size-cells = <2>; >> 68 ranges; >> 69 72 /* This is for getting crash l 70 /* This is for getting crash logs using Android downstream kernels */ 73 ramoops@1fe00000 { 71 ramoops@1fe00000 { 74 compatible = "ramoops" 72 compatible = "ramoops"; 75 reg = <0 0x1fe00000 0 !! 73 reg = <0x0 0x1fe00000 0x0 0x200000>; 76 console-size = <0x1000 74 console-size = <0x100000>; 77 record-size = <0x10000 75 record-size = <0x10000>; 78 ftrace-size = <0x10000 76 ftrace-size = <0x10000>; 79 pmsg-size = <0x80000>; 77 pmsg-size = <0x80000>; 80 }; 78 }; 81 79 82 fb_region: fb@40000000 { !! 80 continuous_splash: framebuffer@3401000{ 83 reg = <0 0x40000000 0 !! 81 reg = <0x0 0x3401000 0x0 0x2200000>; >> 82 no-map; >> 83 }; >> 84 >> 85 dfps_data_mem: dfps_data_mem@3400000 { >> 86 reg = <0x0 0x3400000 0x0 0x1000>; >> 87 no-map; >> 88 }; >> 89 >> 90 peripheral_region: peripheral_region@7400000 { >> 91 reg = <0x0 0x7400000 0x0 0x1c00000>; >> 92 no-map; >> 93 }; >> 94 >> 95 modem_region: modem_region@9000000 { >> 96 reg = <0x0 0x9000000 0x0 0x5a00000>; >> 97 no-map; >> 98 }; >> 99 >> 100 tzapp: modem_region@ea00000 { >> 101 reg = <0x0 0xea00000 0x0 0x1900000>; 84 no-map; 102 no-map; 85 }; 103 }; 86 104 87 tzapp: memory@c7800000 { !! 105 fb_region: fb_region@40000000 { 88 reg = <0 0xc7800000 0 !! 106 reg = <0x00 0x40000000 0x00 0x1000000>; 89 no-map; 107 no-map; 90 }; 108 }; 91 }; 109 }; 92 }; 110 }; 93 111 94 &blsp1_spi1 { !! 112 &blsp_spi0 { 95 status = "okay"; 113 status = "okay"; 96 114 97 /* FPC fingerprint reader */ 115 /* FPC fingerprint reader */ 98 }; 116 }; 99 117 100 /* I2C1 is disabled on this board */ 118 /* I2C1 is disabled on this board */ 101 119 102 &blsp1_i2c2 { !! 120 &blsp_i2c2 { 103 status = "okay"; 121 status = "okay"; 104 clock-frequency = <355000>; << 105 122 106 /* NXP PN547 NFC */ !! 123 /* NXP NFC */ 107 }; 124 }; 108 125 109 &blsp1_i2c6 { !! 126 &blsp_i2c4 { 110 status = "okay"; 127 status = "okay"; 111 clock-frequency = <355000>; << 112 128 113 touchscreen: rmi4-i2c-dev@2c { !! 129 /* Empty but active */ 114 compatible = "syna,rmi4-i2c"; << 115 reg = <0x2c>; << 116 #address-cells = <1>; << 117 #size-cells = <0>; << 118 << 119 interrupt-parent = <&tlmm>; << 120 interrupts = <42 IRQ_TYPE_EDGE << 121 << 122 pinctrl-names = "default"; << 123 pinctrl-0 = <&ts_int_active &t << 124 << 125 vdd-supply = <&pm8994_l22>; << 126 vio-supply = <&pm8994_s4>; << 127 << 128 syna,reset-delay-ms = <220>; << 129 syna,startup-delay-ms = <220>; << 130 << 131 rmi4-f01@1 { << 132 reg = <0x01>; << 133 syna,nosleep-mode = <1 << 134 }; << 135 << 136 rmi4-f11@11 { << 137 reg = <0x11>; << 138 syna,sensor-type = <1> << 139 }; << 140 }; << 141 }; 130 }; 142 131 143 &blsp1_uart2 { !! 132 &blsp_i2c5 { 144 status = "okay"; 133 status = "okay"; >> 134 >> 135 /* SMB1357 charger and sii8620 HDMI/MHL bridge */ 145 }; 136 }; 146 137 147 &blsp2_i2c5 { !! 138 &blsp_i2c6 { 148 status = "okay"; 139 status = "okay"; 149 clock-frequency = <355000>; << 150 140 151 /* sii8620 HDMI/MHL bridge */ !! 141 /* Synaptics touchscreen */ 152 }; 142 }; 153 143 154 &blsp2_uart2 { !! 144 &blsp1_uart2 { 155 status = "okay"; 145 status = "okay"; 156 }; 146 }; 157 147 158 /* !! 148 &blsp2_uart2 { 159 * Kitakami bootloader only turns cont_splash !! 149 status = "okay"; 160 * specific downstream MDSS/backlight nodes in << 161 * One way to use that framebuffer is to load << 162 * LK with the downstream DTB appended and the << 163 * mainline Linux. << 164 */ << 165 &cont_splash_mem { << 166 reg = <0 0x03401000 0 0x2200000>; << 167 }; << 168 << 169 &pmi8994_spmi_regulators { << 170 /* << 171 * Yeah, this one *is* managed by RPMP << 172 * to be hacked up as a-o due to the G << 173 * power domain.. which still isn't en << 174 * OXILI_CX and OXILI_GX together! << 175 */ << 176 vdd_gfx: s2 { << 177 regulator-name = "VDD_GFX"; << 178 regulator-min-microvolt = <980 << 179 regulator-max-microvolt = <980 << 180 << 181 /* hack until we rig up the gp << 182 regulator-always-on; << 183 }; << 184 }; 150 }; 185 151 186 &rpm_requests { 152 &rpm_requests { 187 /* PMI8994 should probe first, because !! 153 pm8994_regulators: pm8994-regulators { 188 pmi8994_regulators: regulators-0 { << 189 compatible = "qcom,rpm-pmi8994 << 190 << 191 vdd_s1-supply = <&vph_pwr>; << 192 vdd_bst_byp-supply = <&vph_pwr << 193 << 194 pmi8994_s1: s1 { << 195 regulator-min-microvol << 196 regulator-max-microvol << 197 }; << 198 << 199 /* S2 & S3 - VDD_GFX */ << 200 << 201 pmi8994_bby: boost-bypass { << 202 regulator-min-microvol << 203 regulator-max-microvol << 204 }; << 205 }; << 206 << 207 pm8994_regulators: regulators-1 { << 208 compatible = "qcom,rpm-pm8994- 154 compatible = "qcom,rpm-pm8994-regulators"; >> 155 vdd_l1-supply = <&pm8994_s1>; >> 156 vdd_l2_26_28-supply = <&pm8994_s3>; >> 157 vdd_l3_11-supply = <&pm8994_s3>; >> 158 vdd_l4_27_31-supply = <&pm8994_s3>; >> 159 vdd_l5_7-supply = <&pm8994_s3>; >> 160 vdd_l6_12_32-supply = <&pm8994_s5>; >> 161 vdd_l8_16_30-supply = <&vreg_vph_pwr>; >> 162 vdd_l9_10_18_22-supply = <&vreg_vph_pwr>; >> 163 vdd_l13_19_23_24-supply = <&vreg_vph_pwr>; >> 164 vdd_l14_15-supply = <&pm8994_s5>; >> 165 vdd_l17_29-supply = <&vreg_vph_pwr>; >> 166 vdd_l20_21-supply = <&vreg_vph_pwr>; >> 167 vdd_l25-supply = <&pm8994_s5>; >> 168 vdd_lvs1_2 = <&pm8994_s4>; >> 169 >> 170 pm8994_s1: s1 {}; >> 171 pm8994_s2: s2 {}; >> 172 pm8994_s3: s3 {}; >> 173 pm8994_s4: s4 {}; >> 174 pm8994_s5: s5 {}; >> 175 pm8994_s6: s6 {}; >> 176 pm8994_s7: s7 {}; >> 177 >> 178 pm8994_l1: l1 {}; >> 179 pm8994_l2: l2 {}; >> 180 pm8994_l3: l3 {}; >> 181 pm8994_l4: l4 {}; >> 182 pm8994_l6: l6 {}; >> 183 pm8994_l8: l8 {}; >> 184 pm8994_l9: l9 {}; >> 185 pm8994_l10: l10 {}; >> 186 pm8994_l11: l11 {}; >> 187 pm8994_l12: l12 {}; >> 188 pm8994_l13: l13 {}; >> 189 pm8994_l14: l14 {}; >> 190 pm8994_l15: l15 {}; >> 191 pm8994_l16: l16 {}; >> 192 pm8994_l17: l17 {}; >> 193 pm8994_l18: l18 {}; >> 194 pm8994_l19: l19 {}; >> 195 pm8994_l20: l20 {}; >> 196 pm8994_l21: l21 {}; >> 197 pm8994_l22: l22 {}; >> 198 pm8994_l23: l23 {}; >> 199 pm8994_l24: l24 {}; >> 200 pm8994_l25: l25 {}; >> 201 pm8994_l26: l26 {}; >> 202 pm8994_l27: l27 {}; >> 203 pm8994_l28: l28 {}; >> 204 pm8994_l29: l29 {}; >> 205 pm8994_l30: l30 {}; >> 206 pm8994_l31: l31 {}; >> 207 pm8994_l32: l32 {}; 209 208 210 vdd_s3-supply = <&vph_pwr>; !! 209 pm8994_lvs1: lvs1 {}; 211 vdd_s4-supply = <&vph_pwr>; !! 210 pm8994_lvs2: lvs2 {}; 212 vdd_s5-supply = <&vph_pwr>; !! 211 }; 213 vdd_s6-supply = <&vph_pwr>; << 214 vdd_s7-supply = <&vph_pwr>; << 215 vdd_l1-supply = <&pmi8994_s1>; << 216 vdd_l2_l26_l28-supply = <&pm89 << 217 vdd_l3_l11-supply = <&pm8994_s << 218 vdd_l4_l27_l31-supply = <&pm89 << 219 vdd_l6_l12_l32-supply = <&pm89 << 220 vdd_l8_l16_l30-supply = <&vph_ << 221 vdd_l9_l10_l18_l22-supply = <& << 222 vdd_l13_l19_l23_l24-supply = < << 223 vdd_l14_l15-supply = <&pm8994_ << 224 vdd_l17_l29-supply = <&pmi8994 << 225 vdd_l20_l21-supply = <&pmi8994 << 226 vdd_l25-supply = <&pm8994_s3>; << 227 vdd_lvs1_2-supply = <&pm8994_s << 228 << 229 /* S1, S2, S6 and S12 are mana << 230 << 231 pm8994_s3: s3 { << 232 regulator-min-microvol << 233 regulator-max-microvol << 234 }; << 235 << 236 pm8994_s4: s4 { << 237 regulator-min-microvol << 238 regulator-max-microvol << 239 regulator-system-load << 240 regulator-allow-set-lo << 241 regulator-always-on; << 242 }; << 243 << 244 pm8994_s5: s5 { << 245 regulator-min-microvol << 246 regulator-max-microvol << 247 }; << 248 << 249 pm8994_s7: s7 { << 250 regulator-min-microvol << 251 regulator-max-microvol << 252 }; << 253 << 254 /* << 255 * S8 - SPMI-managed VDD_APC0 << 256 * S9, S10 and S11 (the main o << 257 */ << 258 << 259 pm8994_l1: l1 { << 260 regulator-min-microvol << 261 regulator-max-microvol << 262 }; << 263 << 264 pm8994_l2: l2 { << 265 regulator-min-microvol << 266 regulator-max-microvol << 267 regulator-system-load << 268 regulator-allow-set-lo << 269 }; << 270 << 271 pm8994_l3: l3 { << 272 regulator-min-microvol << 273 regulator-max-microvol << 274 regulator-boot-on; << 275 }; << 276 << 277 pm8994_l4: l4 { << 278 regulator-min-microvol << 279 regulator-max-microvol << 280 }; << 281 << 282 /* L5 is inaccessible from RPM << 283 << 284 pm8994_l6: l6 { << 285 regulator-min-microvol << 286 regulator-max-microvol << 287 }; << 288 << 289 /* L7 is inaccessible from RPM << 290 << 291 pm8994_l8: l8 { << 292 regulator-min-microvol << 293 regulator-max-microvol << 294 }; << 295 << 296 pm8994_l9: l9 { << 297 regulator-min-microvol << 298 regulator-max-microvol << 299 }; << 300 << 301 pm8994_l10: l10 { << 302 regulator-min-microvol << 303 regulator-max-microvol << 304 }; << 305 << 306 pm8994_l11: l11 { << 307 regulator-min-microvol << 308 regulator-max-microvol << 309 }; << 310 << 311 pm8994_l12: l12 { << 312 regulator-min-microvol << 313 regulator-max-microvol << 314 regulator-system-load << 315 regulator-allow-set-lo << 316 }; << 317 << 318 pm8994_l13: l13 { << 319 regulator-min-microvol << 320 regulator-max-microvol << 321 }; << 322 << 323 pm8994_l14: l14 { << 324 regulator-min-microvol << 325 regulator-max-microvol << 326 regulator-system-load << 327 regulator-allow-set-lo << 328 regulator-boot-on; << 329 }; << 330 << 331 pm8994_l15: l15 { << 332 regulator-min-microvol << 333 regulator-max-microvol << 334 }; << 335 << 336 pm8994_l16: l16 { << 337 regulator-min-microvol << 338 regulator-max-microvol << 339 }; << 340 << 341 pm8994_l17: l17 { << 342 regulator-min-microvol << 343 regulator-max-microvol << 344 regulator-boot-on; << 345 }; << 346 << 347 pm8994_l18: l18 { << 348 regulator-min-microvol << 349 regulator-max-microvol << 350 regulator-always-on; << 351 regulator-boot-on; << 352 }; << 353 << 354 pm8994_l19: l19 { << 355 regulator-min-microvol << 356 regulator-max-microvol << 357 regulator-boot-on; << 358 }; << 359 << 360 pm8994_l20: l20 { << 361 regulator-min-microvol << 362 regulator-max-microvol << 363 regulator-system-load << 364 regulator-allow-set-lo << 365 }; << 366 << 367 pm8994_l21: l21 { << 368 regulator-min-microvol << 369 regulator-max-microvol << 370 regulator-system-load << 371 regulator-allow-set-lo << 372 }; << 373 << 374 pm8994_l22: l22 { << 375 regulator-min-microvol << 376 regulator-max-microvol << 377 regulator-boot-on; << 378 }; << 379 << 380 pm8994_l23: l23 { << 381 regulator-min-microvol << 382 regulator-max-microvol << 383 regulator-always-on; << 384 regulator-boot-on; << 385 }; << 386 << 387 pm8994_l24: l24 { << 388 regulator-min-microvol << 389 regulator-max-microvol << 390 }; << 391 << 392 pm8994_l25: l25 { << 393 regulator-min-microvol << 394 regulator-max-microvol << 395 regulator-boot-on; << 396 }; << 397 << 398 pm8994_l26: l26 { << 399 regulator-min-microvol << 400 regulator-max-microvol << 401 }; << 402 << 403 pm8994_l27: l27 { << 404 regulator-min-microvol << 405 regulator-max-microvol << 406 regulator-boot-on; << 407 }; << 408 << 409 pm8994_l28: l28 { << 410 regulator-min-microvol << 411 regulator-max-microvol << 412 regulator-system-load << 413 regulator-allow-set-lo << 414 }; << 415 << 416 pm8994_l29: l29 { << 417 regulator-min-microvol << 418 regulator-max-microvol << 419 regulator-boot-on; << 420 }; << 421 << 422 pm8994_l30: l30 { << 423 regulator-min-microvol << 424 regulator-max-microvol << 425 regulator-boot-on; << 426 }; << 427 << 428 pm8994_l31: l31 { << 429 regulator-min-microvol << 430 regulator-max-microvol << 431 regulator-system-load << 432 regulator-allow-set-lo << 433 }; << 434 212 435 pm8994_l32: l32 { !! 213 pmi8994_regulators: pmi8994-regulators { 436 regulator-min-microvol !! 214 compatible = "qcom,rpm-pmi8994-regulators"; 437 regulator-max-microvol << 438 }; << 439 215 440 pm8994_lvs1: lvs1 { !! 216 pmi8994_s1: s1 {}; 441 regulator-boot-on; !! 217 pmi8994_s2: s2 {}; 442 }; !! 218 pmi8994_s3: s3 {}; 443 pm8994_lvs2: lvs2 { !! 219 pmi8994_bby: boost-bypass {}; 444 regulator-boot-on; << 445 }; << 446 }; 220 }; 447 }; 221 }; 448 222 449 &sdhc1 { 223 &sdhc1 { 450 /* !! 224 /* There is an issue with the eMMC causing permanent 451 * There is an issue with the eMMC cau << 452 * damage to the card if a quirk isn't 225 * damage to the card if a quirk isn't addressed. 453 * Until it's fixed, disable the MMC s 226 * Until it's fixed, disable the MMC so as not to brick 454 * devices. 227 * devices. 455 */ 228 */ 456 status = "disabled"; 229 status = "disabled"; 457 230 458 /* !! 231 /* Downstream pushes 2.95V to the sdhci device, 459 * Downstream pushes 2.95V to the sdhc << 460 * but upstream driver REALLY wants to 232 * but upstream driver REALLY wants to make vmmc 1.8v 461 * cause of the hs400-1_8v mode. MMC w 233 * cause of the hs400-1_8v mode. MMC works fine without 462 * that regulator, so let's not use it 234 * that regulator, so let's not use it for now. 463 * vqmmc is also disabled cause driver 235 * vqmmc is also disabled cause driver stll complains. 464 * 236 * 465 * vmmc-supply = <&pm8994_l20>; 237 * vmmc-supply = <&pm8994_l20>; 466 * vqmmc-supply = <&pm8994_s4>; 238 * vqmmc-supply = <&pm8994_s4>; 467 */ 239 */ 468 }; << 469 << 470 &sdhc2 { << 471 status = "okay"; << 472 << 473 cd-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH << 474 vmmc-supply = <&pm8994_l21>; << 475 vqmmc-supply = <&pm8994_l13>; << 476 }; << 477 << 478 &tlmm { << 479 ts_int_active: ts-int-active-state { << 480 pins = "gpio42"; << 481 function = "gpio"; << 482 drive-strength = <2>; << 483 bias-disable; << 484 }; << 485 << 486 ts_reset_active: ts-reset-active-state << 487 pins = "gpio109"; << 488 function = "gpio"; << 489 drive-strength = <2>; << 490 bias-disable; << 491 output-low; << 492 }; << 493 }; 240 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.