| 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/leds/common.h> |
| 7 |
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> |
| 8 |
|
| 9 |
/ { |
| 10 |
model = "Fairphone 2"; |
| 11 |
compatible = "fairphone,fp2", "qcom,msm8974pro", "qcom,msm8974"; |
| 12 |
chassis-type = "handset"; |
| 13 |
|
| 14 |
aliases { |
| 15 |
mmc0 = &sdhc_1; |
| 16 |
mmc1 = &sdhc_2; |
| 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-names = "default"; |
| 28 |
pinctrl-0 = <&gpio_keys_pin_a>; |
| 29 |
|
| 30 |
key-camera-snapshot { |
| 31 |
label = "camera_snapshot"; |
| 32 |
gpios = <&pm8941_gpios 1 GPIO_ACTIVE_LOW>; |
| 33 |
linux,code = <KEY_CAMERA>; |
| 34 |
wakeup-source; |
| 35 |
debounce-interval = <15>; |
| 36 |
}; |
| 37 |
|
| 38 |
key-volume-down { |
| 39 |
label = "volume_down"; |
| 40 |
gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; |
| 41 |
linux,code = <KEY_VOLUMEDOWN>; |
| 42 |
wakeup-source; |
| 43 |
debounce-interval = <15>; |
| 44 |
}; |
| 45 |
|
| 46 |
key-volume-up { |
| 47 |
label = "volume_up"; |
| 48 |
gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>; |
| 49 |
linux,code = <KEY_VOLUMEUP>; |
| 50 |
wakeup-source; |
| 51 |
debounce-interval = <15>; |
| 52 |
}; |
| 53 |
}; |
| 54 |
|
| 55 |
vibrator { |
| 56 |
compatible = "gpio-vibrator"; |
| 57 |
enable-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>; |
| 58 |
vcc-supply = <&pm8941_l18>; |
| 59 |
}; |
| 60 |
|
| 61 |
vreg_boost: vreg-boost { |
| 62 |
compatible = "regulator-fixed"; |
| 63 |
|
| 64 |
regulator-name = "vreg-boost"; |
| 65 |
regulator-min-microvolt = <3150000>; |
| 66 |
regulator-max-microvolt = <3150000>; |
| 67 |
|
| 68 |
regulator-always-on; |
| 69 |
regulator-boot-on; |
| 70 |
|
| 71 |
gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>; |
| 72 |
enable-active-high; |
| 73 |
|
| 74 |
pinctrl-names = "default"; |
| 75 |
pinctrl-0 = <&boost_bypass_n_pin>; |
| 76 |
}; |
| 77 |
|
| 78 |
vreg_vph_pwr: vreg-vph-pwr { |
| 79 |
compatible = "regulator-fixed"; |
| 80 |
regulator-name = "vph-pwr"; |
| 81 |
|
| 82 |
regulator-min-microvolt = <3600000>; |
| 83 |
regulator-max-microvolt = <3600000>; |
| 84 |
|
| 85 |
regulator-always-on; |
| 86 |
}; |
| 87 |
}; |
| 88 |
|
| 89 |
&blsp1_i2c2 { |
| 90 |
status = "okay"; |
| 91 |
|
| 92 |
touchscreen@41 { |
| 93 |
compatible = "ilitek,ili2120"; |
| 94 |
reg = <0x41>; |
| 95 |
interrupt-parent = <&tlmm>; |
| 96 |
interrupts = <28 IRQ_TYPE_EDGE_FALLING>; |
| 97 |
reset-gpios = <&tlmm 55 GPIO_ACTIVE_LOW>; |
| 98 |
|
| 99 |
touchscreen-size-x = <1080>; |
| 100 |
touchscreen-size-y = <1920>; |
| 101 |
}; |
| 102 |
}; |
| 103 |
|
| 104 |
&blsp1_uart2 { |
| 105 |
status = "okay"; |
| 106 |
}; |
| 107 |
|
| 108 |
&imem { |
| 109 |
reboot-mode { |
| 110 |
mode-normal = <0x77665501>; |
| 111 |
mode-bootloader = <0x77665500>; |
| 112 |
mode-recovery = <0x77665502>; |
| 113 |
}; |
| 114 |
}; |
| 115 |
|
| 116 |
&pm8941_gpios { |
| 117 |
gpio_keys_pin_a: gpio-keys-active-state { |
| 118 |
pins = "gpio1", "gpio2", "gpio5"; |
| 119 |
function = "normal"; |
| 120 |
|
| 121 |
bias-pull-up; |
| 122 |
power-source = <PM8941_GPIO_S3>; |
| 123 |
}; |
| 124 |
}; |
| 125 |
|
| 126 |
&pm8941_lpg { |
| 127 |
status = "okay"; |
| 128 |
|
| 129 |
qcom,power-source = <1>; |
| 130 |
|
| 131 |
multi-led { |
| 132 |
color = <LED_COLOR_ID_RGB>; |
| 133 |
function = LED_FUNCTION_STATUS; |
| 134 |
|
| 135 |
#address-cells = <1>; |
| 136 |
#size-cells = <0>; |
| 137 |
|
| 138 |
led@7 { |
| 139 |
reg = <7>; |
| 140 |
color = <LED_COLOR_ID_RED>; |
| 141 |
}; |
| 142 |
|
| 143 |
led@6 { |
| 144 |
reg = <6>; |
| 145 |
color = <LED_COLOR_ID_GREEN>; |
| 146 |
}; |
| 147 |
|
| 148 |
led@5 { |
| 149 |
reg = <5>; |
| 150 |
color = <LED_COLOR_ID_BLUE>; |
| 151 |
}; |
| 152 |
}; |
| 153 |
}; |
| 154 |
|
| 155 |
&pronto { |
| 156 |
status = "okay"; |
| 157 |
|
| 158 |
vddmx-supply = <&pm8841_s1>; |
| 159 |
vddpx-supply = <&pm8941_s3>; |
| 160 |
|
| 161 |
pinctrl-names = "default"; |
| 162 |
pinctrl-0 = <&wcnss_pin_a>; |
| 163 |
|
| 164 |
iris { |
| 165 |
vddxo-supply = <&pm8941_l6>; |
| 166 |
vddrfa-supply = <&pm8941_l11>; |
| 167 |
vddpa-supply = <&pm8941_l19>; |
| 168 |
vdddig-supply = <&pm8941_s3>; |
| 169 |
}; |
| 170 |
|
| 171 |
smd-edge { |
| 172 |
qcom,remote-pid = <4>; |
| 173 |
label = "pronto"; |
| 174 |
|
| 175 |
wcnss { |
| 176 |
status = "okay"; |
| 177 |
}; |
| 178 |
}; |
| 179 |
}; |
| 180 |
|
| 181 |
&remoteproc_adsp { |
| 182 |
status = "okay"; |
| 183 |
}; |
| 184 |
|
| 185 |
&remoteproc_mss { |
| 186 |
status = "okay"; |
| 187 |
mss-supply = <&pm8841_s3>; |
| 188 |
mx-supply = <&pm8841_s1>; |
| 189 |
pll-supply = <&pm8941_l12>; |
| 190 |
}; |
| 191 |
|
| 192 |
&rpm_requests { |
| 193 |
regulators-0 { |
| 194 |
compatible = "qcom,rpm-pm8841-regulators"; |
| 195 |
|
| 196 |
pm8841_s1: s1 { |
| 197 |
regulator-min-microvolt = <675000>; |
| 198 |
regulator-max-microvolt = <1050000>; |
| 199 |
}; |
| 200 |
|
| 201 |
pm8841_s3: s3 { |
| 202 |
regulator-min-microvolt = <1050000>; |
| 203 |
regulator-max-microvolt = <1050000>; |
| 204 |
}; |
| 205 |
}; |
| 206 |
|
| 207 |
regulators-1 { |
| 208 |
compatible = "qcom,rpm-pm8941-regulators"; |
| 209 |
|
| 210 |
vdd_l1_l3-supply = <&pm8941_s1>; |
| 211 |
vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; |
| 212 |
vdd_l4_l11-supply = <&pm8941_s1>; |
| 213 |
vdd_l5_l7-supply = <&pm8941_s2>; |
| 214 |
vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; |
| 215 |
vdd_l9_l10_l17_l22-supply = <&vreg_boost>; |
| 216 |
vdd_l13_l20_l23_l24-supply = <&vreg_boost>; |
| 217 |
vdd_l21-supply = <&vreg_boost>; |
| 218 |
|
| 219 |
pm8941_s1: s1 { |
| 220 |
regulator-min-microvolt = <1300000>; |
| 221 |
regulator-max-microvolt = <1300000>; |
| 222 |
regulator-always-on; |
| 223 |
regulator-boot-on; |
| 224 |
}; |
| 225 |
|
| 226 |
pm8941_s2: s2 { |
| 227 |
regulator-min-microvolt = <2150000>; |
| 228 |
regulator-max-microvolt = <2150000>; |
| 229 |
regulator-boot-on; |
| 230 |
}; |
| 231 |
|
| 232 |
pm8941_s3: s3 { |
| 233 |
regulator-min-microvolt = <1800000>; |
| 234 |
regulator-max-microvolt = <1800000>; |
| 235 |
regulator-always-on; |
| 236 |
regulator-boot-on; |
| 237 |
}; |
| 238 |
|
| 239 |
pm8941_l1: l1 { |
| 240 |
regulator-min-microvolt = <1225000>; |
| 241 |
regulator-max-microvolt = <1225000>; |
| 242 |
regulator-always-on; |
| 243 |
regulator-boot-on; |
| 244 |
}; |
| 245 |
|
| 246 |
pm8941_l2: l2 { |
| 247 |
regulator-min-microvolt = <1200000>; |
| 248 |
regulator-max-microvolt = <1200000>; |
| 249 |
}; |
| 250 |
|
| 251 |
pm8941_l3: l3 { |
| 252 |
regulator-min-microvolt = <1225000>; |
| 253 |
regulator-max-microvolt = <1225000>; |
| 254 |
}; |
| 255 |
|
| 256 |
pm8941_l4: l4 { |
| 257 |
regulator-min-microvolt = <1225000>; |
| 258 |
regulator-max-microvolt = <1225000>; |
| 259 |
}; |
| 260 |
|
| 261 |
pm8941_l5: l5 { |
| 262 |
regulator-min-microvolt = <1800000>; |
| 263 |
regulator-max-microvolt = <1800000>; |
| 264 |
}; |
| 265 |
|
| 266 |
pm8941_l6: l6 { |
| 267 |
regulator-min-microvolt = <1800000>; |
| 268 |
regulator-max-microvolt = <1800000>; |
| 269 |
regulator-boot-on; |
| 270 |
}; |
| 271 |
|
| 272 |
pm8941_l7: l7 { |
| 273 |
regulator-min-microvolt = <1800000>; |
| 274 |
regulator-max-microvolt = <1800000>; |
| 275 |
regulator-boot-on; |
| 276 |
}; |
| 277 |
|
| 278 |
pm8941_l8: l8 { |
| 279 |
regulator-min-microvolt = <1800000>; |
| 280 |
regulator-max-microvolt = <1800000>; |
| 281 |
}; |
| 282 |
|
| 283 |
pm8941_l9: l9 { |
| 284 |
regulator-min-microvolt = <1800000>; |
| 285 |
regulator-max-microvolt = <2950000>; |
| 286 |
}; |
| 287 |
|
| 288 |
pm8941_l10: l10 { |
| 289 |
regulator-min-microvolt = <1800000>; |
| 290 |
regulator-max-microvolt = <2950000>; |
| 291 |
}; |
| 292 |
|
| 293 |
pm8941_l11: l11 { |
| 294 |
regulator-min-microvolt = <1225000>; |
| 295 |
regulator-max-microvolt = <1350000>; |
| 296 |
}; |
| 297 |
|
| 298 |
pm8941_l12: l12 { |
| 299 |
regulator-min-microvolt = <1800000>; |
| 300 |
regulator-max-microvolt = <1800000>; |
| 301 |
regulator-always-on; |
| 302 |
regulator-boot-on; |
| 303 |
}; |
| 304 |
|
| 305 |
pm8941_l13: l13 { |
| 306 |
regulator-min-microvolt = <1800000>; |
| 307 |
regulator-max-microvolt = <2950000>; |
| 308 |
regulator-boot-on; |
| 309 |
}; |
| 310 |
|
| 311 |
pm8941_l14: l14 { |
| 312 |
regulator-min-microvolt = <1800000>; |
| 313 |
regulator-max-microvolt = <1800000>; |
| 314 |
}; |
| 315 |
|
| 316 |
pm8941_l15: l15 { |
| 317 |
regulator-min-microvolt = <2050000>; |
| 318 |
regulator-max-microvolt = <2050000>; |
| 319 |
}; |
| 320 |
|
| 321 |
pm8941_l16: l16 { |
| 322 |
regulator-min-microvolt = <2700000>; |
| 323 |
regulator-max-microvolt = <2700000>; |
| 324 |
}; |
| 325 |
|
| 326 |
pm8941_l17: l17 { |
| 327 |
regulator-min-microvolt = <2850000>; |
| 328 |
regulator-max-microvolt = <2850000>; |
| 329 |
}; |
| 330 |
|
| 331 |
pm8941_l18: l18 { |
| 332 |
regulator-min-microvolt = <2850000>; |
| 333 |
regulator-max-microvolt = <2850000>; |
| 334 |
}; |
| 335 |
|
| 336 |
pm8941_l19: l19 { |
| 337 |
regulator-min-microvolt = <2900000>; |
| 338 |
regulator-max-microvolt = <3350000>; |
| 339 |
}; |
| 340 |
|
| 341 |
pm8941_l20: l20 { |
| 342 |
regulator-min-microvolt = <2950000>; |
| 343 |
regulator-max-microvolt = <2950000>; |
| 344 |
regulator-system-load = <200000>; |
| 345 |
regulator-allow-set-load; |
| 346 |
regulator-boot-on; |
| 347 |
}; |
| 348 |
|
| 349 |
pm8941_l21: l21 { |
| 350 |
regulator-min-microvolt = <2950000>; |
| 351 |
regulator-max-microvolt = <2950000>; |
| 352 |
regulator-boot-on; |
| 353 |
}; |
| 354 |
|
| 355 |
pm8941_l22: l22 { |
| 356 |
regulator-min-microvolt = <3000000>; |
| 357 |
regulator-max-microvolt = <3300000>; |
| 358 |
}; |
| 359 |
|
| 360 |
pm8941_l23: l23 { |
| 361 |
regulator-min-microvolt = <3000000>; |
| 362 |
regulator-max-microvolt = <3000000>; |
| 363 |
}; |
| 364 |
|
| 365 |
pm8941_l24: l24 { |
| 366 |
regulator-min-microvolt = <3075000>; |
| 367 |
regulator-max-microvolt = <3075000>; |
| 368 |
regulator-boot-on; |
| 369 |
}; |
| 370 |
}; |
| 371 |
}; |
| 372 |
|
| 373 |
&sdhc_1 { |
| 374 |
status = "okay"; |
| 375 |
|
| 376 |
vmmc-supply = <&pm8941_l20>; |
| 377 |
vqmmc-supply = <&pm8941_s3>; |
| 378 |
|
| 379 |
pinctrl-names = "default", "sleep"; |
| 380 |
pinctrl-0 = <&sdc1_on>; |
| 381 |
pinctrl-1 = <&sdc1_off>; |
| 382 |
}; |
| 383 |
|
| 384 |
&sdhc_2 { |
| 385 |
status = "okay"; |
| 386 |
|
| 387 |
vmmc-supply = <&pm8941_l21>; |
| 388 |
vqmmc-supply = <&pm8941_l13>; |
| 389 |
|
| 390 |
pinctrl-names = "default", "sleep"; |
| 391 |
pinctrl-0 = <&sdc2_on>; |
| 392 |
pinctrl-1 = <&sdc2_off>; |
| 393 |
}; |
| 394 |
|
| 395 |
&smbb { |
| 396 |
usb-charge-current-limit = <1500000>; |
| 397 |
qcom,fast-charge-safe-current = <1500000>; |
| 398 |
qcom,fast-charge-current-limit = <1500000>; |
| 399 |
qcom,fast-charge-safe-voltage = <4380000>; |
| 400 |
qcom,fast-charge-high-threshold-voltage = <4350000>; |
| 401 |
qcom,auto-recharge-threshold-voltage = <4240000>; |
| 402 |
qcom,minimum-input-voltage = <4450000>; |
| 403 |
|
| 404 |
status = "okay"; |
| 405 |
}; |
| 406 |
|
| 407 |
&tlmm { |
| 408 |
sdc1_on: sdc1-on-state { |
| 409 |
clk-pins { |
| 410 |
pins = "sdc1_clk"; |
| 411 |
drive-strength = <16>; |
| 412 |
bias-disable; |
| 413 |
}; |
| 414 |
|
| 415 |
cmd-data-pins { |
| 416 |
pins = "sdc1_cmd", "sdc1_data"; |
| 417 |
drive-strength = <10>; |
| 418 |
bias-pull-up; |
| 419 |
}; |
| 420 |
}; |
| 421 |
|
| 422 |
sdc2_on: sdc2-on-state { |
| 423 |
clk-pins { |
| 424 |
pins = "sdc2_clk"; |
| 425 |
drive-strength = <10>; |
| 426 |
bias-disable; |
| 427 |
}; |
| 428 |
|
| 429 |
cmd-data-pins { |
| 430 |
pins = "sdc2_cmd", "sdc2_data"; |
| 431 |
drive-strength = <6>; |
| 432 |
bias-pull-up; |
| 433 |
}; |
| 434 |
}; |
| 435 |
|
| 436 |
wcnss_pin_a: wcnss-pin-active-state { |
| 437 |
wlan-pins { |
| 438 |
pins = "gpio36", "gpio37", "gpio38", "gpio39", "gpio40"; |
| 439 |
function = "wlan"; |
| 440 |
|
| 441 |
drive-strength = <6>; |
| 442 |
bias-pull-down; |
| 443 |
}; |
| 444 |
|
| 445 |
bt-pins { |
| 446 |
pins = "gpio35", "gpio43", "gpio44"; |
| 447 |
function = "bt"; |
| 448 |
|
| 449 |
drive-strength = <2>; |
| 450 |
bias-pull-down; |
| 451 |
}; |
| 452 |
|
| 453 |
fm-pins { |
| 454 |
pins = "gpio41", "gpio42"; |
| 455 |
function = "fm"; |
| 456 |
|
| 457 |
drive-strength = <2>; |
| 458 |
bias-pull-down; |
| 459 |
}; |
| 460 |
}; |
| 461 |
}; |
| 462 |
|
| 463 |
&usb { |
| 464 |
status = "okay"; |
| 465 |
|
| 466 |
phys = <&usb_hs1_phy>; |
| 467 |
phy-select = <&tcsr 0xb000 0>; |
| 468 |
extcon = <&smbb>, <&usb_id>; |
| 469 |
vbus-supply = <&chg_otg>; |
| 470 |
|
| 471 |
hnp-disable; |
| 472 |
srp-disable; |
| 473 |
adp-disable; |
| 474 |
}; |
| 475 |
|
| 476 |
&usb_hs1_phy { |
| 477 |
status = "okay"; |
| 478 |
|
| 479 |
v1p8-supply = <&pm8941_l6>; |
| 480 |
v3p3-supply = <&pm8941_l24>; |
| 481 |
|
| 482 |
extcon = <&smbb>; |
| 483 |
qcom,init-seq = /bits/ 8 <0x1 0x64>; |
| 484 |
}; |