1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz> 4 */ 5 6/dts-v1/; 7 8/* PM7250B is configured to use SID2/3 */ 9#define PM7250B_SID 2 10#define PM7250B_SID1 3 11 12/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */ 13#define PMK8350_SID 6 14 15#include <dt-bindings/firmware/qcom,scm.h> 16#include <dt-bindings/gpio/gpio.h> 17#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h> 18#include <dt-bindings/input/input.h> 19#include <dt-bindings/leds/common.h> 20#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 21#include <dt-bindings/regulator/qcom,rpmh-regulator.h> 22#include <dt-bindings/sound/qcom,q6asm.h> 23#include <dt-bindings/usb/pd.h> 24#include "sm7225.dtsi" 25#include "pm6150l.dtsi" 26#include "pm6350.dtsi" 27#include "pm7250b.dtsi" 28#include "pmk8350.dtsi" 29 30/ { 31 model = "Fairphone 4"; 32 compatible = "fairphone,fp4", "qcom,sm7225"; 33 chassis-type = "handset"; 34 35 /* required for bootloader to select correct board */ 36 qcom,msm-id = <459 0x10000>; 37 qcom,board-id = <8 32>; 38 39 aliases { 40 serial0 = &uart9; 41 serial1 = &uart1; 42 }; 43 44 chosen { 45 #address-cells = <2>; 46 #size-cells = <2>; 47 ranges; 48 49 stdout-path = "serial0:115200n8"; 50 51 framebuffer0: framebuffer@a000000 { 52 compatible = "simple-framebuffer"; 53 reg = <0 0xa0000000 0 (2340 * 1080 * 4)>; 54 width = <1080>; 55 height = <2340>; 56 stride = <(1080 * 4)>; 57 format = "a8r8g8b8"; 58 }; 59 }; 60 61 gpio-keys { 62 compatible = "gpio-keys"; 63 pinctrl-names = "default"; 64 pinctrl-0 = <&gpio_keys_pin>; 65 66 key-volume-up { 67 label = "volume_up"; 68 linux,code = <KEY_VOLUMEUP>; 69 gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>; 70 }; 71 }; 72 73 /* Dummy regulator until PM6150L has LCDB VSP/VSN support */ 74 lcdb_dummy: regulator-lcdb-dummy { 75 compatible = "regulator-fixed"; 76 regulator-name = "lcdb_dummy"; 77 regulator-min-microvolt = <5500000>; 78 regulator-max-microvolt = <5500000>; 79 }; 80 81 reserved-memory { 82 /* 83 * The rmtfs memory region in downstream is 'dynamically allocated' 84 * but given the same address every time. Hard code it as this address is 85 * where the modem firmware expects it to be. 86 */ 87 memory@efe01000 { 88 compatible = "qcom,rmtfs-mem"; 89 reg = <0 0xefe01000 0 0x600000>; 90 no-map; 91 92 qcom,client-id = <1>; 93 qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>; 94 }; 95 }; 96 97 msm_therm_sensor: thermal-sensor-msm { 98 compatible = "generic-adc-thermal"; 99 #thermal-sensor-cells = <0>; 100 io-channels = <&pm6150l_adc ADC5_AMUX_THM2_100K_PU>; 101 io-channel-names = "sensor-channel"; 102 }; 103 104 rear_cam_sensor: thermal-sensor-rear-cam { 105 compatible = "generic-adc-thermal"; 106 #thermal-sensor-cells = <0>; 107 io-channels = <&pm6150l_adc ADC5_GPIO2_100K_PU>; 108 io-channel-names = "sensor-channel"; 109 }; 110 111 thermal-zones { 112 chg-skin-thermal { 113 thermal-sensors = <&pm7250b_adc_tm 0>; 114 115 trips { 116 active-config0 { 117 temperature = <125000>; 118 hysteresis = <1000>; 119 type = "passive"; 120 }; 121 }; 122 }; 123 124 conn-thermal { 125 thermal-sensors = <&pm7250b_adc_tm 1>; 126 127 trips { 128 active-config0 { 129 temperature = <125000>; 130 hysteresis = <1000>; 131 type = "passive"; 132 }; 133 }; 134 }; 135 136 pa0-thermal { 137 thermal-sensors = <&pm6150l_adc_tm 1>; 138 139 trips { 140 active-config0 { 141 temperature = <125000>; 142 hysteresis = <1000>; 143 type = "passive"; 144 }; 145 }; 146 }; 147 148 pa1-thermal { 149 thermal-sensors = <&pm6150l_adc_tm 0>; 150 151 trips { 152 active-config0 { 153 temperature = <125000>; 154 hysteresis = <1000>; 155 type = "passive"; 156 }; 157 }; 158 }; 159 160 pm8008-thermal { 161 polling-delay-passive = <100>; 162 thermal-sensors = <&pm8008>; 163 164 trips { 165 trip0 { 166 temperature = <95000>; 167 hysteresis = <0>; 168 type = "passive"; 169 }; 170 171 trip1 { 172 temperature = <115000>; 173 hysteresis = <0>; 174 type = "critical"; 175 }; 176 }; 177 }; 178 179 quiet-thermal { 180 thermal-sensors = <&pm6150l_adc_tm 3>; 181 182 trips { 183 active-config0 { 184 temperature = <125000>; 185 hysteresis = <1000>; 186 type = "passive"; 187 }; 188 }; 189 }; 190 191 rear-cam-thermal { 192 polling-delay-passive = <1000>; 193 polling-delay = <5000>; 194 thermal-sensors = <&rear_cam_sensor>; 195 196 trips { 197 active-config0 { 198 temperature = <125000>; 199 hysteresis = <1000>; 200 type = "passive"; 201 }; 202 }; 203 }; 204 205 rfc-flash-thermal { 206 thermal-sensors = <&pm6150l_adc_tm 2>; 207 208 trips { 209 active-config0 { 210 temperature = <125000>; 211 hysteresis = <1000>; 212 type = "passive"; 213 }; 214 }; 215 }; 216 217 sdm-skin-thermal { 218 polling-delay-passive = <1000>; 219 polling-delay = <5000>; 220 thermal-sensors = <&msm_therm_sensor>; 221 222 trips { 223 trip0 { 224 temperature = <45000>; 225 hysteresis = <0>; 226 type = "passive"; 227 }; 228 229 trip1 { 230 temperature = <55000>; 231 hysteresis = <0>; 232 type = "critical"; 233 }; 234 }; 235 }; 236 237 xo-thermal { 238 thermal-sensors = <&pmk8350_adc_tm 0>; 239 240 trips { 241 active-config0 { 242 temperature = <125000>; 243 hysteresis = <1000>; 244 type = "passive"; 245 }; 246 }; 247 }; 248 }; 249}; 250 251&adsp { 252 firmware-name = "qcom/sm7225/fairphone4/adsp.mbn"; 253 status = "okay"; 254}; 255 256&apps_rsc { 257 regulators-0 { 258 compatible = "qcom,pm6350-rpmh-regulators"; 259 qcom,pmic-id = "a"; 260 261 vreg_s1a: smps1 { 262 regulator-name = "vreg_s1a"; 263 regulator-min-microvolt = <1000000>; 264 regulator-max-microvolt = <1200000>; 265 }; 266 267 vreg_s2a: smps2 { 268 regulator-name = "vreg_s2a"; 269 regulator-min-microvolt = <1503000>; 270 regulator-max-microvolt = <2048000>; 271 }; 272 273 vreg_l2a: ldo2 { 274 regulator-name = "vreg_l2a"; 275 regulator-min-microvolt = <1503000>; 276 regulator-max-microvolt = <1980000>; 277 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 278 }; 279 280 vreg_l3a: ldo3 { 281 regulator-name = "vreg_l3a"; 282 regulator-min-microvolt = <2700000>; 283 regulator-max-microvolt = <3300000>; 284 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 285 }; 286 287 vreg_l4a: ldo4 { 288 regulator-name = "vreg_l4a"; 289 regulator-min-microvolt = <352000>; 290 regulator-max-microvolt = <801000>; 291 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 292 }; 293 294 vreg_l5a: ldo5 { 295 regulator-name = "vreg_l5a"; 296 regulator-min-microvolt = <1503000>; 297 regulator-max-microvolt = <1980000>; 298 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 299 }; 300 301 vreg_l6a: ldo6 { 302 regulator-name = "vreg_l6a"; 303 regulator-min-microvolt = <1710000>; 304 regulator-max-microvolt = <3544000>; 305 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 306 }; 307 308 vreg_l7a: ldo7 { 309 regulator-name = "vreg_l7a"; 310 regulator-min-microvolt = <1620000>; 311 regulator-max-microvolt = <1980000>; 312 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 313 }; 314 315 vreg_l8a: ldo8 { 316 regulator-name = "vreg_l8a"; 317 regulator-min-microvolt = <2800000>; 318 regulator-max-microvolt = <2800000>; 319 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 320 }; 321 322 vreg_l9a: ldo9 { 323 regulator-name = "vreg_l9a"; 324 regulator-min-microvolt = <1650000>; 325 regulator-max-microvolt = <3401000>; 326 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 327 }; 328 329 vreg_l11a: ldo11 { 330 regulator-name = "vreg_l11a"; 331 regulator-min-microvolt = <1800000>; 332 regulator-max-microvolt = <2000000>; 333 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 334 }; 335 336 vreg_l12a: ldo12 { 337 regulator-name = "vreg_l12a"; 338 regulator-min-microvolt = <1620000>; 339 regulator-max-microvolt = <1980000>; 340 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 341 }; 342 343 vreg_l13a: ldo13 { 344 regulator-name = "vreg_l13a"; 345 regulator-min-microvolt = <570000>; 346 regulator-max-microvolt = <650000>; 347 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 348 }; 349 350 vreg_l14a: ldo14 { 351 regulator-name = "vreg_l14a"; 352 regulator-min-microvolt = <1700000>; 353 regulator-max-microvolt = <1900000>; 354 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 355 }; 356 357 vreg_l15a: ldo15 { 358 regulator-name = "vreg_l15a"; 359 regulator-min-microvolt = <1100000>; 360 regulator-max-microvolt = <1305000>; 361 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 362 }; 363 364 vreg_l16a: ldo16 { 365 regulator-name = "vreg_l16a"; 366 regulator-min-microvolt = <830000>; 367 regulator-max-microvolt = <921000>; 368 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 369 }; 370 371 vreg_l18a: ldo18 { 372 regulator-name = "vreg_l18a"; 373 regulator-min-microvolt = <788000>; 374 regulator-max-microvolt = <1049000>; 375 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 376 }; 377 378 vreg_l19a: ldo19 { 379 regulator-name = "vreg_l19a"; 380 regulator-min-microvolt = <1080000>; 381 regulator-max-microvolt = <1305000>; 382 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 383 }; 384 385 vreg_l20a: ldo20 { 386 regulator-name = "vreg_l20a"; 387 regulator-min-microvolt = <530000>; 388 regulator-max-microvolt = <801000>; 389 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 390 }; 391 392 vreg_l21a: ldo21 { 393 regulator-name = "vreg_l21a"; 394 regulator-min-microvolt = <751000>; 395 regulator-max-microvolt = <825000>; 396 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 397 }; 398 399 vreg_l22a: ldo22 { 400 regulator-name = "vreg_l22a"; 401 regulator-min-microvolt = <1080000>; 402 regulator-max-microvolt = <1305000>; 403 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 404 }; 405 }; 406 407 regulators-1 { 408 compatible = "qcom,pm6150l-rpmh-regulators"; 409 qcom,pmic-id = "e"; 410 411 vreg_s8e: smps8 { 412 regulator-name = "vreg_s8e"; 413 regulator-min-microvolt = <313000>; 414 regulator-max-microvolt = <1395000>; 415 }; 416 417 vreg_l1e: ldo1 { 418 regulator-name = "vreg_l1e"; 419 regulator-min-microvolt = <1620000>; 420 regulator-max-microvolt = <1980000>; 421 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 422 }; 423 424 vreg_l2e: ldo2 { 425 regulator-name = "vreg_l2e"; 426 regulator-min-microvolt = <1170000>; 427 regulator-max-microvolt = <1305000>; 428 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 429 }; 430 431 vreg_l3e: ldo3 { 432 regulator-name = "vreg_l3e"; 433 regulator-min-microvolt = <1100000>; 434 regulator-max-microvolt = <1299000>; 435 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 436 }; 437 438 vreg_l4e: ldo4 { 439 regulator-name = "vreg_l4e"; 440 regulator-min-microvolt = <1620000>; 441 regulator-max-microvolt = <3300000>; 442 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 443 }; 444 445 vreg_l5e: ldo5 { 446 regulator-name = "vreg_l5e"; 447 regulator-min-microvolt = <1620000>; 448 regulator-max-microvolt = <3300000>; 449 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 450 }; 451 452 vreg_l6e: ldo6 { 453 regulator-name = "vreg_l6e"; 454 regulator-min-microvolt = <1700000>; 455 regulator-max-microvolt = <2950000>; 456 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 457 regulator-allow-set-load; 458 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 459 RPMH_REGULATOR_MODE_HPM>; 460 }; 461 462 vreg_l7e: ldo7 { 463 regulator-name = "vreg_l7e"; 464 regulator-min-microvolt = <2700000>; 465 regulator-max-microvolt = <3544000>; 466 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 467 }; 468 469 vreg_l8e: ldo8 { 470 regulator-name = "vreg_l8e"; 471 regulator-min-microvolt = <1620000>; 472 regulator-max-microvolt = <2000000>; 473 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 474 }; 475 476 vreg_l9e: ldo9 { 477 regulator-name = "vreg_l9e"; 478 regulator-min-microvolt = <2700000>; 479 regulator-max-microvolt = <2960000>; 480 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 481 regulator-allow-set-load; 482 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM 483 RPMH_REGULATOR_MODE_HPM>; 484 }; 485 486 vreg_l10e: ldo10 { 487 regulator-name = "vreg_l10e"; 488 regulator-min-microvolt = <3000000>; 489 regulator-max-microvolt = <3401000>; 490 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 491 }; 492 493 vreg_l11e: ldo11 { 494 regulator-name = "vreg_l11e"; 495 regulator-min-microvolt = <3000000>; 496 regulator-max-microvolt = <3401000>; 497 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 498 }; 499 500 vreg_bob: bob { 501 regulator-name = "vreg_bob"; 502 regulator-min-microvolt = <1620000>; 503 regulator-max-microvolt = <5492000>; 504 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; 505 regulator-allow-bypass; 506 }; 507 }; 508}; 509 510&cci0 { 511 status = "okay"; 512}; 513 514&cci0_i2c0 { 515 /* IMX582 @ 0x1a */ 516}; 517 518&cci0_i2c1 { 519 /* IMX582 @ 0x1a */ 520}; 521 522&cci1 { 523 status = "okay"; 524}; 525 526&cci1_i2c0 { 527 /* IMX576 @ 0x10 */ 528}; 529 530&cdsp { 531 firmware-name = "qcom/sm7225/fairphone4/cdsp.mbn"; 532 status = "okay"; 533}; 534 535&gpi_dma0 { 536 status = "okay"; 537}; 538 539&gpi_dma1 { 540 status = "okay"; 541}; 542 543&gpu { 544 status = "okay"; 545}; 546 547&gpu_zap_shader { 548 firmware-name = "qcom/sm7225/fairphone4/a615_zap.mbn"; 549}; 550 551&i2c0 { 552 clock-frequency = <400000>; 553 status = "okay"; 554 555 /* ST21NFCD NFC @ 8 */ 556 /* VL53L3 ToF @ 29 */ 557 /* AW88264A amplifier @ 34 */ 558 /* AW88264A amplifier @ 35 */ 559}; 560 561&i2c8 { 562 clock-frequency = <400000>; 563 status = "okay"; 564 565 /* HX83112A touchscreen @ 48 */ 566}; 567 568&i2c10 { 569 clock-frequency = <400000>; 570 status = "okay"; 571 572 pm8008: pmic@8 { 573 compatible = "qcom,pm8008"; 574 reg = <0x8>; 575 576 interrupts-extended = <&tlmm 59 IRQ_TYPE_EDGE_RISING>; 577 reset-gpios = <&tlmm 58 GPIO_ACTIVE_LOW>; 578 579 vdd-l1-l2-supply = <&vreg_s8e>; 580 vdd-l3-l4-supply = <&vreg_bob>; 581 vdd-l5-supply = <&vreg_bob>; 582 vdd-l6-supply = <&vreg_s2a>; 583 vdd-l7-supply = <&vreg_bob>; 584 585 pinctrl-names = "default"; 586 pinctrl-0 = <&pm8008_default>; 587 588 gpio-controller; 589 #gpio-cells = <2>; 590 gpio-ranges = <&pm8008 0 0 2>; 591 592 interrupt-controller; 593 #interrupt-cells = <2>; 594 595 #thermal-sensor-cells = <0>; 596 597 regulators { 598 vreg_l1p: ldo1 { 599 regulator-name = "vreg_l1p"; 600 regulator-min-microvolt = <528000>; 601 regulator-max-microvolt = <1200000>; 602 }; 603 604 vreg_l2p: ldo2 { 605 regulator-name = "vreg_l2p"; 606 regulator-min-microvolt = <528000>; 607 regulator-max-microvolt = <1200000>; 608 }; 609 610 vreg_l3p: ldo3 { 611 regulator-name = "vreg_l3p"; 612 regulator-min-microvolt = <1500000>; 613 regulator-max-microvolt = <2800000>; 614 }; 615 616 vreg_l4p: ldo4 { 617 regulator-name = "vreg_l4p"; 618 regulator-min-microvolt = <1500000>; 619 regulator-max-microvolt = <2904000>; 620 }; 621 622 vreg_l5p: ldo5 { 623 regulator-name = "vreg_l5p"; 624 regulator-min-microvolt = <1500000>; 625 regulator-max-microvolt = <2900000>; 626 }; 627 628 vreg_l6p: ldo6 { 629 regulator-name = "vreg_l6p"; 630 regulator-min-microvolt = <1500000>; 631 regulator-max-microvolt = <1800000>; 632 }; 633 634 vreg_l7p: ldo7 { 635 regulator-name = "vreg_l7p"; 636 regulator-min-microvolt = <1500000>; 637 regulator-max-microvolt = <3140000>; 638 }; 639 }; 640 }; 641 642 /* PX8618 @ 26 */ 643 /* SMB1395 PMIC @ 34 */ 644 /* awinic,aw8695 @ 5a */ 645}; 646 647&ipa { 648 qcom,gsi-loader = "self"; 649 memory-region = <&pil_ipa_fw_mem>; 650 firmware-name = "qcom/sm7225/fairphone4/ipa_fws.mbn"; 651 status = "okay"; 652}; 653 654&mdss { 655 status = "okay"; 656}; 657 658&mdss_dsi0 { 659 vdda-supply = <&vreg_l22a>; 660 status = "okay"; 661 662 panel@0 { 663 compatible = "djn,9a-3r063-1102b"; 664 reg = <0>; 665 666 backlight = <&pm6150l_wled>; 667 reset-gpios = <&pm6150l_gpios 9 GPIO_ACTIVE_LOW>; 668 669 vdd1-supply = <&vreg_l1e>; 670 vsn-supply = <&lcdb_dummy>; 671 vsp-supply = <&lcdb_dummy>; 672 673 port { 674 panel_in: endpoint { 675 remote-endpoint = <&mdss_dsi0_out>; 676 }; 677 }; 678 }; 679}; 680 681&mdss_dsi0_out { 682 data-lanes = <0 1 2 3>; 683 remote-endpoint = <&panel_in>; 684}; 685 686&mdss_dsi0_phy { 687 vdds-supply = <&vreg_l18a>; 688 status = "okay"; 689}; 690 691&mpss { 692 firmware-name = "qcom/sm7225/fairphone4/modem.mbn"; 693 status = "okay"; 694}; 695 696&pm6150l_adc { 697 pinctrl-0 = <&pm6150l_adc_default>; 698 pinctrl-names = "default"; 699 700 channel@4d { 701 reg = <ADC5_AMUX_THM1_100K_PU>; 702 label = "pa_therm1"; 703 qcom,hw-settle-time = <200>; 704 qcom,pre-scaling = <1 1>; 705 qcom,ratiometric; 706 }; 707 708 channel@4e { 709 reg = <ADC5_AMUX_THM2_100K_PU>; 710 label = "msm_therm"; 711 qcom,hw-settle-time = <200>; 712 qcom,pre-scaling = <1 1>; 713 qcom,ratiometric; 714 }; 715 716 channel@4f { 717 reg = <ADC5_AMUX_THM3_100K_PU>; 718 label = "pa_therm0"; 719 qcom,hw-settle-time = <200>; 720 qcom,pre-scaling = <1 1>; 721 qcom,ratiometric; 722 }; 723 724 channel@53 { 725 reg = <ADC5_GPIO2_100K_PU>; 726 label = "rear_cam_therm"; 727 qcom,hw-settle-time = <200>; 728 qcom,pre-scaling = <1 1>; 729 qcom,ratiometric; 730 }; 731 732 channel@54 { 733 reg = <ADC5_GPIO3_100K_PU>; 734 label = "rear_cam_flash_therm"; 735 qcom,hw-settle-time = <200>; 736 qcom,pre-scaling = <1 1>; 737 qcom,ratiometric; 738 }; 739 740 channel@55 { 741 reg = <ADC5_GPIO4_100K_PU>; 742 label = "quiet_therm"; 743 qcom,hw-settle-time = <200>; 744 qcom,pre-scaling = <1 1>; 745 qcom,ratiometric; 746 }; 747}; 748 749&pm6150l_adc_tm { 750 status = "okay"; 751 752 pa-therm1@0 { 753 reg = <0>; 754 io-channels = <&pm6150l_adc ADC5_AMUX_THM1_100K_PU>; 755 qcom,hw-settle-time-us = <200>; 756 qcom,ratiometric; 757 }; 758 759 pa-therm0@1 { 760 reg = <1>; 761 io-channels = <&pm6150l_adc ADC5_AMUX_THM3_100K_PU>; 762 qcom,hw-settle-time-us = <200>; 763 qcom,ratiometric; 764 }; 765 766 rear-cam-flash-therm@2 { 767 reg = <2>; 768 io-channels = <&pm6150l_adc ADC5_GPIO3_100K_PU>; 769 qcom,hw-settle-time-us = <200>; 770 qcom,ratiometric; 771 }; 772 773 quiet-therm@3 { 774 reg = <3>; 775 io-channels = <&pm6150l_adc ADC5_GPIO4_100K_PU>; 776 qcom,hw-settle-time-us = <200>; 777 qcom,ratiometric; 778 }; 779}; 780 781&pm6150l_flash { 782 status = "okay"; 783 784 led-0 { 785 function = LED_FUNCTION_FLASH; 786 color = <LED_COLOR_ID_YELLOW>; 787 led-sources = <1>; 788 led-max-microamp = <180000>; 789 flash-max-microamp = <1000000>; 790 flash-max-timeout-us = <1280000>; 791 }; 792 793 led-1 { 794 function = LED_FUNCTION_FLASH; 795 color = <LED_COLOR_ID_WHITE>; 796 led-sources = <2>; 797 led-max-microamp = <180000>; 798 flash-max-microamp = <1000000>; 799 flash-max-timeout-us = <1280000>; 800 }; 801}; 802 803&pm6150l_gpios { 804 pm6150l_adc_default: adc-default-state { 805 pins = "gpio6", "gpio7", "gpio10"; 806 function = PMIC_GPIO_FUNC_NORMAL; 807 bias-high-impedance; 808 }; 809}; 810 811&pm6150l_wled { 812 qcom,switching-freq = <800>; 813 qcom,current-limit-microamp = <20000>; 814 qcom,num-strings = <2>; 815 816 status = "okay"; 817}; 818 819&pm6350_gpios { 820 gpio_keys_pin: gpio-keys-state { 821 pins = "gpio2"; 822 function = PMIC_GPIO_FUNC_NORMAL; 823 bias-pull-up; 824 input-enable; 825 power-source = <0>; 826 }; 827}; 828 829&pm6350_resin { 830 linux,code = <KEY_VOLUMEDOWN>; 831 status = "okay"; 832}; 833 834&pm7250b_adc { 835 channel@4d { 836 reg = <ADC5_AMUX_THM1_100K_PU>; 837 qcom,ratiometric; 838 qcom,hw-settle-time = <200>; 839 qcom,pre-scaling = <1 1>; 840 label = "charger_skin_therm"; 841 }; 842 843 channel@4f { 844 reg = <ADC5_AMUX_THM3_100K_PU>; 845 qcom,ratiometric; 846 qcom,hw-settle-time = <200>; 847 qcom,pre-scaling = <1 1>; 848 label = "conn_therm"; 849 }; 850}; 851 852&pm7250b_adc_tm { 853 status = "okay"; 854 855 charger-skin-therm@0 { 856 reg = <0>; 857 io-channels = <&pm7250b_adc ADC5_AMUX_THM1_100K_PU>; 858 qcom,ratiometric; 859 qcom,hw-settle-time-us = <200>; 860 }; 861 862 conn-therm@1 { 863 reg = <1>; 864 io-channels = <&pm7250b_adc ADC5_AMUX_THM3_100K_PU>; 865 qcom,ratiometric; 866 qcom,hw-settle-time-us = <200>; 867 }; 868}; 869 870&pm7250b_typec { 871 vdd-pdphy-supply = <&vreg_l3a>; 872 873 status = "okay"; 874 875 connector { 876 compatible = "usb-c-connector"; 877 878 power-role = "dual"; 879 data-role = "dual"; 880 self-powered; 881 882 /* 883 * Disable USB Power Delivery for now, seems to need extra work 884 * to support role switching while also letting the battery 885 * charge still - without charger driver 886 */ 887 typec-power-opmode = "default"; 888 pd-disable; 889 890 ports { 891 #address-cells = <1>; 892 #size-cells = <0>; 893 894 port@0 { 895 reg = <0>; 896 pm7250b_hs_in: endpoint { 897 remote-endpoint = <&usb_1_dwc3_hs_out>; 898 }; 899 }; 900 901 port@1 { 902 reg = <1>; 903 pm7250b_ss_in: endpoint { 904 remote-endpoint = <&usb_1_qmpphy_out>; 905 }; 906 }; 907 }; 908 }; 909}; 910 911&pm7250b_vbus { 912 regulator-min-microamp = <500000>; 913 regulator-max-microamp = <1500000>; 914 status = "okay"; 915}; 916 917&pmk8350_adc_tm { 918 status = "okay"; 919 920 xo-therm@0 { 921 reg = <0>; 922 io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>; 923 qcom,hw-settle-time-us = <200>; 924 qcom,ratiometric; 925 }; 926}; 927 928&pmk8350_rtc { 929 status = "okay"; 930}; 931 932&pmk8350_vadc { 933 channel@644 { 934 reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>; 935 qcom,ratiometric; 936 qcom,hw-settle-time = <200>; 937 qcom,pre-scaling = <1 1>; 938 label = "xo_therm"; 939 }; 940}; 941 942&q6asmdai { 943 dai@0 { 944 reg = <MSM_FRONTEND_DAI_MULTIMEDIA1>; 945 }; 946}; 947 948&qup_uart1_cts { 949 /* 950 * Configure a bias-bus-hold on CTS to lower power 951 * usage when Bluetooth is turned off. Bus hold will 952 * maintain a low power state regardless of whether 953 * the Bluetooth module drives the pin in either 954 * direction or leaves the pin fully unpowered. 955 */ 956 bias-bus-hold; 957}; 958 959&qup_uart1_rts { 960 /* We'll drive RTS, so no pull */ 961 drive-strength = <2>; 962 bias-disable; 963}; 964 965&qup_uart1_rx { 966 /* 967 * Configure a pull-up on RX. This is needed to avoid 968 * garbage data when the TX pin of the Bluetooth module is 969 * in tri-state (module powered off or not driving the 970 * signal yet). 971 */ 972 bias-pull-up; 973}; 974 975&qup_uart1_tx { 976 /* We'll drive TX, so no pull */ 977 drive-strength = <2>; 978 bias-disable; 979}; 980 981&qupv3_id_0 { 982 status = "okay"; 983}; 984 985&qupv3_id_1 { 986 status = "okay"; 987}; 988 989&sdc2_off_state { 990 sd-cd-pins { 991 pins = "gpio94"; 992 function = "gpio"; 993 drive-strength = <2>; 994 bias-disable; 995 }; 996}; 997 998&sdc2_on_state { 999 sd-cd-pins { 1000 pins = "gpio94"; 1001 function = "gpio"; 1002 drive-strength = <2>; 1003 bias-pull-up; 1004 }; 1005}; 1006 1007&sdhc_2 { 1008 vmmc-supply = <&vreg_l9e>; 1009 vqmmc-supply = <&vreg_l6e>; 1010 1011 cd-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; 1012 1013 status = "okay"; 1014}; 1015 1016&sound { 1017 compatible = "fairphone,fp4-sndcard"; 1018 model = "Fairphone 4"; 1019 1020 mm1-dai-link { 1021 link-name = "MultiMedia1"; 1022 1023 cpu { 1024 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; 1025 }; 1026 }; 1027 1028 usb-dai-link { 1029 link-name = "USB Playback"; 1030 1031 codec { 1032 sound-dai = <&q6usbdai USB_RX>; 1033 }; 1034 1035 cpu { 1036 sound-dai = <&q6afedai USB_RX>; 1037 }; 1038 1039 platform { 1040 sound-dai = <&q6routing>; 1041 }; 1042 }; 1043}; 1044 1045&tlmm { 1046 gpio-reserved-ranges = <13 4>, <56 2>; 1047 1048 qup_uart1_sleep_cts: qup-uart1-sleep-cts-state { 1049 pins = "gpio61"; 1050 function = "gpio"; 1051 /* 1052 * Configure a bias-bus-hold on CTS to lower power 1053 * usage when Bluetooth is turned off. Bus hold will 1054 * maintain a low power state regardless of whether 1055 * the Bluetooth module drives the pin in either 1056 * direction or leaves the pin fully unpowered. 1057 */ 1058 bias-bus-hold; 1059 }; 1060 1061 qup_uart1_sleep_rts: qup-uart1-sleep-rts-state { 1062 pins = "gpio62"; 1063 function = "gpio"; 1064 /* 1065 * Configure pull-down on RTS. As RTS is active low 1066 * signal, pull it low to indicate the BT SoC that it 1067 * can wakeup the system anytime from suspend state by 1068 * pulling RX low (by sending wakeup bytes). 1069 */ 1070 bias-pull-down; 1071 }; 1072 1073 qup_uart1_sleep_rx: qup-uart1-sleep-rx-state { 1074 pins = "gpio64"; 1075 function = "gpio"; 1076 /* 1077 * Configure a pull-up on RX. This is needed to avoid 1078 * garbage data when the TX pin of the Bluetooth module 1079 * is floating which may cause spurious wakeups. 1080 */ 1081 bias-pull-up; 1082 }; 1083 1084 qup_uart1_sleep_tx: qup-uart1-sleep-tx-state { 1085 pins = "gpio63"; 1086 function = "gpio"; 1087 /* 1088 * Configure pull-up on TX when it isn't actively driven 1089 * to prevent BT SoC from receiving garbage during sleep. 1090 */ 1091 bias-pull-up; 1092 }; 1093 1094 pm8008_default: pm8008-default-state { 1095 int-pins { 1096 pins = "gpio59"; 1097 function = "gpio"; 1098 drive-strength = <2>; 1099 bias-pull-down; 1100 }; 1101 1102 reset-n-pins { 1103 pins = "gpio58"; 1104 function = "gpio"; 1105 drive-strength = <2>; 1106 bias-disable; 1107 }; 1108 }; 1109}; 1110 1111&uart1 { 1112 /delete-property/ interrupts; 1113 interrupts-extended = <&intc GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>, 1114 <&tlmm 64 IRQ_TYPE_EDGE_FALLING>; 1115 1116 pinctrl-names = "default", "sleep"; 1117 pinctrl-1 = <&qup_uart1_sleep_cts>, <&qup_uart1_sleep_rts>, <&qup_uart1_sleep_tx>, <&qup_uart1_sleep_rx>; 1118 1119 status = "okay"; 1120 1121 bluetooth { 1122 compatible = "qcom,wcn3988-bt"; 1123 1124 vddio-supply = <&vreg_l11a>; 1125 vddxo-supply = <&vreg_l7a>; 1126 vddrf-supply = <&vreg_l2e>; 1127 vddch0-supply = <&vreg_l10e>; 1128 swctrl-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>; 1129 1130 max-speed = <3200000>; 1131 }; 1132}; 1133 1134&uart9 { 1135 status = "okay"; 1136}; 1137 1138&ufs_mem_hc { 1139 reset-gpios = <&tlmm 156 GPIO_ACTIVE_LOW>; 1140 1141 vcc-supply = <&vreg_l7e>; 1142 vcc-max-microamp = <800000>; 1143 vccq2-supply = <&vreg_l12a>; 1144 vccq2-max-microamp = <800000>; 1145 1146 status = "okay"; 1147}; 1148 1149&ufs_mem_phy { 1150 vdda-phy-supply = <&vreg_l18a>; 1151 vdda-pll-supply = <&vreg_l22a>; 1152 1153 status = "okay"; 1154}; 1155 1156&usb_1 { 1157 status = "okay"; 1158}; 1159 1160&usb_1_dwc3 { 1161 maximum-speed = "super-speed"; 1162 dr_mode = "otg"; 1163}; 1164 1165&usb_1_dwc3_hs_out { 1166 remote-endpoint = <&pm7250b_hs_in>; 1167}; 1168 1169&usb_1_hsphy { 1170 vdd-supply = <&vreg_l18a>; 1171 vdda-pll-supply = <&vreg_l2a>; 1172 vdda-phy-dpdm-supply = <&vreg_l3a>; 1173 1174 status = "okay"; 1175}; 1176 1177&usb_1_qmpphy { 1178 vdda-phy-supply = <&vreg_l22a>; 1179 vdda-pll-supply = <&vreg_l16a>; 1180 1181 status = "okay"; 1182}; 1183 1184&usb_1_qmpphy_out { 1185 remote-endpoint = <&pm7250b_ss_in>; 1186}; 1187 1188&wifi { 1189 vdd-0.8-cx-mx-supply = <&vreg_l4a>; 1190 vdd-1.8-xo-supply = <&vreg_l7a>; 1191 vdd-1.3-rfa-supply = <&vreg_l2e>; 1192 vdd-3.3-ch0-supply = <&vreg_l10e>; 1193 vdd-3.3-ch1-supply = <&vreg_l11e>; 1194 1195 status = "okay"; 1196}; 1197