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