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