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 mmc0 = &sdmmc; 23 mmc1 = &sdhci; 24 }; 25 26 avdd_0v9_s0: avdd-0v9-s0 { 27 compatible = "regulator-fixed"; 28 regulator-name = "avdd_0v9_s0"; 29 regulator-always-on; 30 regulator-boot-on; 31 regulator-min-microvolt = <900000>; 32 regulator-max-microvolt = <900000>; 33 vin-supply = <&vcc1v8_sys_s3>; 34 }; 35 36 avdd_1v8_s0: avdd-1v8-s0 { 37 compatible = "regulator-fixed"; 38 regulator-name = "avdd_1v8_s0"; 39 regulator-always-on; 40 regulator-boot-on; 41 regulator-min-microvolt = <1800000>; 42 regulator-max-microvolt = <1800000>; 43 vin-supply = <&vcc3v3_sys_s3>; 44 }; 45 46 clkin_gmac: external-gmac-clock { 47 compatible = "fixed-clock"; 48 clock-frequency = <125000000>; 49 clock-output-names = "clkin_gmac"; 50 #clock-cells = <0>; 51 }; 52 53 fan1 { 54 /* fan connected to P7 */ 55 compatible = "pwm-fan"; 56 pwms = <&pwm0 0 40000 0>; 57 cooling-levels = <0 80 170 255>; 58 }; 59 60 fan2 { 61 /* fan connected to P6 */ 62 compatible = "pwm-fan"; 63 pwms = <&pwm1 0 40000 0>; 64 cooling-levels = <0 80 170 255>; 65 }; 66 67 leds { 68 compatible = "gpio-leds"; 69 pinctrl-names = "default"; 70 pinctrl-0 = <&sys_grn_led_on &sys_red_led_on>; 71 72 led-0 { 73 label = "helios64:green:status"; 74 gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; 75 default-state = "on"; 76 }; 77 78 led-1 { 79 label = "helios64:red:fault"; 80 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; 81 default-state = "keep"; 82 }; 83 }; 84 85 pcie_power: pcie-power { 86 compatible = "regulator-fixed"; 87 enable-active-high; 88 gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>; 89 pinctrl-0 = <&pcie_pwr>; 90 pinctrl-names = "default"; 91 regulator-boot-on; 92 regulator-name = "pcie_power"; 93 startup-delay-us = <10000>; 94 vin-supply = <&vcc5v0_perdev>; 95 }; 96 97 vcc1v8_sys_s0: vcc1v8-sys-s0 { 98 compatible = "regulator-fixed"; 99 regulator-name = "vcc1v8_sys_s0"; 100 regulator-always-on; 101 regulator-boot-on; 102 regulator-min-microvolt = <1800000>; 103 regulator-max-microvolt = <1800000>; 104 vin-supply = <&vcc1v8_sys_s3>; 105 }; 106 107 vcc3v0_sd: vcc3v0-sd { 108 compatible = "regulator-fixed"; 109 enable-active-high; 110 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; 111 regulator-name = "vcc3v0_sd"; 112 regulator-boot-on; 113 regulator-min-microvolt = <3000000>; 114 regulator-max-microvolt = <3000000>; 115 pinctrl-names = "default"; 116 pinctrl-0 = <&sdmmc0_pwr_h>; 117 vin-supply = <&vcc3v3_sys_s3>; 118 }; 119 120 vcc3v3_sys_s3: vcc_lan: vcc3v3-sys-s3 { 121 compatible = "regulator-fixed"; 122 regulator-name = "vcc3v3_sys_s3"; 123 regulator-always-on; 124 regulator-boot-on; 125 regulator-min-microvolt = <3300000>; 126 regulator-max-microvolt = <3300000>; 127 vin-supply = <&vcc5v0_sys>; 128 129 regulator-state-mem { 130 regulator-on-in-suspend; 131 }; 132 }; 133 134 vcc5v0_perdev: vcc5v0-perdev { 135 compatible = "regulator-fixed"; 136 regulator-name = "vcc5v0_perdev"; 137 regulator-always-on; 138 regulator-boot-on; 139 regulator-min-microvolt = <5000000>; 140 regulator-max-microvolt = <5000000>; 141 vin-supply = <&vcc12v_dcin_bkup>; 142 }; 143 144 vcc5v0_sys: vcc5v0-sys { 145 compatible = "regulator-fixed"; 146 regulator-name = "vcc5v0_sys"; 147 regulator-always-on; 148 regulator-boot-on; 149 regulator-min-microvolt = <5000000>; 150 regulator-max-microvolt = <5000000>; 151 vin-supply = <&vcc12v_dcin_bkup>; 152 153 regulator-state-mem { 154 regulator-on-in-suspend; 155 }; 156 }; 157 158 vcc5v0_usb: vcc5v0-usb { 159 compatible = "regulator-fixed"; 160 enable-active-high; 161 gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>; 162 pinctrl-names = "default"; 163 pinctrl-0 = <&vcc5v0_usb_en>; 164 regulator-name = "vcc5v0_usb"; 165 regulator-always-on; 166 regulator-boot-on; 167 regulator-min-microvolt = <5000000>; 168 regulator-max-microvolt = <5000000>; 169 vin-supply = <&vcc5v0_perdev>; 170 }; 171 172 vcc12v_dcin: vcc12v-dcin { 173 compatible = "regulator-fixed"; 174 regulator-name = "vcc12v_dcin"; 175 regulator-always-on; 176 regulator-boot-on; 177 regulator-min-microvolt = <12000000>; 178 regulator-max-microvolt = <12000000>; 179 }; 180 181 vcc12v_dcin_bkup: vcc12v-dcin-bkup { 182 compatible = "regulator-fixed"; 183 regulator-name = "vcc12v_dcin_bkup"; 184 regulator-always-on; 185 regulator-boot-on; 186 regulator-min-microvolt = <12000000>; 187 regulator-max-microvolt = <12000000>; 188 vin-supply = <&vcc12v_dcin>; 189 }; 190}; 191 192/* 193 * The system doesn't run stable with cpu freq enabled, so disallow the lower 194 * frequencies until this problem is properly understood and resolved. 195 */ 196&cluster0_opp { 197 /delete-node/ opp00; 198 /delete-node/ opp01; 199 /delete-node/ opp02; 200 /delete-node/ opp03; 201 /delete-node/ opp04; 202}; 203 204&cluster1_opp { 205 /delete-node/ opp00; 206 /delete-node/ opp01; 207 /delete-node/ opp02; 208 /delete-node/ opp03; 209 /delete-node/ opp04; 210 /delete-node/ opp05; 211 /delete-node/ opp06; 212}; 213 214&cpu_b0 { 215 cpu-supply = <&vdd_cpu_b>; 216}; 217 218&cpu_b1 { 219 cpu-supply = <&vdd_cpu_b>; 220}; 221 222&cpu_l0 { 223 cpu-supply = <&vdd_cpu_l>; 224}; 225 226&cpu_l1 { 227 cpu-supply = <&vdd_cpu_l>; 228}; 229 230&cpu_l2 { 231 cpu-supply = <&vdd_cpu_l>; 232}; 233 234&cpu_l3 { 235 cpu-supply = <&vdd_cpu_l>; 236}; 237 238&emmc_phy { 239 status = "okay"; 240}; 241 242&gmac { 243 assigned-clock-parents = <&clkin_gmac>; 244 assigned-clocks = <&cru SCLK_RMII_SRC>; 245 clock_in_out = "input"; 246 phy-mode = "rgmii"; 247 phy-supply = <&vcc_lan>; 248 pinctrl-names = "default"; 249 pinctrl-0 = <&rgmii_pins &gphy_reset>; 250 rx_delay = <0x20>; 251 tx_delay = <0x28>; 252 snps,reset-active-low; 253 snps,reset-delays-us = <0 10000 50000>; 254 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; 255 status = "okay"; 256}; 257 258&i2c0 { 259 clock-frequency = <400000>; 260 i2c-scl-rising-time-ns = <168>; 261 i2c-scl-falling-time-ns = <4>; 262 status = "okay"; 263 264 rk808: pmic@1b { 265 compatible = "rockchip,rk808"; 266 reg = <0x1b>; 267 interrupt-parent = <&gpio0>; 268 interrupts = <10 IRQ_TYPE_LEVEL_LOW>; 269 clock-output-names = "xin32k", "rk808-clkout2"; 270 pinctrl-names = "default"; 271 pinctrl-0 = <&pmic_int_l>; 272 rockchip,system-power-controller; 273 vcc1-supply = <&vcc5v0_sys>; 274 vcc2-supply = <&vcc5v0_sys>; 275 vcc3-supply = <&vcc5v0_sys>; 276 vcc4-supply = <&vcc5v0_sys>; 277 vcc6-supply = <&vcc5v0_sys>; 278 vcc7-supply = <&vcc5v0_sys>; 279 vcc8-supply = <&vcc3v3_sys_s3>; 280 vcc9-supply = <&vcc5v0_sys>; 281 vcc10-supply = <&vcc5v0_sys>; 282 vcc11-supply = <&vcc5v0_sys>; 283 vcc12-supply = <&vcc3v3_sys_s3>; 284 vddio-supply = <&vcc3v0_s3>; 285 wakeup-source; 286 #clock-cells = <1>; 287 288 regulators { 289 vdd_cpu_l: DCDC_REG2 { 290 regulator-name = "vdd_cpu_l"; 291 regulator-always-on; 292 regulator-boot-on; 293 regulator-min-microvolt = <750000>; 294 regulator-max-microvolt = <1350000>; 295 regulator-ramp-delay = <6001>; 296 297 regulator-state-mem { 298 regulator-off-in-suspend; 299 }; 300 }; 301 302 vcc1v8_sys_s3: DCDC_REG4 { 303 regulator-name = "vcc1v8_sys_s3"; 304 regulator-always-on; 305 regulator-boot-on; 306 regulator-min-microvolt = <1800000>; 307 regulator-max-microvolt = <1800000>; 308 309 regulator-state-mem { 310 regulator-on-in-suspend; 311 regulator-suspend-microvolt = <1800000>; 312 }; 313 }; 314 315 vcc_sdio_s0: LDO_REG4 { 316 regulator-name = "vcc_sdio_s0"; 317 regulator-always-on; 318 regulator-boot-on; 319 regulator-min-microvolt = <1800000>; 320 regulator-max-microvolt = <3000000>; 321 322 regulator-state-mem { 323 regulator-on-in-suspend; 324 regulator-suspend-microvolt = <3000000>; 325 }; 326 }; 327 328 vcc3v0_s3: LDO_REG8 { 329 regulator-name = "vcc3v0_s3"; 330 regulator-always-on; 331 regulator-boot-on; 332 regulator-min-microvolt = <3000000>; 333 regulator-max-microvolt = <3000000>; 334 335 regulator-state-mem { 336 regulator-on-in-suspend; 337 regulator-suspend-microvolt = <3000000>; 338 }; 339 }; 340 }; 341 }; 342 343 vdd_cpu_b: regulator@40 { 344 compatible = "silergy,syr827"; 345 reg = <0x40>; 346 fcs,suspend-voltage-selector = <1>; 347 regulator-name = "vdd_cpu_b"; 348 regulator-always-on; 349 regulator-boot-on; 350 regulator-min-microvolt = <712500>; 351 regulator-max-microvolt = <1500000>; 352 regulator-ramp-delay = <1000>; 353 vin-supply = <&vcc5v0_sys>; 354 355 regulator-state-mem { 356 regulator-off-in-suspend; 357 }; 358 }; 359}; 360 361&i2c2 { 362 clock-frequency = <400000>; 363 i2c-scl-rising-time-ns = <160>; 364 i2c-scl-falling-time-ns = <30>; 365 status = "okay"; 366 367 temp@4c { 368 compatible = "national,lm75"; 369 reg = <0x4c>; 370 }; 371}; 372 373&io_domains { 374 audio-supply = <&vcc1v8_sys_s0>; 375 bt656-supply = <&vcc1v8_sys_s0>; 376 gpio1830-supply = <&vcc3v0_s3>; 377 sdmmc-supply = <&vcc_sdio_s0>; 378 status = "okay"; 379}; 380 381&pcie_phy { 382 status = "okay"; 383}; 384 385&pcie0 { 386 num-lanes = <2>; 387 status = "okay"; 388 389 vpcie12v-supply = <&vcc12v_dcin>; 390 vpcie3v3-supply = <&pcie_power>; 391 vpcie1v8-supply = <&avdd_1v8_s0>; 392 vpcie0v9-supply = <&avdd_0v9_s0>; 393}; 394 395&pinctrl { 396 gmac { 397 gphy_reset: gphy-reset { 398 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_output_low>; 399 }; 400 }; 401 402 leds { 403 sys_grn_led_on: sys-grn-led-on { 404 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>; 405 }; 406 407 sys_red_led_on: sys-red-led-on { 408 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>; 409 }; 410 }; 411 412 pcie { 413 pcie_pwr: pcie-pwr { 414 rockchip,pins = 415 <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; 416 }; 417 }; 418 419 pmic { 420 pmic_int_l: pmic-int-l { 421 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; 422 }; 423 }; 424 425 power { 426 vcc5v0_usb_en: vcc5v0-usb-en { 427 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; 428 }; 429 }; 430 431 vcc3v0-sd { 432 sdmmc0_pwr_h: sdmmc0-pwr-h { 433 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; 434 }; 435 }; 436}; 437 438&pmu_io_domains { 439 pmu1830-supply = <&vcc3v0_s3>; 440 status = "okay"; 441}; 442 443&pwm0 { 444 /* pwm-fan on P7 */ 445 status = "okay"; 446}; 447 448&pwm1 { 449 /* pwm-fan on P6 */ 450 status = "okay"; 451}; 452 453&sdhci { 454 bus-width = <8>; 455 mmc-hs200-1_8v; 456 non-removable; 457 vqmmc-supply = <&vcc1v8_sys_s0>; 458 status = "okay"; 459}; 460 461&sdmmc { 462 bus-width = <4>; 463 cap-sd-highspeed; 464 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; 465 disable-wp; 466 pinctrl-names = "default"; 467 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 468 vmmc-supply = <&vcc3v0_sd>; 469 vqmmc-supply = <&vcc_sdio_s0>; 470 status = "okay"; 471}; 472 473&tcphy1 { 474 /* phy for &usbdrd_dwc3_1 */ 475 status = "okay"; 476}; 477 478&u2phy1 { 479 status = "okay"; 480 481 otg-port { 482 /* phy for &usbdrd_dwc3_1 */ 483 phy-supply = <&vcc5v0_usb>; 484 status = "okay"; 485 }; 486}; 487 488&uart2 { 489 status = "okay"; 490}; 491 492&usbdrd3_1 { 493 status = "okay"; 494 495 usb@fe900000 { 496 dr_mode = "host"; 497 status = "okay"; 498 }; 499}; 500