1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /dts-v1/; 3 #include <dt-bindings/pwm/pwm.h> 4 #include <dt-bindings/input/input.h> 5 #include <dt-bindings/interrupt-controller/irq 6 #include "rk3399.dtsi" 7 8 / { 9 model = "Hugsun X99 TV BOX"; 10 compatible = "hugsun,x99", "rockchip,r 11 12 aliases { 13 ethernet0 = &gmac; 14 mmc0 = &sdio0; 15 mmc1 = &sdmmc; 16 mmc2 = &sdhci; 17 }; 18 19 chosen { 20 stdout-path = "serial2:1500000 21 }; 22 23 clkin_gmac: external-gmac-clock { 24 compatible = "fixed-clock"; 25 clock-frequency = <125000000>; 26 clock-output-names = "clkin_gm 27 #clock-cells = <0>; 28 }; 29 30 dc_5v: dc-5v { 31 compatible = "regulator-fixed" 32 regulator-name = "dc_5v"; 33 regulator-always-on; 34 regulator-boot-on; 35 regulator-min-microvolt = <500 36 regulator-max-microvolt = <500 37 }; 38 39 ir-receiver { 40 compatible = "gpio-ir-receiver 41 gpios = <&gpio0 RK_PA6 GPIO_AC 42 pinctrl-names = "default"; 43 pinctrl-0 = <&ir_rx>; 44 }; 45 46 leds { 47 compatible = "gpio-leds"; 48 pinctrl-names = "default"; 49 pinctrl-0 = <&power_led_pin>; 50 51 power_led: led-0 { 52 label = "blue:power"; 53 gpios = <&gpio4 RK_PC2 54 default-state = "on"; 55 linux,default-trigger 56 }; 57 }; 58 59 vcc_sys: vcc-sys { 60 compatible = "regulator-fixed" 61 regulator-name = "vcc_sys"; 62 regulator-min-microvolt = <500 63 regulator-max-microvolt = <500 64 regulator-always-on; 65 vin-supply = <&dc_5v>; 66 }; 67 68 vcc_phy: vcc-phy-regulator { 69 compatible = "regulator-fixed" 70 regulator-name = "vcc_phy"; 71 regulator-always-on; 72 regulator-boot-on; 73 }; 74 75 vcc1v8_s0: vcc1v8-s0 { 76 compatible = "regulator-fixed" 77 regulator-name = "vcc1v8_s0"; 78 regulator-min-microvolt = <180 79 regulator-max-microvolt = <180 80 regulator-always-on; 81 }; 82 83 vcc3v3_sys: vcc3v3-sys { 84 compatible = "regulator-fixed" 85 regulator-name = "vcc3v3_sys"; 86 regulator-min-microvolt = <330 87 regulator-max-microvolt = <330 88 regulator-always-on; 89 vin-supply = <&vcc_sys>; 90 }; 91 92 vcc5v0_host: vcc5v0-host-regulator { 93 compatible = "regulator-fixed" 94 enable-active-high; 95 gpio = <&gpio4 RK_PD2 GPIO_ACT 96 pinctrl-names = "default"; 97 pinctrl-0 = <&host_vbus_drv>; 98 regulator-name = "vcc5v0_host" 99 regulator-always-on; 100 }; 101 102 vcc5v0_typec: vcc5v0-typec-regulator { 103 compatible = "regulator-fixed" 104 enable-active-high; 105 gpio = <&gpio1 RK_PA3 GPIO_ACT 106 pinctrl-names = "default"; 107 pinctrl-0 = <&vcc5v0_typec_en> 108 regulator-name = "vcc5v0_typec 109 regulator-always-on; 110 vin-supply = <&vcc5v0_usb>; 111 }; 112 113 vcc5v0_usb: vcc5v0-usb { 114 compatible = "regulator-fixed" 115 regulator-name = "vcc5v0_usb"; 116 regulator-always-on; 117 regulator-boot-on; 118 regulator-min-microvolt = <500 119 regulator-max-microvolt = <500 120 vin-supply = <&dc_5v>; 121 }; 122 123 vdd_log: vdd-log { 124 compatible = "pwm-regulator"; 125 pwms = <&pwm2 0 25000 1>; 126 pwm-supply = <&vcc_sys>; 127 regulator-name = "vdd_log"; 128 regulator-min-microvolt = <800 129 regulator-max-microvolt = <140 130 regulator-always-on; 131 regulator-boot-on; 132 }; 133 134 sdio_pwrseq: sdio-pwrseq { 135 compatible = "mmc-pwrseq-simpl 136 clocks = <&rk808 1>; 137 clock-names = "ext_clock"; 138 pinctrl-names = "default"; 139 pinctrl-0 = <&wifi_reg_on_h>; 140 reset-gpios = <&gpio0 RK_PB2 G 141 }; 142 143 }; 144 145 &cpu_l0 { 146 cpu-supply = <&vdd_cpu_l>; 147 }; 148 149 &cpu_l1 { 150 cpu-supply = <&vdd_cpu_l>; 151 }; 152 153 &cpu_l2 { 154 cpu-supply = <&vdd_cpu_l>; 155 }; 156 157 &cpu_l3 { 158 cpu-supply = <&vdd_cpu_l>; 159 }; 160 161 &cpu_b0 { 162 cpu-supply = <&vdd_cpu_b>; 163 }; 164 165 &cpu_b1 { 166 cpu-supply = <&vdd_cpu_b>; 167 }; 168 169 &emmc_phy { 170 status = "okay"; 171 }; 172 173 &gmac { 174 assigned-clocks = <&cru SCLK_RMII_SRC> 175 assigned-clock-parents = <&clkin_gmac> 176 clock_in_out = "input"; 177 phy-supply = <&vcc_phy>; 178 phy-mode = "rgmii"; 179 pinctrl-names = "default"; 180 pinctrl-0 = <&rgmii_pins>; 181 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ 182 snps,reset-active-low; 183 snps,reset-delays-us = <0 10000 50000> 184 tx_delay = <0x28>; 185 rx_delay = <0x11>; 186 status = "okay"; 187 }; 188 189 &gpu { 190 status = "okay"; 191 mali-supply = <&vdd_gpu>; 192 }; 193 194 &hdmi { 195 ddc-i2c-bus = <&i2c3>; 196 pinctrl-names = "default"; 197 pinctrl-0 = <&hdmi_cec>; 198 status = "okay"; 199 }; 200 201 &hdmi_sound { 202 status = "okay"; 203 }; 204 205 &i2c0 { 206 status = "okay"; 207 i2c-scl-rising-time-ns = <180>; 208 i2c-scl-falling-time-ns = <30>; 209 clock-frequency = <400000>; 210 211 vdd_cpu_b: syr827@40 { 212 compatible = "silergy,syr827"; 213 reg = <0x40>; 214 regulator-compatible = "fan535 215 pinctrl-0 = <&vsel1_pin>; 216 regulator-name = "vdd_cpu_b"; 217 regulator-min-microvolt = <712 218 regulator-max-microvolt = <150 219 regulator-ramp-delay = <1000>; 220 fcs,suspend-voltage-selector = 221 regulator-always-on; 222 regulator-boot-on; 223 vin-supply = <&vcc_sys>; 224 regulator-state-mem { 225 regulator-off-in-suspe 226 }; 227 }; 228 229 vdd_gpu: syr828@41 { 230 compatible = "silergy,syr828"; 231 reg = <0x41>; 232 regulator-compatible = "fan535 233 pinctrl-0 = <&vsel2_pin>; 234 regulator-name = "vdd_gpu"; 235 regulator-min-microvolt = <712 236 regulator-max-microvolt = <150 237 regulator-ramp-delay = <1000>; 238 fcs,suspend-voltage-selector = 239 regulator-always-on; 240 regulator-boot-on; 241 vin-supply = <&vcc_sys>; 242 regulator-initial-mode = <1>; 243 regulator-state-mem { 244 regulator-off-in-suspe 245 }; 246 }; 247 248 rk808: pmic@1b { 249 compatible = "rockchip,rk808"; 250 reg = <0x1b>; 251 interrupt-parent = <&gpio1>; 252 interrupts = <21 IRQ_TYPE_LEVE 253 pinctrl-names = "default"; 254 pinctrl-0 = <&pmic_int_l>; 255 rockchip,system-power-controll 256 wakeup-source; 257 #clock-cells = <1>; 258 clock-output-names = "xin32k", 259 260 vcc1-supply = <&vcc_sys>; 261 vcc2-supply = <&vcc_sys>; 262 vcc3-supply = <&vcc_sys>; 263 vcc4-supply = <&vcc_sys>; 264 vcc6-supply = <&vcc_sys>; 265 vcc7-supply = <&vcc_sys>; 266 vcc8-supply = <&vcc3v3_sys>; 267 vcc9-supply = <&vcc_sys>; 268 vcc10-supply = <&vcc_sys>; 269 vcc11-supply = <&vcc_sys>; 270 vcc12-supply = <&vcc3v3_sys>; 271 vddio-supply = <&vcc_1v8>; 272 273 regulators { 274 vdd_center: DCDC_REG1 275 regulator-name 276 regulator-min- 277 regulator-max- 278 regulator-ramp 279 regulator-alwa 280 regulator-boot 281 regulator-stat 282 regula 283 }; 284 }; 285 286 vdd_cpu_l: DCDC_REG2 { 287 regulator-name 288 regulator-min- 289 regulator-max- 290 regulator-ramp 291 regulator-alwa 292 regulator-boot 293 regulator-stat 294 regula 295 }; 296 }; 297 298 vcc_ddr: DCDC_REG3 { 299 regulator-name 300 regulator-alwa 301 regulator-boot 302 regulator-stat 303 regula 304 }; 305 }; 306 307 vcc_1v8: DCDC_REG4 { 308 regulator-name 309 regulator-min- 310 regulator-max- 311 regulator-alwa 312 regulator-boot 313 regulator-stat 314 regula 315 regula 316 }; 317 }; 318 319 vcc1v8_dvp: LDO_REG1 { 320 regulator-name 321 regulator-min- 322 regulator-max- 323 regulator-alwa 324 regulator-boot 325 regulator-stat 326 regula 327 regula 328 }; 329 }; 330 331 vcca1v8_hdmi: LDO_REG2 332 regulator-name 333 regulator-min- 334 regulator-max- 335 regulator-alwa 336 regulator-boot 337 regulator-stat 338 regula 339 regula 340 }; 341 }; 342 343 vcca_1v8: LDO_REG3 { 344 regulator-name 345 regulator-min- 346 regulator-max- 347 regulator-alwa 348 regulator-boot 349 regulator-stat 350 regula 351 regula 352 }; 353 }; 354 355 vcc_sd: LDO_REG4 { 356 regulator-name 357 regulator-min- 358 regulator-max- 359 regulator-alwa 360 regulator-boot 361 regulator-stat 362 regula 363 regula 364 }; 365 }; 366 367 vcc3v0_sd: LDO_REG5 { 368 regulator-name 369 regulator-min- 370 regulator-max- 371 regulator-alwa 372 regulator-boot 373 regulator-stat 374 regula 375 regula 376 }; 377 }; 378 379 vcc_1v5: LDO_REG6 { 380 regulator-name 381 regulator-min- 382 regulator-max- 383 regulator-alwa 384 regulator-boot 385 regulator-stat 386 regula 387 regula 388 }; 389 }; 390 391 vcca0v9_hdmi: LDO_REG7 392 regulator-name 393 regulator-min- 394 regulator-max- 395 regulator-alwa 396 regulator-boot 397 regulator-stat 398 regula 399 regula 400 }; 401 }; 402 403 vcc_3v0: LDO_REG8 { 404 regulator-name 405 regulator-min- 406 regulator-max- 407 regulator-alwa 408 regulator-boot 409 regulator-stat 410 regula 411 regula 412 }; 413 }; 414 415 vcc3v3_s3: SWITCH_REG1 416 regulator-name 417 regulator-alwa 418 regulator-boot 419 regulator-stat 420 regula 421 }; 422 }; 423 424 vcc3v3_s0: SWITCH_REG2 425 regulator-name 426 regulator-alwa 427 regulator-boot 428 regulator-stat 429 regula 430 }; 431 }; 432 }; 433 }; 434 }; 435 436 &i2c1 { 437 i2c-scl-rising-time-ns = <300>; 438 i2c-scl-falling-time-ns = <15>; 439 status = "okay"; 440 }; 441 442 &i2c3 { 443 i2c-scl-rising-time-ns = <450>; 444 i2c-scl-falling-time-ns = <15>; 445 status = "okay"; 446 }; 447 448 &i2c4 { 449 i2c-scl-rising-time-ns = <600>; 450 i2c-scl-falling-time-ns = <40>; 451 status = "okay"; 452 453 fusb0: typec-portc@22 { 454 compatible = "fcs,fusb302"; 455 reg = <0x22>; 456 interrupt-parent = <&gpio1>; 457 interrupts = <RK_PA2 IRQ_TYPE_ 458 pinctrl-names = "default"; 459 pinctrl-0 = <&fusb0_int>; 460 vbus-supply = <&vcc5v0_typec>; 461 status = "okay"; 462 }; 463 }; 464 465 &i2c7 { 466 status = "okay"; 467 }; 468 469 &i2s0 { 470 rockchip,playback-channels = <8>; 471 rockchip,capture-channels = <8>; 472 status = "okay"; 473 }; 474 475 &i2s1 { 476 rockchip,playback-channels = <2>; 477 rockchip,capture-channels = <2>; 478 status = "okay"; 479 }; 480 481 &i2s2 { 482 status = "okay"; 483 }; 484 485 &io_domains { 486 status = "okay"; 487 audio-supply = <&vcc1v8_s0>; 488 bt656-supply = <&vcc1v8_s0>; 489 gpio1830-supply = <&vcc_3v0>; 490 sdmmc-supply = <&vcc_sd>; 491 }; 492 493 &pmu_io_domains { 494 status = "okay"; 495 pmu1830-supply = <&vcc_1v8>; 496 }; 497 498 &pinctrl { 499 fusb30x { 500 fusb0_int: fusb0-int { 501 rockchip,pins = 502 <1 RK_PA2 RK_F 503 }; 504 }; 505 506 gmac { 507 rgmii_sleep_pins: rgmii-sleep- 508 rockchip,pins = 509 <3 RK_PB7 RK_F 510 }; 511 }; 512 513 ir { 514 ir_rx: ir-rx { 515 rockchip,pins = <0 RK_ 516 }; 517 }; 518 519 leds { 520 power_led_pin: power-led-pin { 521 rockchip,pins = <4 RK_ 522 }; 523 }; 524 525 pmic { 526 pmic_int_l: pmic-int-l { 527 rockchip,pins = 528 <1 RK_PC5 RK_F 529 }; 530 531 vsel1_pin: vsel1-pin { 532 rockchip,pins = 533 <1 RK_PC1 RK_F 534 }; 535 536 vsel2_pin: vsel2-pin { 537 rockchip,pins = 538 <1 RK_PB6 RK_F 539 }; 540 }; 541 542 sdio { 543 bt_host_wake_l: bt-host-wake-l 544 rockchip,pins = <0 RK_ 545 }; 546 547 bt_reg_on_h: bt-reg-on-h { 548 /* external pullup to 549 rockchip,pins = <0 RK_ 550 }; 551 552 bt_wake_l: bt-wake-l { 553 rockchip,pins = <2 RK_ 554 }; 555 556 wifi_reg_on_h: wifi-reg_on-h { 557 rockchip,pins = <0 RK_ 558 }; 559 }; 560 561 wifi { 562 wifi_host_wake_l: wifi-host-wa 563 rockchip,pins = <0 RK_ 564 }; 565 }; 566 567 usb-typec { 568 vcc5v0_typec_en: vcc5v0_typec_ 569 rockchip,pins = <1 RK_ 570 }; 571 }; 572 573 usb2 { 574 host_vbus_drv: host-vbus-drv { 575 rockchip,pins = 576 <4 RK_PD2 RK_F 577 }; 578 }; 579 }; 580 581 &pwm2 { 582 status = "okay"; 583 pinctrl-0 = <&pwm2_pin_pull_down>; 584 }; 585 586 &saradc { 587 vref-supply = <&vcc1v8_s0>; 588 status = "okay"; 589 }; 590 591 &sdmmc { 592 clock-frequency = <150000000>; 593 max-frequency = <150000000>; 594 bus-width = <4>; 595 cap-mmc-highspeed; 596 cap-sd-highspeed; 597 disable-wp; 598 vqmmc-supply = <&vcc_sd>; 599 pinctrl-names = "default"; 600 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sd 601 card-detect-delay = <800>; 602 status = "okay"; 603 }; 604 605 &sdhci { 606 bus-width = <8>; 607 mmc-hs400-1_8v; 608 mmc-hs400-enhanced-strobe; 609 non-removable; 610 keep-power-in-suspend; 611 status = "okay"; 612 }; 613 614 &sdio0 { 615 bus-width = <4>; 616 clock-frequency = <50000000>; 617 cap-sdio-irq; 618 cap-sd-highspeed; 619 keep-power-in-suspend; 620 mmc-pwrseq = <&sdio_pwrseq>; 621 non-removable; 622 pinctrl-names = "default"; 623 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &s 624 sd-uhs-sdr104; 625 #address-cells = <1>; 626 #size-cells = <0>; 627 status = "okay"; 628 629 brcmf: wifi@1 { 630 compatible = "brcm,bcm4329-fma 631 reg = <1>; 632 interrupt-parent = <&gpio0>; 633 interrupts = <RK_PA3 IRQ_TYPE_ 634 interrupt-names = "host-wake"; 635 pinctrl-names = "default"; 636 pinctrl-0 = <&wifi_host_wake_l 637 }; 638 }; 639 640 &spdif { 641 status = "okay"; 642 pinctrl-0 = <&spdif_bus_1>; 643 }; 644 645 &spi1 { 646 status = "okay"; 647 648 flash@0 { 649 compatible = "jedec,spi-nor"; 650 #address-cells = <1>; 651 #size-cells = <1>; 652 reg = <0>; 653 spi-max-frequency = <10000000> 654 }; 655 }; 656 657 &tcphy0 { 658 status = "okay"; 659 }; 660 661 &tcphy1 { 662 status = "okay"; 663 }; 664 665 &tsadc { 666 /* tshut mode 0:CRU 1:GPIO */ 667 rockchip,hw-tshut-mode = <1>; 668 /* tshut polarity 0:LOW 1:HIGH */ 669 rockchip,hw-tshut-polarity = <1>; 670 rockchip,hw-tshut-temp = <110000>; 671 status = "okay"; 672 }; 673 674 &u2phy0 { 675 status = "okay"; 676 677 u2phy0_host: host-port { 678 phy-supply = <&vcc5v0_typec>; 679 status = "okay"; 680 }; 681 682 u2phy0_otg: otg-port { 683 status = "okay"; 684 }; 685 }; 686 687 &u2phy1 { 688 status = "okay"; 689 690 u2phy1_host: host-port { 691 phy-supply = <&vcc5v0_host>; 692 status = "okay"; 693 }; 694 695 u2phy1_otg: otg-port { 696 status = "okay"; 697 }; 698 }; 699 700 &uart0 { 701 pinctrl-names = "default"; 702 pinctrl-0 = <&uart0_xfer &uart0_rts &u 703 status = "okay"; 704 705 bluetooth { 706 compatible = "brcm,bcm43438-bt 707 clocks = <&rk808 1>; 708 clock-names = "ext_clock"; 709 device-wakeup-gpios = <&gpio2 710 host-wakeup-gpios = <&gpio0 RK 711 shutdown-gpios = <&gpio0 RK_PB 712 max-speed = <4000000>; 713 pinctrl-names = "default"; 714 pinctrl-0 = <&bt_reg_on_h &bt_ 715 vbat-supply = <&vcc3v3_sys>; 716 vddio-supply = <&vcc_1v8>; 717 }; 718 }; 719 720 &uart2 { 721 status = "okay"; 722 }; 723 724 &usb_host0_ehci { 725 status = "okay"; 726 }; 727 728 &usb_host0_ohci { 729 status = "okay"; 730 }; 731 732 &usb_host1_ehci { 733 status = "okay"; 734 }; 735 736 &usb_host1_ohci { 737 status = "okay"; 738 }; 739 740 &usbdrd3_0 { 741 status = "okay"; 742 }; 743 744 &usbdrd_dwc3_0 { 745 status = "okay"; 746 dr_mode = "host"; 747 }; 748 749 &usbdrd3_1 { 750 status = "okay"; 751 }; 752 753 &usbdrd_dwc3_1 { 754 status = "okay"; 755 dr_mode = "host"; 756 }; 757 758 &vopb { 759 status = "okay"; 760 }; 761 762 &vopb_mmu { 763 status = "okay"; 764 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.