1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 3 * Copyright (c) 2023 Rockchip Electronics Co. 4 * 5 * https://cool-pi.com/topic/130/coolpi-4b-pro 6 * 7 */ 8 9 /dts-v1/; 10 11 #include <dt-bindings/gpio/gpio.h> 12 #include <dt-bindings/leds/common.h> 13 #include <dt-bindings/pinctrl/rockchip.h> 14 #include "rk3588s.dtsi" 15 16 / { 17 model = "RK3588S CoolPi 4 Model B"; 18 compatible = "coolpi,pi-4b", "rockchip 19 20 aliases { 21 mmc0 = &sdhci; 22 mmc1 = &sdmmc; 23 mmc2 = &sdio; 24 }; 25 26 analog-sound { 27 compatible = "audio-graph-card 28 dais = <&i2s0_8ch_p0>; 29 label = "rk3588-es8316"; 30 routing = "MIC2", "Mic Jack", 31 "Headphones", "HPOL" 32 "Headphones", "HPOR" 33 widgets = "Microphone", "Mic J 34 "Headphone", "Headph 35 }; 36 37 chosen { 38 stdout-path = "serial2:1500000 39 }; 40 41 leds: leds { 42 compatible = "gpio-leds"; 43 pinctrl-names = "default"; 44 pinctrl-0 = <&gpio_leds>; 45 46 led0: led-green { 47 color = <LED_COLOR_ID_ 48 function = LED_FUNCTIO 49 gpios = <&gpio0 RK_PD0 50 linux,default-trigger 51 }; 52 53 led1: led-red { 54 color = <LED_COLOR_ID_ 55 default-state = "off"; 56 function = LED_FUNCTIO 57 gpios = <&gpio0 RK_PC4 58 linux,default-trigger 59 }; 60 }; 61 62 sdio_pwrseq: sdio-pwrseq { 63 compatible = "mmc-pwrseq-simpl 64 clocks = <&hym8563>; 65 clock-names = "ext_clock"; 66 pinctrl-names = "default"; 67 pinctrl-0 = <&wifi_enable_h>; 68 /* 69 * On the module itself this i 70 * on the actual card populate 71 * - SDIO_RESET_L_WL_REG_ON 72 * - PDN (power down when low) 73 */ 74 post-power-on-delay-ms = <200> 75 reset-gpios = <&gpio0 RK_PC7 G 76 }; 77 78 vcc12v_dcin: vcc12v-dcin-regulator { 79 compatible = "regulator-fixed" 80 regulator-name = "vcc12v_dcin" 81 regulator-always-on; 82 regulator-boot-on; 83 regulator-min-microvolt = <120 84 regulator-max-microvolt = <120 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 = <500 93 regulator-max-microvolt = <500 94 vin-supply = <&vcc12v_dcin>; 95 }; 96 97 vcc5v0_usbdcin: vcc5v0-usbdcin-regulat 98 compatible = "regulator-fixed" 99 regulator-name = "vcc5v0_usbdc 100 regulator-always-on; 101 regulator-boot-on; 102 regulator-min-microvolt = <500 103 regulator-max-microvolt = <500 104 vin-supply = <&vcc12v_dcin>; 105 }; 106 107 vcc5v0_usb: vcc5v0-usb-regulator { 108 compatible = "regulator-fixed" 109 regulator-name = "vcc5v0_usb"; 110 regulator-always-on; 111 regulator-boot-on; 112 regulator-min-microvolt = <500 113 regulator-max-microvolt = <500 114 vin-supply = <&vcc5v0_usbdcin> 115 }; 116 117 avdd0v85_pcie20: avdd0v85-pcie20-regul 118 compatible = "regulator-fixed" 119 regulator-name = "avdd0v85_pci 120 regulator-boot-on; 121 regulator-always-on; 122 regulator-min-microvolt = <850 123 regulator-max-microvolt = <850 124 vin-supply = <&vdd_0v85_s0>; 125 }; 126 127 avdd1v8_pcie20: avdd1v8-pcie20-regulat 128 compatible = "regulator-fixed" 129 regulator-name = "avdd1v8_pcie 130 regulator-boot-on; 131 regulator-always-on; 132 regulator-min-microvolt = <180 133 regulator-max-microvolt = <180 134 vin-supply = <&avcc_1v8_s0>; 135 }; 136 137 vcc3v3_mipi: vcc3v3-mipi-regulator { 138 compatible = "regulator-fixed" 139 enable-active-high; 140 gpio = <&gpio3 RK_PC2 GPIO_ACT 141 regulator-name = "vcc3v3_mipi" 142 regulator-boot-on; 143 regulator-always-on; 144 vin-supply = <&vcc_3v3_s3>; 145 }; 146 147 vcc5v0_host: vcc5v0-host-regulator { 148 compatible = "regulator-fixed" 149 enable-active-high; 150 gpio = <&gpio3 RK_PC0 GPIO_ACT 151 pinctrl-names = "default"; 152 pinctrl-0 = <&vcc5v0_host_en>; 153 regulator-name = "vcc5v0_host" 154 regulator-boot-on; 155 regulator-always-on; 156 regulator-min-microvolt = <500 157 regulator-max-microvolt = <500 158 vin-supply = <&vcc5v0_sys>; 159 }; 160 161 vcc5v0_otg: vcc5v0-otg-regulator { 162 compatible = "regulator-fixed" 163 enable-active-high; 164 gpio = <&gpio3 RK_PC1 GPIO_ACT 165 pinctrl-names = "default"; 166 pinctrl-0 = <&vcc5v0_u3host_en 167 regulator-name = "vcc5v0_otg"; 168 regulator-boot-on; 169 regulator-always-on; 170 regulator-min-microvolt = <500 171 regulator-max-microvolt = <500 172 vin-supply = <&vcc5v0_sys>; 173 }; 174 175 vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regul 176 compatible = "regulator-fixed" 177 regulator-name = "vcc_1v1_nldo 178 regulator-always-on; 179 regulator-boot-on; 180 regulator-min-microvolt = <110 181 regulator-max-microvolt = <110 182 vin-supply = <&vcc5v0_sys>; 183 }; 184 }; 185 186 &combphy0_ps { 187 status = "okay"; 188 }; 189 190 &combphy2_psu { 191 status = "okay"; 192 }; 193 194 &cpu_l0 { 195 cpu-supply = <&vdd_cpu_lit_s0>; 196 }; 197 198 &cpu_b0 { 199 cpu-supply = <&vdd_cpu_big0_s0>; 200 }; 201 202 &cpu_b2 { 203 cpu-supply = <&vdd_cpu_big1_s0>; 204 }; 205 206 &gpu { 207 mali-supply = <&vdd_gpu_s0>; 208 status = "okay"; 209 }; 210 211 &i2c0 { 212 pinctrl-0 = <&i2c0m2_xfer>; 213 status = "okay"; 214 215 vdd_cpu_big0_s0: regulator@42 { 216 compatible = "rockchip,rk8602" 217 reg = <0x42>; 218 fcs,suspend-voltage-selector = 219 regulator-name = "vdd_cpu_big0 220 regulator-always-on; 221 regulator-boot-on; 222 regulator-min-microvolt = <550 223 regulator-max-microvolt = <105 224 regulator-ramp-delay = <2300>; 225 vin-supply = <&vcc5v0_sys>; 226 227 regulator-state-mem { 228 regulator-off-in-suspe 229 }; 230 }; 231 232 vdd_cpu_big1_s0: regulator@43 { 233 compatible = "rockchip,rk8603" 234 reg = <0x43>; 235 fcs,suspend-voltage-selector = 236 regulator-name = "vdd_cpu_big1 237 regulator-always-on; 238 regulator-boot-on; 239 regulator-min-microvolt = <550 240 regulator-max-microvolt = <105 241 regulator-ramp-delay = <2300>; 242 vin-supply = <&vcc5v0_sys>; 243 244 regulator-state-mem { 245 regulator-off-in-suspe 246 }; 247 }; 248 }; 249 250 &i2c2 { 251 status = "okay"; 252 253 vdd_npu_s0: regulator@42 { 254 compatible = "rockchip,rk8602" 255 reg = <0x42>; 256 fcs,suspend-voltage-selector = 257 regulator-name = "vdd_npu_s0"; 258 regulator-always-on; 259 regulator-boot-on; 260 regulator-min-microvolt = <550 261 regulator-max-microvolt = <950 262 regulator-ramp-delay = <2300>; 263 vin-supply = <&vcc5v0_sys>; 264 265 regulator-state-mem { 266 regulator-off-in-suspe 267 }; 268 }; 269 }; 270 271 &i2c6 { 272 pinctrl-0 = <&i2c6m3_xfer>; 273 status = "okay"; 274 275 hym8563: rtc@51 { 276 compatible = "haoyu,hym8563"; 277 reg = <0x51>; 278 interrupt-parent = <&gpio0>; 279 interrupts = <RK_PB0 IRQ_TYPE_ 280 #clock-cells = <0>; 281 clock-output-names = "hym8563" 282 pinctrl-names = "default"; 283 pinctrl-0 = <&hym8563_int>; 284 }; 285 }; 286 287 &i2c7 { 288 pinctrl-0 = <&i2c7m0_xfer>; 289 status = "okay"; 290 291 es8316: audio-codec@10 { 292 compatible = "everest,es8316"; 293 reg = <0x10>; 294 assigned-clocks = <&cru I2S0_8 295 assigned-clock-rates = <122880 296 clocks = <&cru I2S0_8CH_MCLKOU 297 clock-names = "mclk"; 298 #sound-dai-cells = <0>; 299 300 port { 301 es8316_p0_0: endpoint 302 remote-endpoin 303 }; 304 }; 305 }; 306 }; 307 308 &i2s0_8ch { 309 pinctrl-0 = <&i2s0_lrck 310 &i2s0_mclk 311 &i2s0_sclk 312 &i2s0_sdi0 313 &i2s0_sdo0>; 314 status = "okay"; 315 316 i2s0_8ch_p0: port { 317 i2s0_8ch_p0_0: endpoint { 318 dai-format = "i2s"; 319 mclk-fs = <256>; 320 remote-endpoint = <&es 321 }; 322 }; 323 }; 324 325 &pcie2x1l2 { 326 pinctrl-names = "default"; 327 pinctrl-0 = <&rtl8111_isolate>; 328 reset-gpios = <&gpio3 RK_PD1 GPIO_ACTI 329 status = "okay"; 330 }; 331 332 &pinctrl { 333 hym8563 { 334 hym8563_int: hym8563-int { 335 rockchip,pins = <0 RK_ 336 }; 337 }; 338 339 led { 340 gpio_leds: gpio-leds { 341 rockchip,pins = <0 RK_ 342 <0 RK_ 343 }; 344 }; 345 346 rtl8111 { 347 rtl8111_isolate: rtl8111-isola 348 rockchip,pins = <1 RK_ 349 }; 350 }; 351 352 sdio-pwrseq { 353 wifi_enable_h: wifi-enable-h { 354 rockchip,pins = <0 RK_ 355 }; 356 }; 357 358 usb { 359 vcc5v0_host_en: vcc5v0-host-en 360 rockchip,pins = <3 RK_ 361 <4 RK_ 362 }; 363 364 vcc5v0_u3host_en: vcc5v0-u3hos 365 rockchip,pins = <3 RK_ 366 }; 367 }; 368 369 wireless-bluetooth { 370 bt_reset_gpio: bt-reset-pin { 371 rockchip,pins = <0 RK_ 372 }; 373 374 bt_wake_gpio: bt-wake-pin { 375 rockchip,pins = <0 RK_ 376 }; 377 378 bt_wake_host_irq: bt-wake-host 379 rockchip,pins = <0 RK_ 380 }; 381 }; 382 383 wireless-wlan { 384 wifi_host_wake_irq: wifi-host- 385 rockchip,pins = <0 RK_ 386 }; 387 388 wifi_poweren_pin: wifi-poweren 389 rockchip,pins = <1 RK_ 390 }; 391 }; 392 }; 393 394 &pwm2 { 395 pinctrl-0 = <&pwm2m1_pins>; 396 status = "okay"; 397 }; 398 399 &pwm13 { 400 pinctrl-names = "active"; 401 pinctrl-0 = <&pwm13m2_pins>; 402 status = "okay"; 403 }; 404 405 &saradc { 406 vref-supply = <&vcc_1v8_s0>; 407 status = "okay"; 408 }; 409 410 &sdhci { 411 bus-width = <8>; 412 max-frequency = <200000000>; 413 mmc-hs400-1_8v; 414 mmc-hs400-enhanced-strobe; 415 no-sdio; 416 no-sd; 417 non-removable; 418 status = "okay"; 419 }; 420 421 &sdio { 422 bus-width = <4>; 423 cap-sd-highspeed; 424 cap-sdio-irq; 425 disable-wp; 426 keep-power-in-suspend; 427 max-frequency = <150000000>; 428 mmc-pwrseq = <&sdio_pwrseq>; 429 no-sd; 430 no-mmc; 431 non-removable; 432 pinctrl-names = "default"; 433 pinctrl-0 = <&sdiom1_pins>,<&wifi_powe 434 status = "okay"; 435 }; 436 437 &sdmmc { 438 bus-width = <4>; 439 cap-mmc-highspeed; 440 cap-sd-highspeed; 441 disable-wp; 442 max-frequency = <150000000>; 443 no-sdio; 444 no-mmc; 445 sd-uhs-sdr104; 446 vmmc-supply = <&vcc_3v3_s3>; 447 vqmmc-supply = <&vccio_sd_s0>; 448 status = "okay"; 449 }; 450 451 &spi2 { 452 assigned-clocks = <&cru CLK_SPI2>; 453 assigned-clock-rates = <200000000>; 454 num-cs = <1>; 455 pinctrl-names = "default"; 456 pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins> 457 status = "okay"; 458 459 pmic@0 { 460 compatible = "rockchip,rk806"; 461 reg = <0x0>; 462 interrupt-parent = <&gpio0>; 463 interrupts = <7 IRQ_TYPE_LEVEL 464 gpio-controller; 465 #gpio-cells = <2>; 466 pinctrl-names = "default"; 467 pinctrl-0 = <&pmic_pins>, <&rk 468 <&rk806_dvs2_null> 469 spi-max-frequency = <1000000>; 470 vcc1-supply = <&vcc5v0_sys>; 471 vcc2-supply = <&vcc5v0_sys>; 472 vcc3-supply = <&vcc5v0_sys>; 473 vcc4-supply = <&vcc5v0_sys>; 474 vcc5-supply = <&vcc5v0_sys>; 475 vcc6-supply = <&vcc5v0_sys>; 476 vcc7-supply = <&vcc5v0_sys>; 477 vcc8-supply = <&vcc5v0_sys>; 478 vcc9-supply = <&vcc5v0_sys>; 479 vcc10-supply = <&vcc5v0_sys>; 480 vcc11-supply = <&vcc_2v0_pldo_ 481 vcc12-supply = <&vcc5v0_sys>; 482 vcc13-supply = <&vcc_1v1_nldo_ 483 vcc14-supply = <&vcc_1v1_nldo_ 484 vcca-supply = <&vcc5v0_sys>; 485 486 rk806_dvs1_null: dvs1-null-pin 487 pins = "gpio_pwrctrl1" 488 function = "pin_fun0"; 489 }; 490 491 rk806_dvs2_null: dvs2-null-pin 492 pins = "gpio_pwrctrl2" 493 function = "pin_fun0"; 494 }; 495 496 rk806_dvs3_null: dvs3-null-pin 497 pins = "gpio_pwrctrl3" 498 function = "pin_fun0"; 499 }; 500 501 regulators { 502 vdd_gpu_s0: vdd_gpu_me 503 regulator-name 504 regulator-boot 505 regulator-min- 506 regulator-max- 507 regulator-ramp 508 regulator-enab 509 510 regulator-stat 511 regula 512 }; 513 }; 514 515 vdd_cpu_lit_s0: vdd_cp 516 regulator-name 517 regulator-alwa 518 regulator-boot 519 regulator-min- 520 regulator-max- 521 regulator-ramp 522 523 regulator-stat 524 regula 525 }; 526 }; 527 528 vdd_log_s0: dcdc-reg3 529 regulator-name 530 regulator-alwa 531 regulator-boot 532 regulator-min- 533 regulator-max- 534 regulator-ramp 535 536 regulator-stat 537 regula 538 regula 539 }; 540 }; 541 542 vdd_vdenc_s0: vdd_vden 543 regulator-name 544 regulator-alwa 545 regulator-boot 546 regulator-min- 547 regulator-max- 548 regulator-ramp 549 550 regulator-stat 551 regula 552 }; 553 }; 554 555 vdd_ddr_s0: dcdc-reg5 556 regulator-name 557 regulator-alwa 558 regulator-boot 559 regulator-min- 560 regulator-max- 561 regulator-ramp 562 563 regulator-stat 564 regula 565 regula 566 }; 567 }; 568 569 vdd2_ddr_s3: dcdc-reg6 570 regulator-name 571 regulator-alwa 572 regulator-boot 573 574 regulator-stat 575 regula 576 }; 577 }; 578 579 vcc_2v0_pldo_s3: dcdc- 580 regulator-name 581 regulator-alwa 582 regulator-boot 583 regulator-min- 584 regulator-max- 585 regulator-ramp 586 587 regulator-stat 588 regula 589 regula 590 }; 591 }; 592 593 vcc_3v3_s3: dcdc-reg8 594 regulator-name 595 regulator-alwa 596 regulator-boot 597 regulator-min- 598 regulator-max- 599 600 regulator-stat 601 regula 602 regula 603 }; 604 }; 605 606 vddq_ddr_s0: dcdc-reg9 607 regulator-name 608 regulator-alwa 609 regulator-boot 610 611 regulator-stat 612 regula 613 }; 614 }; 615 616 vcc_1v8_s3: dcdc-reg10 617 regulator-name 618 regulator-alwa 619 regulator-boot 620 regulator-min- 621 regulator-max- 622 623 regulator-stat 624 regula 625 regula 626 }; 627 }; 628 629 avcc_1v8_s0: pldo-reg1 630 regulator-name 631 regulator-alwa 632 regulator-boot 633 regulator-min- 634 regulator-max- 635 636 regulator-stat 637 regula 638 }; 639 }; 640 641 vcc_1v8_s0: pldo-reg2 642 regulator-name 643 regulator-alwa 644 regulator-boot 645 regulator-min- 646 regulator-max- 647 648 regulator-stat 649 regula 650 regula 651 }; 652 }; 653 654 avdd_1v2_s0: pldo-reg3 655 regulator-name 656 regulator-alwa 657 regulator-boot 658 regulator-min- 659 regulator-max- 660 661 regulator-stat 662 regula 663 }; 664 }; 665 666 vcc_3v3_s0: pldo-reg4 667 regulator-name 668 regulator-alwa 669 regulator-boot 670 regulator-min- 671 regulator-max- 672 regulator-ramp 673 674 regulator-stat 675 regula 676 }; 677 }; 678 679 vccio_sd_s0: pldo-reg5 680 regulator-name 681 regulator-alwa 682 regulator-boot 683 regulator-min- 684 regulator-max- 685 regulator-ramp 686 687 regulator-stat 688 regula 689 }; 690 }; 691 692 pldo6_s3: pldo-reg6 { 693 regulator-name 694 regulator-alwa 695 regulator-boot 696 regulator-min- 697 regulator-max- 698 699 regulator-stat 700 regula 701 regula 702 }; 703 }; 704 705 vdd_0v75_s3: nldo-reg1 706 regulator-name 707 regulator-alwa 708 regulator-boot 709 regulator-min- 710 regulator-max- 711 712 regulator-stat 713 regula 714 regula 715 }; 716 }; 717 718 vdd_ddr_pll_s0: nldo-r 719 regulator-name 720 regulator-alwa 721 regulator-boot 722 regulator-min- 723 regulator-max- 724 725 regulator-stat 726 regula 727 regula 728 }; 729 }; 730 731 avdd_0v75_s0: nldo-reg 732 regulator-name 733 regulator-alwa 734 regulator-boot 735 regulator-min- 736 regulator-max- 737 738 regulator-stat 739 regula 740 }; 741 }; 742 743 vdd_0v85_s0: nldo-reg4 744 regulator-name 745 regulator-alwa 746 regulator-boot 747 regulator-min- 748 regulator-max- 749 750 regulator-stat 751 regula 752 }; 753 }; 754 755 vdd_0v75_s0: nldo-reg5 756 regulator-name 757 regulator-alwa 758 regulator-boot 759 regulator-min- 760 regulator-max- 761 762 regulator-stat 763 regula 764 }; 765 }; 766 }; 767 }; 768 }; 769 770 &tsadc { 771 status = "okay"; 772 }; 773 774 &u2phy2 { 775 status = "okay"; 776 }; 777 778 &u2phy3 { 779 status = "okay"; 780 }; 781 782 &u2phy2_host { 783 phy-supply = <&vcc5v0_host>; 784 status = "okay"; 785 }; 786 787 &u2phy3_host { 788 status = "okay"; 789 }; 790 791 &uart2 { 792 pinctrl-0 = <&uart2m0_xfer>; 793 status = "okay"; 794 }; 795 796 /* bt */ 797 &uart9 { 798 status = "okay"; 799 pinctrl-names = "default"; 800 pinctrl-0 = <&uart9m2_xfer &uart9m2_ct 801 }; 802 803 &usb_host0_ehci { 804 status = "okay"; 805 }; 806 807 &usb_host0_ohci { 808 status = "okay"; 809 }; 810 811 &usb_host1_ehci { 812 status = "okay"; 813 }; 814 815 &usb_host1_ohci { 816 status = "okay"; 817 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.