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/leds/common.h> 7#include <dt-bindings/input/input.h> 8#include <dt-bindings/pinctrl/rockchip.h> 9#include "rk3588s.dtsi" 10 11/ { 12 model = "Xunlong Orange Pi 5"; 13 compatible = "xunlong,orangepi-5", "rockchip,rk3588s"; 14 15 aliases { 16 mmc0 = &sdmmc; 17 serial2 = &uart2; 18 }; 19 20 chosen { 21 stdout-path = "serial2:1500000n8"; 22 }; 23 24 adc-keys { 25 compatible = "adc-keys"; 26 io-channels = <&saradc 1>; 27 io-channel-names = "buttons"; 28 keyup-threshold-microvolt = <1800000>; 29 poll-interval = <100>; 30 31 button-recovery { 32 label = "Recovery"; 33 linux,code = <KEY_VENDOR>; 34 press-threshold-microvolt = <1800>; 35 }; 36 }; 37 38 leds { 39 compatible = "gpio-leds"; 40 pinctrl-names = "default"; 41 pinctrl-0 = <&leds_gpio>; 42 43 led-1 { 44 gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; 45 label = "status_led"; 46 linux,default-trigger = "heartbeat"; 47 }; 48 }; 49 50 vbus_typec: vbus-typec-regulator { 51 compatible = "regulator-fixed"; 52 enable-active-high; 53 gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; 54 pinctrl-names = "default"; 55 pinctrl-0 = <&typec5v_pwren>; 56 regulator-name = "vbus_typec"; 57 regulator-min-microvolt = <5000000>; 58 regulator-max-microvolt = <5000000>; 59 vin-supply = <&vcc5v0_sys>; 60 }; 61 62 vcc5v0_sys: vcc5v0-sys-regulator { 63 compatible = "regulator-fixed"; 64 regulator-name = "vcc5v0_sys"; 65 regulator-always-on; 66 regulator-boot-on; 67 regulator-min-microvolt = <5000000>; 68 regulator-max-microvolt = <5000000>; 69 }; 70 71 vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator { 72 compatible = "regulator-fixed"; 73 enable-active-low; 74 gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>; 75 regulator-name = "vcc_3v3_sd_s0"; 76 regulator-boot-on; 77 regulator-min-microvolt = <3300000>; 78 regulator-max-microvolt = <3300000>; 79 vin-supply = <&vcc_3v3_s3>; 80 }; 81 82 vcc3v3_pcie20: vcc3v3-pcie20-regulator { 83 compatible = "regulator-fixed"; 84 enable-active-high; 85 gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; 86 regulator-name = "vcc3v3_pcie20"; 87 regulator-boot-on; 88 regulator-min-microvolt = <1800000>; 89 regulator-max-microvolt = <1800000>; 90 startup-delay-us = <50000>; 91 vin-supply = <&vcc5v0_sys>; 92 }; 93}; 94 95&combphy0_ps { 96 status = "okay"; 97}; 98 99&combphy2_psu { 100 status = "okay"; 101}; 102 103&cpu_b0 { 104 cpu-supply = <&vdd_cpu_big0_s0>; 105}; 106 107&cpu_b1 { 108 cpu-supply = <&vdd_cpu_big0_s0>; 109}; 110 111&cpu_b2 { 112 cpu-supply = <&vdd_cpu_big1_s0>; 113}; 114 115&cpu_b3 { 116 cpu-supply = <&vdd_cpu_big1_s0>; 117}; 118 119&cpu_l0 { 120 cpu-supply = <&vdd_cpu_lit_s0>; 121}; 122 123&cpu_l1 { 124 cpu-supply = <&vdd_cpu_lit_s0>; 125}; 126 127&cpu_l2 { 128 cpu-supply = <&vdd_cpu_lit_s0>; 129}; 130 131&cpu_l3 { 132 cpu-supply = <&vdd_cpu_lit_s0>; 133}; 134 135&gmac1 { 136 clock_in_out = "output"; 137 phy-handle = <&rgmii_phy1>; 138 phy-mode = "rgmii-rxid"; 139 pinctrl-0 = <&gmac1_miim 140 &gmac1_tx_bus2 141 &gmac1_rx_bus2 142 &gmac1_rgmii_clk 143 &gmac1_rgmii_bus>; 144 pinctrl-names = "default"; 145 tx_delay = <0x42>; 146 status = "okay"; 147}; 148 149&i2c0 { 150 pinctrl-names = "default"; 151 pinctrl-0 = <&i2c0m2_xfer>; 152 status = "okay"; 153 154 vdd_cpu_big0_s0: regulator@42 { 155 compatible = "rockchip,rk8602"; 156 reg = <0x42>; 157 fcs,suspend-voltage-selector = <1>; 158 regulator-name = "vdd_cpu_big0_s0"; 159 regulator-always-on; 160 regulator-boot-on; 161 regulator-min-microvolt = <550000>; 162 regulator-max-microvolt = <1050000>; 163 regulator-ramp-delay = <2300>; 164 vin-supply = <&vcc5v0_sys>; 165 166 regulator-state-mem { 167 regulator-off-in-suspend; 168 }; 169 }; 170 171 vdd_cpu_big1_s0: regulator@43 { 172 compatible = "rockchip,rk8603", "rockchip,rk8602"; 173 reg = <0x43>; 174 fcs,suspend-voltage-selector = <1>; 175 regulator-name = "vdd_cpu_big1_s0"; 176 regulator-always-on; 177 regulator-boot-on; 178 regulator-min-microvolt = <550000>; 179 regulator-max-microvolt = <1050000>; 180 regulator-ramp-delay = <2300>; 181 vin-supply = <&vcc5v0_sys>; 182 183 regulator-state-mem { 184 regulator-off-in-suspend; 185 }; 186 }; 187}; 188 189&i2c2 { 190 status = "okay"; 191 192 vdd_npu_s0: regulator@42 { 193 compatible = "rockchip,rk8602"; 194 reg = <0x42>; 195 fcs,suspend-voltage-selector = <1>; 196 regulator-name = "vdd_npu_s0"; 197 regulator-always-on; 198 regulator-boot-on; 199 regulator-min-microvolt = <550000>; 200 regulator-max-microvolt = <950000>; 201 regulator-ramp-delay = <2300>; 202 vin-supply = <&vcc5v0_sys>; 203 204 regulator-state-mem { 205 regulator-off-in-suspend; 206 }; 207 }; 208}; 209 210&i2c6 { 211 pinctrl-names = "default"; 212 pinctrl-0 = <&i2c6m3_xfer>; 213 status = "okay"; 214 215 hym8563: rtc@51 { 216 compatible = "haoyu,hym8563"; 217 reg = <0x51>; 218 #clock-cells = <0>; 219 clock-output-names = "hym8563"; 220 pinctrl-names = "default"; 221 pinctrl-0 = <&hym8563_int>; 222 interrupt-parent = <&gpio0>; 223 interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>; 224 wakeup-source; 225 }; 226}; 227 228&mdio1 { 229 rgmii_phy1: ethernet-phy@1 { 230 compatible = "ethernet-phy-ieee802.3-c22"; 231 reg = <0x1>; 232 reset-assert-us = <20000>; 233 reset-deassert-us = <100000>; 234 reset-gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; 235 }; 236}; 237 238&pcie2x1l2 { 239 reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; 240 vpcie3v3-supply = <&vcc3v3_pcie20>; 241 status = "okay"; 242}; 243 244&pinctrl { 245 gpio-func { 246 leds_gpio: leds-gpio { 247 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 248 }; 249 }; 250 251 hym8563 { 252 hym8563_int: hym8563-int { 253 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; 254 }; 255 }; 256 257 usb-typec { 258 usbc0_int: usbc0-int { 259 rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; 260 }; 261 262 typec5v_pwren: typec5v-pwren { 263 rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; 264 }; 265 }; 266}; 267 268&saradc { 269 vref-supply = <&avcc_1v8_s0>; 270 status = "okay"; 271}; 272 273&sdmmc { 274 bus-width = <4>; 275 cap-sd-highspeed; 276 disable-wp; 277 max-frequency = <150000000>; 278 no-mmc; 279 no-sdio; 280 sd-uhs-sdr104; 281 vmmc-supply = <&vcc_3v3_sd_s0>; 282 vqmmc-supply = <&vccio_sd_s0>; 283 status = "okay"; 284}; 285 286&sfc { 287 pinctrl-names = "default"; 288 pinctrl-0 = <&fspim0_pins>; 289 status = "okay"; 290 291 flash@0 { 292 compatible = "jedec,spi-nor"; 293 reg = <0x0>; 294 spi-max-frequency = <100000000>; 295 spi-rx-bus-width = <4>; 296 spi-tx-bus-width = <1>; 297 }; 298}; 299 300&spi2 { 301 status = "okay"; 302 assigned-clocks = <&cru CLK_SPI2>; 303 assigned-clock-rates = <200000000>; 304 num-cs = <1>; 305 pinctrl-names = "default"; 306 pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>; 307 308 pmic@0 { 309 compatible = "rockchip,rk806"; 310 reg = <0x0>; 311 interrupt-parent = <&gpio0>; 312 interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 313 pinctrl-names = "default"; 314 pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>, 315 <&rk806_dvs2_null>, <&rk806_dvs3_null>; 316 spi-max-frequency = <1000000>; 317 318 vcc1-supply = <&vcc5v0_sys>; 319 vcc2-supply = <&vcc5v0_sys>; 320 vcc3-supply = <&vcc5v0_sys>; 321 vcc4-supply = <&vcc5v0_sys>; 322 vcc5-supply = <&vcc5v0_sys>; 323 vcc6-supply = <&vcc5v0_sys>; 324 vcc7-supply = <&vcc5v0_sys>; 325 vcc8-supply = <&vcc5v0_sys>; 326 vcc9-supply = <&vcc5v0_sys>; 327 vcc10-supply = <&vcc5v0_sys>; 328 vcc11-supply = <&vcc_2v0_pldo_s3>; 329 vcc12-supply = <&vcc5v0_sys>; 330 vcc13-supply = <&vcc_1v1_nldo_s3>; 331 vcc14-supply = <&vcc_1v1_nldo_s3>; 332 vcca-supply = <&vcc5v0_sys>; 333 334 gpio-controller; 335 #gpio-cells = <2>; 336 337 rk806_dvs1_null: dvs1-null-pins { 338 pins = "gpio_pwrctrl2"; 339 function = "pin_fun0"; 340 }; 341 342 rk806_dvs2_null: dvs2-null-pins { 343 pins = "gpio_pwrctrl2"; 344 function = "pin_fun0"; 345 }; 346 347 rk806_dvs3_null: dvs3-null-pins { 348 pins = "gpio_pwrctrl3"; 349 function = "pin_fun0"; 350 }; 351 352 regulators { 353 vdd_gpu_s0: dcdc-reg1 { 354 regulator-name = "vdd_gpu_s0"; 355 regulator-boot-on; 356 regulator-min-microvolt = <550000>; 357 regulator-max-microvolt = <950000>; 358 regulator-ramp-delay = <12500>; 359 regulator-enable-ramp-delay = <400>; 360 361 regulator-state-mem { 362 regulator-off-in-suspend; 363 }; 364 }; 365 366 vdd_cpu_lit_s0: dcdc-reg2 { 367 regulator-name = "vdd_cpu_lit_s0"; 368 regulator-always-on; 369 regulator-boot-on; 370 regulator-min-microvolt = <550000>; 371 regulator-max-microvolt = <950000>; 372 regulator-ramp-delay = <12500>; 373 374 regulator-state-mem { 375 regulator-off-in-suspend; 376 }; 377 }; 378 379 vdd_log_s0: dcdc-reg3 { 380 regulator-name = "vdd_log_s0"; 381 regulator-always-on; 382 regulator-boot-on; 383 regulator-min-microvolt = <675000>; 384 regulator-max-microvolt = <750000>; 385 regulator-ramp-delay = <12500>; 386 387 regulator-state-mem { 388 regulator-off-in-suspend; 389 regulator-suspend-microvolt = <750000>; 390 }; 391 }; 392 393 vdd_vdenc_s0: dcdc-reg4 { 394 regulator-name = "vdd_vdenc_s0"; 395 regulator-always-on; 396 regulator-boot-on; 397 regulator-min-microvolt = <550000>; 398 regulator-max-microvolt = <950000>; 399 regulator-ramp-delay = <12500>; 400 401 regulator-state-mem { 402 regulator-off-in-suspend; 403 }; 404 }; 405 406 vdd_ddr_s0: dcdc-reg5 { 407 regulator-name = "vdd_ddr_s0"; 408 regulator-always-on; 409 regulator-boot-on; 410 regulator-min-microvolt = <675000>; 411 regulator-max-microvolt = <900000>; 412 regulator-ramp-delay = <12500>; 413 414 regulator-state-mem { 415 regulator-off-in-suspend; 416 regulator-suspend-microvolt = <850000>; 417 }; 418 }; 419 420 vcc_1v1_nldo_s3: vdd2_ddr_s3: dcdc-reg6 { 421 regulator-name = "vdd2_ddr_s3"; 422 regulator-always-on; 423 regulator-boot-on; 424 regulator-max-microvolt = <1100000>; 425 regulator-min-microvolt = <1100000>; 426 427 regulator-state-mem { 428 regulator-on-in-suspend; 429 }; 430 }; 431 432 vcc_2v0_pldo_s3: dcdc-reg7 { 433 regulator-name = "vdd_2v0_pldo_s3"; 434 regulator-always-on; 435 regulator-boot-on; 436 regulator-min-microvolt = <2000000>; 437 regulator-max-microvolt = <2000000>; 438 regulator-ramp-delay = <12500>; 439 440 regulator-state-mem { 441 regulator-on-in-suspend; 442 regulator-suspend-microvolt = <2000000>; 443 }; 444 }; 445 446 vcc_3v3_s3: dcdc-reg8 { 447 regulator-name = "vcc_3v3_s3"; 448 regulator-always-on; 449 regulator-boot-on; 450 regulator-min-microvolt = <3300000>; 451 regulator-max-microvolt = <3300000>; 452 453 regulator-state-mem { 454 regulator-on-in-suspend; 455 regulator-suspend-microvolt = <3300000>; 456 }; 457 }; 458 459 vddq_ddr_s0: dcdc-reg9 { 460 regulator-name = "vddq_ddr_s0"; 461 regulator-always-on; 462 regulator-boot-on; 463 464 regulator-state-mem { 465 regulator-off-in-suspend; 466 }; 467 }; 468 469 vcc_1v8_s3: dcdc-reg10 { 470 regulator-name = "vcc_1v8_s3"; 471 regulator-always-on; 472 regulator-boot-on; 473 regulator-min-microvolt = <1800000>; 474 regulator-max-microvolt = <1800000>; 475 476 regulator-state-mem { 477 regulator-on-in-suspend; 478 regulator-suspend-microvolt = <1800000>; 479 }; 480 }; 481 482 avcc_1v8_s0: pldo-reg1 { 483 regulator-name = "avcc_1v8_s0"; 484 regulator-always-on; 485 regulator-boot-on; 486 regulator-min-microvolt = <1800000>; 487 regulator-max-microvolt = <1800000>; 488 489 regulator-state-mem { 490 regulator-off-in-suspend; 491 }; 492 }; 493 494 vcc_1v8_s0: pldo-reg2 { 495 regulator-name = "vcc_1v8_s0"; 496 regulator-always-on; 497 regulator-boot-on; 498 regulator-min-microvolt = <1800000>; 499 regulator-max-microvolt = <1800000>; 500 501 regulator-state-mem { 502 regulator-off-in-suspend; 503 regulator-suspend-microvolt = <1800000>; 504 }; 505 }; 506 507 avdd_1v2_s0: pldo-reg3 { 508 regulator-name = "avdd_1v2_s0"; 509 regulator-always-on; 510 regulator-boot-on; 511 regulator-min-microvolt = <1200000>; 512 regulator-max-microvolt = <1200000>; 513 514 regulator-state-mem { 515 regulator-off-in-suspend; 516 }; 517 }; 518 519 vcc_3v3_s0: pldo-reg4 { 520 regulator-name = "vcc_3v3_s0"; 521 regulator-always-on; 522 regulator-boot-on; 523 regulator-min-microvolt = <3300000>; 524 regulator-max-microvolt = <3300000>; 525 regulator-ramp-delay = <12500>; 526 527 regulator-state-mem { 528 regulator-off-in-suspend; 529 }; 530 }; 531 532 vccio_sd_s0: pldo-reg5 { 533 regulator-name = "vccio_sd_s0"; 534 regulator-always-on; 535 regulator-boot-on; 536 regulator-min-microvolt = <1800000>; 537 regulator-max-microvolt = <3300000>; 538 regulator-ramp-delay = <12500>; 539 540 regulator-state-mem { 541 regulator-off-in-suspend; 542 }; 543 }; 544 545 pldo6_s3: pldo-reg6 { 546 regulator-name = "pldo6_s3"; 547 regulator-always-on; 548 regulator-boot-on; 549 regulator-min-microvolt = <1800000>; 550 regulator-max-microvolt = <1800000>; 551 552 regulator-state-mem { 553 regulator-on-in-suspend; 554 regulator-suspend-microvolt = <1800000>; 555 }; 556 }; 557 558 vdd_0v75_s3: nldo-reg1 { 559 regulator-name = "vdd_0v75_s3"; 560 regulator-always-on; 561 regulator-boot-on; 562 regulator-min-microvolt = <750000>; 563 regulator-max-microvolt = <750000>; 564 565 regulator-state-mem { 566 regulator-on-in-suspend; 567 regulator-suspend-microvolt = <750000>; 568 }; 569 }; 570 571 vdd_ddr_pll_s0: nldo-reg2 { 572 regulator-name = "vdd_ddr_pll_s0"; 573 regulator-always-on; 574 regulator-boot-on; 575 regulator-min-microvolt = <850000>; 576 regulator-max-microvolt = <850000>; 577 578 regulator-state-mem { 579 regulator-off-in-suspend; 580 regulator-suspend-microvolt = <850000>; 581 }; 582 }; 583 584 avdd_0v75_s0: nldo-reg3 { 585 regulator-name = "avdd_0v75_s0"; 586 regulator-always-on; 587 regulator-boot-on; 588 regulator-min-microvolt = <750000>; 589 regulator-max-microvolt = <750000>; 590 591 regulator-state-mem { 592 regulator-off-in-suspend; 593 }; 594 }; 595 596 vdd_0v85_s0: nldo-reg4 { 597 regulator-name = "vdd_0v85_s0"; 598 regulator-always-on; 599 regulator-boot-on; 600 regulator-min-microvolt = <850000>; 601 regulator-max-microvolt = <850000>; 602 603 regulator-state-mem { 604 regulator-off-in-suspend; 605 }; 606 }; 607 608 vdd_0v75_s0: nldo-reg5 { 609 regulator-name = "vdd_0v75_s0"; 610 regulator-always-on; 611 regulator-boot-on; 612 regulator-min-microvolt = <750000>; 613 regulator-max-microvolt = <750000>; 614 615 regulator-state-mem { 616 regulator-off-in-suspend; 617 }; 618 }; 619 }; 620 }; 621}; 622 623&tsadc { 624 status = "okay"; 625}; 626 627&u2phy2 { 628 status = "okay"; 629}; 630 631&u2phy2_host { 632 status = "okay"; 633}; 634 635&u2phy3 { 636 status = "okay"; 637}; 638 639&u2phy3_host { 640 status = "okay"; 641}; 642 643&uart2 { 644 pinctrl-0 = <&uart2m0_xfer>; 645 status = "okay"; 646}; 647 648&usb_host0_ehci { 649 status = "okay"; 650}; 651 652&usb_host0_ohci { 653 status = "okay"; 654}; 655 656&usb_host1_ehci { 657 status = "okay"; 658}; 659 660&usb_host1_ohci { 661 status = "okay"; 662}; 663