Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3399-kobol-helios64.dts

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