1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 * Copyright (c) 2025 John Clark <inindev@gmail.com> 5 */ 6 7/dts-v1/; 8 9#include <dt-bindings/gpio/gpio.h> 10#include <dt-bindings/leds/common.h> 11#include <dt-bindings/pinctrl/rockchip.h> 12#include <dt-bindings/soc/rockchip,vop2.h> 13#include "rk3576.dtsi" 14 15/ { 16 model = "Luckfox Core3576 Module"; 17 compatible = "luckfox,core3576","rockchip,rk3576"; 18 19 aliases { 20 mmc0 = &sdhci; 21 }; 22 23 chosen { 24 stdout-path = "serial0:1500000n8"; 25 }; 26 27 hdmi-con { 28 compatible = "hdmi-connector"; 29 hdmi-pwr-supply = <&vcc_5v0_hdmi>; 30 type = "a"; 31 32 port { 33 hdmi_con_in: endpoint { 34 remote-endpoint = <&hdmi_out_con>; 35 }; 36 }; 37 }; 38 39 vbus_5v0_typec: regulator-vbus-5v0-typec { 40 compatible = "regulator-fixed"; 41 enable-active-high; 42 gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; 43 pinctrl-names = "default"; 44 pinctrl-0 = <&usb_otg0_pwr_en>; 45 regulator-min-microvolt = <5000000>; 46 regulator-max-microvolt = <5000000>; 47 regulator-name = "vbus5v0_typec"; 48 vin-supply = <&vcc_5v0_device>; 49 50 regulator-state-mem { 51 regulator-off-in-suspend; 52 }; 53 }; 54 55 vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 { 56 compatible = "regulator-fixed"; 57 regulator-always-on; 58 regulator-boot-on; 59 regulator-min-microvolt = <1100000>; 60 regulator-max-microvolt = <1100000>; 61 regulator-name = "vcc_1v1_nldo_s3"; 62 vin-supply = <&vcc_5v0_sys>; 63 64 regulator-state-mem { 65 regulator-on-in-suspend; 66 }; 67 }; 68 69 vcc_2v0_pldo_s3: regulator-vcc-2v0-pldo-s3 { 70 compatible = "regulator-fixed"; 71 regulator-always-on; 72 regulator-boot-on; 73 regulator-min-microvolt = <2000000>; 74 regulator-max-microvolt = <2000000>; 75 regulator-name = "vcc_2v0_pldo_s3"; 76 vin-supply = <&vcc_5v0_sys>; 77 78 regulator-state-mem { 79 regulator-on-in-suspend; 80 }; 81 }; 82 83 vcc_3v3_pcie: regulator-vcc-3v3-pcie { 84 compatible = "regulator-fixed"; 85 enable-active-high; 86 gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>; 87 pinctrl-names = "default"; 88 pinctrl-0 = <&pcie_pwr_en>; 89 regulator-min-microvolt = <3300000>; 90 regulator-max-microvolt = <3300000>; 91 regulator-name = "vcc_3v3_pcie"; 92 startup-delay-us = <1000>; 93 vin-supply = <&vcc_5v0_sys>; 94 95 regulator-state-mem { 96 regulator-off-in-suspend; 97 }; 98 }; 99 100 vcc_3v3_rtc_s5: regulator-vcc-3v3-rtc-s5 { 101 compatible = "regulator-fixed"; 102 regulator-always-on; 103 regulator-boot-on; 104 regulator-min-microvolt = <3300000>; 105 regulator-max-microvolt = <3300000>; 106 regulator-name = "vcc_3v3_rtc_s5"; 107 vin-supply = <&vcc_5v0_sys>; 108 109 regulator-state-mem { 110 regulator-on-in-suspend; 111 }; 112 }; 113 114 vcc_5v0_dcin: regulator-vcc-5v0-dcin { 115 compatible = "regulator-fixed"; 116 regulator-always-on; 117 regulator-boot-on; 118 regulator-min-microvolt = <5000000>; 119 regulator-max-microvolt = <5000000>; 120 regulator-name = "vcc_5v0_dcin"; 121 122 regulator-state-mem { 123 regulator-on-in-suspend; 124 }; 125 }; 126 127 vcc_5v0_device: regulator-vcc-5v0-device { 128 compatible = "regulator-fixed"; 129 regulator-always-on; 130 regulator-boot-on; 131 regulator-min-microvolt = <5000000>; 132 regulator-max-microvolt = <5000000>; 133 regulator-name = "vcc_5v0_device"; 134 vin-supply = <&vcc_5v0_dcin>; 135 136 regulator-state-mem { 137 regulator-off-in-suspend; 138 }; 139 }; 140 141 vcc_5v0_hdmi: regulator-vcc-5v0-hdmi { 142 compatible = "regulator-fixed"; 143 enable-active-high; 144 gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>; 145 pinctrl-names = "default"; 146 pinctrl-0 = <&hdmi_con_en>; 147 regulator-min-microvolt = <5000000>; 148 regulator-max-microvolt = <5000000>; 149 regulator-name = "vcc_5v0_hdmi"; 150 vin-supply = <&vcc_5v0_sys>; 151 152 regulator-state-mem { 153 regulator-off-in-suspend; 154 }; 155 }; 156 157 vcc_5v0_host: regulator-vcc-5v0-host { 158 compatible = "regulator-fixed"; 159 enable-active-high; 160 gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; 161 pinctrl-names = "default"; 162 pinctrl-0 = <&usb_host_pwr_en>; 163 regulator-min-microvolt = <5000000>; 164 regulator-max-microvolt = <5000000>; 165 regulator-name = "vcc_5v0_host"; 166 vin-supply = <&vcc_5v0_device>; 167 168 regulator-state-mem { 169 regulator-off-in-suspend; 170 }; 171 }; 172 173 vcc_5v0_sys: regulator-vcc-5v0-sys { 174 compatible = "regulator-fixed"; 175 regulator-always-on; 176 regulator-boot-on; 177 regulator-min-microvolt = <5000000>; 178 regulator-max-microvolt = <5000000>; 179 regulator-name = "vcc_5v0_sys"; 180 vin-supply = <&vcc_5v0_dcin>; 181 182 regulator-state-mem { 183 regulator-on-in-suspend; 184 }; 185 }; 186}; 187 188&combphy0_ps { 189 status = "okay"; 190}; 191 192&combphy1_psu { 193 status = "okay"; 194}; 195 196&cpu_b0 { 197 cpu-supply = <&vdd_cpu_big_s0>; 198}; 199 200&cpu_b1 { 201 cpu-supply = <&vdd_cpu_big_s0>; 202}; 203 204&cpu_b2 { 205 cpu-supply = <&vdd_cpu_big_s0>; 206}; 207 208&cpu_b3 { 209 cpu-supply = <&vdd_cpu_big_s0>; 210}; 211 212&cpu_l0 { 213 cpu-supply = <&vdd_cpu_lit_s0>; 214}; 215 216&cpu_l1 { 217 cpu-supply = <&vdd_cpu_lit_s0>; 218}; 219 220&cpu_l2 { 221 cpu-supply = <&vdd_cpu_lit_s0>; 222}; 223 224&cpu_l3 { 225 cpu-supply = <&vdd_cpu_lit_s0>; 226}; 227 228&gpu { 229 mali-supply = <&vdd_gpu_s0>; 230 status = "okay"; 231}; 232 233&hdmi { 234 status = "okay"; 235}; 236 237&hdmi_in { 238 hdmi_in_vp0: endpoint { 239 remote-endpoint = <&vp0_out_hdmi>; 240 }; 241}; 242 243&hdmi_out { 244 hdmi_out_con: endpoint { 245 remote-endpoint = <&hdmi_con_in>; 246 }; 247}; 248 249&hdptxphy { 250 status = "okay"; 251}; 252 253&i2c1 { 254 status = "okay"; 255 256 pmic@23 { 257 compatible = "rockchip,rk806"; 258 reg = <0x23>; 259 #gpio-cells = <2>; 260 gpio-controller; 261 interrupt-parent = <&gpio0>; 262 interrupts = <6 IRQ_TYPE_LEVEL_LOW>; 263 pinctrl-names = "default"; 264 pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>, 265 <&rk806_dvs2_null>, <&rk806_dvs3_null>; 266 system-power-controller; 267 268 vcc1-supply = <&vcc_5v0_sys>; 269 vcc2-supply = <&vcc_5v0_sys>; 270 vcc3-supply = <&vcc_5v0_sys>; 271 vcc4-supply = <&vcc_5v0_sys>; 272 vcc5-supply = <&vcc_5v0_sys>; 273 vcc6-supply = <&vcc_5v0_sys>; 274 vcc7-supply = <&vcc_5v0_sys>; 275 vcc8-supply = <&vcc_5v0_sys>; 276 vcc9-supply = <&vcc_5v0_sys>; 277 vcc10-supply = <&vcc_5v0_sys>; 278 vcc11-supply = <&vcc_2v0_pldo_s3>; 279 vcc12-supply = <&vcc_5v0_sys>; 280 vcc13-supply = <&vcc_1v1_nldo_s3>; 281 vcc14-supply = <&vcc_1v1_nldo_s3>; 282 vcca-supply = <&vcc_5v0_sys>; 283 284 rk806_dvs1_null: dvs1-null-pins { 285 pins = "gpio_pwrctrl2"; 286 function = "pin_fun0"; 287 }; 288 289 rk806_dvs2_null: dvs2-null-pins { 290 pins = "gpio_pwrctrl2"; 291 function = "pin_fun0"; 292 }; 293 294 rk806_dvs3_null: dvs3-null-pins { 295 pins = "gpio_pwrctrl3"; 296 function = "pin_fun0"; 297 }; 298 299 rk806_dvs1_slp: dvs1-slp-pins { 300 pins = "gpio_pwrctrl1"; 301 function = "pin_fun1"; 302 }; 303 304 rk806_dvs1_pwrdn: dvs1-pwrdn-pins { 305 pins = "gpio_pwrctrl1"; 306 function = "pin_fun2"; 307 }; 308 309 rk806_dvs1_rst: dvs1-rst-pins { 310 pins = "gpio_pwrctrl1"; 311 function = "pin_fun3"; 312 }; 313 314 rk806_dvs2_slp: dvs2-slp-pins { 315 pins = "gpio_pwrctrl2"; 316 function = "pin_fun1"; 317 }; 318 319 rk806_dvs2_pwrdn: dvs2-pwrdn-pins { 320 pins = "gpio_pwrctrl2"; 321 function = "pin_fun2"; 322 }; 323 324 rk806_dvs2_rst: dvs2-rst-pins { 325 pins = "gpio_pwrctrl2"; 326 function = "pin_fun3"; 327 }; 328 329 rk806_dvs2_dvs: dvs2-dvs-pins { 330 pins = "gpio_pwrctrl2"; 331 function = "pin_fun4"; 332 }; 333 334 rk806_dvs2_gpio: dvs2-gpio-pins { 335 pins = "gpio_pwrctrl2"; 336 function = "pin_fun5"; 337 }; 338 339 340 rk806_dvs3_slp: dvs3-slp-pins { 341 pins = "gpio_pwrctrl3"; 342 function = "pin_fun1"; 343 }; 344 345 rk806_dvs3_pwrdn: dvs3-pwrdn-pins { 346 pins = "gpio_pwrctrl3"; 347 function = "pin_fun2"; 348 }; 349 350 rk806_dvs3_rst: dvs3-rst-pins { 351 pins = "gpio_pwrctrl3"; 352 function = "pin_fun3"; 353 }; 354 355 rk806_dvs3_dvs: dvs3-dvs-pins { 356 pins = "gpio_pwrctrl3"; 357 function = "pin_fun4"; 358 }; 359 360 rk806_dvs3_gpio: dvs3-gpio-pins { 361 pins = "gpio_pwrctrl3"; 362 function = "pin_fun5"; 363 }; 364 365 regulators { 366 vdd_cpu_big_s0: dcdc-reg1 { 367 regulator-always-on; 368 regulator-boot-on; 369 regulator-min-microvolt = <550000>; 370 regulator-max-microvolt = <950000>; 371 regulator-ramp-delay = <12500>; 372 regulator-name = "vdd_cpu_big_s0"; 373 regulator-enable-ramp-delay = <400>; 374 375 regulator-state-mem { 376 regulator-off-in-suspend; 377 }; 378 }; 379 380 vdd_npu_s0: dcdc-reg2 { 381 regulator-boot-on; 382 regulator-min-microvolt = <550000>; 383 regulator-max-microvolt = <950000>; 384 regulator-ramp-delay = <12500>; 385 regulator-name = "vdd_npu_s0"; 386 regulator-enable-ramp-delay = <400>; 387 388 regulator-state-mem { 389 regulator-off-in-suspend; 390 }; 391 }; 392 393 vdd_cpu_lit_s0: dcdc-reg3 { 394 regulator-always-on; 395 regulator-boot-on; 396 regulator-min-microvolt = <550000>; 397 regulator-max-microvolt = <950000>; 398 regulator-ramp-delay = <12500>; 399 regulator-name = "vdd_cpu_lit_s0"; 400 401 regulator-state-mem { 402 regulator-off-in-suspend; 403 regulator-suspend-microvolt = <750000>; 404 }; 405 }; 406 407 vcc_3v3_s3: dcdc-reg4 { 408 regulator-always-on; 409 regulator-boot-on; 410 regulator-min-microvolt = <3300000>; 411 regulator-max-microvolt = <3300000>; 412 regulator-name = "vcc_3v3_s3"; 413 414 regulator-state-mem { 415 regulator-on-in-suspend; 416 regulator-suspend-microvolt = <3300000>; 417 }; 418 }; 419 420 vdd_gpu_s0: dcdc-reg5 { 421 regulator-boot-on; 422 regulator-min-microvolt = <550000>; 423 regulator-max-microvolt = <900000>; 424 regulator-ramp-delay = <12500>; 425 regulator-name = "vdd_gpu_s0"; 426 regulator-enable-ramp-delay = <400>; 427 428 regulator-state-mem { 429 regulator-off-in-suspend; 430 regulator-suspend-microvolt = <850000>; 431 }; 432 }; 433 434 vddq_ddr_s0: dcdc-reg6 { 435 regulator-always-on; 436 regulator-boot-on; 437 regulator-name = "vddq_ddr_s0"; 438 439 regulator-state-mem { 440 regulator-off-in-suspend; 441 }; 442 }; 443 444 vdd_logic_s0: dcdc-reg7 { 445 regulator-always-on; 446 regulator-boot-on; 447 regulator-min-microvolt = <550000>; 448 regulator-max-microvolt = <800000>; 449 regulator-name = "vdd_logic_s0"; 450 451 regulator-state-mem { 452 regulator-off-in-suspend; 453 }; 454 }; 455 456 vcc_1v8_s3: dcdc-reg8 { 457 regulator-always-on; 458 regulator-boot-on; 459 regulator-min-microvolt = <1800000>; 460 regulator-max-microvolt = <1800000>; 461 regulator-name = "vcc_1v8_s3"; 462 463 regulator-state-mem { 464 regulator-on-in-suspend; 465 regulator-suspend-microvolt = <1800000>; 466 }; 467 }; 468 469 vdd2_ddr_s3: dcdc-reg9 { 470 regulator-always-on; 471 regulator-boot-on; 472 regulator-name = "vdd2_ddr_s3"; 473 474 regulator-state-mem { 475 regulator-on-in-suspend; 476 }; 477 }; 478 479 vdd_ddr_s0: dcdc-reg10 { 480 regulator-always-on; 481 regulator-boot-on; 482 regulator-min-microvolt = <550000>; 483 regulator-max-microvolt = <1200000>; 484 regulator-name = "vdd_ddr_s0"; 485 486 regulator-state-mem { 487 regulator-off-in-suspend; 488 }; 489 }; 490 491 vcca_1v8_s0: pldo-reg1 { 492 regulator-always-on; 493 regulator-boot-on; 494 regulator-min-microvolt = <1800000>; 495 regulator-max-microvolt = <1800000>; 496 regulator-name = "vcca_1v8_s0"; 497 498 regulator-state-mem { 499 regulator-off-in-suspend; 500 }; 501 }; 502 503 vcca1v8_pldo2_s0: pldo-reg2 { 504 regulator-always-on; 505 regulator-boot-on; 506 regulator-min-microvolt = <1800000>; 507 regulator-max-microvolt = <1800000>; 508 regulator-name = "vcca1v8_pldo2_s0"; 509 510 regulator-state-mem { 511 regulator-off-in-suspend; 512 }; 513 }; 514 515 vdda_1v2_s0: pldo-reg3 { 516 regulator-always-on; 517 regulator-boot-on; 518 regulator-min-microvolt = <1200000>; 519 regulator-max-microvolt = <1200000>; 520 regulator-name = "vdda_1v2_s0"; 521 522 regulator-state-mem { 523 regulator-off-in-suspend; 524 }; 525 }; 526 527 vcca_3v3_s0: pldo-reg4 { 528 regulator-always-on; 529 regulator-boot-on; 530 regulator-min-microvolt = <3300000>; 531 regulator-max-microvolt = <3300000>; 532 regulator-name = "vcca_3v3_s0"; 533 534 regulator-state-mem { 535 regulator-off-in-suspend; 536 }; 537 }; 538 539 vccio_sd_s0: pldo-reg5 { 540 regulator-always-on; 541 regulator-boot-on; 542 regulator-min-microvolt = <1800000>; 543 regulator-max-microvolt = <3300000>; 544 regulator-name = "vccio_sd_s0"; 545 546 regulator-state-mem { 547 regulator-off-in-suspend; 548 }; 549 }; 550 551 vcca1v8_pldo6_s3: pldo-reg6 { 552 regulator-always-on; 553 regulator-boot-on; 554 regulator-min-microvolt = <1800000>; 555 regulator-max-microvolt = <1800000>; 556 regulator-name = "vcca1v8_pldo6_s3"; 557 558 regulator-state-mem { 559 regulator-on-in-suspend; 560 regulator-suspend-microvolt = <1800000>; 561 }; 562 }; 563 564 vdd_0v75_s3: nldo-reg1 { 565 regulator-always-on; 566 regulator-boot-on; 567 regulator-min-microvolt = <750000>; 568 regulator-max-microvolt = <750000>; 569 regulator-name = "vdd_0v75_s3"; 570 571 regulator-state-mem { 572 regulator-on-in-suspend; 573 regulator-suspend-microvolt = <750000>; 574 }; 575 }; 576 577 vdda_ddr_pll_s0: nldo-reg2 { 578 regulator-always-on; 579 regulator-boot-on; 580 regulator-min-microvolt = <850000>; 581 regulator-max-microvolt = <850000>; 582 regulator-name = "vdda_ddr_pll_s0"; 583 584 regulator-state-mem { 585 regulator-off-in-suspend; 586 }; 587 }; 588 589 vdda0v75_hdmi_s0: nldo-reg3 { 590 regulator-always-on; 591 regulator-boot-on; 592 regulator-min-microvolt = <837500>; 593 regulator-max-microvolt = <837500>; 594 regulator-name = "vdda0v75_hdmi_s0"; 595 596 regulator-state-mem { 597 regulator-off-in-suspend; 598 }; 599 }; 600 601 vdda_0v85_s0: nldo-reg4 { 602 regulator-always-on; 603 regulator-boot-on; 604 regulator-min-microvolt = <850000>; 605 regulator-max-microvolt = <850000>; 606 regulator-name = "vdda_0v85_s0"; 607 608 regulator-state-mem { 609 regulator-off-in-suspend; 610 }; 611 }; 612 613 vdda_0v75_s0: nldo-reg5 { 614 regulator-always-on; 615 regulator-boot-on; 616 regulator-min-microvolt = <750000>; 617 regulator-max-microvolt = <750000>; 618 regulator-name = "vdda_0v75_s0"; 619 620 regulator-state-mem { 621 regulator-off-in-suspend; 622 }; 623 }; 624 }; 625 }; 626}; 627 628&i2c2 { 629 status = "okay"; 630 631 hym8563: rtc@51 { 632 compatible = "haoyu,hym8563"; 633 reg = <0x51>; 634 #clock-cells = <0>; 635 clock-output-names = "hym8563"; 636 interrupt-parent = <&gpio0>; 637 interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>; 638 pinctrl-names = "default"; 639 pinctrl-0 = <&hym8563_int>; 640 wakeup-source; 641 }; 642}; 643 644&pcie0 { 645 pinctrl-names = "default"; 646 pinctrl-0 = <&pcie_reset>; 647 reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>; 648 vpcie3v3-supply = <&vcc_3v3_pcie>; 649 status = "okay"; 650}; 651 652&pinctrl { 653 hdmi { 654 hdmi_con_en: hdmi-con-en { 655 rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; 656 }; 657 }; 658 659 hym8563 { 660 hym8563_int: hym8563-int { 661 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; 662 }; 663 }; 664 665 pcie { 666 pcie_pwr_en: pcie-pwr-en { 667 rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; 668 }; 669 670 pcie_reset: pcie-reset { 671 rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>; 672 }; 673 }; 674 675 usb { 676 usb_host_pwr_en: usb-host-pwr-en { 677 rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>; 678 }; 679 680 usb_otg0_pwr_en: usb-otg0-pwr-en { 681 rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; 682 }; 683 684 usbc0_int: usbc0-int { 685 rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>; 686 }; 687 }; 688}; 689 690&rng { 691 status = "okay"; 692}; 693 694&saradc { 695 vref-supply = <&vcca_1v8_s0>; 696 status = "okay"; 697}; 698 699&sdhci { 700 bus-width = <8>; 701 full-pwr-cycle-in-suspend; 702 mmc-hs400-1_8v; 703 mmc-hs400-enhanced-strobe; 704 no-sd; 705 no-sdio; 706 non-removable; 707 vmmc-supply = <&vcc_3v3_s3>; 708 vqmmc-supply = <&vccio_sd_s0>; 709 status = "okay"; 710}; 711 712&uart0 { 713 status = "okay"; 714}; 715 716&uart4 { 717 pinctrl-names = "default"; 718 pinctrl-0 = <&uart4m1_xfer &uart4m1_ctsn>; 719 status = "okay"; 720}; 721 722&u2phy1 { 723 status = "okay"; 724}; 725 726&u2phy1_otg { 727 phy-supply = <&vcc_5v0_host>; 728 status = "okay"; 729}; 730 731&usb_drd1_dwc3 { 732 dr_mode = "host"; 733 status = "okay"; 734}; 735 736&vop { 737 status = "okay"; 738}; 739 740&vop_mmu { 741 status = "okay"; 742}; 743 744&vp0 { 745 vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { 746 reg = <ROCKCHIP_VOP2_EP_HDMI0>; 747 remote-endpoint = <&hdmi_in_vp0>; 748 }; 749}; 750