| 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 |
vddpx-supply = <&pm8941_s3>; |
| 218 |
|
| 219 |
pinctrl-names = "default"; |
| 220 |
pinctrl-0 = <&wcnss_pin_a>; |
| 221 |
|
| 222 |
status = "okay"; |
| 223 |
|
| 224 |
iris { |
| 225 |
vddxo-supply = <&pm8941_l6>; |
| 226 |
vddrfa-supply = <&pm8941_l11>; |
| 227 |
vddpa-supply = <&pm8941_l19>; |
| 228 |
vdddig-supply = <&pm8941_s3>; |
| 229 |
}; |
| 230 |
|
| 231 |
smd-edge { |
| 232 |
qcom,remote-pid = <4>; |
| 233 |
label = "pronto"; |
| 234 |
|
| 235 |
wcnss { |
| 236 |
status = "okay"; |
| 237 |
}; |
| 238 |
}; |
| 239 |
}; |
| 240 |
|
| 241 |
&remoteproc_adsp { |
| 242 |
status = "okay"; |
| 243 |
}; |
| 244 |
|
| 245 |
&rpm_requests { |
| 246 |
regulators-0 { |
| 247 |
compatible = "qcom,rpm-pm8841-regulators"; |
| 248 |
|
| 249 |
pm8841_s1: s1 { |
| 250 |
regulator-min-microvolt = <675000>; |
| 251 |
regulator-max-microvolt = <1050000>; |
| 252 |
}; |
| 253 |
|
| 254 |
pm8841_s3: s3 { |
| 255 |
regulator-min-microvolt = <1050000>; |
| 256 |
regulator-max-microvolt = <1050000>; |
| 257 |
}; |
| 258 |
}; |
| 259 |
|
| 260 |
regulators-1 { |
| 261 |
compatible = "qcom,rpm-pm8941-regulators"; |
| 262 |
|
| 263 |
vdd_l1_l3-supply = <&pm8941_s1>; |
| 264 |
vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; |
| 265 |
vdd_l4_l11-supply = <&pm8941_s1>; |
| 266 |
vdd_l5_l7-supply = <&pm8941_s2>; |
| 267 |
vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; |
| 268 |
vdd_l8_l16_l18_l19-supply = <&vreg_vph_pwr>; |
| 269 |
vdd_l9_l10_l17_l22-supply = <&vreg_boost>; |
| 270 |
vdd_l13_l20_l23_l24-supply = <&vreg_boost>; |
| 271 |
vdd_l21-supply = <&vreg_boost>; |
| 272 |
|
| 273 |
pm8941_s1: s1 { |
| 274 |
regulator-min-microvolt = <1300000>; |
| 275 |
regulator-max-microvolt = <1300000>; |
| 276 |
|
| 277 |
regulator-always-on; |
| 278 |
regulator-boot-on; |
| 279 |
}; |
| 280 |
|
| 281 |
pm8941_s2: s2 { |
| 282 |
regulator-min-microvolt = <2150000>; |
| 283 |
regulator-max-microvolt = <2150000>; |
| 284 |
|
| 285 |
regulator-boot-on; |
| 286 |
}; |
| 287 |
|
| 288 |
pm8941_s3: s3 { |
| 289 |
regulator-min-microvolt = <1800000>; |
| 290 |
regulator-max-microvolt = <1800000>; |
| 291 |
regulator-system-load = <154000>; |
| 292 |
|
| 293 |
regulator-always-on; |
| 294 |
regulator-boot-on; |
| 295 |
regulator-allow-set-load; |
| 296 |
}; |
| 297 |
|
| 298 |
pm8941_l1: l1 { |
| 299 |
regulator-min-microvolt = <1225000>; |
| 300 |
regulator-max-microvolt = <1225000>; |
| 301 |
|
| 302 |
regulator-always-on; |
| 303 |
regulator-boot-on; |
| 304 |
}; |
| 305 |
|
| 306 |
pm8941_l2: l2 { |
| 307 |
regulator-min-microvolt = <1200000>; |
| 308 |
regulator-max-microvolt = <1200000>; |
| 309 |
}; |
| 310 |
|
| 311 |
pm8941_l3: l3 { |
| 312 |
regulator-min-microvolt = <1225000>; |
| 313 |
regulator-max-microvolt = <1225000>; |
| 314 |
}; |
| 315 |
|
| 316 |
pm8941_l4: l4 { |
| 317 |
regulator-min-microvolt = <1225000>; |
| 318 |
regulator-max-microvolt = <1225000>; |
| 319 |
}; |
| 320 |
|
| 321 |
pm8941_l5: l5 { |
| 322 |
regulator-min-microvolt = <1800000>; |
| 323 |
regulator-max-microvolt = <1800000>; |
| 324 |
}; |
| 325 |
|
| 326 |
pm8941_l6: l6 { |
| 327 |
regulator-min-microvolt = <1800000>; |
| 328 |
regulator-max-microvolt = <1800000>; |
| 329 |
|
| 330 |
regulator-boot-on; |
| 331 |
}; |
| 332 |
|
| 333 |
pm8941_l7: l7 { |
| 334 |
regulator-min-microvolt = <1800000>; |
| 335 |
regulator-max-microvolt = <1800000>; |
| 336 |
|
| 337 |
regulator-boot-on; |
| 338 |
}; |
| 339 |
|
| 340 |
pm8941_l8: l8 { |
| 341 |
regulator-min-microvolt = <1800000>; |
| 342 |
regulator-max-microvolt = <1800000>; |
| 343 |
}; |
| 344 |
|
| 345 |
pm8941_l9: l9 { |
| 346 |
regulator-min-microvolt = <1800000>; |
| 347 |
regulator-max-microvolt = <2950000>; |
| 348 |
}; |
| 349 |
|
| 350 |
pm8941_l10: l10 { |
| 351 |
regulator-min-microvolt = <1800000>; |
| 352 |
regulator-max-microvolt = <2950000>; |
| 353 |
}; |
| 354 |
|
| 355 |
pm8941_l11: l11 { |
| 356 |
regulator-min-microvolt = <1225000>; |
| 357 |
regulator-max-microvolt = <1350000>; |
| 358 |
}; |
| 359 |
|
| 360 |
pm8941_l12: l12 { |
| 361 |
regulator-min-microvolt = <1800000>; |
| 362 |
regulator-max-microvolt = <1800000>; |
| 363 |
|
| 364 |
regulator-always-on; |
| 365 |
regulator-boot-on; |
| 366 |
regulator-allow-set-load; |
| 367 |
}; |
| 368 |
|
| 369 |
pm8941_l13: l13 { |
| 370 |
regulator-min-microvolt = <1800000>; |
| 371 |
regulator-max-microvolt = <2950000>; |
| 372 |
|
| 373 |
regulator-boot-on; |
| 374 |
}; |
| 375 |
|
| 376 |
pm8941_l14: l14 { |
| 377 |
regulator-min-microvolt = <1800000>; |
| 378 |
regulator-max-microvolt = <1800000>; |
| 379 |
}; |
| 380 |
|
| 381 |
pm8941_l15: l15 { |
| 382 |
regulator-min-microvolt = <2050000>; |
| 383 |
regulator-max-microvolt = <2050000>; |
| 384 |
}; |
| 385 |
|
| 386 |
pm8941_l16: l16 { |
| 387 |
regulator-min-microvolt = <2700000>; |
| 388 |
regulator-max-microvolt = <2700000>; |
| 389 |
}; |
| 390 |
|
| 391 |
pm8941_l17: l17 { |
| 392 |
regulator-min-microvolt = <2850000>; |
| 393 |
regulator-max-microvolt = <2850000>; |
| 394 |
}; |
| 395 |
|
| 396 |
pm8941_l18: l18 { |
| 397 |
regulator-min-microvolt = <2850000>; |
| 398 |
regulator-max-microvolt = <2850000>; |
| 399 |
}; |
| 400 |
|
| 401 |
pm8941_l19: l19 { |
| 402 |
regulator-min-microvolt = <2900000>; |
| 403 |
regulator-max-microvolt = <3350000>; |
| 404 |
}; |
| 405 |
|
| 406 |
pm8941_l20: l20 { |
| 407 |
regulator-min-microvolt = <2950000>; |
| 408 |
regulator-max-microvolt = <2950000>; |
| 409 |
|
| 410 |
regulator-system-load = <200000>; |
| 411 |
regulator-allow-set-load; |
| 412 |
regulator-boot-on; |
| 413 |
}; |
| 414 |
|
| 415 |
pm8941_l21: l21 { |
| 416 |
regulator-min-microvolt = <2950000>; |
| 417 |
regulator-max-microvolt = <2950000>; |
| 418 |
|
| 419 |
regulator-boot-on; |
| 420 |
}; |
| 421 |
|
| 422 |
pm8941_l22: l22 { |
| 423 |
regulator-min-microvolt = <3000000>; |
| 424 |
regulator-max-microvolt = <3000000>; |
| 425 |
regulator-allow-set-load; |
| 426 |
}; |
| 427 |
|
| 428 |
pm8941_l23: l23 { |
| 429 |
regulator-min-microvolt = <3000000>; |
| 430 |
regulator-max-microvolt = <3000000>; |
| 431 |
}; |
| 432 |
|
| 433 |
pm8941_l24: l24 { |
| 434 |
regulator-min-microvolt = <3075000>; |
| 435 |
regulator-max-microvolt = <3075000>; |
| 436 |
|
| 437 |
regulator-boot-on; |
| 438 |
}; |
| 439 |
|
| 440 |
pm8941_lvs3: lvs3 {}; |
| 441 |
}; |
| 442 |
}; |
| 443 |
|
| 444 |
&sdhc_1 { |
| 445 |
vmmc-supply = <&pm8941_l20>; |
| 446 |
vqmmc-supply = <&pm8941_s3>; |
| 447 |
|
| 448 |
pinctrl-names = "default", "sleep"; |
| 449 |
pinctrl-0 = <&sdc1_on>; |
| 450 |
pinctrl-1 = <&sdc1_off>; |
| 451 |
|
| 452 |
status = "okay"; |
| 453 |
}; |
| 454 |
|
| 455 |
&smbb { |
| 456 |
status = "okay"; |
| 457 |
}; |
| 458 |
|
| 459 |
&tlmm { |
| 460 |
gpio_hall_sensor_default: gpio-hall-sensor-default-state { |
| 461 |
pins = "gpio68"; |
| 462 |
function = "gpio"; |
| 463 |
drive-strength = <8>; |
| 464 |
bias-pull-up; |
| 465 |
}; |
| 466 |
|
| 467 |
sdc1_on: sdc1-on-state { |
| 468 |
clk-pins { |
| 469 |
pins = "sdc1_clk"; |
| 470 |
drive-strength = <4>; |
| 471 |
bias-disable; |
| 472 |
}; |
| 473 |
|
| 474 |
cmd-data-pins { |
| 475 |
pins = "sdc1_cmd", "sdc1_data"; |
| 476 |
drive-strength = <4>; |
| 477 |
bias-pull-up; |
| 478 |
}; |
| 479 |
}; |
| 480 |
|
| 481 |
touch_default_state: touch-default-state { |
| 482 |
int-pins { |
| 483 |
pins = "gpio61"; |
| 484 |
function = "gpio"; |
| 485 |
drive-strength = <2>; |
| 486 |
bias-disable; |
| 487 |
}; |
| 488 |
|
| 489 |
reset-pins { |
| 490 |
pins = "gpio60"; |
| 491 |
function = "gpio"; |
| 492 |
drive-strength = <2>; |
| 493 |
bias-pull-up; |
| 494 |
}; |
| 495 |
}; |
| 496 |
|
| 497 |
wcnss_pin_a: wcnss-pin-active-state { |
| 498 |
wlan-pins { |
| 499 |
pins = "gpio36", "gpio37", "gpio38", "gpio39", "gpio40"; |
| 500 |
function = "wlan"; |
| 501 |
drive-strength = <6>; |
| 502 |
bias-pull-down; |
| 503 |
}; |
| 504 |
|
| 505 |
bt-pins { |
| 506 |
pins = "gpio35", "gpio43", "gpio44"; |
| 507 |
function = "bt"; |
| 508 |
drive-strength = <2>; |
| 509 |
bias-pull-down; |
| 510 |
}; |
| 511 |
}; |
| 512 |
}; |
| 513 |
|
| 514 |
&usb { |
| 515 |
phys = <&usb_hs1_phy>; |
| 516 |
phy-select = <&tcsr 0xb000 0>; |
| 517 |
extcon = <&smbb>, <&usb_id>; |
| 518 |
vbus-supply = <&chg_otg>; |
| 519 |
|
| 520 |
hnp-disable; |
| 521 |
srp-disable; |
| 522 |
adp-disable; |
| 523 |
|
| 524 |
status = "okay"; |
| 525 |
}; |
| 526 |
|
| 527 |
&usb_hs1_phy { |
| 528 |
status = "okay"; |
| 529 |
|
| 530 |
v1p8-supply = <&pm8941_l6>; |
| 531 |
v3p3-supply = <&pm8941_l24>; |
| 532 |
|
| 533 |
extcon = <&smbb>; |
| 534 |
qcom,init-seq = /bits/ 8 <0x1 0x64>; |
| 535 |
}; |