1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd. 4 * Copyright (c) 2018 Akash Gajjar <Akash_Gajjar@mentor.com> 5 * Copyright (c) 2020 Tobias Schramm <t.schramm@manjaro.org> 6 */ 7 8/dts-v1/; 9#include <dt-bindings/input/gpio-keys.h> 10#include <dt-bindings/input/linux-event-codes.h> 11#include <dt-bindings/pwm/pwm.h> 12#include <dt-bindings/usb/pd.h> 13#include <dt-bindings/leds/common.h> 14#include "rk3399.dtsi" 15 16/ { 17 model = "Pine64 Pinebook Pro"; 18 compatible = "pine64,pinebook-pro", "rockchip,rk3399"; 19 chassis-type = "laptop"; 20 21 aliases { 22 mmc0 = &sdio0; 23 mmc1 = &sdmmc; 24 mmc2 = &sdhci; 25 }; 26 27 chosen { 28 stdout-path = "serial2:1500000n8"; 29 }; 30 31 backlight: edp-backlight { 32 compatible = "pwm-backlight"; 33 power-supply = <&vcc_12v>; 34 pwms = <&pwm0 0 125000 0>; 35 }; 36 37 bat: battery { 38 compatible = "simple-battery"; 39 charge-full-design-microamp-hours = <10000000>; 40 voltage-max-design-microvolt = <4350000>; 41 voltage-min-design-microvolt = <3000000>; 42 }; 43 44 edp_panel: edp-panel { 45 compatible = "boe,nv140fhmn49"; 46 backlight = <&backlight>; 47 enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>; 48 pinctrl-names = "default"; 49 pinctrl-0 = <&panel_en_pin>; 50 power-supply = <&vcc3v3_panel>; 51 52 port { 53 panel_in_edp: endpoint { 54 remote-endpoint = <&edp_out_panel>; 55 }; 56 }; 57 }; 58 59 /* 60 * Use separate nodes for gpio-keys to allow for selective deactivation 61 * of wakeup sources via sysfs without disabling the whole key 62 */ 63 gpio-key-lid { 64 compatible = "gpio-keys"; 65 pinctrl-names = "default"; 66 pinctrl-0 = <&lidbtn_pin>; 67 68 switch-lid { 69 debounce-interval = <20>; 70 gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_LOW>; 71 label = "Lid"; 72 linux,code = <SW_LID>; 73 linux,input-type = <EV_SW>; 74 wakeup-event-action = <EV_ACT_DEASSERTED>; 75 wakeup-source; 76 }; 77 }; 78 79 gpio-key-power { 80 compatible = "gpio-keys"; 81 pinctrl-names = "default"; 82 pinctrl-0 = <&pwrbtn_pin>; 83 84 key-power { 85 debounce-interval = <20>; 86 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; 87 label = "Power"; 88 linux,code = <KEY_POWER>; 89 wakeup-source; 90 }; 91 }; 92 93 leds { 94 compatible = "gpio-leds"; 95 pinctrl-names = "default"; 96 pinctrl-0 = <&pwr_led_pin &slp_led_pin>; 97 98 green_led: led-0 { 99 color = <LED_COLOR_ID_GREEN>; 100 default-state = "on"; 101 function = LED_FUNCTION_POWER; 102 gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>; 103 label = "green:power"; 104 }; 105 106 red_led: led-1 { 107 color = <LED_COLOR_ID_RED>; 108 default-state = "off"; 109 function = LED_FUNCTION_STANDBY; 110 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; 111 label = "red:standby"; 112 panic-indicator; 113 retain-state-suspended; 114 }; 115 }; 116 117 /* Power sequence for SDIO WiFi module */ 118 sdio_pwrseq: sdio-pwrseq { 119 compatible = "mmc-pwrseq-simple"; 120 clocks = <&rk808 1>; 121 clock-names = "ext_clock"; 122 pinctrl-names = "default"; 123 pinctrl-0 = <&wifi_enable_h_pin>; 124 post-power-on-delay-ms = <100>; 125 power-off-delay-us = <500000>; 126 127 /* WL_REG_ON on module */ 128 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; 129 }; 130 131 /* Audio components */ 132 es8316-sound { 133 compatible = "simple-audio-card"; 134 pinctrl-names = "default"; 135 pinctrl-0 = <&hp_det_pin>; 136 simple-audio-card,name = "rockchip,es8316-codec"; 137 simple-audio-card,format = "i2s"; 138 simple-audio-card,mclk-fs = <256>; 139 140 simple-audio-card,widgets = 141 "Microphone", "Mic Jack", 142 "Headphone", "Headphones", 143 "Speaker", "Speaker"; 144 simple-audio-card,routing = 145 "MIC1", "Mic Jack", 146 "Headphones", "HPOL", 147 "Headphones", "HPOR", 148 "Speaker Amplifier INL", "HPOL", 149 "Speaker Amplifier INR", "HPOR", 150 "Speaker", "Speaker Amplifier OUTL", 151 "Speaker", "Speaker Amplifier OUTR"; 152 153 simple-audio-card,hp-det-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; 154 simple-audio-card,aux-devs = <&speaker_amp>; 155 simple-audio-card,pin-switches = "Speaker"; 156 157 simple-audio-card,cpu { 158 sound-dai = <&i2s1>; 159 }; 160 161 simple-audio-card,codec { 162 sound-dai = <&es8316>; 163 }; 164 }; 165 166 speaker_amp: speaker-amplifier { 167 compatible = "simple-audio-amplifier"; 168 enable-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_HIGH>; 169 sound-name-prefix = "Speaker Amplifier"; 170 VCC-supply = <&pa_5v>; 171 }; 172 173 /* Power tree */ 174 /* Root power source */ 175 vcc_sysin: regulator-vcc-sysin { 176 compatible = "regulator-fixed"; 177 regulator-name = "vcc_sysin"; 178 regulator-always-on; 179 regulator-boot-on; 180 }; 181 182 /* Regulators supplied by vcc_sysin */ 183 /* LCD backlight supply */ 184 vcc_12v: regulator-vcc-12v { 185 compatible = "regulator-fixed"; 186 regulator-name = "vcc_12v"; 187 regulator-always-on; 188 regulator-boot-on; 189 regulator-min-microvolt = <12000000>; 190 regulator-max-microvolt = <12000000>; 191 vin-supply = <&vcc_sysin>; 192 193 regulator-state-mem { 194 regulator-off-in-suspend; 195 }; 196 }; 197 198 /* Main 3.3 V supply */ 199 vcc3v3_sys: wifi_bat: regulator-vcc3v3-sys { 200 compatible = "regulator-fixed"; 201 regulator-name = "vcc3v3_sys"; 202 regulator-always-on; 203 regulator-boot-on; 204 regulator-min-microvolt = <3300000>; 205 regulator-max-microvolt = <3300000>; 206 vin-supply = <&vcc_sysin>; 207 208 regulator-state-mem { 209 regulator-on-in-suspend; 210 }; 211 }; 212 213 /* 5 V USB power supply */ 214 vcc5v0_usb: pa_5v: regulator-vcc5v0-usb { 215 compatible = "regulator-fixed"; 216 enable-active-high; 217 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; 218 pinctrl-names = "default"; 219 pinctrl-0 = <&pwr_5v_pin>; 220 regulator-name = "vcc5v0_usb"; 221 regulator-always-on; 222 regulator-min-microvolt = <5000000>; 223 regulator-max-microvolt = <5000000>; 224 vin-supply = <&vcc_sysin>; 225 226 regulator-state-mem { 227 regulator-off-in-suspend; 228 }; 229 }; 230 231 /* RK3399 logic supply */ 232 vdd_log: regulator-vdd-log { 233 compatible = "pwm-regulator"; 234 pwms = <&pwm2 0 25000 1>; 235 pwm-supply = <&vcc_sysin>; 236 regulator-name = "vdd_log"; 237 regulator-always-on; 238 regulator-boot-on; 239 regulator-min-microvolt = <800000>; 240 regulator-max-microvolt = <1400000>; 241 242 regulator-state-mem { 243 regulator-on-in-suspend; 244 }; 245 }; 246 247 /* Regulators supplied by vcc3v3_sys */ 248 /* 0.9 V supply, always on */ 249 vcc_0v9: regulator-vcc-0v9 { 250 compatible = "regulator-fixed"; 251 regulator-name = "vcc_0v9"; 252 regulator-always-on; 253 regulator-boot-on; 254 regulator-min-microvolt = <900000>; 255 regulator-max-microvolt = <900000>; 256 vin-supply = <&vcc3v3_sys>; 257 }; 258 259 /* S3 1.8 V supply, switched by vcc1v8_s3 */ 260 vcca1v8_s3: regulator-vcc1v8-s3 { 261 compatible = "regulator-fixed"; 262 regulator-name = "vcca1v8_s3"; 263 regulator-always-on; 264 regulator-boot-on; 265 regulator-min-microvolt = <1800000>; 266 regulator-max-microvolt = <1800000>; 267 vin-supply = <&vcc3v3_sys>; 268 }; 269 270 /* micro SD card power */ 271 vcc3v0_sd: regulator-vcc3v0-sd { 272 compatible = "regulator-fixed"; 273 enable-active-high; 274 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; 275 pinctrl-names = "default"; 276 pinctrl-0 = <&sdmmc0_pwr_h_pin>; 277 regulator-name = "vcc3v0_sd"; 278 regulator-always-on; 279 regulator-min-microvolt = <3000000>; 280 regulator-max-microvolt = <3000000>; 281 vin-supply = <&vcc3v3_sys>; 282 283 regulator-state-mem { 284 regulator-off-in-suspend; 285 }; 286 }; 287 288 /* LCD panel power, called VCC3V3_S0 in schematic */ 289 vcc3v3_panel: regulator-vcc3v3-panel { 290 compatible = "regulator-fixed"; 291 enable-active-high; 292 gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>; 293 pinctrl-names = "default"; 294 pinctrl-0 = <&lcdvcc_en_pin>; 295 regulator-name = "vcc3v3_panel"; 296 regulator-always-on; 297 regulator-min-microvolt = <3300000>; 298 regulator-max-microvolt = <3300000>; 299 regulator-enable-ramp-delay = <100000>; 300 vin-supply = <&vcc3v3_sys>; 301 302 regulator-state-mem { 303 regulator-off-in-suspend; 304 }; 305 }; 306 307 /* M.2 adapter power, switched by vcc1v8_s3 */ 308 vcc3v3_ssd: regulator-vcc3v3-ssd { 309 compatible = "regulator-fixed"; 310 regulator-name = "vcc3v3_ssd"; 311 regulator-min-microvolt = <3300000>; 312 regulator-max-microvolt = <3300000>; 313 vin-supply = <&vcc3v3_sys>; 314 }; 315 316 /* Regulators supplied by vcc5v0_usb */ 317 /* USB 3 port power supply regulator */ 318 vcc5v0_otg: regulator-vcc5v0-otg { 319 compatible = "regulator-fixed"; 320 enable-active-high; 321 gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; 322 pinctrl-names = "default"; 323 pinctrl-0 = <&vcc5v0_host_en_pin>; 324 regulator-name = "vcc5v0_otg"; 325 regulator-always-on; 326 regulator-min-microvolt = <5000000>; 327 regulator-max-microvolt = <5000000>; 328 vin-supply = <&vcc5v0_usb>; 329 330 regulator-state-mem { 331 regulator-off-in-suspend; 332 }; 333 }; 334 335 /* Regulators supplied by vcc5v0_usb */ 336 /* Type C port power supply regulator */ 337 vbus_5vout: vbus_typec: regulator-vbus-5vout { 338 compatible = "regulator-fixed"; 339 enable-active-high; 340 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>; 341 pinctrl-names = "default"; 342 pinctrl-0 = <&vcc5v0_typec0_en_pin>; 343 regulator-name = "vbus_5vout"; 344 regulator-min-microvolt = <5000000>; 345 regulator-max-microvolt = <5000000>; 346 vin-supply = <&vcc5v0_usb>; 347 348 regulator-state-mem { 349 regulator-off-in-suspend; 350 }; 351 }; 352 353 /* Regulators supplied by vcc_1v8 */ 354 /* Primary 0.9 V LDO */ 355 vcca0v9_s3: regulator-vcca0v9-s3 { 356 compatible = "regulator-fixed"; 357 regulator-name = "vcc0v9_s3"; 358 regulator-min-microvolt = <5000000>; 359 regulator-max-microvolt = <5000000>; 360 vin-supply = <&vcc_1v8>; 361 362 regulator-state-mem { 363 regulator-on-in-suspend; 364 }; 365 }; 366 367 mains_charger: dc-charger { 368 compatible = "gpio-charger"; 369 charger-type = "mains"; 370 gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_LOW>; 371 372 /* Also triggered by USB charger */ 373 pinctrl-names = "default"; 374 pinctrl-0 = <&dc_det_pin>; 375 }; 376}; 377 378&cpu_b0 { 379 cpu-supply = <&vdd_cpu_b>; 380}; 381 382&cpu_b1 { 383 cpu-supply = <&vdd_cpu_b>; 384}; 385 386&cpu_l0 { 387 cpu-supply = <&vdd_cpu_l>; 388}; 389 390&cpu_l1 { 391 cpu-supply = <&vdd_cpu_l>; 392}; 393 394&cpu_l2 { 395 cpu-supply = <&vdd_cpu_l>; 396}; 397 398&cpu_l3 { 399 cpu-supply = <&vdd_cpu_l>; 400}; 401 402&edp { 403 force-hpd; 404 status = "okay"; 405}; 406 407&edp_out { 408 edp_out_panel: endpoint { 409 remote-endpoint = <&panel_in_edp>; 410 }; 411}; 412 413&emmc_phy { 414 status = "okay"; 415}; 416 417&gpu { 418 mali-supply = <&vdd_gpu>; 419 status = "okay"; 420}; 421 422&i2c0 { 423 clock-frequency = <400000>; 424 i2c-scl-falling-time-ns = <4>; 425 i2c-scl-rising-time-ns = <168>; 426 status = "okay"; 427 428 rk808: pmic@1b { 429 compatible = "rockchip,rk808"; 430 reg = <0x1b>; 431 #clock-cells = <1>; 432 clock-output-names = "xin32k", "rk808-clkout2"; 433 interrupt-parent = <&gpio3>; 434 interrupts = <10 IRQ_TYPE_LEVEL_LOW>; 435 pinctrl-names = "default"; 436 pinctrl-0 = <&pmic_int_l_pin>; 437 system-power-controller; 438 wakeup-source; 439 440 vcc1-supply = <&vcc_sysin>; 441 vcc2-supply = <&vcc_sysin>; 442 vcc3-supply = <&vcc_sysin>; 443 vcc4-supply = <&vcc_sysin>; 444 vcc6-supply = <&vcc_sysin>; 445 vcc7-supply = <&vcc_sysin>; 446 vcc8-supply = <&vcc3v3_sys>; 447 vcc9-supply = <&vcc_sysin>; 448 vcc10-supply = <&vcc_sysin>; 449 vcc11-supply = <&vcc_sysin>; 450 vcc12-supply = <&vcc3v3_sys>; 451 452 regulators { 453 /* rk3399 center logic supply */ 454 vdd_center: DCDC_REG1 { 455 regulator-name = "vdd_center"; 456 regulator-always-on; 457 regulator-boot-on; 458 regulator-min-microvolt = <750000>; 459 regulator-max-microvolt = <1350000>; 460 regulator-ramp-delay = <6001>; 461 462 regulator-state-mem { 463 regulator-off-in-suspend; 464 }; 465 }; 466 467 vdd_cpu_l: DCDC_REG2 { 468 regulator-name = "vdd_cpu_l"; 469 regulator-always-on; 470 regulator-boot-on; 471 regulator-min-microvolt = <750000>; 472 regulator-max-microvolt = <1350000>; 473 regulator-ramp-delay = <6001>; 474 475 regulator-state-mem { 476 regulator-off-in-suspend; 477 }; 478 }; 479 480 vcc_ddr: DCDC_REG3 { 481 regulator-name = "vcc_ddr"; 482 regulator-always-on; 483 regulator-boot-on; 484 485 regulator-state-mem { 486 regulator-on-in-suspend; 487 }; 488 }; 489 490 vcc_1v8: vcc_wl: DCDC_REG4 { 491 regulator-name = "vcc_1v8"; 492 regulator-always-on; 493 regulator-boot-on; 494 regulator-min-microvolt = <1800000>; 495 regulator-max-microvolt = <1800000>; 496 497 regulator-state-mem { 498 regulator-on-in-suspend; 499 regulator-suspend-microvolt = <1800000>; 500 }; 501 }; 502 503 /* not used */ 504 LDO_REG1 { 505 }; 506 507 /* not used */ 508 LDO_REG2 { 509 }; 510 511 vcc1v8_pmupll: LDO_REG3 { 512 regulator-name = "vcc1v8_pmupll"; 513 regulator-always-on; 514 regulator-boot-on; 515 regulator-min-microvolt = <1800000>; 516 regulator-max-microvolt = <1800000>; 517 518 regulator-state-mem { 519 regulator-on-in-suspend; 520 regulator-suspend-microvolt = <1800000>; 521 }; 522 }; 523 524 vcc_sdio: LDO_REG4 { 525 regulator-name = "vcc_sdio"; 526 regulator-always-on; 527 regulator-boot-on; 528 regulator-min-microvolt = <1800000>; 529 regulator-max-microvolt = <3000000>; 530 531 regulator-state-mem { 532 regulator-on-in-suspend; 533 regulator-suspend-microvolt = <3000000>; 534 }; 535 }; 536 537 vcca3v0_codec: LDO_REG5 { 538 regulator-name = "vcca3v0_codec"; 539 regulator-always-on; 540 regulator-boot-on; 541 regulator-min-microvolt = <3000000>; 542 regulator-max-microvolt = <3000000>; 543 544 regulator-state-mem { 545 regulator-off-in-suspend; 546 }; 547 }; 548 549 vcc_1v5: LDO_REG6 { 550 regulator-name = "vcc_1v5"; 551 regulator-always-on; 552 regulator-boot-on; 553 regulator-min-microvolt = <1500000>; 554 regulator-max-microvolt = <1500000>; 555 556 regulator-state-mem { 557 regulator-on-in-suspend; 558 regulator-suspend-microvolt = <1500000>; 559 }; 560 }; 561 562 vcca1v8_codec: LDO_REG7 { 563 regulator-name = "vcca1v8_codec"; 564 regulator-always-on; 565 regulator-boot-on; 566 regulator-min-microvolt = <1800000>; 567 regulator-max-microvolt = <1800000>; 568 569 regulator-state-mem { 570 regulator-off-in-suspend; 571 }; 572 }; 573 574 vcc_3v0: LDO_REG8 { 575 regulator-name = "vcc_3v0"; 576 regulator-always-on; 577 regulator-boot-on; 578 regulator-min-microvolt = <3000000>; 579 regulator-max-microvolt = <3000000>; 580 581 regulator-state-mem { 582 regulator-on-in-suspend; 583 regulator-suspend-microvolt = <3000000>; 584 }; 585 }; 586 587 vcc3v3_s3: SWITCH_REG1 { 588 regulator-name = "vcc3v3_s3"; 589 regulator-always-on; 590 regulator-boot-on; 591 592 regulator-state-mem { 593 regulator-off-in-suspend; 594 }; 595 }; 596 597 vcc3v3_s0: SWITCH_REG2 { 598 regulator-name = "vcc3v3_s0"; 599 regulator-always-on; 600 regulator-boot-on; 601 602 regulator-state-mem { 603 regulator-off-in-suspend; 604 }; 605 }; 606 }; 607 }; 608 609 vdd_cpu_b: regulator@40 { 610 compatible = "silergy,syr827"; 611 reg = <0x40>; 612 fcs,suspend-voltage-selector = <1>; 613 pinctrl-names = "default"; 614 pinctrl-0 = <&vsel1_pin>; 615 regulator-name = "vdd_cpu_b"; 616 regulator-always-on; 617 regulator-boot-on; 618 regulator-min-microvolt = <712500>; 619 regulator-max-microvolt = <1500000>; 620 regulator-ramp-delay = <1000>; 621 vin-supply = <&vcc_1v8>; 622 623 regulator-state-mem { 624 regulator-off-in-suspend; 625 }; 626 }; 627 628 vdd_gpu: regulator@41 { 629 compatible = "silergy,syr828"; 630 reg = <0x41>; 631 fcs,suspend-voltage-selector = <1>; 632 pinctrl-names = "default"; 633 pinctrl-0 = <&vsel2_pin>; 634 regulator-name = "vdd_gpu"; 635 regulator-always-on; 636 regulator-boot-on; 637 regulator-min-microvolt = <712500>; 638 regulator-max-microvolt = <1500000>; 639 regulator-ramp-delay = <1000>; 640 vin-supply = <&vcc_1v8>; 641 642 regulator-state-mem { 643 regulator-off-in-suspend; 644 }; 645 }; 646}; 647 648&i2c1 { 649 clock-frequency = <100000>; 650 i2c-scl-falling-time-ns = <4>; 651 i2c-scl-rising-time-ns = <168>; 652 status = "okay"; 653 654 es8316: audio-codec@11 { 655 compatible = "everest,es8316"; 656 reg = <0x11>; 657 clocks = <&cru SCLK_I2S_8CH_OUT>; 658 clock-names = "mclk"; 659 #sound-dai-cells = <0>; 660 }; 661}; 662 663&i2c3 { 664 i2c-scl-falling-time-ns = <15>; 665 i2c-scl-rising-time-ns = <450>; 666 status = "okay"; 667}; 668 669&i2c4 { 670 i2c-scl-falling-time-ns = <20>; 671 i2c-scl-rising-time-ns = <600>; 672 status = "okay"; 673 674 fusb0: fusb30x@22 { 675 compatible = "fcs,fusb302"; 676 reg = <0x22>; 677 interrupt-parent = <&gpio1>; 678 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>; 679 pinctrl-names = "default"; 680 pinctrl-0 = <&fusb0_int_pin>; 681 vbus-supply = <&vbus_typec>; 682 683 connector { 684 compatible = "usb-c-connector"; 685 data-role = "dual"; 686 label = "USB-C"; 687 op-sink-microwatt = <1000000>; 688 power-role = "dual"; 689 sink-pdos = 690 <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>; 691 source-pdos = 692 <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>; 693 try-power-role = "sink"; 694 695 ports { 696 #address-cells = <1>; 697 #size-cells = <0>; 698 699 port@0 { 700 reg = <0>; 701 702 usbc_hs: endpoint { 703 remote-endpoint = 704 <&u2phy0_typec_hs>; 705 }; 706 }; 707 708 port@1 { 709 reg = <1>; 710 711 usbc_ss: endpoint { 712 remote-endpoint = 713 <&tcphy0_typec_ss>; 714 }; 715 }; 716 717 port@2 { 718 reg = <2>; 719 720 usbc_dp: endpoint { 721 remote-endpoint = 722 <&tcphy0_typec_dp>; 723 }; 724 }; 725 }; 726 }; 727 }; 728 729 cw2015@62 { 730 compatible = "cellwise,cw2015"; 731 reg = <0x62>; 732 cellwise,battery-profile = /bits/ 8 < 733 0x17 0x67 0x80 0x73 0x6E 0x6C 0x6B 0x63 734 0x77 0x51 0x5C 0x58 0x50 0x4C 0x48 0x36 735 0x15 0x0C 0x0C 0x19 0x5B 0x7D 0x6F 0x69 736 0x69 0x5B 0x0C 0x29 0x20 0x40 0x52 0x59 737 0x57 0x56 0x54 0x4F 0x3B 0x1F 0x7F 0x17 738 0x06 0x1A 0x30 0x5A 0x85 0x93 0x96 0x2D 739 0x48 0x77 0x9C 0xB3 0x80 0x52 0x94 0xCB 740 0x2F 0x00 0x64 0xA5 0xB5 0x11 0xF0 0x11 741 >; 742 cellwise,monitor-interval-ms = <5000>; 743 monitored-battery = <&bat>; 744 power-supplies = <&mains_charger>, <&fusb0>; 745 }; 746}; 747 748&i2s1 { 749 pinctrl-names = "default"; 750 pinctrl-0 = <&i2s_8ch_mclk_pin>, <&i2s1_2ch_bus>; 751 rockchip,capture-channels = <8>; 752 rockchip,playback-channels = <8>; 753 status = "okay"; 754}; 755 756&io_domains { 757 audio-supply = <&vcc_3v0>; 758 gpio1830-supply = <&vcc_3v0>; 759 sdmmc-supply = <&vcc_sdio>; 760 status = "okay"; 761}; 762 763&pcie_phy { 764 status = "okay"; 765}; 766 767&pcie0 { 768 ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; 769 num-lanes = <4>; 770 pinctrl-names = "default"; 771 pinctrl-0 = <&pcie_clkreqn_cpm>; 772 vpcie0v9-supply = <&vcca0v9_s3>; 773 vpcie1v8-supply = <&vcca1v8_s3>; 774 vpcie3v3-supply = <&vcc3v3_ssd>; 775 status = "okay"; 776}; 777 778&pinctrl { 779 buttons { 780 pwrbtn_pin: pwrbtn-pin { 781 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; 782 }; 783 784 lidbtn_pin: lidbtn-pin { 785 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; 786 }; 787 }; 788 789 dc-charger { 790 dc_det_pin: dc-det-pin { 791 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; 792 }; 793 }; 794 795 es8316 { 796 hp_det_pin: hp-det-pin { 797 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; 798 }; 799 }; 800 801 fusb302x { 802 fusb0_int_pin: fusb0-int-pin { 803 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; 804 }; 805 }; 806 807 i2s1 { 808 i2s_8ch_mclk_pin: i2s-8ch-mclk-pin { 809 rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>; 810 }; 811 }; 812 813 lcd-panel { 814 lcdvcc_en_pin: lcdvcc-en-pin { 815 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; 816 }; 817 818 panel_en_pin: panel-en-pin { 819 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 820 }; 821 822 lcd_panel_reset_pin: lcd-panel-reset-pin { 823 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>; 824 }; 825 }; 826 827 leds { 828 pwr_led_pin: pwr-led-pin { 829 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 830 }; 831 832 slp_led_pin: slp-led-pin { 833 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 834 }; 835 }; 836 837 pmic { 838 pmic_int_l_pin: pmic-int-l-pin { 839 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; 840 }; 841 842 vsel1_pin: vsel1-pin { 843 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>; 844 }; 845 846 vsel2_pin: vsel2-pin { 847 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>; 848 }; 849 }; 850 851 sdcard { 852 sdmmc0_pwr_h_pin: sdmmc0-pwr-h-pin { 853 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; 854 }; 855 856 }; 857 858 sdio-pwrseq { 859 wifi_enable_h_pin: wifi-enable-h-pin { 860 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; 861 }; 862 }; 863 864 usb-typec { 865 vcc5v0_typec0_en_pin: vcc5v0-typec0-en-pin { 866 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; 867 }; 868 }; 869 870 usb2 { 871 pwr_5v_pin: pwr-5v-pin { 872 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; 873 }; 874 875 vcc5v0_host_en_pin: vcc5v0-host-en-pin { 876 rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; 877 }; 878 }; 879 880 wireless-bluetooth { 881 bt_wake_pin: bt-wake-pin { 882 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; 883 }; 884 885 bt_host_wake_pin: bt-host-wake-pin { 886 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; 887 }; 888 889 bt_reset_pin: bt-reset-pin { 890 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; 891 }; 892 }; 893}; 894 895&pmu_io_domains { 896 pmu1830-supply = <&vcc_3v0>; 897 status = "okay"; 898}; 899 900&pwm0 { 901 status = "okay"; 902}; 903 904&pwm2 { 905 status = "okay"; 906}; 907 908&saradc { 909 vref-supply = <&vcca1v8_s3>; 910 status = "okay"; 911}; 912 913&sdmmc { 914 bus-width = <4>; 915 cap-mmc-highspeed; 916 cap-sd-highspeed; 917 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; 918 disable-wp; 919 pinctrl-names = "default"; 920 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>; 921 sd-uhs-sdr50; 922 vmmc-supply = <&vcc3v0_sd>; 923 vqmmc-supply = <&vcc_sdio>; 924 status = "okay"; 925}; 926 927&sdio0 { 928 bus-width = <4>; 929 cap-sd-highspeed; 930 cap-sdio-irq; 931 keep-power-in-suspend; 932 mmc-pwrseq = <&sdio_pwrseq>; 933 non-removable; 934 pinctrl-names = "default"; 935 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; 936 sd-uhs-sdr104; 937 status = "okay"; 938}; 939 940&sdhci { 941 bus-width = <8>; 942 mmc-hs200-1_8v; 943 non-removable; 944 status = "okay"; 945}; 946 947&spi1 { 948 status = "okay"; 949 950 spiflash: flash@0 { 951 compatible = "jedec,spi-nor"; 952 reg = <0>; 953 m25p,fast-read; 954 spi-max-frequency = <10000000>; 955 vcc-supply = <&vcc_3v0>; 956 }; 957}; 958 959&tcphy0 { 960 status = "okay"; 961}; 962 963&tcphy0_dp { 964 port { 965 tcphy0_typec_dp: endpoint { 966 remote-endpoint = <&usbc_dp>; 967 }; 968 }; 969}; 970 971&tcphy0_usb3 { 972 port { 973 tcphy0_typec_ss: endpoint { 974 remote-endpoint = <&usbc_ss>; 975 }; 976 }; 977}; 978 979&tcphy1 { 980 status = "okay"; 981}; 982 983&tsadc { 984 /* tshut mode 0:CRU 1:GPIO */ 985 rockchip,hw-tshut-mode = <1>; 986 /* tshut polarity 0:LOW 1:HIGH */ 987 rockchip,hw-tshut-polarity = <1>; 988 status = "okay"; 989}; 990 991&u2phy0 { 992 status = "okay"; 993 994 u2phy0_otg: otg-port { 995 status = "okay"; 996 }; 997 998 u2phy0_host: host-port { 999 phy-supply = <&vcc5v0_otg>; 1000 status = "okay"; 1001 }; 1002 1003 port { 1004 u2phy0_typec_hs: endpoint { 1005 remote-endpoint = <&usbc_hs>; 1006 }; 1007 }; 1008}; 1009 1010&u2phy1 { 1011 status = "okay"; 1012 1013 u2phy1_otg: otg-port { 1014 status = "okay"; 1015 }; 1016 1017 u2phy1_host: host-port { 1018 phy-supply = <&vcc5v0_otg>; 1019 status = "okay"; 1020 }; 1021}; 1022 1023&uart0 { 1024 pinctrl-names = "default"; 1025 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; 1026 uart-has-rtscts; 1027 status = "okay"; 1028 1029 bluetooth { 1030 compatible = "brcm,bcm4345c5"; 1031 clocks = <&rk808 1>; 1032 clock-names = "lpo"; 1033 device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>; 1034 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; 1035 max-speed = <1500000>; 1036 pinctrl-names = "default"; 1037 pinctrl-0 = <&bt_host_wake_pin &bt_wake_pin &bt_reset_pin>; 1038 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; 1039 vbat-supply = <&wifi_bat>; 1040 vddio-supply = <&vcc_wl>; 1041 }; 1042}; 1043 1044&uart2 { 1045 status = "okay"; 1046}; 1047 1048&usb_host0_ehci { 1049 status = "okay"; 1050}; 1051 1052&usb_host0_ohci { 1053 status = "okay"; 1054}; 1055 1056&usb_host1_ehci { 1057 status = "okay"; 1058}; 1059 1060&usb_host1_ohci { 1061 status = "okay"; 1062}; 1063 1064&usbdrd3_0 { 1065 status = "okay"; 1066}; 1067 1068&usbdrd_dwc3_0 { 1069 dr_mode = "host"; 1070 status = "okay"; 1071}; 1072 1073&usbdrd3_1 { 1074 status = "okay"; 1075}; 1076 1077&usbdrd_dwc3_1 { 1078 dr_mode = "host"; 1079 status = "okay"; 1080}; 1081 1082&vopb { 1083 status = "okay"; 1084}; 1085 1086&vopb_mmu { 1087 status = "okay"; 1088}; 1089 1090&vopl { 1091 status = "okay"; 1092}; 1093 1094&vopl_mmu { 1095 status = "okay"; 1096}; 1097