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