1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2023 Theobroma Systems Design und Consulting GmbH 4 */ 5 6#include <dt-bindings/gpio/gpio.h> 7#include <dt-bindings/leds/common.h> 8#include <dt-bindings/pinctrl/rockchip.h> 9#include "rk3588.dtsi" 10 11/ { 12 compatible = "tsd,rk3588-tiger", "rockchip,rk3588"; 13 14 aliases { 15 mmc0 = &sdhci; 16 rtc0 = &rtc_twi; 17 }; 18 19 emmc_pwrseq: emmc-pwrseq { 20 compatible = "mmc-pwrseq-emmc"; 21 pinctrl-0 = <&emmc_reset>; 22 pinctrl-names = "default"; 23 reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>; 24 }; 25 26 extcon_usb3: extcon-usb3 { 27 compatible = "linux,extcon-usb-gpio"; 28 id-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; 29 pinctrl-names = "default"; 30 pinctrl-0 = <&usb3_id>; 31 status = "disabled"; 32 }; 33 34 leds { 35 compatible = "gpio-leds"; 36 pinctrl-names = "default"; 37 pinctrl-0 = <&module_led_pin>; 38 39 /* Named LED1 on the board */ 40 led-1 { 41 gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>; 42 function = LED_FUNCTION_HEARTBEAT; 43 linux,default-trigger = "heartbeat"; 44 color = <LED_COLOR_ID_AMBER>; 45 }; 46 }; 47 48 /* 49 * 100MHz reference clock for PCIe peripherals from PI6C557-05BLE 50 * clock generator. 51 * The clock output is gated via the OE pin on the clock generator. 52 * This is modeled as a fixed-clock plus a gpio-gate-clock. 53 */ 54 pcie_refclk_gen: pcie-refclk-gen-clock { 55 compatible = "fixed-clock"; 56 #clock-cells = <0>; 57 clock-frequency = <100000000>; 58 }; 59 60 pcie_refclk: pcie-refclk-clock { 61 compatible = "gpio-gate-clock"; 62 clocks = <&pcie_refclk_gen>; 63 #clock-cells = <0>; 64 enable-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; /* PCIE30X4_CLKREQN_M1_L */ 65 }; 66 67 vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator { 68 compatible = "regulator-fixed"; 69 regulator-name = "vcc_1v1_nldo_s3"; 70 regulator-always-on; 71 regulator-boot-on; 72 regulator-min-microvolt = <1100000>; 73 regulator-max-microvolt = <1100000>; 74 vin-supply = <&vcc5v0_sys>; 75 }; 76 77 vcc_1v2_s3: vcc-1v2-s3-regulator { 78 compatible = "regulator-fixed"; 79 regulator-name = "vcc_1v2_s3"; 80 regulator-always-on; 81 regulator-boot-on; 82 regulator-min-microvolt = <1200000>; 83 regulator-max-microvolt = <1200000>; 84 vin-supply = <&vcc5v0_sys>; 85 }; 86 87 vcc5v0_sys: vcc5v0-sys-regulator { 88 compatible = "regulator-fixed"; 89 regulator-name = "vcc5v0_sys"; 90 regulator-always-on; 91 regulator-boot-on; 92 regulator-min-microvolt = <5000000>; 93 regulator-max-microvolt = <5000000>; 94 vin-supply = <&vcc5v0_baseboard>; 95 }; 96}; 97 98&cpu_b0 { 99 cpu-supply = <&vdd_cpu_big0_s0>; 100}; 101 102&cpu_b1 { 103 cpu-supply = <&vdd_cpu_big0_s0>; 104}; 105 106&cpu_b2 { 107 cpu-supply = <&vdd_cpu_big1_s0>; 108}; 109 110&cpu_b3 { 111 cpu-supply = <&vdd_cpu_big1_s0>; 112}; 113 114&cpu_l0 { 115 cpu-supply = <&vdd_cpu_lit_s0>; 116}; 117 118&cpu_l1 { 119 cpu-supply = <&vdd_cpu_lit_s0>; 120}; 121 122&cpu_l2 { 123 cpu-supply = <&vdd_cpu_lit_s0>; 124}; 125 126&cpu_l3 { 127 cpu-supply = <&vdd_cpu_lit_s0>; 128}; 129 130&gmac0 { 131 clock_in_out = "output"; 132 phy-handle = <&rgmii_phy>; 133 phy-mode = "rgmii"; 134 phy-supply = <&vcc_1v2_s3>; 135 pinctrl-names = "default"; 136 pinctrl-0 = <&gmac0_miim 137 &gmac0_rx_bus2 138 &gmac0_tx_bus2 139 &gmac0_rgmii_clk 140 &gmac0_rgmii_bus 141 ð0_pins 142 ð_reset>; 143 tx_delay = <0x10>; 144 rx_delay = <0x10>; 145 snps,reset-gpio = <&gpio4 RK_PC3 GPIO_ACTIVE_LOW>; 146 snps,reset-active-low; 147 snps,reset-delays-us = <0 10000 100000>; 148}; 149 150&gpu { 151 mali-supply = <&vdd_gpu_s0>; 152 status = "okay"; 153}; 154 155&i2c1 { 156 pinctrl-0 = <&i2c1m0_xfer>; 157}; 158 159&i2c1m0_xfer { 160 rockchip,pins = 161 /* i2c1_scl_m0 */ 162 <0 RK_PB5 9 &pcfg_pull_none_drv_level_0>, 163 /* i2c1_sda_m0 */ 164 <0 RK_PB6 9 &pcfg_pull_none_drv_level_0>; 165}; 166 167&i2c2 { 168 pinctrl-0 = <&i2c2m3_xfer>; 169 status = "okay"; 170}; 171 172&i2c2m3_xfer { 173 rockchip,pins = 174 /* i2c2_scl_m3 */ 175 <1 RK_PC5 9 &pcfg_pull_none_drv_level_0>, 176 /* i2c2_sda_m3 */ 177 <1 RK_PC4 9 &pcfg_pull_none_drv_level_0>; 178}; 179 180&i2c3 { 181 pinctrl-0 = <&i2c3m0_xfer>; 182}; 183 184&i2c4 { 185 pinctrl-0 = <&i2c4m4_xfer>; 186 status = "okay"; 187 188 vdd_npu_s0: regulator@42 { 189 compatible = "rockchip,rk8602"; 190 reg = <0x42>; 191 fcs,suspend-voltage-selector = <1>; 192 regulator-name = "vdd_npu_s0"; 193 regulator-always-on; 194 regulator-boot-on; 195 regulator-min-microvolt = <550000>; 196 regulator-max-microvolt = <950000>; 197 regulator-ramp-delay = <2300>; 198 vin-supply = <&vcc5v0_sys>; 199 200 regulator-state-mem { 201 regulator-off-in-suspend; 202 }; 203 }; 204}; 205 206&i2c5 { 207 pinctrl-0 = <&i2c5m1_xfer>; 208}; 209 210&i2c5m1_xfer { 211 rockchip,pins = 212 /* i2c5_scl_m1 */ 213 <4 RK_PB6 9 &pcfg_pull_none_drv_level_0>, 214 /* i2c5_sda_m1 */ 215 <4 RK_PB7 9 &pcfg_pull_none_drv_level_0>; 216}; 217 218&i2c6 { 219 /* 220 * Mule-ATtiny can handle up to Fast mode Plus (1MHz) on I2C bus, 221 * but SOC can handle only up to (400kHz). 222 */ 223 clock-frequency = <400000>; 224 status = "okay"; 225 226 fan@18 { 227 compatible = "ti,amc6821"; 228 reg = <0x18>; 229 }; 230 231 rtc_twi: rtc@6f { 232 compatible = "isil,isl1208"; 233 reg = <0x6f>; 234 }; 235}; 236 237&i2c6m0_xfer { 238 rockchip,pins = 239 /* i2c6_scl_m0 */ 240 <0 RK_PD0 9 &pcfg_pull_none_drv_level_0>, 241 /* i2c6_sda_m0 */ 242 <0 RK_PC7 9 &pcfg_pull_none_drv_level_0>; 243}; 244 245&i2c7 { 246 status = "okay"; 247 248 vdd_cpu_big0_s0: regulator@42 { 249 compatible = "rockchip,rk8602"; 250 reg = <0x42>; 251 fcs,suspend-voltage-selector = <1>; 252 regulator-name = "vdd_cpu_big0_s0"; 253 regulator-always-on; 254 regulator-boot-on; 255 regulator-min-microvolt = <550000>; 256 regulator-max-microvolt = <1050000>; 257 regulator-ramp-delay = <2300>; 258 vin-supply = <&vcc5v0_sys>; 259 260 regulator-state-mem { 261 regulator-off-in-suspend; 262 }; 263 }; 264 265 vdd_cpu_big1_s0: regulator@43 { 266 compatible = "rockchip,rk8603", "rockchip,rk8602"; 267 reg = <0x43>; 268 fcs,suspend-voltage-selector = <1>; 269 regulator-name = "vdd_cpu_big1_s0"; 270 regulator-always-on; 271 regulator-boot-on; 272 regulator-min-microvolt = <550000>; 273 regulator-max-microvolt = <1050000>; 274 regulator-ramp-delay = <2300>; 275 vin-supply = <&vcc5v0_sys>; 276 277 regulator-state-mem { 278 regulator-off-in-suspend; 279 }; 280 }; 281}; 282 283&i2c7m0_xfer { 284 rockchip,pins = 285 /* i2c7_scl_m0 */ 286 <1 RK_PD0 9 &pcfg_pull_none_drv_level_0>, 287 /* i2c7_sda_m0 */ 288 <1 RK_PD1 9 &pcfg_pull_none_drv_level_0>; 289}; 290 291&i2c8 { 292 pinctrl-0 = <&i2c8m2_xfer>; 293}; 294 295&mdio0 { 296 rgmii_phy: ethernet-phy@6 { 297 /* KSZ9031 or KSZ9131 */ 298 compatible = "ethernet-phy-ieee802.3-c22"; 299 reg = <0x6>; 300 clocks = <&cru REFCLKO25M_ETH0_OUT>; 301 }; 302}; 303 304&pcie3x4 { 305 /* 306 * The board has a gpio-controlled "pcie_refclk" generator, 307 * so add it to the list of clocks. 308 */ 309 clocks = <&cru ACLK_PCIE_4L_MSTR>, <&cru ACLK_PCIE_4L_SLV>, 310 <&cru ACLK_PCIE_4L_DBI>, <&cru PCLK_PCIE_4L>, 311 <&cru CLK_PCIE_AUX0>, <&cru CLK_PCIE4L_PIPE>, 312 <&pcie_refclk>; 313 clock-names = "aclk_mst", "aclk_slv", 314 "aclk_dbi", "pclk", 315 "aux", "pipe", 316 "ref"; 317 reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>; 318}; 319 320&pinctrl { 321 emmc { 322 emmc_reset: emmc-reset { 323 rockchip,pins = <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; 324 }; 325 }; 326 327 ethernet { 328 eth_reset: eth-reset { 329 rockchip,pins = <4 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; 330 }; 331 }; 332 333 leds { 334 module_led_pin: module-led-pin { 335 rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; 336 }; 337 }; 338 339 usb3 { 340 usb3_id: usb3-id { 341 rockchip,pins = 342 <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; 343 }; 344 }; 345}; 346 347&pwm0 { 348 pinctrl-0 = <&pwm0m1_pins>; 349 pinctrl-names = "default"; 350}; 351 352&saradc { 353 vref-supply = <&vcc_1v8_s0>; 354 status = "okay"; 355}; 356 357&sdhci { 358 bus-width = <8>; 359 cap-mmc-highspeed; 360 mmc-ddr-1_8v; 361 mmc-hs200-1_8v; 362 mmc-hs400-1_8v; 363 mmc-hs400-enhanced-strobe; 364 mmc-pwrseq = <&emmc_pwrseq>; 365 no-sdio; 366 no-sd; 367 non-removable; 368 pinctrl-names = "default"; 369 pinctrl-0 = <&emmc_bus8 &emmc_cmd &emmc_clk &emmc_data_strobe>; 370 vmmc-supply = <&vcc_3v3_s3>; 371 vqmmc-supply = <&vcc_1v8_s3>; 372 status = "okay"; 373}; 374 375&sdmmc { 376 bus-width = <4>; 377 cap-sd-highspeed; 378 max-frequency = <150000000>; 379 vqmmc-supply = <&vccio_sd_s0>; 380}; 381 382&spi0 { 383 pinctrl-0 = <&spi0m1_cs0 &spi0m1_cs1 &spi0m3_pins>; 384}; 385 386&spi2 { 387 assigned-clocks = <&cru CLK_SPI2>; 388 assigned-clock-rates = <200000000>; 389 num-cs = <1>; 390 pinctrl-names = "default"; 391 pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>; 392 status = "okay"; 393 394 pmic@0 { 395 compatible = "rockchip,rk806"; 396 reg = <0x0>; 397 interrupt-parent = <&gpio0>; 398 interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 399 gpio-controller; 400 #gpio-cells = <2>; 401 pinctrl-names = "default"; 402 pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>, 403 <&rk806_dvs2_null>, <&rk806_dvs3_null>; 404 spi-max-frequency = <1000000>; 405 system-power-controller; 406 vcc1-supply = <&vcc5v0_sys>; 407 vcc2-supply = <&vcc5v0_sys>; 408 vcc3-supply = <&vcc5v0_sys>; 409 vcc4-supply = <&vcc5v0_sys>; 410 vcc5-supply = <&vcc5v0_sys>; 411 vcc6-supply = <&vcc5v0_sys>; 412 vcc7-supply = <&vcc5v0_sys>; 413 vcc8-supply = <&vcc5v0_sys>; 414 vcc9-supply = <&vcc5v0_sys>; 415 vcc10-supply = <&vcc5v0_sys>; 416 vcc11-supply = <&vcc_2v0_pldo_s3>; 417 vcc12-supply = <&vcc5v0_sys>; 418 vcc13-supply = <&vcc_1v1_nldo_s3>; 419 vcc14-supply = <&vcc_1v1_nldo_s3>; 420 vcca-supply = <&vcc5v0_sys>; 421 422 rk806_dvs1_null: dvs1-null-pins { 423 pins = "gpio_pwrctrl1"; 424 function = "pin_fun0"; 425 }; 426 427 rk806_dvs2_null: dvs2-null-pins { 428 pins = "gpio_pwrctrl2"; 429 function = "pin_fun0"; 430 }; 431 432 rk806_dvs3_null: dvs3-null-pins { 433 pins = "gpio_pwrctrl3"; 434 function = "pin_fun0"; 435 }; 436 437 regulators { 438 vdd_gpu_s0: dcdc-reg1 { 439 regulator-boot-on; 440 regulator-min-microvolt = <550000>; 441 regulator-max-microvolt = <950000>; 442 regulator-ramp-delay = <12500>; 443 regulator-name = "vdd_gpu_s0"; 444 regulator-enable-ramp-delay = <400>; 445 446 regulator-state-mem { 447 regulator-off-in-suspend; 448 }; 449 }; 450 451 vdd_cpu_lit_s0: dcdc-reg2 { 452 regulator-name = "vdd_cpu_lit_s0"; 453 regulator-always-on; 454 regulator-boot-on; 455 regulator-min-microvolt = <550000>; 456 regulator-max-microvolt = <950000>; 457 regulator-ramp-delay = <12500>; 458 459 regulator-state-mem { 460 regulator-off-in-suspend; 461 }; 462 }; 463 464 vdd_log_s0: dcdc-reg3 { 465 regulator-name = "vdd_log_s0"; 466 regulator-always-on; 467 regulator-boot-on; 468 regulator-min-microvolt = <675000>; 469 regulator-max-microvolt = <750000>; 470 regulator-ramp-delay = <12500>; 471 472 regulator-state-mem { 473 regulator-off-in-suspend; 474 regulator-suspend-microvolt = <750000>; 475 }; 476 }; 477 478 vdd_vdenc_s0: dcdc-reg4 { 479 regulator-name = "vdd_vdenc_s0"; 480 regulator-always-on; 481 regulator-boot-on; 482 regulator-min-microvolt = <550000>; 483 regulator-max-microvolt = <950000>; 484 regulator-ramp-delay = <12500>; 485 486 regulator-state-mem { 487 regulator-off-in-suspend; 488 }; 489 }; 490 491 vdd_ddr_s0: dcdc-reg5 { 492 regulator-name = "vdd_ddr_s0"; 493 regulator-always-on; 494 regulator-boot-on; 495 regulator-min-microvolt = <675000>; 496 regulator-max-microvolt = <900000>; 497 regulator-ramp-delay = <12500>; 498 499 regulator-state-mem { 500 regulator-off-in-suspend; 501 regulator-suspend-microvolt = <850000>; 502 }; 503 }; 504 505 vdd2_ddr_s3: dcdc-reg6 { 506 regulator-name = "vdd2_ddr_s3"; 507 regulator-always-on; 508 regulator-boot-on; 509 510 regulator-state-mem { 511 regulator-on-in-suspend; 512 }; 513 }; 514 515 vcc_2v0_pldo_s3: dcdc-reg7 { 516 regulator-name = "vcc_2v0_pldo_s3"; 517 regulator-always-on; 518 regulator-boot-on; 519 regulator-min-microvolt = <2000000>; 520 regulator-max-microvolt = <2000000>; 521 regulator-ramp-delay = <12500>; 522 523 regulator-state-mem { 524 regulator-on-in-suspend; 525 regulator-suspend-microvolt = <2000000>; 526 }; 527 }; 528 529 vcc_3v3_s3: dcdc-reg8 { 530 regulator-name = "vcc_3v3_s3"; 531 regulator-always-on; 532 regulator-boot-on; 533 regulator-min-microvolt = <3300000>; 534 regulator-max-microvolt = <3300000>; 535 536 regulator-state-mem { 537 regulator-on-in-suspend; 538 regulator-suspend-microvolt = <3300000>; 539 }; 540 }; 541 542 vddq_ddr_s0: dcdc-reg9 { 543 regulator-name = "vddq_ddr_s0"; 544 regulator-always-on; 545 regulator-boot-on; 546 547 regulator-state-mem { 548 regulator-off-in-suspend; 549 }; 550 }; 551 552 vcc_1v8_s3: dcdc-reg10 { 553 regulator-name = "vcc_1v8_s3"; 554 regulator-always-on; 555 regulator-boot-on; 556 regulator-min-microvolt = <1800000>; 557 regulator-max-microvolt = <1800000>; 558 559 regulator-state-mem { 560 regulator-on-in-suspend; 561 regulator-suspend-microvolt = <1800000>; 562 }; 563 }; 564 565 vcca_1v8_s0: pldo-reg1 { 566 regulator-name = "vcca_1v8_s0"; 567 regulator-always-on; 568 regulator-boot-on; 569 regulator-min-microvolt = <1800000>; 570 regulator-max-microvolt = <1800000>; 571 572 regulator-state-mem { 573 regulator-off-in-suspend; 574 }; 575 }; 576 577 vcc_1v8_s0: pldo-reg2 { 578 regulator-name = "vcc_1v8_s0"; 579 regulator-always-on; 580 regulator-boot-on; 581 regulator-min-microvolt = <1800000>; 582 regulator-max-microvolt = <1800000>; 583 584 regulator-state-mem { 585 regulator-off-in-suspend; 586 regulator-suspend-microvolt = <1800000>; 587 }; 588 }; 589 590 vdda_1v2_s0: pldo-reg3 { 591 regulator-name = "vdda_1v2_s0"; 592 regulator-always-on; 593 regulator-boot-on; 594 regulator-min-microvolt = <1200000>; 595 regulator-max-microvolt = <1200000>; 596 597 regulator-state-mem { 598 regulator-off-in-suspend; 599 }; 600 }; 601 602 vcca_3v3_s0: pldo-reg4 { 603 regulator-name = "vcca_3v3_s0"; 604 regulator-always-on; 605 regulator-boot-on; 606 regulator-min-microvolt = <3300000>; 607 regulator-max-microvolt = <3300000>; 608 regulator-ramp-delay = <12500>; 609 610 regulator-state-mem { 611 regulator-off-in-suspend; 612 }; 613 }; 614 615 vccio_sd_s0: pldo-reg5 { 616 regulator-name = "vccio_sd_s0"; 617 regulator-always-on; 618 regulator-boot-on; 619 regulator-min-microvolt = <1800000>; 620 regulator-max-microvolt = <3300000>; 621 regulator-ramp-delay = <12500>; 622 623 regulator-state-mem { 624 regulator-off-in-suspend; 625 }; 626 }; 627 628 pldo6_s3: pldo-reg6 { 629 regulator-name = "pldo6_s3"; 630 regulator-always-on; 631 regulator-boot-on; 632 regulator-min-microvolt = <1800000>; 633 regulator-max-microvolt = <1800000>; 634 635 regulator-state-mem { 636 regulator-on-in-suspend; 637 regulator-suspend-microvolt = <1800000>; 638 }; 639 }; 640 641 vdd_0v75_s3: nldo-reg1 { 642 regulator-name = "vdd_0v75_s3"; 643 regulator-always-on; 644 regulator-boot-on; 645 regulator-min-microvolt = <750000>; 646 regulator-max-microvolt = <750000>; 647 648 regulator-state-mem { 649 regulator-on-in-suspend; 650 regulator-suspend-microvolt = <750000>; 651 }; 652 }; 653 654 vdda_ddr_pll_s0: nldo-reg2 { 655 regulator-name = "vdda_ddr_pll_s0"; 656 regulator-always-on; 657 regulator-boot-on; 658 regulator-min-microvolt = <850000>; 659 regulator-max-microvolt = <850000>; 660 661 regulator-state-mem { 662 regulator-off-in-suspend; 663 regulator-suspend-microvolt = <850000>; 664 }; 665 }; 666 667 vdda_0v75_s0: nldo-reg3 { 668 regulator-name = "vdda_0v75_s0"; 669 regulator-always-on; 670 regulator-boot-on; 671 regulator-min-microvolt = <750000>; 672 regulator-max-microvolt = <750000>; 673 674 regulator-state-mem { 675 regulator-off-in-suspend; 676 }; 677 }; 678 679 vdda_0v85_s0: nldo-reg4 { 680 regulator-name = "vdda_0v85_s0"; 681 regulator-always-on; 682 regulator-boot-on; 683 regulator-min-microvolt = <850000>; 684 regulator-max-microvolt = <850000>; 685 686 regulator-state-mem { 687 regulator-off-in-suspend; 688 }; 689 }; 690 691 vdd_0v75_s0: nldo-reg5 { 692 regulator-name = "vdd_0v75_s0"; 693 regulator-always-on; 694 regulator-boot-on; 695 regulator-min-microvolt = <750000>; 696 regulator-max-microvolt = <750000>; 697 698 regulator-state-mem { 699 regulator-off-in-suspend; 700 }; 701 }; 702 }; 703 }; 704}; 705 706&tsadc { 707 status = "okay"; 708}; 709 710/* Routed to UART0 on the Q7 connector */ 711&uart2 { 712 pinctrl-0 = <&uart2m2_xfer>; 713}; 714 715/* Mule-ATtiny UPDI */ 716&uart4 { 717 pinctrl-0 = <&uart4m2_xfer>; 718 status = "okay"; 719}; 720