1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 3 /dts-v1/; 4 5 #include <dt-bindings/gpio/gpio.h> 6 #include <dt-bindings/input/linux-event-codes. 7 #include <dt-bindings/leds/common.h> 8 #include <dt-bindings/pinctrl/rockchip.h> 9 #include <dt-bindings/soc/rockchip,vop2.h> 10 #include "rk3566.dtsi" 11 12 / { 13 chassis-type = "handset"; 14 15 chosen: chosen { 16 stdout-path = "serial2:1500000 17 }; 18 19 adc_keys: adc-keys { 20 compatible = "adc-keys"; 21 io-channels = <&saradc 0>; 22 io-channel-names = "buttons"; 23 keyup-threshold-microvolt = <1 24 poll-interval = <60>; 25 26 /* 27 * Button is mapped to F key i 28 * according to input guidelin 29 */ 30 button-mode { 31 label = "MODE"; 32 linux,code = <BTN_MODE 33 press-threshold-microv 34 }; 35 }; 36 37 gpio_keys_control: gpio-keys-control { 38 compatible = "gpio-keys"; 39 pinctrl-0 = <&btn_pins_ctrl>; 40 pinctrl-names = "default"; 41 42 button-b { 43 gpios = <&gpio3 RK_PC3 44 label = "SOUTH"; 45 linux,code = <BTN_SOUT 46 }; 47 48 button-down { 49 gpios = <&gpio3 RK_PA4 50 label = "DPAD-DOWN"; 51 linux,code = <BTN_DPAD 52 }; 53 54 button-l1 { 55 gpios = <&gpio3 RK_PB1 56 label = "TL"; 57 linux,code = <BTN_TL>; 58 }; 59 60 button-l2 { 61 gpios = <&gpio3 RK_PB2 62 label = "TL2"; 63 linux,code = <BTN_TL2> 64 }; 65 66 button-select { 67 gpios = <&gpio3 RK_PB6 68 label = "SELECT"; 69 linux,code = <BTN_SELE 70 }; 71 72 button-start { 73 gpios = <&gpio3 RK_PB5 74 label = "START"; 75 linux,code = <BTN_STAR 76 }; 77 78 button-up { 79 gpios = <&gpio3 RK_PA3 80 label = "DPAD-UP"; 81 linux,code = <BTN_DPAD 82 }; 83 84 button-x { 85 gpios = <&gpio3 RK_PC0 86 label = "NORTH"; 87 linux,code = <BTN_NORT 88 }; 89 }; 90 91 gpio_keys_vol: gpio-keys-vol { 92 compatible = "gpio-keys"; 93 autorepeat; 94 pinctrl-0 = <&btn_pins_vol>; 95 pinctrl-names = "default"; 96 97 button-vol-down { 98 gpios = <&gpio3 RK_PB0 99 label = "VOLUMEDOWN"; 100 linux,code = <KEY_VOLU 101 }; 102 103 button-vol-up { 104 gpios = <&gpio3 RK_PA7 105 label = "VOLUMEUP"; 106 linux,code = <KEY_VOLU 107 }; 108 }; 109 110 hdmi-con { 111 compatible = "hdmi-connector"; 112 ddc-i2c-bus = <&i2c5>; 113 type = "c"; 114 115 port { 116 hdmi_con_in: endpoint 117 remote-endpoin 118 }; 119 }; 120 }; 121 122 leds: pwm-leds { 123 compatible = "pwm-leds"; 124 125 green_led: led-0 { 126 color = <LED_COLOR_ID_ 127 default-state = "on"; 128 function = LED_FUNCTIO 129 max-brightness = <255> 130 pwms = <&pwm6 0 25000 131 }; 132 133 amber_led: led-1 { 134 color = <LED_COLOR_ID_ 135 function = LED_FUNCTIO 136 max-brightness = <255> 137 pwms = <&pwm7 0 25000 138 }; 139 140 red_led: led-2 { 141 color = <LED_COLOR_ID_ 142 default-state = "off"; 143 function = LED_FUNCTIO 144 max-brightness = <255> 145 pwms = <&pwm0 0 25000 146 }; 147 }; 148 149 sdio_pwrseq: sdio-pwrseq { 150 compatible = "mmc-pwrseq-simpl 151 clocks = <&rk817 1>; 152 clock-names = "ext_clock"; 153 pinctrl-0 = <&wifi_enable_h>; 154 pinctrl-names = "default"; 155 post-power-on-delay-ms = <200> 156 reset-gpios = <&gpio4 RK_PA2 G 157 }; 158 159 vcc3v3_lcd0_n: regulator-vcc3v3-lcd0 { 160 compatible = "regulator-fixed" 161 gpio = <&gpio0 RK_PC2 GPIO_ACT 162 enable-active-high; 163 pinctrl-0 = <&vcc_lcd_h>; 164 pinctrl-names = "default"; 165 regulator-boot-on; 166 regulator-min-microvolt = <330 167 regulator-max-microvolt = <330 168 regulator-name = "vcc3v3_lcd0_ 169 vin-supply = <&vcc_3v3>; 170 regulator-state-mem { 171 regulator-off-in-suspe 172 }; 173 }; 174 175 vcc_sys: regulator-vcc-sys { 176 compatible = "regulator-fixed" 177 regulator-always-on; 178 regulator-boot-on; 179 regulator-min-microvolt = <380 180 regulator-max-microvolt = <380 181 regulator-name = "vcc_sys"; 182 }; 183 184 vcc_wifi: regulator-vcc-wifi { 185 compatible = "regulator-fixed" 186 enable-active-high; 187 gpio = <&gpio0 RK_PA0 GPIO_ACT 188 pinctrl-0 = <&vcc_wifi_h>; 189 pinctrl-names = "default"; 190 regulator-always-on; 191 regulator-boot-on; 192 regulator-min-microvolt = <330 193 regulator-max-microvolt = <330 194 regulator-name = "vcc_wifi"; 195 }; 196 197 vibrator: pwm-vibrator { 198 compatible = "pwm-vibrator"; 199 pwm-names = "enable"; 200 pwms = <&pwm5 0 1000000000 0>; 201 }; 202 }; 203 204 &combphy1 { 205 status = "okay"; 206 }; 207 208 &cpu0 { 209 cpu-supply = <&vdd_cpu>; 210 }; 211 212 &cpu1 { 213 cpu-supply = <&vdd_cpu>; 214 }; 215 216 &cpu2 { 217 cpu-supply = <&vdd_cpu>; 218 }; 219 220 &cpu3 { 221 cpu-supply = <&vdd_cpu>; 222 }; 223 224 &gpu { 225 mali-supply = <&vdd_gpu>; 226 status = "okay"; 227 }; 228 229 &hdmi { 230 ddc-i2c-bus = <&i2c5>; 231 pinctrl-0 = <&hdmitxm0_cec>; 232 pinctrl-names = "default"; 233 status = "okay"; 234 }; 235 236 &hdmi_in { 237 hdmi_in_vp0: endpoint { 238 remote-endpoint = <&vp0_out_hd 239 }; 240 }; 241 242 &hdmi_out { 243 hdmi_out_con: endpoint { 244 remote-endpoint = <&hdmi_con_i 245 }; 246 }; 247 248 &hdmi_sound { 249 status = "okay"; 250 }; 251 252 &i2c0 { 253 status = "okay"; 254 255 rk817: pmic@20 { 256 compatible = "rockchip,rk817"; 257 reg = <0x20>; 258 interrupt-parent = <&gpio0>; 259 interrupts = <RK_PA3 IRQ_TYPE_ 260 clock-output-names = "rk808-cl 261 clock-names = "mclk"; 262 clocks = <&cru I2S1_MCLKOUT_TX 263 assigned-clocks = <&cru I2S1_M 264 assigned-clock-parents = <&cru 265 #clock-cells = <1>; 266 #sound-dai-cells = <0>; 267 pinctrl-names = "default"; 268 pinctrl-0 = <&i2s1m0_mclk>, <& 269 wakeup-source; 270 271 vcc1-supply = <&vcc_sys>; 272 vcc2-supply = <&vcc_sys>; 273 vcc3-supply = <&vcc_sys>; 274 vcc4-supply = <&vcc_sys>; 275 vcc5-supply = <&vcc_sys>; 276 vcc6-supply = <&vcc_sys>; 277 vcc7-supply = <&vcc_sys>; 278 vcc8-supply = <&vcc_sys>; 279 vcc9-supply = <&dcdc_boost>; 280 281 regulators { 282 vdd_logic: DCDC_REG1 { 283 regulator-alwa 284 regulator-boot 285 regulator-min- 286 regulator-max- 287 regulator-ramp 288 regulator-init 289 regulator-name 290 regulator-stat 291 regula 292 regula 293 }; 294 }; 295 296 vdd_gpu: DCDC_REG2 { 297 regulator-alwa 298 regulator-boot 299 regulator-min- 300 regulator-max- 301 regulator-ramp 302 regulator-init 303 regulator-name 304 regulator-stat 305 regula 306 }; 307 }; 308 309 vcc_ddr: DCDC_REG3 { 310 regulator-alwa 311 regulator-boot 312 regulator-init 313 regulator-name 314 regulator-stat 315 regula 316 }; 317 }; 318 319 vcc_3v3: DCDC_REG4 { 320 regulator-alwa 321 regulator-boot 322 regulator-min- 323 regulator-max- 324 regulator-init 325 regulator-name 326 regulator-stat 327 regula 328 regula 329 }; 330 }; 331 332 vcca1v8_pmu: LDO_REG1 333 regulator-alwa 334 regulator-boot 335 regulator-min- 336 regulator-max- 337 regulator-name 338 regulator-stat 339 regula 340 regula 341 }; 342 }; 343 344 vdda_0v9: LDO_REG2 { 345 regulator-alwa 346 regulator-boot 347 regulator-min- 348 regulator-max- 349 regulator-name 350 regulator-stat 351 regula 352 }; 353 }; 354 355 vdda0v9_pmu: LDO_REG3 356 regulator-alwa 357 regulator-boot 358 regulator-min- 359 regulator-max- 360 regulator-name 361 regulator-stat 362 regula 363 regula 364 }; 365 }; 366 367 vccio_acodec: LDO_REG4 368 regulator-alwa 369 regulator-boot 370 regulator-min- 371 regulator-max- 372 regulator-name 373 regulator-stat 374 regula 375 }; 376 }; 377 378 vccio_sd: LDO_REG5 { 379 regulator-alwa 380 regulator-boot 381 regulator-min- 382 regulator-max- 383 regulator-name 384 regulator-stat 385 regula 386 }; 387 }; 388 389 vcc3v3_pmu: LDO_REG6 { 390 regulator-alwa 391 regulator-boot 392 regulator-min- 393 regulator-max- 394 regulator-name 395 regulator-stat 396 regula 397 regula 398 }; 399 }; 400 401 vcc_1v8: LDO_REG7 { 402 regulator-alwa 403 regulator-boot 404 regulator-min- 405 regulator-max- 406 regulator-name 407 regulator-stat 408 regula 409 }; 410 }; 411 412 vcc1v8_dvp: LDO_REG8 { 413 regulator-alwa 414 regulator-boot 415 regulator-min- 416 regulator-max- 417 regulator-name 418 regulator-stat 419 regula 420 }; 421 }; 422 423 vcc2v8_dvp: LDO_REG9 { 424 regulator-alwa 425 regulator-boot 426 regulator-min- 427 regulator-max- 428 regulator-name 429 regulator-stat 430 regula 431 }; 432 }; 433 434 dcdc_boost: BOOST { 435 regulator-alwa 436 regulator-boot 437 regulator-min- 438 regulator-max- 439 regulator-name 440 regulator-stat 441 regula 442 }; 443 }; 444 445 otg_switch: OTG_SWITCH 446 regulator-name 447 regulator-stat 448 regula 449 }; 450 }; 451 }; 452 }; 453 454 vdd_cpu: regulator@40 { 455 compatible = "fcs,fan53555"; 456 reg = <0x40>; 457 fcs,suspend-voltage-selector = 458 regulator-always-on; 459 regulator-boot-on; 460 regulator-min-microvolt = <712 461 regulator-max-microvolt = <139 462 regulator-name = "vdd_cpu"; 463 regulator-ramp-delay = <2300>; 464 vin-supply = <&vcc_sys>; 465 regulator-state-mem { 466 regulator-off-in-suspe 467 }; 468 }; 469 }; 470 471 &i2c1 { 472 /* Unknown/unused device at 0x3c */ 473 status = "disabled"; 474 }; 475 476 &i2c5 { 477 pinctrl-0 = <&i2c5m1_xfer>; 478 pinctrl-names = "default"; 479 status = "okay"; 480 }; 481 482 &i2s0_8ch { 483 status = "okay"; 484 }; 485 486 &i2s1_8ch { 487 pinctrl-0 = <&i2s1m0_sclktx 488 &i2s1m0_lrcktx 489 &i2s1m0_sdi0 490 &i2s1m0_sdo0>; 491 pinctrl-names = "default"; 492 rockchip,trcm-sync-tx-only; 493 status = "okay"; 494 }; 495 496 &pinctrl { 497 gpio-btns { 498 btn_pins_ctrl: btn-pins-ctrl { 499 rockchip,pins = 500 <3 RK_PA1 RK_F 501 <3 RK_PA2 RK_F 502 <3 RK_PA3 RK_F 503 <3 RK_PA4 RK_F 504 <3 RK_PA5 RK_F 505 <3 RK_PA6 RK_F 506 <3 RK_PB1 RK_F 507 <3 RK_PB2 RK_F 508 <3 RK_PB3 RK_F 509 <3 RK_PB4 RK_F 510 <3 RK_PB5 RK_F 511 <3 RK_PB6 RK_F 512 <3 RK_PC0 RK_F 513 <3 RK_PC1 RK_F 514 <3 RK_PC2 RK_F 515 <3 RK_PC3 RK_F 516 }; 517 518 btn_pins_vol: btn-pins-vol { 519 rockchip,pins = 520 <3 RK_PA7 RK_FUNC_GPIO 521 <3 RK_PB0 RK_FUNC_GPIO 522 }; 523 }; 524 525 joy-mux { 526 joy_mux_en: joy-mux-en { 527 rockchip,pins = 528 <0 RK_PB5 RK_F 529 }; 530 }; 531 532 pmic { 533 pmic_int_l: pmic-int-l { 534 rockchip,pins = 535 <0 RK_PA3 RK_F 536 }; 537 }; 538 539 sdio-pwrseq { 540 wifi_enable_h: wifi-enable-h { 541 rockchip,pins = 542 <4 RK_PA2 RK_F 543 }; 544 }; 545 546 vcc3v3-lcd { 547 vcc_lcd_h: vcc-lcd-h { 548 rockchip,pins = 549 <0 RK_PC2 RK_F 550 }; 551 }; 552 553 vcc-wifi { 554 vcc_wifi_h: vcc-wifi-h { 555 rockchip,pins = 556 <0 RK_PA0 RK_F 557 }; 558 }; 559 }; 560 561 &pmu_io_domains { 562 status = "okay"; 563 pmuio1-supply = <&vcc3v3_pmu>; 564 pmuio2-supply = <&vcc3v3_pmu>; 565 vccio1-supply = <&vccio_acodec>; 566 vccio3-supply = <&vccio_sd>; 567 vccio4-supply = <&vcc_1v8>; 568 vccio5-supply = <&vcc_3v3>; 569 vccio6-supply = <&vcc1v8_dvp>; 570 vccio7-supply = <&vcc_3v3>; 571 }; 572 573 &pwm0 { 574 pinctrl-0 = <&pwm0m1_pins>; 575 pinctrl-names = "default"; 576 status = "okay"; 577 }; 578 579 &pwm5 { 580 status = "okay"; 581 }; 582 583 &pwm6 { 584 status = "okay"; 585 }; 586 587 &pwm7 { 588 status = "okay"; 589 }; 590 591 &saradc { 592 vref-supply = <&vcc_1v8>; 593 status = "okay"; 594 }; 595 596 &sdmmc0 { 597 bus-width = <4>; 598 cap-sd-highspeed; 599 cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_ 600 disable-wp; 601 pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk 602 pinctrl-names = "default"; 603 sd-uhs-sdr104; 604 vmmc-supply = <&vcc_3v3>; 605 vqmmc-supply = <&vccio_sd>; 606 status = "okay"; 607 }; 608 609 &sdmmc1 { 610 bus-width = <4>; 611 cap-sd-highspeed; 612 cd-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_ 613 disable-wp; 614 pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd 615 pinctrl-names = "default"; 616 sd-uhs-sdr104; 617 vmmc-supply = <&vcc_3v3>; 618 vqmmc-supply = <&vcc1v8_dvp>; 619 status = "okay"; 620 }; 621 622 &sdmmc2 { 623 bus-width = <4>; 624 cap-sd-highspeed; 625 cap-sdio-irq; 626 keep-power-in-suspend; 627 mmc-pwrseq = <&sdio_pwrseq>; 628 no-mmc; 629 no-sd; 630 non-removable; 631 pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_ 632 pinctrl-names = "default"; 633 sd-uhs-sdr50; 634 vmmc-supply = <&vcc_wifi>; 635 vqmmc-supply = <&vcca1v8_pmu>; 636 status = "okay"; 637 }; 638 639 &tsadc { 640 rockchip,hw-tshut-mode = <1>; 641 rockchip,hw-tshut-polarity = <0>; 642 status = "okay"; 643 }; 644 645 &uart1 { 646 pinctrl-0 = <&uart1m1_xfer &uart1m1_ct 647 pinctrl-names = "default"; 648 uart-has-rtscts; 649 status = "okay"; 650 651 bluetooth { 652 compatible = "realtek,rtl8821c 653 device-wake-gpios = <&gpio4 4 654 enable-gpios = <&gpio4 3 GPIO_ 655 host-wake-gpios = <&gpio4 5 GP 656 }; 657 }; 658 659 &uart2 { 660 status = "okay"; 661 }; 662 663 /* 664 * Lack the schematics to verify, but port wor 665 * (and not a host or OTG port). 666 */ 667 &usb_host0_xhci { 668 dr_mode = "peripheral"; 669 phys = <&usb2phy0_otg>; 670 phy-names = "usb2-phy"; 671 status = "okay"; 672 }; 673 674 &usb_host1_ehci { 675 status = "okay"; 676 }; 677 678 &usb_host1_ohci { 679 status = "okay"; 680 }; 681 682 &usb_host1_xhci { 683 phy-names = "usb2-phy", "usb3-phy"; 684 phys = <&usb2phy1_host>, <&combphy1 PH 685 status = "okay"; 686 }; 687 688 &usb2phy0 { 689 status = "okay"; 690 }; 691 692 &usb2phy0_otg { 693 status = "okay"; 694 }; 695 696 &usb2phy1 { 697 status = "okay"; 698 }; 699 700 &usb2phy1_host { 701 status = "okay"; 702 }; 703 704 &vop { 705 assigned-clocks = <&cru DCLK_VOP0>, <& 706 assigned-clock-parents = <&pmucru PLL_ 707 status = "okay"; 708 }; 709 710 &vop_mmu { 711 status = "okay"; 712 }; 713 714 &vp0 { 715 vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_E 716 reg = <ROCKCHIP_VOP2_EP_HDMI0> 717 remote-endpoint = <&hdmi_in_vp 718 }; 719 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.