1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2// Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd 3 4/dts-v1/; 5#include <dt-bindings/gpio/gpio.h> 6#include <dt-bindings/pinctrl/rockchip.h> 7#include <dt-bindings/input/input.h> 8#include <dt-bindings/display/drm_mipi_dsi.h> 9#include <dt-bindings/sensor-dev.h> 10#include <dt-bindings/pwm/pwm.h> 11#include "dt-bindings/usb/pd.h" 12#include "rk3399pro.dtsi" 13#include "rk3399-android.dtsi" 14#include "rk3399-opp.dtsi" 15#include "rk3399-vop-clk-set.dtsi" 16 17/ { 18 model = "Rockchip RK3399pro evb v11 board"; 19 compatible = "rockchip,rk3399pro-evb-v11", "rockchip,rk3399pro"; 20 21 adc-keys { 22 compatible = "adc-keys"; 23 io-channels = <&saradc 2>; 24 io-channel-names = "buttons"; 25 poll-interval = <100>; 26 keyup-threshold-microvolt = <1800000>; 27 28 esc-key { 29 linux,code = <KEY_ESC>; 30 label = "esc"; 31 press-threshold-microvolt = <1310000>; 32 }; 33 34 menu-key { 35 linux,code = <KEY_MENU>; 36 label = "menu"; 37 press-threshold-microvolt = <987000>; 38 }; 39 40 home-key { 41 linux,code = <KEY_HOME>; 42 label = "home"; 43 press-threshold-microvolt = <624000>; 44 }; 45 46 vol-down-key { 47 linux,code = <KEY_VOLUMEDOWN>; 48 label = "volume down"; 49 press-threshold-microvolt = <300000>; 50 }; 51 52 vol-up-key { 53 linux,code = <KEY_VOLUMEUP>; 54 label = "volume up"; 55 press-threshold-microvolt = <17000>; 56 }; 57 }; 58 59 backlight: backlight { 60 compatible = "pwm-backlight"; 61 pwms = <&pwm0 0 25000 0>; 62 brightness-levels = < 63 0 20 20 21 21 22 22 23 64 23 24 24 25 25 26 26 27 65 27 28 28 29 29 30 30 31 66 31 32 32 33 33 34 34 35 67 35 36 36 37 37 38 38 39 68 40 41 42 43 44 45 46 47 69 48 49 50 51 52 53 54 55 70 56 57 58 59 60 61 62 63 71 64 65 66 67 68 69 70 71 72 72 73 74 75 76 77 78 79 73 80 81 82 83 84 85 86 87 74 88 89 90 91 92 93 94 95 75 96 97 98 99 100 101 102 103 76 104 105 106 107 108 109 110 111 77 112 113 114 115 116 117 118 119 78 120 121 122 123 124 125 126 127 79 128 129 130 131 132 133 134 135 80 136 137 138 139 140 141 142 143 81 144 145 146 147 148 149 150 151 82 152 153 154 155 156 157 158 159 83 160 161 162 163 164 165 166 167 84 168 169 170 171 172 173 174 175 85 176 177 178 179 180 181 182 183 86 184 185 186 187 188 189 190 191 87 192 193 194 195 196 197 198 199 88 200 201 202 203 204 205 206 207 89 208 209 210 211 212 213 214 215 90 216 217 218 219 220 221 222 223 91 224 225 226 227 228 229 230 231 92 232 233 234 235 236 237 238 239 93 240 241 242 243 244 245 246 247 94 248 249 250 251 252 253 254 255 95 >; 96 default-brightness-level = <200>; 97 enable-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; 98 }; 99 100 clkin_gmac: external-gmac-clock { 101 compatible = "fixed-clock"; 102 clock-frequency = <125000000>; 103 clock-output-names = "clkin_gmac"; 104 #clock-cells = <0>; 105 }; 106 107 hdmi_sound: hdmi-sound { 108 status = "okay"; 109 compatible = "simple-audio-card"; 110 simple-audio-card,format = "i2s"; 111 simple-audio-card,mclk-fs = <256>; 112 simple-audio-card,name = "rockchip,hdmi"; 113 114 simple-audio-card,cpu { 115 sound-dai = <&i2s2>; 116 }; 117 simple-audio-card,codec { 118 sound-dai = <&hdmi>; 119 }; 120 }; 121 122 panel: panel { 123 compatible = "simple-panel"; 124 backlight = <&backlight>; 125 enable-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>; 126 prepare-delay-ms = <20>; 127 enable-delay-ms = <20>; 128 reset-delay-ms = <20>; 129 130 display-timings { 131 native-mode = <&timing0>; 132 133 timing0: timing0 { 134 clock-frequency = <200000000>; 135 hactive = <1536>; 136 vactive = <2048>; 137 hfront-porch = <12>; 138 hsync-len = <16>; 139 hback-porch = <48>; 140 vfront-porch = <8>; 141 vsync-len = <4>; 142 vback-porch = <8>; 143 hsync-active = <0>; 144 vsync-active = <0>; 145 de-active = <0>; 146 pixelclk-active = <0>; 147 }; 148 }; 149 150 ports { 151 panel_in: endpoint { 152 remote-endpoint = <&edp_out>; 153 }; 154 }; 155 }; 156 157 rk809-sound { 158 compatible = "simple-audio-card"; 159 simple-audio-card,format = "i2s"; 160 simple-audio-card,name = "rockchip,rk809-codec"; 161 simple-audio-card,mclk-fs = <256>; 162 simple-audio-card,widgets = 163 "Microphone", "Mic Jack", 164 "Headphone", "Headphone Jack"; 165 simple-audio-card,routing = 166 "Mic Jack", "MICBIAS1", 167 "IN1P", "Mic Jack", 168 "Headphone Jack", "HPOL", 169 "Headphone Jack", "HPOR"; 170 simple-audio-card,cpu { 171 sound-dai = <&i2s1>; 172 }; 173 simple-audio-card,codec { 174 sound-dai = <&rk809_codec>; 175 }; 176 }; 177 178 rk_headset: rk-headset { 179 compatible = "rockchip_headset"; 180 headset_gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; 181 pinctrl-names = "default"; 182 pinctrl-0 = <&hp_det>; 183 io-channels = <&saradc 3>; 184 }; 185 186 sdio_pwrseq: sdio-pwrseq { 187 compatible = "mmc-pwrseq-simple"; 188 clocks = <&rk809 1>; 189 clock-names = "ext_clock"; 190 pinctrl-names = "default"; 191 pinctrl-0 = <&wifi_enable_h>; 192 193 /* 194 * On the module itself this is one of these (depending 195 * on the actual card populated): 196 * - SDIO_RESET_L_WL_REG_ON 197 * - PDN (power down when low) 198 */ 199 reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; 200 }; 201 202 vbus_typec: vbus-typec-regulator { 203 compatible = "regulator-fixed"; 204 enable-active-high; 205 gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>; 206 pinctrl-names = "default"; 207 pinctrl-0 = <&vcc5v0_typec0_en>; 208 regulator-name = "vbus_typec"; 209 vin-supply = <&vcc5v0_sys>; 210 }; 211 212 vcc_phy: vcc-phy-regulator { 213 compatible = "regulator-fixed"; 214 regulator-name = "vcc_phy"; 215 regulator-always-on; 216 regulator-boot-on; 217 }; 218 219 vcc5v0_sys: vccsys { 220 compatible = "regulator-fixed"; 221 regulator-name = "vcc5v0_sys"; 222 regulator-always-on; 223 regulator-boot-on; 224 regulator-min-microvolt = <5000000>; 225 regulator-max-microvolt = <5000000>; 226 }; 227 228 wireless-wlan { 229 compatible = "wlan-platdata"; 230 rockchip,grf = <&grf>; 231 wifi_chip_type = "ap6398s"; 232 sdio_vref = <1800>; 233 WIFI,host_wake_irq = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>; 234 status = "okay"; 235 }; 236 237 wireless-bluetooth { 238 compatible = "bluetooth-platdata"; 239 clocks = <&rk809 1>; 240 clock-names = "ext_clock"; 241 uart_rts_gpios = <&gpio2 RK_PC3 GPIO_ACTIVE_LOW>; 242 pinctrl-names = "default", "rts_gpio"; 243 pinctrl-0 = <&uart0_rts>, <&bt_irq_gpio>; 244 pinctrl-1 = <&uart0_gpios>; 245 BT,reset_gpio = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; 246 BT,wake_gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; 247 BT,wake_host_irq = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; 248 status = "okay"; 249 }; 250}; 251 252&cdn_dp { 253 status = "okay"; 254 phys = <&tcphy0_dp>; 255}; 256 257&cpu_l0 { 258 cpu-supply = <&vdd_cpu_l>; 259}; 260 261&cpu_l1 { 262 cpu-supply = <&vdd_cpu_l>; 263}; 264 265&cpu_l2 { 266 cpu-supply = <&vdd_cpu_l>; 267}; 268 269&cpu_l3 { 270 cpu-supply = <&vdd_cpu_l>; 271}; 272 273&cpu_b0 { 274 cpu-supply = <&vdd_cpu_b>; 275}; 276 277&cpu_b1 { 278 cpu-supply = <&vdd_cpu_b>; 279}; 280 281&dmc { 282 status = "okay"; 283 center-supply = <&vdd_center>; 284}; 285 286&dp_in_vopb { 287 status = "disabled"; 288}; 289 290&edp { 291 status = "okay"; 292 force-hpd; 293 294 ports { 295 port@1 { 296 reg = <1>; 297 298 edp_out: endpoint { 299 remote-endpoint = <&panel_in>; 300 }; 301 }; 302 }; 303}; 304 305&edp_in_vopl { 306 status = "disabled"; 307}; 308 309&emmc_phy { 310 status = "okay"; 311}; 312 313&fiq_debugger { 314 pinctrl-0 = <&uart2a_xfer>; 315}; 316 317&gmac { 318 phy-supply = <&vcc_phy>; 319 phy-mode = "rgmii"; 320 clock_in_out = "input"; 321 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; 322 snps,reset-active-low; 323 snps,reset-delays-us = <0 10000 50000>; 324 assigned-clocks = <&cru SCLK_RMII_SRC>; 325 assigned-clock-parents = <&clkin_gmac>; 326 pinctrl-names = "default"; 327 pinctrl-0 = <&rgmii_pins>; 328 tx_delay = <0x28>; 329 rx_delay = <0x11>; 330 status = "okay"; 331}; 332 333&gpu { 334 status = "okay"; 335 mali-supply = <&vdd_gpu>; 336}; 337 338&hdmi { 339 status = "okay"; 340 #sound-dai-cells = <0>; 341 rockchip,phy-table = 342 <74250000 0x8009 0x0004 0x0272>, 343 <165000000 0x802b 0x0004 0x0209>, 344 <297000000 0x8039 0x0005 0x028d>, 345 <594000000 0x8039 0x0000 0x00f6>, 346 <000000000 0x0000 0x0000 0x0000>; 347}; 348 349&hdmi_dp_sound { 350 status = "okay"; 351}; 352 353&hdmi_in_vopb { 354 status = "disabled"; 355}; 356 357&i2s2 { 358 #sound-dai-cells = <0>; 359 status = "okay"; 360}; 361 362&i2c0 { 363 status = "okay"; 364 i2c-scl-rising-time-ns = <180>; 365 i2c-scl-falling-time-ns = <30>; 366 clock-frequency = <400000>; 367 368 rk809: pmic@20 { 369 compatible = "rockchip,rk809"; 370 reg = <0x20>; 371 interrupt-parent = <&gpio1>; 372 interrupts = <RK_PC2 IRQ_TYPE_LEVEL_LOW>; 373 pinctrl-names = "default", "pmic-sleep", 374 "pmic-power-off", "pmic-reset"; 375 pinctrl-0 = <&pmic_int_l>; 376 pinctrl-1 = <&soc_slppin_slp>, <&rk809_slppin_slp>; 377 pinctrl-2 = <&soc_slppin_gpio>, <&rk809_slppin_pwrdn>; 378 pinctrl-3 = <&soc_slppin_gpio>,<&rk809_slppin_null>; 379 rockchip,system-power-controller; 380 pmic-reset-func = <0>; 381 wakeup-source; 382 #clock-cells = <1>; 383 clock-output-names = "rk808-clkout1", "rk808-clkout2"; 384 385 vcc1-supply = <&vcc5v0_sys>; 386 vcc2-supply = <&vcc5v0_sys>; 387 vcc3-supply = <&vcc5v0_sys>; 388 vcc4-supply = <&vcc5v0_sys>; 389 vcc5-supply = <&vcc_buck5>; 390 vcc6-supply = <&vcc_buck5>; 391 vcc7-supply = <&vcc3v3_sys>; 392 vcc8-supply = <&vcc3v3_sys>; 393 vcc9-supply = <&vcc5v0_sys>; 394 395 pwrkey { 396 status = "okay"; 397 }; 398 399 rtc { 400 status = "okay"; 401 }; 402 403 pinctrl_rk8xx: pinctrl_rk8xx { 404 gpio-controller; 405 #gpio-cells = <2>; 406 407 rk809_slppin_null: rk809_slppin_null { 408 pins = "gpio_slp"; 409 function = "pin_fun0"; 410 }; 411 412 rk809_slppin_slp: rk809_slppin_slp { 413 pins = "gpio_slp"; 414 function = "pin_fun1"; 415 }; 416 417 rk809_slppin_pwrdn: rk809_slppin_pwrdn { 418 pins = "gpio_slp"; 419 function = "pin_fun2"; 420 }; 421 422 rk809_slppin_rst: rk809_slppin_rst { 423 pins = "gpio_slp"; 424 function = "pin_fun3"; 425 }; 426 }; 427 428 regulators { 429 vdd_center: DCDC_REG1 { 430 regulator-always-on; 431 regulator-boot-on; 432 regulator-min-microvolt = <750000>; 433 regulator-max-microvolt = <1350000>; 434 regulator-initial-mode = <0x2>; 435 regulator-name = "vdd_center"; 436 regulator-state-mem { 437 regulator-off-in-suspend; 438 regulator-suspend-microvolt = <900000>; 439 }; 440 }; 441 442 vdd_cpu_l: DCDC_REG2 { 443 regulator-always-on; 444 regulator-boot-on; 445 regulator-min-microvolt = <750000>; 446 regulator-max-microvolt = <1350000>; 447 regulator-ramp-delay = <6001>; 448 regulator-initial-mode = <0x2>; 449 regulator-name = "vdd_cpu_l"; 450 regulator-state-mem { 451 regulator-off-in-suspend; 452 }; 453 }; 454 455 vcc_ddr: DCDC_REG3 { 456 regulator-always-on; 457 regulator-boot-on; 458 regulator-name = "vcc_ddr"; 459 regulator-initial-mode = <0x2>; 460 regulator-state-mem { 461 regulator-on-in-suspend; 462 }; 463 }; 464 465 vcc3v3_sys: DCDC_REG4 { 466 regulator-always-on; 467 regulator-boot-on; 468 regulator-min-microvolt = <3300000>; 469 regulator-max-microvolt = <3300000>; 470 regulator-initial-mode = <0x2>; 471 regulator-name = "vcc3v3_sys"; 472 regulator-state-mem { 473 regulator-on-in-suspend; 474 regulator-suspend-microvolt = <3300000>; 475 }; 476 }; 477 478 vcc_buck5: DCDC_REG5 { 479 regulator-always-on; 480 regulator-boot-on; 481 regulator-min-microvolt = <2200000>; 482 regulator-max-microvolt = <2200000>; 483 regulator-name = "vcc_buck5"; 484 regulator-state-mem { 485 regulator-on-in-suspend; 486 regulator-suspend-microvolt = <2200000>; 487 }; 488 }; 489 490 vcca_0v9: LDO_REG1 { 491 regulator-always-on; 492 regulator-boot-on; 493 regulator-min-microvolt = <900000>; 494 regulator-max-microvolt = <900000>; 495 regulator-name = "vcca_0v9"; 496 regulator-state-mem { 497 regulator-off-in-suspend; 498 }; 499 }; 500 501 vcc_1v8: LDO_REG2 { 502 regulator-always-on; 503 regulator-boot-on; 504 regulator-min-microvolt = <1800000>; 505 regulator-max-microvolt = <1800000>; 506 507 regulator-name = "vcc_1v8"; 508 regulator-state-mem { 509 regulator-on-in-suspend; 510 regulator-suspend-microvolt = <1800000>; 511 }; 512 }; 513 514 vcc0v9_soc: LDO_REG3 { 515 regulator-always-on; 516 regulator-boot-on; 517 regulator-min-microvolt = <900000>; 518 regulator-max-microvolt = <900000>; 519 520 regulator-name = "vcc0v9_soc"; 521 regulator-state-mem { 522 regulator-on-in-suspend; 523 regulator-suspend-microvolt = <900000>; 524 }; 525 }; 526 527 vcca_1v8: LDO_REG4 { 528 regulator-always-on; 529 regulator-boot-on; 530 regulator-min-microvolt = <1800000>; 531 regulator-max-microvolt = <1800000>; 532 533 regulator-name = "vcca_1v8"; 534 regulator-state-mem { 535 regulator-off-in-suspend; 536 }; 537 }; 538 539 vdd1v5_dvp: LDO_REG5 { 540 regulator-always-on; 541 regulator-boot-on; 542 regulator-min-microvolt = <1500000>; 543 regulator-max-microvolt = <1500000>; 544 545 regulator-name = "vdd1v5_dvp"; 546 regulator-state-mem { 547 regulator-off-in-suspend; 548 }; 549 }; 550 551 vcc_1v5: LDO_REG6 { 552 regulator-always-on; 553 regulator-boot-on; 554 regulator-min-microvolt = <1500000>; 555 regulator-max-microvolt = <1500000>; 556 557 regulator-name = "vcc_1v5"; 558 regulator-state-mem { 559 regulator-off-in-suspend; 560 }; 561 }; 562 563 vcc_3v0: LDO_REG7 { 564 regulator-always-on; 565 regulator-boot-on; 566 regulator-min-microvolt = <3000000>; 567 regulator-max-microvolt = <3000000>; 568 569 regulator-name = "vcc_3v0"; 570 regulator-state-mem { 571 regulator-off-in-suspend; 572 }; 573 }; 574 575 vccio_sd: LDO_REG8 { 576 regulator-always-on; 577 regulator-boot-on; 578 regulator-min-microvolt = <1800000>; 579 regulator-max-microvolt = <3300000>; 580 581 regulator-name = "vccio_sd"; 582 regulator-state-mem { 583 regulator-off-in-suspend; 584 }; 585 }; 586 587 vcc_sd: LDO_REG9 { 588 regulator-always-on; 589 regulator-boot-on; 590 regulator-min-microvolt = <3300000>; 591 regulator-max-microvolt = <3300000>; 592 593 regulator-name = "vcc_sd"; 594 regulator-state-mem { 595 regulator-off-in-suspend; 596 }; 597 }; 598 599 vcc5v0_usb: SWITCH_REG1 { 600 regulator-always-on; 601 regulator-boot-on; 602 regulator-name = "vcc5v0_usb"; 603 regulator-state-mem { 604 regulator-on-in-suspend; 605 }; 606 }; 607 608 vccio_3v3: SWITCH_REG2 { 609 regulator-always-on; 610 regulator-boot-on; 611 regulator-name = "vccio_3v3"; 612 regulator-state-mem { 613 regulator-off-in-suspend; 614 }; 615 }; 616 }; 617 618 rk809_codec: codec { 619 #sound-dai-cells = <0>; 620 compatible = "rockchip,rk809-codec", "rockchip,rk817-codec"; 621 clocks = <&cru SCLK_I2S_8CH_OUT>; 622 clock-names = "mclk"; 623 pinctrl-names = "default"; 624 pinctrl-0 = <&i2s_8ch_mclk>; 625 hp-volume = <20>; 626 spk-volume = <3>; 627 status = "okay"; 628 }; 629 }; 630 631 vdd_cpu_b: tcs4525@1c { 632 compatible = "tcs,tcs4525"; 633 reg = <0x1c>; 634 vin-supply = <&vcc5v0_sys>; 635 regulator-compatible = "fan53555-reg"; 636 pinctrl-0 = <&vsel1_gpio>; 637 vsel-gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>; 638 regulator-name = "vdd_cpu_b"; 639 regulator-min-microvolt = <712500>; 640 regulator-max-microvolt = <1500000>; 641 regulator-ramp-delay = <2300>; 642 fcs,suspend-voltage-selector = <1>; 643 regulator-always-on; 644 regulator-boot-on; 645 regulator-initial-state = <3>; 646 regulator-state-mem { 647 regulator-off-in-suspend; 648 }; 649 }; 650 651 vdd_gpu: tcs4526@10 { 652 compatible = "tcs,tcs4526"; 653 reg = <0x10>; 654 vin-supply = <&vcc5v0_sys>; 655 regulator-compatible = "fan53555-reg"; 656 pinctrl-0 = <&vsel2_gpio>; 657 vsel-gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>; 658 regulator-name = "vdd_gpu"; 659 regulator-min-microvolt = <735000>; 660 regulator-max-microvolt = <1400000>; 661 regulator-ramp-delay = <2300>; 662 fcs,suspend-voltage-selector = <1>; 663 regulator-always-on; 664 regulator-boot-on; 665 regulator-initial-state = <3>; 666 regulator-state-mem { 667 regulator-off-in-suspend; 668 }; 669 }; 670 671 bq25700: bq25700@6b { 672 compatible = "ti,bq25703"; 673 reg = <0x6b>; 674 interrupt-parent = <&gpio1>; 675 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>; 676 pinctrl-names = "default"; 677 pinctrl-0 = <&charger_ok_int>; 678 ti,charge-current = <1500000>; 679 ti,max-charge-voltage = <8704000>; 680 ti,max-input-voltage = <20000000>; 681 ti,max-input-current = <6000000>; 682 ti,input-current-sdp = <500000>; 683 ti,input-current-dcp = <2000000>; 684 ti,input-current-cdp = <2000000>; 685 ti,input-current-dc = <2000000>; 686 ti,minimum-sys-voltage = <6700000>; 687 ti,otg-voltage = <5000000>; 688 ti,otg-current = <500000>; 689 ti,input-current = <500000>; 690 pd-charge-only = <0>; 691 status = "disabled"; 692 }; 693}; 694 695&i2c1 { 696 status = "okay"; 697 i2c-scl-rising-time-ns = <140>; 698 i2c-scl-falling-time-ns = <30>; 699 700 mpu6500@68 { 701 status = "okay"; 702 compatible = "invensense,mpu6500"; 703 reg = <0x68>; 704 irq-gpio = <&gpio3 RK_PD2 IRQ_TYPE_EDGE_RISING>; 705 mpu-int_config = <0x10>; 706 mpu-level_shifter = <0>; 707 mpu-orientation = <0 1 0 1 0 0 0 0 1>; 708 orientation-x= <0>; 709 orientation-y= <0>; 710 orientation-z= <1>; 711 mpu-debug = <1>; 712 }; 713 714 sensor@d { 715 status = "okay"; 716 compatible = "ak8963"; 717 reg = <0x0d>; 718 type = <SENSOR_TYPE_COMPASS>; 719 irq-gpio = <&gpio3 RK_PD7 IRQ_TYPE_EDGE_RISING>; 720 irq_enable = <0>; 721 poll_delay_ms = <30>; 722 layout = <3>; 723 }; 724}; 725 726&i2c4 { 727 status = "okay"; 728 i2c-scl-rising-time-ns = <345>; 729 i2c-scl-falling-time-ns = <11>; 730 731 gsl3673: gsl3673@40 { 732 compatible = "GSL,GSL3673"; 733 reg = <0x40>; 734 screen_max_x = <1536>; 735 screen_max_y = <2048>; 736 irq_gpio_number = <&gpio4 RK_PC3 IRQ_TYPE_LEVEL_LOW>; 737 rst_gpio_number = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>; 738 }; 739}; 740 741&i2c8 { 742 status = "okay"; 743 i2c-scl-rising-time-ns = <345>; 744 i2c-scl-falling-time-ns = <11>; 745 clock-frequency = <100000>; 746 747 usbc0: fusb302@22 { 748 compatible = "fcs,fusb302"; 749 reg = <0x22>; 750 interrupt-parent = <&gpio1>; 751 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>; 752 pinctrl-names = "default"; 753 pinctrl-0 = <&usbc0_int>; 754 vbus-supply = <&vbus_typec>; 755 status = "okay"; 756 757 ports { 758 #address-cells = <1>; 759 #size-cells = <0>; 760 761 port@0 { 762 reg = <0>; 763 usbc0_role_sw: endpoint@0 { 764 remote-endpoint = <&dwc3_0_role_switch>; 765 }; 766 }; 767 }; 768 769 usb_con: connector { 770 compatible = "usb-c-connector"; 771 label = "USB-C"; 772 data-role = "dual"; 773 power-role = "dual"; 774 try-power-role = "sink"; 775 op-sink-microwatt = <1000000>; 776 sink-pdos = 777 <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>; 778 source-pdos = 779 <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>; 780 781 ports { 782 #address-cells = <1>; 783 #size-cells = <0>; 784 785 port@0 { 786 reg = <0>; 787 usbc0_orien_sw: endpoint { 788 remote-endpoint = <&tcphy0_orientation_switch>; 789 }; 790 }; 791 }; 792 }; 793 }; 794}; 795 796&i2s1 { 797 status = "okay"; 798 #sound-dai-cells = <0>; 799}; 800 801&io_domains { 802 status = "okay"; 803 bt656-supply = <&vcca_1v8>; 804 audio-supply = <&vcca_1v8>; 805 sdmmc-supply = <&vccio_sd>; 806 gpio1830-supply = <&vcc_3v0>; 807}; 808 809&isp0_mmu { 810 status = "okay"; 811}; 812 813&isp1_mmu { 814 status = "okay"; 815}; 816 817&pcie_phy { 818 status = "disabled"; 819}; 820 821&pcie0 { 822 status = "disabled"; 823}; 824 825&pmu_io_domains { 826 status = "okay"; 827 pmu1830-supply = <&vcc_1v8>; 828}; 829 830&pwm0 { 831 status = "okay"; 832}; 833 834&pwm2 { 835 status = "okay"; 836}; 837 838&rockchip_suspend { 839 status = "okay"; 840 rockchip,sleep-debug-en = <1>; 841 rockchip,sleep-mode-config = < 842 (0 843 | RKPM_SLP_ARMPD 844 | RKPM_SLP_PERILPPD 845 | RKPM_SLP_DDR_RET 846 | RKPM_SLP_PLLPD 847 | RKPM_SLP_CENTER_PD 848 | RKPM_SLP_OSC_DIS 849 | RKPM_SLP_AP_PWROFF 850 ) 851 >; 852 rockchip,wakeup-config = <RKPM_GPIO_WKUP_EN>; 853 rockchip,pwm-regulator-config = <PWM2_REGULATOR_EN>; 854 rockchip,power-ctrl = 855 <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>, 856 <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>; 857}; 858 859&route_edp { 860 status = "okay"; 861}; 862 863&saradc { 864 status = "okay"; 865 vref-supply = <&vcc_1v8>; 866}; 867 868&sdmmc { 869 sd-uhs-sdr12; 870 sd-uhs-sdr25; 871 sd-uhs-sdr50; 872 sd-uhs-sdr104; 873}; 874 875&spi1 { 876 status = "okay"; 877 max-freq = <48000000>; /* spi internal clk, don't modify */ 878 spi_dev@0 { 879 compatible = "rockchip,spidev"; 880 reg = <0>; 881 spi-max-frequency = <12000000>; 882 spi-lsb-first; 883 }; 884}; 885 886&tcphy0 { 887 status = "okay"; 888 orientation-switch; 889 port { 890 #address-cells = <1>; 891 #size-cells = <0>; 892 tcphy0_orientation_switch: endpoint@0 { 893 reg = <0>; 894 remote-endpoint = <&usbc0_orien_sw>; 895 }; 896 }; 897}; 898 899&tcphy1 { 900 status = "okay"; 901}; 902 903&tsadc { 904 rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ 905 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ 906 status = "okay"; 907}; 908 909&u2phy0 { 910 status = "okay"; 911 912 u2phy0_otg: otg-port { 913 status = "okay"; 914 }; 915 916 u2phy0_host: host-port { 917 phy-supply = <&vcc5v0_usb>; 918 status = "okay"; 919 }; 920}; 921 922&u2phy1 { 923 status = "okay"; 924 925 u2phy1_otg: otg-port { 926 status = "okay"; 927 }; 928 929 u2phy1_host: host-port { 930 phy-supply = <&vcc5v0_usb>; 931 status = "okay"; 932 }; 933}; 934 935&uart0 { 936 pinctrl-names = "default"; 937 pinctrl-0 = <&uart0_xfer &uart0_cts>; 938 status = "okay"; 939}; 940 941&usb_host0_ehci { 942 status = "okay"; 943}; 944 945&usb_host1_ehci { 946 status = "okay"; 947}; 948 949&usb_host0_ohci { 950 status = "okay"; 951}; 952 953&usb_host1_ohci { 954 status = "okay"; 955}; 956 957&usbdrd3_0 { 958 status = "okay"; 959}; 960 961&usbdrd3_1 { 962 status = "okay"; 963}; 964 965&usbdrd_dwc3_0 { 966 status = "okay"; 967 usb-role-switch; 968 port { 969 #address-cells = <1>; 970 #size-cells = <0>; 971 dwc3_0_role_switch: endpoint@0 { 972 reg = <0>; 973 remote-endpoint = <&usbc0_role_sw>; 974 }; 975 }; 976}; 977 978&usbdrd_dwc3_1 { 979 status = "okay"; 980}; 981 982&vopb { 983 assigned-clocks = <&cru DCLK_VOP0_DIV>; 984 assigned-clock-parents = <&cru PLL_CPLL>; 985}; 986 987&vopl { 988 assigned-clocks = <&cru DCLK_VOP1_DIV>; 989 assigned-clock-parents = <&cru PLL_VPLL>; 990}; 991 992&pinctrl { 993 pinctrl-names = "default"; 994 pinctrl-0 = <&npu_ref_clk>; 995 996 bq2570 { 997 charger_ok_int: charger-ok-int { 998 rockchip,pins = 999 <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; 1000 }; 1001 }; 1002 1003 headphone { 1004 hp_det: hp-det { 1005 rockchip,pins = 1006 <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>; 1007 }; 1008 }; 1009 1010 lcd_rst { 1011 lcd_rst_gpio: lcd-rst-gpio { 1012 rockchip,pins = 1013 <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; 1014 }; 1015 }; 1016 1017 npu_clk { 1018 npu_ref_clk: npu-ref-clk { 1019 rockchip,pins = 1020 <0 RK_PA2 1 &pcfg_pull_none>; 1021 }; 1022 }; 1023 1024 pmic { 1025 pmic_int_l: pmic-int-l { 1026 rockchip,pins = 1027 <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; 1028 }; 1029 vsel1_gpio: vsel1-gpio { 1030 rockchip,pins = 1031 <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>; 1032 }; 1033 vsel2_gpio: vsel2-gpio { 1034 rockchip,pins = 1035 <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>; 1036 }; 1037 1038 soc_slppin_gpio: soc-slppin-gpio { 1039 rockchip,pins = 1040 <1 RK_PA5 RK_FUNC_GPIO &pcfg_output_low>; 1041 }; 1042 1043 soc_slppin_slp: soc-slppin-slp { 1044 rockchip,pins = 1045 <1 RK_PA5 1 &pcfg_pull_down>; 1046 }; 1047 }; 1048 1049 sdio-pwrseq { 1050 wifi_enable_h: wifi-enable-h { 1051 rockchip,pins = 1052 <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; 1053 }; 1054 }; 1055 1056 sdmmc { 1057 sdmmc_bus1: sdmmc-bus1 { 1058 rockchip,pins = 1059 <4 RK_PB0 1 &pcfg_pull_up_10ma>; 1060 }; 1061 1062 sdmmc_bus4: sdmmc-bus4 { 1063 rockchip,pins = 1064 <4 RK_PB0 1 &pcfg_pull_up_10ma>, 1065 <4 RK_PB1 1 &pcfg_pull_up_10ma>, 1066 <4 RK_PB2 1 &pcfg_pull_up_10ma>, 1067 <4 RK_PB3 1 &pcfg_pull_up_10ma>; 1068 }; 1069 1070 sdmmc_clk: sdmmc-clk { 1071 rockchip,pins = 1072 <4 RK_PB4 1 &pcfg_pull_none_10ma>; 1073 }; 1074 1075 sdmmc_cmd: sdmmc-cmd { 1076 rockchip,pins = 1077 <4 RK_PB5 1 &pcfg_pull_up_10ma>; 1078 }; 1079 }; 1080 1081 tp_irq { 1082 tp_irq_gpio: tp-irq-gpio { 1083 rockchip,pins = 1084 <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; 1085 }; 1086 }; 1087 1088 usb-typec { 1089 usbc0_int: usbc0-int { 1090 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; 1091 }; 1092 1093 vcc5v0_typec0_en: vcc5v0-typec0-en { 1094 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; 1095 }; 1096 }; 1097 1098 wireless-bluetooth { 1099 uart0_gpios: uart0-gpios { 1100 rockchip,pins = 1101 <2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; 1102 }; 1103 1104 bt_irq_gpio: bt-irq-gpio { 1105 rockchip,pins = 1106 <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>; 1107 }; 1108 }; 1109}; 1110