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