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 eeprom: eeprom@50 { 170 compatible = "belling,bl24c16a", "atmel,24c16"; 171 reg = <0x50>; 172 pagesize = <16>; 173 }; 174}; 175 176&i2c7 { 177 status = "okay"; 178 179 es8316: audio-codec@11 { 180 compatible = "everest,es8316"; 181 reg = <0x11>; 182 clocks = <&cru I2S0_8CH_MCLKOUT>; 183 clock-names = "mclk"; 184 assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; 185 assigned-clock-rates = <12288000>; 186 #sound-dai-cells = <0>; 187 188 port { 189 es8316_p0_0: endpoint { 190 remote-endpoint = <&i2s0_8ch_p0_0>; 191 }; 192 }; 193 }; 194}; 195 196&i2s0_8ch { 197 pinctrl-names = "default"; 198 pinctrl-0 = <&i2s0_lrck 199 &i2s0_mclk 200 &i2s0_sclk 201 &i2s0_sdi0 202 &i2s0_sdo0>; 203 status = "okay"; 204 205 i2s0_8ch_p0: port { 206 i2s0_8ch_p0_0: endpoint { 207 dai-format = "i2s"; 208 mclk-fs = <256>; 209 remote-endpoint = <&es8316_p0_0>; 210 }; 211 }; 212}; 213 214&gmac1 { 215 clock_in_out = "output"; 216 phy-handle = <&rgmii_phy1>; 217 phy-mode = "rgmii"; 218 pinctrl-0 = <&gmac1_miim 219 &gmac1_tx_bus2 220 &gmac1_rx_bus2 221 &gmac1_rgmii_clk 222 &gmac1_rgmii_bus>; 223 pinctrl-names = "default"; 224 tx_delay = <0x3a>; 225 rx_delay = <0x3e>; 226 status = "okay"; 227}; 228 229&mdio1 { 230 rgmii_phy1: ethernet-phy@1 { 231 /* RTL8211F */ 232 compatible = "ethernet-phy-id001c.c916"; 233 reg = <0x1>; 234 pinctrl-names = "default"; 235 pinctrl-0 = <&rtl8211f_rst>; 236 reset-assert-us = <20000>; 237 reset-deassert-us = <100000>; 238 reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; 239 }; 240}; 241 242&pinctrl { 243 leds { 244 io_led: io-led { 245 rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; 246 }; 247 }; 248 249 power { 250 vcc_5v0_en: vcc-5v0-en { 251 rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; 252 }; 253 }; 254 255 rtl8211f { 256 rtl8211f_rst: rtl8211f-rst { 257 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; 258 }; 259 }; 260}; 261 262&sdhci { 263 bus-width = <8>; 264 no-sdio; 265 no-sd; 266 non-removable; 267 max-frequency = <200000000>; 268 mmc-hs400-1_8v; 269 mmc-hs400-enhanced-strobe; 270 status = "okay"; 271}; 272 273&sdmmc { 274 bus-width = <4>; 275 cap-mmc-highspeed; 276 cap-sd-highspeed; 277 disable-wp; 278 max-frequency = <150000000>; 279 no-sdio; 280 no-mmc; 281 sd-uhs-sdr104; 282 vmmc-supply = <&vcc_3v3_s0>; 283 vqmmc-supply = <&vccio_sd_s0>; 284 status = "okay"; 285}; 286 287&spi2 { 288 status = "okay"; 289 assigned-clocks = <&cru CLK_SPI2>; 290 assigned-clock-rates = <200000000>; 291 num-cs = <1>; 292 pinctrl-names = "default"; 293 pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>; 294 295 pmic@0 { 296 compatible = "rockchip,rk806"; 297 reg = <0x0>; 298 interrupt-parent = <&gpio0>; 299 interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 300 pinctrl-names = "default"; 301 pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>, 302 <&rk806_dvs2_null>, <&rk806_dvs3_null>; 303 spi-max-frequency = <1000000>; 304 305 vcc1-supply = <&vcc5v0_sys>; 306 vcc2-supply = <&vcc5v0_sys>; 307 vcc3-supply = <&vcc5v0_sys>; 308 vcc4-supply = <&vcc5v0_sys>; 309 vcc5-supply = <&vcc5v0_sys>; 310 vcc6-supply = <&vcc5v0_sys>; 311 vcc7-supply = <&vcc5v0_sys>; 312 vcc8-supply = <&vcc5v0_sys>; 313 vcc9-supply = <&vcc5v0_sys>; 314 vcc10-supply = <&vcc5v0_sys>; 315 vcc11-supply = <&vcc_2v0_pldo_s3>; 316 vcc12-supply = <&vcc5v0_sys>; 317 vcc13-supply = <&vcc_1v1_nldo_s3>; 318 vcc14-supply = <&vcc_1v1_nldo_s3>; 319 vcca-supply = <&vcc5v0_sys>; 320 321 gpio-controller; 322 #gpio-cells = <2>; 323 324 rk806_dvs1_null: dvs1-null-pins { 325 pins = "gpio_pwrctrl2"; 326 function = "pin_fun0"; 327 }; 328 329 rk806_dvs2_null: dvs2-null-pins { 330 pins = "gpio_pwrctrl2"; 331 function = "pin_fun0"; 332 }; 333 334 rk806_dvs3_null: dvs3-null-pins { 335 pins = "gpio_pwrctrl3"; 336 function = "pin_fun0"; 337 }; 338 339 regulators { 340 vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 { 341 regulator-name = "vdd_gpu_s0"; 342 regulator-boot-on; 343 regulator-min-microvolt = <550000>; 344 regulator-max-microvolt = <950000>; 345 regulator-ramp-delay = <12500>; 346 regulator-enable-ramp-delay = <400>; 347 348 regulator-state-mem { 349 regulator-off-in-suspend; 350 }; 351 }; 352 353 vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 { 354 regulator-name = "vdd_cpu_lit_s0"; 355 regulator-always-on; 356 regulator-boot-on; 357 regulator-min-microvolt = <550000>; 358 regulator-max-microvolt = <950000>; 359 regulator-ramp-delay = <12500>; 360 361 regulator-state-mem { 362 regulator-off-in-suspend; 363 }; 364 }; 365 366 vdd_log_s0: dcdc-reg3 { 367 regulator-name = "vdd_log_s0"; 368 regulator-always-on; 369 regulator-boot-on; 370 regulator-min-microvolt = <675000>; 371 regulator-max-microvolt = <750000>; 372 regulator-ramp-delay = <12500>; 373 374 regulator-state-mem { 375 regulator-off-in-suspend; 376 regulator-suspend-microvolt = <750000>; 377 }; 378 }; 379 380 vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 { 381 regulator-name = "vdd_vdenc_s0"; 382 regulator-always-on; 383 regulator-boot-on; 384 regulator-min-microvolt = <550000>; 385 regulator-max-microvolt = <950000>; 386 regulator-ramp-delay = <12500>; 387 388 regulator-state-mem { 389 regulator-off-in-suspend; 390 }; 391 }; 392 393 vdd_ddr_s0: dcdc-reg5 { 394 regulator-name = "vdd_ddr_s0"; 395 regulator-always-on; 396 regulator-boot-on; 397 regulator-min-microvolt = <675000>; 398 regulator-max-microvolt = <900000>; 399 regulator-ramp-delay = <12500>; 400 401 regulator-state-mem { 402 regulator-off-in-suspend; 403 regulator-suspend-microvolt = <850000>; 404 }; 405 }; 406 407 vdd2_ddr_s3: dcdc-reg6 { 408 regulator-name = "vdd2_ddr_s3"; 409 regulator-always-on; 410 regulator-boot-on; 411 412 regulator-state-mem { 413 regulator-on-in-suspend; 414 }; 415 }; 416 417 vcc_2v0_pldo_s3: dcdc-reg7 { 418 regulator-name = "vdd_2v0_pldo_s3"; 419 regulator-always-on; 420 regulator-boot-on; 421 regulator-min-microvolt = <2000000>; 422 regulator-max-microvolt = <2000000>; 423 regulator-ramp-delay = <12500>; 424 425 regulator-state-mem { 426 regulator-on-in-suspend; 427 regulator-suspend-microvolt = <2000000>; 428 }; 429 }; 430 431 vcc_3v3_s3: dcdc-reg8 { 432 regulator-name = "vcc_3v3_s3"; 433 regulator-always-on; 434 regulator-boot-on; 435 regulator-min-microvolt = <3300000>; 436 regulator-max-microvolt = <3300000>; 437 438 regulator-state-mem { 439 regulator-on-in-suspend; 440 regulator-suspend-microvolt = <3300000>; 441 }; 442 }; 443 444 vddq_ddr_s0: dcdc-reg9 { 445 regulator-name = "vddq_ddr_s0"; 446 regulator-always-on; 447 regulator-boot-on; 448 449 regulator-state-mem { 450 regulator-off-in-suspend; 451 }; 452 }; 453 454 vcc_1v8_s3: dcdc-reg10 { 455 regulator-name = "vcc_1v8_s3"; 456 regulator-always-on; 457 regulator-boot-on; 458 regulator-min-microvolt = <1800000>; 459 regulator-max-microvolt = <1800000>; 460 461 regulator-state-mem { 462 regulator-on-in-suspend; 463 regulator-suspend-microvolt = <1800000>; 464 }; 465 }; 466 467 avcc_1v8_s0: pldo-reg1 { 468 regulator-name = "avcc_1v8_s0"; 469 regulator-always-on; 470 regulator-boot-on; 471 regulator-min-microvolt = <1800000>; 472 regulator-max-microvolt = <1800000>; 473 474 regulator-state-mem { 475 regulator-off-in-suspend; 476 }; 477 }; 478 479 vcc_1v8_s0: pldo-reg2 { 480 regulator-name = "vcc_1v8_s0"; 481 regulator-always-on; 482 regulator-boot-on; 483 regulator-min-microvolt = <1800000>; 484 regulator-max-microvolt = <1800000>; 485 486 regulator-state-mem { 487 regulator-off-in-suspend; 488 regulator-suspend-microvolt = <1800000>; 489 }; 490 }; 491 492 avdd_1v2_s0: pldo-reg3 { 493 regulator-name = "avdd_1v2_s0"; 494 regulator-always-on; 495 regulator-boot-on; 496 regulator-min-microvolt = <1200000>; 497 regulator-max-microvolt = <1200000>; 498 499 regulator-state-mem { 500 regulator-off-in-suspend; 501 }; 502 }; 503 504 vcc_3v3_s0: pldo-reg4 { 505 regulator-name = "vcc_3v3_s0"; 506 regulator-always-on; 507 regulator-boot-on; 508 regulator-min-microvolt = <3300000>; 509 regulator-max-microvolt = <3300000>; 510 regulator-ramp-delay = <12500>; 511 512 regulator-state-mem { 513 regulator-off-in-suspend; 514 }; 515 }; 516 517 vccio_sd_s0: pldo-reg5 { 518 regulator-name = "vccio_sd_s0"; 519 regulator-always-on; 520 regulator-boot-on; 521 regulator-min-microvolt = <1800000>; 522 regulator-max-microvolt = <3300000>; 523 regulator-ramp-delay = <12500>; 524 525 regulator-state-mem { 526 regulator-off-in-suspend; 527 }; 528 }; 529 530 pldo6_s3: pldo-reg6 { 531 regulator-name = "pldo6_s3"; 532 regulator-always-on; 533 regulator-boot-on; 534 regulator-min-microvolt = <1800000>; 535 regulator-max-microvolt = <1800000>; 536 537 regulator-state-mem { 538 regulator-on-in-suspend; 539 regulator-suspend-microvolt = <1800000>; 540 }; 541 }; 542 543 vdd_0v75_s3: nldo-reg1 { 544 regulator-name = "vdd_0v75_s3"; 545 regulator-always-on; 546 regulator-boot-on; 547 regulator-min-microvolt = <750000>; 548 regulator-max-microvolt = <750000>; 549 550 regulator-state-mem { 551 regulator-on-in-suspend; 552 regulator-suspend-microvolt = <750000>; 553 }; 554 }; 555 556 vdd_ddr_pll_s0: nldo-reg2 { 557 regulator-name = "vdd_ddr_pll_s0"; 558 regulator-always-on; 559 regulator-boot-on; 560 regulator-min-microvolt = <850000>; 561 regulator-max-microvolt = <850000>; 562 563 regulator-state-mem { 564 regulator-off-in-suspend; 565 regulator-suspend-microvolt = <850000>; 566 }; 567 }; 568 569 avdd_0v75_s0: nldo-reg3 { 570 regulator-name = "avdd_0v75_s0"; 571 regulator-always-on; 572 regulator-boot-on; 573 regulator-min-microvolt = <750000>; 574 regulator-max-microvolt = <750000>; 575 576 regulator-state-mem { 577 regulator-off-in-suspend; 578 }; 579 }; 580 581 vdd_0v85_s0: nldo-reg4 { 582 regulator-name = "vdd_0v85_s0"; 583 regulator-always-on; 584 regulator-boot-on; 585 regulator-min-microvolt = <850000>; 586 regulator-max-microvolt = <850000>; 587 588 regulator-state-mem { 589 regulator-off-in-suspend; 590 }; 591 }; 592 593 vdd_0v75_s0: nldo-reg5 { 594 regulator-name = "vdd_0v75_s0"; 595 regulator-always-on; 596 regulator-boot-on; 597 regulator-min-microvolt = <750000>; 598 regulator-max-microvolt = <750000>; 599 600 regulator-state-mem { 601 regulator-off-in-suspend; 602 }; 603 }; 604 }; 605 }; 606}; 607 608&uart2 { 609 pinctrl-0 = <&uart2m0_xfer>; 610 status = "okay"; 611}; 612