1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2020 Aditya Prayoga <aditya@kobol.io> 4 */ 5 6/* 7 * The Kobol Helios64 is a board designed to operate as a NAS and optionally 8 * ships with an enclosing that can host five 2.5" hard disks. 9 * 10 * See https://wiki.kobol.io/helios64/intro/ for further details. 11 */ 12 13/dts-v1/; 14#include "rk3399.dtsi" 15#include "rk3399-opp.dtsi" 16 17/ { 18 model = "Kobol Helios64"; 19 compatible = "kobol,helios64", "rockchip,rk3399"; 20 21 aliases { 22 ethernet0 = &gmac; 23 mmc0 = &sdmmc; 24 mmc1 = &sdhci; 25 }; 26 27 avdd_0v9_s0: avdd-0v9-s0 { 28 compatible = "regulator-fixed"; 29 regulator-name = "avdd_0v9_s0"; 30 regulator-always-on; 31 regulator-boot-on; 32 regulator-min-microvolt = <900000>; 33 regulator-max-microvolt = <900000>; 34 vin-supply = <&vcc1v8_sys_s3>; 35 }; 36 37 avdd_1v8_s0: avdd-1v8-s0 { 38 compatible = "regulator-fixed"; 39 regulator-name = "avdd_1v8_s0"; 40 regulator-always-on; 41 regulator-boot-on; 42 regulator-min-microvolt = <1800000>; 43 regulator-max-microvolt = <1800000>; 44 vin-supply = <&vcc3v3_sys_s3>; 45 }; 46 47 chosen { 48 stdout-path = "serial2:1500000n8"; 49 }; 50 51 clkin_gmac: external-gmac-clock { 52 compatible = "fixed-clock"; 53 clock-frequency = <125000000>; 54 clock-output-names = "clkin_gmac"; 55 #clock-cells = <0>; 56 }; 57 58 fan1 { 59 /* fan connected to P7 */ 60 compatible = "pwm-fan"; 61 pwms = <&pwm0 0 40000 0>; 62 cooling-levels = <0 80 170 255>; 63 }; 64 65 fan2 { 66 /* fan connected to P6 */ 67 compatible = "pwm-fan"; 68 pwms = <&pwm1 0 40000 0>; 69 cooling-levels = <0 80 170 255>; 70 }; 71 72 leds { 73 compatible = "gpio-leds"; 74 pinctrl-names = "default"; 75 pinctrl-0 = <&sys_grn_led_on &sys_red_led_on>; 76 77 led-0 { 78 label = "helios64:green:status"; 79 gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; 80 default-state = "on"; 81 }; 82 83 led-1 { 84 label = "helios64:red:fault"; 85 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; 86 default-state = "keep"; 87 }; 88 }; 89 90 hdd_a_power: hdd-a-power { 91 compatible = "regulator-fixed"; 92 enable-active-high; 93 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>; 94 pinctrl-0 = <&hdd_a_power_en>; 95 pinctrl-names = "default"; 96 regulator-always-on; 97 regulator-boot-on; 98 regulator-name = "hdd_a_power"; 99 startup-delay-us = <2000000>; 100 }; 101 102 hdd_b_power: hdd-b-power { 103 compatible = "regulator-fixed"; 104 enable-active-high; 105 gpio = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>; 106 pinctrl-0 = <&hdd_b_power_en>; 107 pinctrl-names = "default"; 108 regulator-always-on; 109 regulator-boot-on; 110 regulator-name = "hdd_b_power"; 111 startup-delay-us = <2000000>; 112 }; 113 114 pcie_power: pcie-power { 115 compatible = "regulator-fixed"; 116 enable-active-high; 117 gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>; 118 pinctrl-0 = <&pcie_pwr>; 119 pinctrl-names = "default"; 120 regulator-boot-on; 121 regulator-name = "pcie_power"; 122 startup-delay-us = <10000>; 123 vin-supply = <&vcc5v0_perdev>; 124 }; 125 126 usblan_power: usblan-power { 127 compatible = "regulator-fixed"; 128 enable-active-high; 129 gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>; 130 pinctrl-names = "default"; 131 pinctrl-0 = <&usb_lan_en>; 132 regulator-name = "usblan_power"; 133 regulator-always-on; 134 regulator-boot-on; 135 vin-supply = <&vcc5v0_usb>; 136 }; 137 138 vcc1v8_sys_s0: vcc1v8-sys-s0 { 139 compatible = "regulator-fixed"; 140 regulator-name = "vcc1v8_sys_s0"; 141 regulator-always-on; 142 regulator-boot-on; 143 regulator-min-microvolt = <1800000>; 144 regulator-max-microvolt = <1800000>; 145 vin-supply = <&vcc1v8_sys_s3>; 146 }; 147 148 vcc3v0_sd: vcc3v0-sd { 149 compatible = "regulator-fixed"; 150 enable-active-high; 151 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; 152 regulator-name = "vcc3v0_sd"; 153 regulator-boot-on; 154 regulator-min-microvolt = <3000000>; 155 regulator-max-microvolt = <3000000>; 156 pinctrl-names = "default"; 157 pinctrl-0 = <&sdmmc0_pwr_h>; 158 vin-supply = <&vcc3v3_sys_s3>; 159 }; 160 161 vcc3v3_sys_s3: vcc_lan: vcc3v3-sys-s3 { 162 compatible = "regulator-fixed"; 163 regulator-name = "vcc3v3_sys_s3"; 164 regulator-always-on; 165 regulator-boot-on; 166 regulator-min-microvolt = <3300000>; 167 regulator-max-microvolt = <3300000>; 168 vin-supply = <&vcc5v0_sys>; 169 170 regulator-state-mem { 171 regulator-on-in-suspend; 172 }; 173 }; 174 175 vcc5v0_perdev: vcc5v0-perdev { 176 compatible = "regulator-fixed"; 177 regulator-name = "vcc5v0_perdev"; 178 regulator-always-on; 179 regulator-boot-on; 180 regulator-min-microvolt = <5000000>; 181 regulator-max-microvolt = <5000000>; 182 vin-supply = <&vcc12v_dcin_bkup>; 183 }; 184 185 vcc5v0_sys: vcc5v0-sys { 186 compatible = "regulator-fixed"; 187 regulator-name = "vcc5v0_sys"; 188 regulator-always-on; 189 regulator-boot-on; 190 regulator-min-microvolt = <5000000>; 191 regulator-max-microvolt = <5000000>; 192 vin-supply = <&vcc12v_dcin_bkup>; 193 194 regulator-state-mem { 195 regulator-on-in-suspend; 196 }; 197 }; 198 199 vcc5v0_usb: vcc5v0-usb { 200 compatible = "regulator-fixed"; 201 enable-active-high; 202 gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>; 203 pinctrl-names = "default"; 204 pinctrl-0 = <&vcc5v0_usb_en>; 205 regulator-name = "vcc5v0_usb"; 206 regulator-always-on; 207 regulator-boot-on; 208 regulator-min-microvolt = <5000000>; 209 regulator-max-microvolt = <5000000>; 210 vin-supply = <&vcc5v0_perdev>; 211 }; 212 213 vcc12v_dcin: vcc12v-dcin { 214 compatible = "regulator-fixed"; 215 regulator-name = "vcc12v_dcin"; 216 regulator-always-on; 217 regulator-boot-on; 218 regulator-min-microvolt = <12000000>; 219 regulator-max-microvolt = <12000000>; 220 }; 221 222 vcc12v_dcin_bkup: vcc12v-dcin-bkup { 223 compatible = "regulator-fixed"; 224 regulator-name = "vcc12v_dcin_bkup"; 225 regulator-always-on; 226 regulator-boot-on; 227 regulator-min-microvolt = <12000000>; 228 regulator-max-microvolt = <12000000>; 229 vin-supply = <&vcc12v_dcin>; 230 }; 231}; 232 233/* 234 * The system doesn't run stable with cpu freq enabled, so disallow the lower 235 * frequencies until this problem is properly understood and resolved. 236 */ 237&cluster0_opp { 238 /delete-node/ opp00; 239 /delete-node/ opp01; 240 /delete-node/ opp02; 241 /delete-node/ opp03; 242 /delete-node/ opp04; 243}; 244 245&cluster1_opp { 246 /delete-node/ opp00; 247 /delete-node/ opp01; 248 /delete-node/ opp02; 249 /delete-node/ opp03; 250 /delete-node/ opp04; 251 /delete-node/ opp05; 252 /delete-node/ opp06; 253}; 254 255&cpu_b0 { 256 cpu-supply = <&vdd_cpu_b>; 257}; 258 259&cpu_b1 { 260 cpu-supply = <&vdd_cpu_b>; 261}; 262 263&cpu_l0 { 264 cpu-supply = <&vdd_cpu_l>; 265}; 266 267&cpu_l1 { 268 cpu-supply = <&vdd_cpu_l>; 269}; 270 271&cpu_l2 { 272 cpu-supply = <&vdd_cpu_l>; 273}; 274 275&cpu_l3 { 276 cpu-supply = <&vdd_cpu_l>; 277}; 278 279&emmc_phy { 280 status = "okay"; 281}; 282 283&gmac { 284 assigned-clock-parents = <&clkin_gmac>; 285 assigned-clocks = <&cru SCLK_RMII_SRC>; 286 clock_in_out = "input"; 287 phy-mode = "rgmii"; 288 phy-supply = <&vcc_lan>; 289 pinctrl-names = "default"; 290 pinctrl-0 = <&rgmii_pins &gphy_reset>; 291 rx_delay = <0x20>; 292 tx_delay = <0x28>; 293 snps,reset-active-low; 294 snps,reset-delays-us = <0 10000 50000>; 295 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; 296 status = "okay"; 297}; 298 299&i2c0 { 300 clock-frequency = <400000>; 301 i2c-scl-rising-time-ns = <168>; 302 i2c-scl-falling-time-ns = <4>; 303 status = "okay"; 304 305 rk808: pmic@1b { 306 compatible = "rockchip,rk808"; 307 reg = <0x1b>; 308 interrupt-parent = <&gpio0>; 309 interrupts = <10 IRQ_TYPE_LEVEL_LOW>; 310 clock-output-names = "xin32k", "rk808-clkout2"; 311 pinctrl-names = "default"; 312 pinctrl-0 = <&pmic_int_l>; 313 rockchip,system-power-controller; 314 vcc1-supply = <&vcc5v0_sys>; 315 vcc2-supply = <&vcc5v0_sys>; 316 vcc3-supply = <&vcc5v0_sys>; 317 vcc4-supply = <&vcc5v0_sys>; 318 vcc6-supply = <&vcc5v0_sys>; 319 vcc7-supply = <&vcc5v0_sys>; 320 vcc8-supply = <&vcc3v3_sys_s3>; 321 vcc9-supply = <&vcc5v0_sys>; 322 vcc10-supply = <&vcc5v0_sys>; 323 vcc11-supply = <&vcc5v0_sys>; 324 vcc12-supply = <&vcc3v3_sys_s3>; 325 vddio-supply = <&vcc3v0_s3>; 326 wakeup-source; 327 #clock-cells = <1>; 328 329 regulators { 330 vdd_cpu_l: DCDC_REG2 { 331 regulator-name = "vdd_cpu_l"; 332 regulator-always-on; 333 regulator-boot-on; 334 regulator-min-microvolt = <750000>; 335 regulator-max-microvolt = <1350000>; 336 regulator-ramp-delay = <6001>; 337 338 regulator-state-mem { 339 regulator-off-in-suspend; 340 }; 341 }; 342 343 vcc1v8_sys_s3: DCDC_REG4 { 344 regulator-name = "vcc1v8_sys_s3"; 345 regulator-always-on; 346 regulator-boot-on; 347 regulator-min-microvolt = <1800000>; 348 regulator-max-microvolt = <1800000>; 349 350 regulator-state-mem { 351 regulator-on-in-suspend; 352 regulator-suspend-microvolt = <1800000>; 353 }; 354 }; 355 356 vcc_sdio_s0: LDO_REG4 { 357 regulator-name = "vcc_sdio_s0"; 358 regulator-always-on; 359 regulator-boot-on; 360 regulator-min-microvolt = <1800000>; 361 regulator-max-microvolt = <3000000>; 362 363 regulator-state-mem { 364 regulator-on-in-suspend; 365 regulator-suspend-microvolt = <3000000>; 366 }; 367 }; 368 369 vcc3v0_s3: LDO_REG8 { 370 regulator-name = "vcc3v0_s3"; 371 regulator-always-on; 372 regulator-boot-on; 373 regulator-min-microvolt = <3000000>; 374 regulator-max-microvolt = <3000000>; 375 376 regulator-state-mem { 377 regulator-on-in-suspend; 378 regulator-suspend-microvolt = <3000000>; 379 }; 380 }; 381 }; 382 }; 383 384 vdd_cpu_b: regulator@40 { 385 compatible = "silergy,syr827"; 386 reg = <0x40>; 387 fcs,suspend-voltage-selector = <1>; 388 regulator-name = "vdd_cpu_b"; 389 regulator-always-on; 390 regulator-boot-on; 391 regulator-min-microvolt = <712500>; 392 regulator-max-microvolt = <1500000>; 393 regulator-ramp-delay = <1000>; 394 vin-supply = <&vcc5v0_sys>; 395 396 regulator-state-mem { 397 regulator-off-in-suspend; 398 }; 399 }; 400}; 401 402&i2c2 { 403 clock-frequency = <400000>; 404 i2c-scl-rising-time-ns = <160>; 405 i2c-scl-falling-time-ns = <30>; 406 status = "okay"; 407 408 temp@4c { 409 compatible = "national,lm75"; 410 reg = <0x4c>; 411 }; 412}; 413 414&io_domains { 415 audio-supply = <&vcc1v8_sys_s0>; 416 bt656-supply = <&vcc1v8_sys_s0>; 417 gpio1830-supply = <&vcc3v0_s3>; 418 sdmmc-supply = <&vcc_sdio_s0>; 419 status = "okay"; 420}; 421 422&pcie_phy { 423 status = "okay"; 424}; 425 426&pcie0 { 427 ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; 428 max-link-speed = <2>; 429 num-lanes = <2>; 430 pinctrl-names = "default"; 431 status = "okay"; 432 433 vpcie12v-supply = <&vcc12v_dcin>; 434 vpcie3v3-supply = <&pcie_power>; 435 vpcie1v8-supply = <&avdd_1v8_s0>; 436 vpcie0v9-supply = <&avdd_0v9_s0>; 437}; 438 439&pinctrl { 440 gmac { 441 gphy_reset: gphy-reset { 442 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_output_low>; 443 }; 444 }; 445 446 leds { 447 sys_grn_led_on: sys-grn-led-on { 448 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>; 449 }; 450 451 sys_red_led_on: sys-red-led-on { 452 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>; 453 }; 454 }; 455 456 pcie { 457 pcie_pwr: pcie-pwr { 458 rockchip,pins = 459 <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; 460 }; 461 }; 462 463 pmic { 464 pmic_int_l: pmic-int-l { 465 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; 466 }; 467 }; 468 469 power { 470 hdd_a_power_en: hdd-a-power-en { 471 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 472 }; 473 474 hdd_b_power_en: hdd-b-power-en { 475 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; 476 }; 477 478 vcc5v0_usb_en: vcc5v0-usb-en { 479 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; 480 }; 481 482 usb_lan_en: usb-lan-en { 483 rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>; 484 }; 485 }; 486 487 vcc3v0-sd { 488 sdmmc0_pwr_h: sdmmc0-pwr-h { 489 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; 490 }; 491 }; 492}; 493 494&pmu_io_domains { 495 pmu1830-supply = <&vcc3v0_s3>; 496 status = "okay"; 497}; 498 499&pwm0 { 500 /* pwm-fan on P7 */ 501 status = "okay"; 502}; 503 504&pwm1 { 505 /* pwm-fan on P6 */ 506 status = "okay"; 507}; 508 509&sdhci { 510 bus-width = <8>; 511 mmc-hs200-1_8v; 512 non-removable; 513 vqmmc-supply = <&vcc1v8_sys_s0>; 514 status = "okay"; 515}; 516 517&sdmmc { 518 bus-width = <4>; 519 cap-sd-highspeed; 520 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; 521 disable-wp; 522 pinctrl-names = "default"; 523 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 524 vmmc-supply = <&vcc3v0_sd>; 525 vqmmc-supply = <&vcc_sdio_s0>; 526 status = "okay"; 527}; 528 529&spi1 { 530 status = "okay"; 531 532 spiflash: flash@0 { 533 compatible = "jedec,spi-nor"; 534 reg = <0x0>; 535 spi-max-frequency = <25000000>; 536 status = "okay"; 537 m25p,fast-read; 538 }; 539}; 540 541/* UEXT connector */ 542&spi2 { 543 status = "okay"; 544}; 545 546&spi5 { 547 status = "okay"; 548}; 549 550&tcphy1 { 551 /* phy for &usbdrd_dwc3_1 */ 552 status = "okay"; 553}; 554 555&tsadc { 556 /* tshut mode 0:CRU 1:GPIO */ 557 rockchip,hw-tshut-mode = <1>; 558 /* tshut polarity 0:LOW 1:HIGH */ 559 rockchip,hw-tshut-polarity = <1>; 560 status = "okay"; 561}; 562 563&u2phy1 { 564 status = "okay"; 565 566 otg-port { 567 /* phy for &usbdrd_dwc3_1 */ 568 phy-supply = <&vcc5v0_usb>; 569 status = "okay"; 570 }; 571}; 572 573&uart2 { 574 status = "okay"; 575}; 576 577&usbdrd3_1 { 578 status = "okay"; 579 580 usb@fe900000 { 581 dr_mode = "host"; 582 status = "okay"; 583 #address-cells = <1>; 584 #size-cells = <0>; 585 586 hub@1 { 587 compatible = "usb2109,0815"; 588 reg = <1>; 589 #address-cells = <1>; 590 #size-cells = <0>; 591 592 port@1 { 593 reg = <1>; 594 #trigger-source-cells = <0>; 595 }; 596 597 port@2 { 598 reg = <2>; 599 #trigger-source-cells = <0>; 600 }; 601 602 port@3 { 603 reg = <3>; 604 #trigger-source-cells = <0>; 605 }; 606 607 device@4 { 608 compatible = "usbbda,8156"; 609 reg = <4>; 610 #address-cells = <2>; 611 #size-cells = <0>; 612 613 interface@0 { /* interface 0 of configuration 1 */ 614 compatible = "usbifbda,8156.config1.0"; 615 reg = <0 1>; 616 }; 617 }; 618 }; 619 }; 620}; 621