1// SPDX-License-Identifier: GPL-2.0 2#include "qcom-msm8974pro.dtsi" 3#include "pm8841.dtsi" 4#include "pm8941.dtsi" 5#include <dt-bindings/input/input.h> 6#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 7 8/ { 9 model = "OnePlus One"; 10 compatible = "oneplus,bacon", "qcom,msm8974pro", "qcom,msm8974"; 11 chassis-type = "handset"; 12 qcom,msm-id = <194 0x10000>; 13 qcom,board-id = <8 0>; 14 15 aliases { 16 mmc0 = &sdhc_1; 17 serial0 = &blsp1_uart2; 18 }; 19 20 chosen { 21 stdout-path = "serial0:115200n8"; 22 }; 23 24 gpio-keys { 25 compatible = "gpio-keys"; 26 27 pinctrl-0 = <&gpio_keys_default>, <&gpio_hall_sensor_default>; 28 pinctrl-names = "default"; 29 30 key-volume-down { 31 label = "Volume Down"; 32 gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; 33 linux,code = <KEY_VOLUMEDOWN>; 34 wakeup-source; 35 debounce-interval = <15>; 36 }; 37 38 key-volume-up { 39 label = "Volume Up"; 40 gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>; 41 linux,code = <KEY_VOLUMEUP>; 42 wakeup-source; 43 debounce-interval = <15>; 44 }; 45 46 event-hall-sensor { 47 label = "Hall Effect Sensor"; 48 gpios = <&tlmm 68 GPIO_ACTIVE_LOW>; 49 linux,input-type = <EV_SW>; 50 linux,code = <SW_LID>; 51 linux,can-disable; 52 debounce-interval = <150>; 53 }; 54 }; 55 56 vreg_boost: vreg-boost { 57 compatible = "regulator-fixed"; 58 59 regulator-name = "vreg-boost"; 60 regulator-min-microvolt = <3150000>; 61 regulator-max-microvolt = <3150000>; 62 63 regulator-always-on; 64 regulator-boot-on; 65 66 gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>; 67 enable-active-high; 68 69 pinctrl-names = "default"; 70 pinctrl-0 = <&boost_bypass_n_pin>; 71 }; 72 73 vreg_vph_pwr: vreg-vph-pwr { 74 compatible = "regulator-fixed"; 75 regulator-name = "vph-pwr"; 76 77 regulator-min-microvolt = <3600000>; 78 regulator-max-microvolt = <3600000>; 79 80 regulator-always-on; 81 }; 82}; 83 84&blsp1_i2c1 { 85 status = "okay"; 86 87 fuel-gauge@55 { 88 compatible = "ti,bq27541"; 89 reg = <0x55>; 90 power-supplies = <&bq24196_charger>; 91 }; 92}; 93 94&blsp1_i2c2 { 95 status = "okay"; 96 97 rmi4-i2c-dev@20 { 98 compatible = "syna,rmi4-i2c"; 99 reg = <0x20>; 100 101 syna,startup-delay-ms = <100>; 102 103 interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>; 104 vdd-supply = <&pm8941_l22>; 105 vio-supply = <&pm8941_lvs3>; 106 107 pinctrl-names = "default"; 108 pinctrl-0 = <&touch_default_state>; 109 110 #address-cells = <1>; 111 #size-cells = <0>; 112 113 rmi4-f01@1 { 114 reg = <0x1>; 115 syna,nosleep-mode = <1>; 116 }; 117 118 rmi4-f12@12 { 119 reg = <0x12>; 120 syna,sensor-type = <1>; 121 /* 122 * Touchscreen size is 2040x1080, y-values between 123 * 1920-2040 are used for touchkey (menu, home & back). 124 * For now clip it off so we don't get touch events 125 * outside of the display area. 126 */ 127 syna,clip-y-high = <1920>; 128 }; 129 }; 130 131 led-controller@36 { 132 compatible = "ti,lm3630a"; 133 reg = <0x36>; 134 135 #address-cells = <1>; 136 #size-cells = <0>; 137 138 led@0 { 139 reg = <0>; 140 led-sources = <0 1>; 141 label = "lcd-backlight"; 142 default-brightness = <80>; 143 }; 144 }; 145 146 led-controller@68 { 147 compatible = "si-en,sn3193"; 148 reg = <0x68>; 149 150 shutdown-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>; 151 152 #address-cells = <1>; 153 #size-cells = <0>; 154 155 led@1 { 156 reg = <1>; 157 label = "red:status"; 158 led-max-microamp = <17500>; 159 }; 160 161 led@2 { 162 reg = <2>; 163 label = "green:status"; 164 led-max-microamp = <17500>; 165 }; 166 167 led@3 { 168 reg = <3>; 169 label = "blue:status"; 170 led-max-microamp = <17500>; 171 }; 172 }; 173}; 174 175&blsp1_i2c6 { 176 status = "okay"; 177 178 bq24196_charger: charger@6b { 179 compatible = "ti,bq24196"; 180 reg = <0x6b>; 181 interrupts-extended = <&tlmm 31 IRQ_TYPE_EDGE_FALLING>; 182 omit-battery-class; 183 }; 184}; 185 186&blsp1_uart2 { 187 status = "okay"; 188}; 189 190&gcc { 191 compatible = "qcom,gcc-msm8974pro-ac"; 192}; 193 194&pm8941_coincell { 195 qcom,rset-ohms = <800>; 196 qcom,vset-millivolts = <3200>; 197 198 status = "okay"; 199}; 200 201&pm8941_gpios { 202 gpio_keys_default: gpio-keys-active-state { 203 pins = "gpio2", "gpio5"; 204 function = "normal"; 205 input-enable; 206 bias-disable; 207 power-source = <PM8941_GPIO_S3>; 208 }; 209}; 210 211&pm8941_vib { 212 status = "okay"; 213}; 214 215&pronto { 216 vddmx-supply = <&pm8841_s1>; 217 vddcx-supply = <&pm8841_s2>; 218 vddpx-supply = <&pm8941_s3>; 219 220 pinctrl-names = "default"; 221 pinctrl-0 = <&wcnss_pin_a>; 222 223 status = "okay"; 224 225 iris { 226 vddxo-supply = <&pm8941_l6>; 227 vddrfa-supply = <&pm8941_l11>; 228 vddpa-supply = <&pm8941_l19>; 229 vdddig-supply = <&pm8941_s3>; 230 }; 231 232 smd-edge { 233 qcom,remote-pid = <4>; 234 label = "pronto"; 235 236 wcnss { 237 status = "okay"; 238 }; 239 }; 240}; 241 242&remoteproc_adsp { 243 cx-supply = <&pm8841_s2>; 244 245 status = "okay"; 246}; 247 248&rpm_requests { 249 regulators-0 { 250 compatible = "qcom,rpm-pm8841-regulators"; 251 252 pm8841_s1: s1 { 253 regulator-min-microvolt = <675000>; 254 regulator-max-microvolt = <1050000>; 255 }; 256 257 pm8841_s2: s2 { 258 regulator-min-microvolt = <875000>; 259 regulator-max-microvolt = <1050000>; 260 regulator-always-on; 261 }; 262 263 pm8841_s3: s3 { 264 regulator-min-microvolt = <1050000>; 265 regulator-max-microvolt = <1050000>; 266 }; 267 }; 268 269 regulators-1 { 270 compatible = "qcom,rpm-pm8941-regulators"; 271 272 vdd_l1_l3-supply = <&pm8941_s1>; 273 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; 274 vdd_l4_l11-supply = <&pm8941_s1>; 275 vdd_l5_l7-supply = <&pm8941_s2>; 276 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; 277 vdd_l8_l16_l18_l19-supply = <&vreg_vph_pwr>; 278 vdd_l9_l10_l17_l22-supply = <&vreg_boost>; 279 vdd_l13_l20_l23_l24-supply = <&vreg_boost>; 280 vdd_l21-supply = <&vreg_boost>; 281 282 pm8941_s1: s1 { 283 regulator-min-microvolt = <1300000>; 284 regulator-max-microvolt = <1300000>; 285 286 regulator-always-on; 287 regulator-boot-on; 288 }; 289 290 pm8941_s2: s2 { 291 regulator-min-microvolt = <2150000>; 292 regulator-max-microvolt = <2150000>; 293 294 regulator-boot-on; 295 }; 296 297 pm8941_s3: s3 { 298 regulator-min-microvolt = <1800000>; 299 regulator-max-microvolt = <1800000>; 300 regulator-system-load = <154000>; 301 302 regulator-always-on; 303 regulator-boot-on; 304 regulator-allow-set-load; 305 }; 306 307 pm8941_l1: l1 { 308 regulator-min-microvolt = <1225000>; 309 regulator-max-microvolt = <1225000>; 310 311 regulator-always-on; 312 regulator-boot-on; 313 }; 314 315 pm8941_l2: l2 { 316 regulator-min-microvolt = <1200000>; 317 regulator-max-microvolt = <1200000>; 318 }; 319 320 pm8941_l3: l3 { 321 regulator-min-microvolt = <1225000>; 322 regulator-max-microvolt = <1225000>; 323 }; 324 325 pm8941_l4: l4 { 326 regulator-min-microvolt = <1225000>; 327 regulator-max-microvolt = <1225000>; 328 }; 329 330 pm8941_l5: l5 { 331 regulator-min-microvolt = <1800000>; 332 regulator-max-microvolt = <1800000>; 333 }; 334 335 pm8941_l6: l6 { 336 regulator-min-microvolt = <1800000>; 337 regulator-max-microvolt = <1800000>; 338 339 regulator-boot-on; 340 }; 341 342 pm8941_l7: l7 { 343 regulator-min-microvolt = <1800000>; 344 regulator-max-microvolt = <1800000>; 345 346 regulator-boot-on; 347 }; 348 349 pm8941_l8: l8 { 350 regulator-min-microvolt = <1800000>; 351 regulator-max-microvolt = <1800000>; 352 }; 353 354 pm8941_l9: l9 { 355 regulator-min-microvolt = <1800000>; 356 regulator-max-microvolt = <2950000>; 357 }; 358 359 pm8941_l10: l10 { 360 regulator-min-microvolt = <1800000>; 361 regulator-max-microvolt = <2950000>; 362 }; 363 364 pm8941_l11: l11 { 365 regulator-min-microvolt = <1225000>; 366 regulator-max-microvolt = <1350000>; 367 }; 368 369 pm8941_l12: l12 { 370 regulator-min-microvolt = <1800000>; 371 regulator-max-microvolt = <1800000>; 372 373 regulator-always-on; 374 regulator-boot-on; 375 regulator-allow-set-load; 376 }; 377 378 pm8941_l13: l13 { 379 regulator-min-microvolt = <1800000>; 380 regulator-max-microvolt = <2950000>; 381 382 regulator-boot-on; 383 }; 384 385 pm8941_l14: l14 { 386 regulator-min-microvolt = <1800000>; 387 regulator-max-microvolt = <1800000>; 388 }; 389 390 pm8941_l15: l15 { 391 regulator-min-microvolt = <2050000>; 392 regulator-max-microvolt = <2050000>; 393 }; 394 395 pm8941_l16: l16 { 396 regulator-min-microvolt = <2700000>; 397 regulator-max-microvolt = <2700000>; 398 }; 399 400 pm8941_l17: l17 { 401 regulator-min-microvolt = <2850000>; 402 regulator-max-microvolt = <2850000>; 403 }; 404 405 pm8941_l18: l18 { 406 regulator-min-microvolt = <2850000>; 407 regulator-max-microvolt = <2850000>; 408 }; 409 410 pm8941_l19: l19 { 411 regulator-min-microvolt = <2900000>; 412 regulator-max-microvolt = <3350000>; 413 }; 414 415 pm8941_l20: l20 { 416 regulator-min-microvolt = <2950000>; 417 regulator-max-microvolt = <2950000>; 418 419 regulator-system-load = <200000>; 420 regulator-allow-set-load; 421 regulator-boot-on; 422 }; 423 424 pm8941_l21: l21 { 425 regulator-min-microvolt = <2950000>; 426 regulator-max-microvolt = <2950000>; 427 428 regulator-boot-on; 429 }; 430 431 pm8941_l22: l22 { 432 regulator-min-microvolt = <3000000>; 433 regulator-max-microvolt = <3000000>; 434 regulator-allow-set-load; 435 }; 436 437 pm8941_l23: l23 { 438 regulator-min-microvolt = <3000000>; 439 regulator-max-microvolt = <3000000>; 440 }; 441 442 pm8941_l24: l24 { 443 regulator-min-microvolt = <3075000>; 444 regulator-max-microvolt = <3075000>; 445 446 regulator-boot-on; 447 }; 448 449 pm8941_lvs3: lvs3 {}; 450 }; 451}; 452 453&sdhc_1 { 454 vmmc-supply = <&pm8941_l20>; 455 vqmmc-supply = <&pm8941_s3>; 456 457 pinctrl-names = "default", "sleep"; 458 pinctrl-0 = <&sdc1_on>; 459 pinctrl-1 = <&sdc1_off>; 460 461 status = "okay"; 462}; 463 464&smbb { 465 status = "okay"; 466}; 467 468&tlmm { 469 gpio_hall_sensor_default: gpio-hall-sensor-default-state { 470 pins = "gpio68"; 471 function = "gpio"; 472 drive-strength = <8>; 473 bias-pull-up; 474 }; 475 476 sdc1_on: sdc1-on-state { 477 clk-pins { 478 pins = "sdc1_clk"; 479 drive-strength = <4>; 480 bias-disable; 481 }; 482 483 cmd-data-pins { 484 pins = "sdc1_cmd", "sdc1_data"; 485 drive-strength = <4>; 486 bias-pull-up; 487 }; 488 }; 489 490 touch_default_state: touch-default-state { 491 int-pins { 492 pins = "gpio61"; 493 function = "gpio"; 494 drive-strength = <2>; 495 bias-disable; 496 }; 497 498 reset-pins { 499 pins = "gpio60"; 500 function = "gpio"; 501 drive-strength = <2>; 502 bias-pull-up; 503 }; 504 }; 505 506 wcnss_pin_a: wcnss-pin-active-state { 507 wlan-pins { 508 pins = "gpio36", "gpio37", "gpio38", "gpio39", "gpio40"; 509 function = "wlan"; 510 drive-strength = <6>; 511 bias-pull-down; 512 }; 513 514 bt-pins { 515 pins = "gpio35", "gpio43", "gpio44"; 516 function = "bt"; 517 drive-strength = <2>; 518 bias-pull-down; 519 }; 520 }; 521}; 522 523&usb { 524 phys = <&usb_hs1_phy>; 525 phy-select = <&tcsr 0xb000 0>; 526 extcon = <&smbb>, <&usb_id>; 527 vbus-supply = <&chg_otg>; 528 529 hnp-disable; 530 srp-disable; 531 adp-disable; 532 533 status = "okay"; 534}; 535 536&usb_hs1_phy { 537 status = "okay"; 538 539 v1p8-supply = <&pm8941_l6>; 540 v3p3-supply = <&pm8941_l24>; 541 542 extcon = <&smbb>; 543 qcom,init-seq = /bits/ 8 <0x1 0x64>; 544}; 545