1 // SPDX-License-Identifier: GPL-2.0-only 1 // SPDX-License-Identifier: GPL-2.0-only 2 2 3 #include "msm8916-pm8916.dtsi" !! 3 #include "msm8916.dtsi" 4 #include "msm8916-modem-qdsp6.dtsi" !! 4 #include "pm8916.dtsi" 5 << 6 #include <dt-bindings/gpio/gpio.h> 5 #include <dt-bindings/gpio/gpio.h> 7 #include <dt-bindings/input/input.h> << 8 #include <dt-bindings/interrupt-controller/irq 6 #include <dt-bindings/interrupt-controller/irq.h> 9 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h << 10 #include <dt-bindings/sound/apq8016-lpass.h> << 11 7 12 / { 8 / { 13 aliases { 9 aliases { 14 mmc0 = &sdhc_1; /* eMMC */ !! 10 serial0 = &blsp1_uart2; 15 mmc1 = &sdhc_2; /* SD card */ << 16 serial0 = &blsp_uart2; << 17 }; 11 }; 18 12 19 chosen { 13 chosen { 20 stdout-path = "serial0"; 14 stdout-path = "serial0"; 21 }; 15 }; 22 16 23 reserved-memory { !! 17 soc { 24 /* Additional memory used by S !! 18 sdhci@7824000 { 25 tz-apps@85500000 { !! 19 status = "okay"; 26 reg = <0x0 0x85500000 << 27 no-map; << 28 }; << 29 }; << 30 << 31 battery: battery { << 32 compatible = "simple-battery"; << 33 precharge-current-microamp = < << 34 precharge-upper-limit-microvol << 35 }; << 36 << 37 clk_pwm: pwm { << 38 compatible = "clk-pwm"; << 39 #pwm-cells = <2>; << 40 20 41 clocks = <&gcc GCC_GP2_CLK>; !! 21 vmmc-supply = <&pm8916_l8>; >> 22 vqmmc-supply = <&pm8916_l5>; 42 23 43 pinctrl-names = "default"; !! 24 pinctrl-names = "default", "sleep"; 44 pinctrl-0 = <&motor_pwm_defaul !! 25 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; 45 status = "disabled"; !! 26 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; 46 }; !! 27 }; 47 28 48 gpio-keys { !! 29 sdhci@7864000 { 49 compatible = "gpio-keys"; !! 30 status = "okay"; 50 31 51 pinctrl-names = "default"; !! 32 vmmc-supply = <&pm8916_l11>; 52 pinctrl-0 = <&gpio_keys_defaul !! 33 vqmmc-supply = <&pm8916_l12>; 53 34 54 label = "GPIO Buttons"; !! 35 pinctrl-names = "default", "sleep"; >> 36 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; >> 37 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; 55 38 56 button-volume-up { !! 39 cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>; 57 label = "Volume Up"; << 58 gpios = <&tlmm 107 GPI << 59 linux,code = <KEY_VOLU << 60 }; 40 }; 61 41 62 button-home { !! 42 serial@78b0000 { 63 label = "Home"; !! 43 status = "okay"; 64 gpios = <&tlmm 109 GPI !! 44 pinctrl-names = "default", "sleep"; 65 linux,code = <KEY_HOME !! 45 pinctrl-0 = <&blsp1_uart2_default>; >> 46 pinctrl-1 = <&blsp1_uart2_sleep>; 66 }; 47 }; 67 }; << 68 << 69 gpio-hall-sensor { << 70 compatible = "gpio-keys"; << 71 48 72 pinctrl-names = "default"; !! 49 usb@78d9000 { 73 pinctrl-0 = <&gpio_hall_sensor !! 50 status = "okay"; >> 51 extcon = <&muic>, <&muic>; 74 52 75 label = "GPIO Hall Effect Sens !! 53 hnp-disable; >> 54 srp-disable; >> 55 adp-disable; 76 56 77 event-hall-sensor { !! 57 ulpi { 78 label = "Hall Effect S !! 58 phy { 79 gpios = <&tlmm 52 GPIO !! 59 extcon = <&muic>; 80 linux,input-type = <EV !! 60 v1p8-supply = <&pm8916_l7>; 81 linux,code = <SW_LID>; !! 61 v3p3-supply = <&pm8916_l13>; 82 linux,can-disable; !! 62 }; >> 63 }; 83 }; 64 }; 84 }; << 85 << 86 /* << 87 * NOTE: A5 connects GPIO 76 to a regl << 88 * driver IC but A3 connects the same << 89 * the driver. << 90 */ << 91 reg_motor_vdd: regulator-motor-vdd { << 92 compatible = "regulator-fixed" << 93 regulator-name = "motor_vdd"; << 94 regulator-min-microvolt = <300 << 95 regulator-max-microvolt = <300 << 96 << 97 gpio = <&tlmm 76 GPIO_ACTIVE_H << 98 enable-active-high; << 99 << 100 pinctrl-names = "default"; << 101 pinctrl-0 = <&motor_en_default << 102 }; << 103 << 104 reg_vdd_tsp_a: regulator-vdd-tsp-a { << 105 compatible = "regulator-fixed" << 106 regulator-name = "vdd_tsp_a"; << 107 regulator-min-microvolt = <330 << 108 regulator-max-microvolt = <330 << 109 65 110 gpio = <&tlmm 73 GPIO_ACTIVE_H !! 66 /* 111 enable-active-high; !! 67 * Attempting to enable these devices causes a "synchronous 112 !! 68 * external abort". Suspected cause is that the debug power 113 pinctrl-names = "default"; !! 69 * domain is not enabled by default on this device. 114 pinctrl-0 = <&tsp_en_default>; !! 70 * Disable these devices for now to avoid the crash. >> 71 * >> 72 * See: https://lore.kernel.org/linux-arm-msm/20190618202623.GA53651@gerhold.net/ >> 73 */ >> 74 tpiu@820000 { status = "disabled"; }; >> 75 funnel@821000 { status = "disabled"; }; >> 76 replicator@824000 { status = "disabled"; }; >> 77 etf@825000 { status = "disabled"; }; >> 78 etr@826000 { status = "disabled"; }; >> 79 funnel@841000 { status = "disabled"; }; >> 80 debug@850000 { status = "disabled"; }; >> 81 debug@852000 { status = "disabled"; }; >> 82 debug@854000 { status = "disabled"; }; >> 83 debug@856000 { status = "disabled"; }; >> 84 etm@85c000 { status = "disabled"; }; >> 85 etm@85d000 { status = "disabled"; }; >> 86 etm@85e000 { status = "disabled"; }; >> 87 etm@85f000 { status = "disabled"; }; 115 }; 88 }; 116 89 117 i2c-muic { 90 i2c-muic { 118 compatible = "i2c-gpio"; 91 compatible = "i2c-gpio"; 119 sda-gpios = <&tlmm 105 (GPIO_A !! 92 sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 120 scl-gpios = <&tlmm 106 (GPIO_A !! 93 scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 121 << 122 pinctrl-names = "default"; << 123 pinctrl-0 = <&muic_i2c_default << 124 94 125 #address-cells = <1>; 95 #address-cells = <1>; 126 #size-cells = <0>; 96 #size-cells = <0>; 127 97 128 muic: extcon@25 { !! 98 muic: sm5502@25 { 129 compatible = "siliconm 99 compatible = "siliconmitus,sm5502-muic"; 130 100 131 reg = <0x25>; 101 reg = <0x25>; 132 interrupt-parent = <&t !! 102 interrupt-parent = <&msmgpio>; 133 interrupts = <12 IRQ_T 103 interrupts = <12 IRQ_TYPE_EDGE_FALLING>; 134 104 135 pinctrl-names = "defau 105 pinctrl-names = "default"; 136 pinctrl-0 = <&muic_int 106 pinctrl-0 = <&muic_int_default>; 137 << 138 usb_con: connector { << 139 compatible = " << 140 label = "micro << 141 type = "micro" << 142 }; << 143 }; 107 }; 144 }; 108 }; 145 << 146 i2c-tkey { << 147 compatible = "i2c-gpio"; << 148 sda-gpios = <&tlmm 16 (GPIO_AC << 149 scl-gpios = <&tlmm 17 (GPIO_AC << 150 << 151 pinctrl-names = "default"; << 152 pinctrl-0 = <&tkey_i2c_default << 153 << 154 #address-cells = <1>; << 155 #size-cells = <0>; << 156 << 157 touchkey: touchkey@20 { << 158 /* Note: Actually an A << 159 compatible = "corerive << 160 reg = <0x20>; << 161 << 162 interrupt-parent = <&t << 163 interrupts = <98 IRQ_T << 164 << 165 /* vcc/vdd-supply are << 166 vddio-supply = <&pm891 << 167 << 168 linux,keycodes = <KEY_ << 169 << 170 pinctrl-names = "defau << 171 pinctrl-0 = <&tkey_def << 172 }; << 173 }; << 174 << 175 i2c-nfc { << 176 compatible = "i2c-gpio"; << 177 sda-gpios = <&tlmm 0 (GPIO_ACT << 178 scl-gpios = <&tlmm 1 (GPIO_ACT << 179 << 180 pinctrl-names = "default"; << 181 pinctrl-0 = <&nfc_i2c_default> << 182 << 183 #address-cells = <1>; << 184 #size-cells = <0>; << 185 << 186 nfc@27 { << 187 compatible = "samsung, << 188 reg = <0x27>; << 189 << 190 interrupt-parent = <&t << 191 interrupts = <21 IRQ_T << 192 << 193 en-gpios = <&tlmm 20 G << 194 wake-gpios = <&tlmm 49 << 195 << 196 clocks = <&rpmcc RPM_S << 197 << 198 pinctrl-names = "defau << 199 pinctrl-0 = <&nfc_defa << 200 }; << 201 }; << 202 << 203 vibrator: vibrator { << 204 compatible = "pwm-vibrator"; << 205 << 206 pwms = <&clk_pwm 0 100000>; << 207 pwm-names = "enable"; << 208 << 209 vcc-supply = <®_motor_vdd>; << 210 status = "disabled"; << 211 }; << 212 }; 109 }; 213 110 214 &blsp_i2c1 { !! 111 &msmgpio { 215 status = "okay"; !! 112 muic_int_default: muic_int_default { 216 !! 113 pinmux { 217 speaker_codec: audio-codec@34 { !! 114 function = "gpio"; 218 compatible = "nxp,tfa9895"; !! 115 pins = "gpio12"; 219 reg = <0x34>; << 220 vddd-supply = <&pm8916_l5>; << 221 sound-name-prefix = "Speaker"; << 222 #sound-dai-cells = <0>; << 223 }; << 224 }; << 225 << 226 &blsp_i2c2 { << 227 status = "okay"; << 228 << 229 accelerometer: accelerometer@10 { << 230 compatible = "bosch,bmc150_acc << 231 reg = <0x10>; << 232 interrupt-parent = <&tlmm>; << 233 interrupts = <115 IRQ_TYPE_EDG << 234 << 235 vdd-supply = <&pm8916_l17>; << 236 vddio-supply = <&pm8916_l5>; << 237 << 238 pinctrl-names = "default"; << 239 pinctrl-0 = <&accel_int_defaul << 240 }; << 241 << 242 magnetometer@12 { << 243 compatible = "bosch,bmc150_mag << 244 reg = <0x12>; << 245 << 246 vdd-supply = <&pm8916_l17>; << 247 vddio-supply = <&pm8916_l5>; << 248 }; << 249 }; << 250 << 251 &blsp_i2c4 { << 252 status = "okay"; << 253 << 254 fuel-gauge@35 { << 255 compatible = "richtek,rt5033-b << 256 reg = <0x35>; << 257 interrupt-parent = <&tlmm>; << 258 interrupts = <121 IRQ_TYPE_EDG << 259 << 260 pinctrl-names = "default"; << 261 pinctrl-0 = <&fg_alert_default << 262 << 263 power-supplies = <&charger>; << 264 }; << 265 }; << 266 << 267 &blsp_i2c6 { << 268 status = "okay"; << 269 << 270 pmic@34 { << 271 compatible = "richtek,rt5033"; << 272 reg = <0x34>; << 273 << 274 interrupts-extended = <&tlmm 6 << 275 << 276 pinctrl-0 = <&pmic_int_default << 277 pinctrl-names = "default"; << 278 << 279 regulators { << 280 rt5033_reg_safe_ldo: S << 281 regulator-min- << 282 regulator-max- << 283 regulator-alwa << 284 }; << 285 << 286 /* << 287 * Needed for camera, << 288 * Define empty nodes << 289 * regulators. << 290 */ << 291 LDO {}; << 292 BUCK {}; << 293 }; 116 }; 294 !! 117 pinconf { 295 charger: charger { !! 118 pins = "gpio12"; 296 compatible = "richtek, !! 119 drive-strength = <2>; 297 monitored-battery = <& !! 120 bias-disable; 298 richtek,usb-connector << 299 }; 121 }; 300 }; 122 }; 301 }; 123 }; 302 124 303 &blsp_uart2 { !! 125 &smd_rpm_regulators { 304 status = "okay"; !! 126 vdd_l1_l2_l3-supply = <&pm8916_s3>; 305 }; !! 127 vdd_l4_l5_l6-supply = <&pm8916_s4>; 306 !! 128 vdd_l7-supply = <&pm8916_s4>; 307 &gpu { << 308 status = "okay"; << 309 }; << 310 129 311 /* !! 130 s1 { 312 * For some reason the speaker amplifier is co !! 131 regulator-min-microvolt = <500000>; 313 * (MI2S_2_D1) instead of the first (MI2S_2_D0 !! 132 regulator-max-microvolt = <1300000>; 314 * device tree, otherwise audio will seemingly << 315 * but the speaker stays silent. << 316 * << 317 * When routing audio via QDSP6 (the default) << 318 * the definitions from &q6afedai are used. Wh << 319 * be alternatively routed directly to the LPA << 320 * The definitions for &lpass are here for com << 321 * setup with minor changes to the DT (either << 322 */ << 323 &lpass { << 324 dai-link@3 { << 325 reg = <MI2S_QUATERNARY>; << 326 qcom,playback-sd-lines = <1>; << 327 }; 133 }; 328 }; << 329 << 330 &mdss { << 331 status = "okay"; << 332 }; << 333 << 334 &mdss_dsi0 { << 335 pinctrl-names = "default", "sleep"; << 336 pinctrl-0 = <&mdss_default>; << 337 pinctrl-1 = <&mdss_sleep>; << 338 }; << 339 << 340 &mpss_mem { << 341 reg = <0x0 0x86800000 0x0 0x5400000>; << 342 }; << 343 << 344 &pm8916_resin { << 345 status = "okay"; << 346 linux,code = <KEY_VOLUMEDOWN>; << 347 }; << 348 << 349 &pm8916_rpm_regulators { << 350 pm8916_l17: l17 { << 351 regulator-min-microvolt = <285 << 352 regulator-max-microvolt = <285 << 353 }; << 354 }; << 355 134 356 &q6afedai { !! 135 s3 { 357 dai@22 { !! 136 regulator-min-microvolt = <1200000>; 358 reg = <QUATERNARY_MI2S_RX>; !! 137 regulator-max-microvolt = <1300000>; 359 qcom,sd-lines = <1>; << 360 }; 138 }; 361 }; << 362 << 363 &sdhc_1 { << 364 status = "okay"; << 365 }; << 366 << 367 &sdhc_2 { << 368 status = "okay"; << 369 << 370 pinctrl-names = "default", "sleep"; << 371 pinctrl-0 = <&sdc2_default &sdc2_cd_de << 372 pinctrl-1 = <&sdc2_sleep &sdc2_cd_defa << 373 << 374 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; << 375 }; << 376 << 377 &sound { << 378 model = "samsung-a2015"; << 379 audio-routing = << 380 "AMIC1", "MIC BIAS External1", << 381 "AMIC2", "MIC BIAS Internal2", << 382 "AMIC3", "MIC BIAS External1"; << 383 << 384 pinctrl-0 = <&cdc_pdm_default &sec_mi2 << 385 pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_ << 386 pinctrl-names = "default", "sleep"; << 387 << 388 sound_link_backend2: backend2-dai-link << 389 link-name = "Quaternary MI2S"; << 390 << 391 cpu { << 392 sound-dai = <&q6afedai << 393 }; << 394 platform { << 395 sound-dai = <&q6routin << 396 }; << 397 codec { << 398 sound-dai = <&speaker_ << 399 }; << 400 }; << 401 }; << 402 << 403 &usb { << 404 status = "okay"; << 405 extcon = <&muic>, <&muic>; << 406 }; << 407 << 408 &usb_hs_phy { << 409 extcon = <&muic>; << 410 }; << 411 << 412 &venus { << 413 status = "okay"; << 414 }; << 415 << 416 &venus_mem { << 417 status = "okay"; << 418 }; << 419 139 420 &tlmm { !! 140 s4 { 421 accel_int_default: accel-int-default-s !! 141 regulator-min-microvolt = <1800000>; 422 pins = "gpio115"; !! 142 regulator-max-microvolt = <2100000>; 423 function = "gpio"; << 424 << 425 drive-strength = <2>; << 426 bias-disable; << 427 }; 143 }; 428 144 429 fg_alert_default: fg-alert-default-sta !! 145 l1 { 430 pins = "gpio121"; !! 146 regulator-min-microvolt = <1225000>; 431 function = "gpio"; !! 147 regulator-max-microvolt = <1225000>; 432 << 433 drive-strength = <2>; << 434 bias-disable; << 435 }; 148 }; 436 149 437 gpio_keys_default: gpio-keys-default-s !! 150 l2 { 438 pins = "gpio107", "gpio109"; !! 151 regulator-min-microvolt = <1200000>; 439 function = "gpio"; !! 152 regulator-max-microvolt = <1200000>; 440 << 441 drive-strength = <2>; << 442 bias-pull-up; << 443 }; 153 }; 444 154 445 gpio_hall_sensor_default: gpio-hall-se !! 155 l3 { 446 pins = "gpio52"; !! 156 regulator-min-microvolt = <500000>; 447 function = "gpio"; !! 157 regulator-max-microvolt = <1287500>; 448 << 449 drive-strength = <2>; << 450 bias-disable; << 451 }; 158 }; 452 159 453 mdss_default: mdss-default-state { !! 160 l4 { 454 pins = "gpio25"; !! 161 regulator-min-microvolt = <2050000>; 455 function = "gpio"; !! 162 regulator-max-microvolt = <2050000>; 456 << 457 drive-strength = <8>; << 458 bias-disable; << 459 }; 163 }; 460 mdss_sleep: mdss-sleep-state { << 461 pins = "gpio25"; << 462 function = "gpio"; << 463 164 464 drive-strength = <2>; !! 165 l5 { 465 bias-pull-down; !! 166 regulator-min-microvolt = <1800000>; >> 167 regulator-max-microvolt = <1800000>; 466 }; 168 }; 467 169 468 motor_en_default: motor-en-default-sta !! 170 l6 { 469 pins = "gpio76"; !! 171 regulator-min-microvolt = <1800000>; 470 function = "gpio"; !! 172 regulator-max-microvolt = <1800000>; 471 << 472 drive-strength = <2>; << 473 bias-disable; << 474 }; 173 }; 475 174 476 motor_pwm_default: motor-pwm-default-s !! 175 l7 { 477 pins = "gpio50"; !! 176 regulator-min-microvolt = <1800000>; 478 function = "gcc_gp2_clk_a"; !! 177 regulator-max-microvolt = <1800000>; 479 }; 178 }; 480 179 481 muic_i2c_default: muic-i2c-default-sta !! 180 l8 { 482 pins = "gpio105", "gpio106"; !! 181 regulator-min-microvolt = <2850000>; 483 function = "gpio"; !! 182 regulator-max-microvolt = <2900000>; 484 << 485 drive-strength = <2>; << 486 bias-disable; << 487 }; 183 }; 488 184 489 muic_int_default: muic-int-default-sta !! 185 l9 { 490 pins = "gpio12"; !! 186 regulator-min-microvolt = <3300000>; 491 function = "gpio"; !! 187 regulator-max-microvolt = <3300000>; 492 << 493 drive-strength = <2>; << 494 bias-disable; << 495 }; 188 }; 496 189 497 nfc_default: nfc-default-state { !! 190 l10 { 498 nfc-pins { !! 191 regulator-min-microvolt = <2700000>; 499 pins = "gpio20", "gpio !! 192 regulator-max-microvolt = <2800000>; 500 function = "gpio"; << 501 << 502 drive-strength = <2>; << 503 bias-disable; << 504 }; << 505 << 506 irq-pins { << 507 pins = "gpio21"; << 508 function = "gpio"; << 509 << 510 drive-strength = <2>; << 511 bias-pull-down; << 512 }; << 513 }; 193 }; 514 194 515 nfc_i2c_default: nfc-i2c-default-state !! 195 l11 { 516 pins = "gpio0", "gpio1"; !! 196 regulator-min-microvolt = <1800000>; 517 function = "gpio"; !! 197 regulator-max-microvolt = <2950000>; 518 !! 198 regulator-allow-set-load; 519 drive-strength = <2>; !! 199 regulator-system-load = <200000>; 520 bias-disable; << 521 }; 200 }; 522 201 523 pmic_int_default: pmic-int-default-sta !! 202 l12 { 524 pins = "gpio62"; !! 203 regulator-min-microvolt = <1800000>; 525 function = "gpio"; !! 204 regulator-max-microvolt = <2950000>; 526 drive-strength = <2>; << 527 bias-disable; << 528 }; 205 }; 529 206 530 sdc2_cd_default: sdc2-cd-default-state !! 207 l13 { 531 pins = "gpio38"; !! 208 regulator-min-microvolt = <3075000>; 532 function = "gpio"; !! 209 regulator-max-microvolt = <3075000>; 533 drive-strength = <2>; << 534 bias-disable; << 535 }; 210 }; 536 211 537 tkey_default: tkey-default-state { !! 212 l14 { 538 pins = "gpio98"; !! 213 regulator-min-microvolt = <1800000>; 539 function = "gpio"; !! 214 regulator-max-microvolt = <3300000>; 540 << 541 drive-strength = <2>; << 542 bias-disable; << 543 }; 215 }; 544 216 545 tkey_i2c_default: tkey-i2c-default-sta !! 217 l15 { 546 pins = "gpio16", "gpio17"; !! 218 regulator-min-microvolt = <1800000>; 547 function = "gpio"; !! 219 regulator-max-microvolt = <3300000>; 548 << 549 drive-strength = <2>; << 550 bias-disable; << 551 }; 220 }; 552 221 553 tsp_en_default: tsp-en-default-state { !! 222 l16 { 554 pins = "gpio73"; !! 223 regulator-min-microvolt = <1800000>; 555 function = "gpio"; !! 224 regulator-max-microvolt = <3300000>; 556 << 557 drive-strength = <2>; << 558 bias-disable; << 559 }; 225 }; 560 226 561 ts_int_default: ts-int-default-state { !! 227 l17 { 562 pins = "gpio13"; !! 228 regulator-min-microvolt = <2850000>; 563 function = "gpio"; !! 229 regulator-max-microvolt = <2850000>; 564 << 565 drive-strength = <2>; << 566 bias-disable; << 567 }; 230 }; 568 }; << 569 231 570 &pm8916_gpios { !! 232 l18 { 571 nfc_clk_req: nfc-clk-req-state { !! 233 regulator-min-microvolt = <2700000>; 572 pins = "gpio2"; !! 234 regulator-max-microvolt = <2700000>; 573 function = "func1"; << 574 << 575 input-enable; << 576 bias-disable; << 577 power-source = <PM8916_GPIO_L2 << 578 }; 235 }; 579 }; 236 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.