Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3568-qnap-tsx33.dtsi

raw
1 #include <dt-bindings/input/input.h>
2 #include <dt-bindings/leds/common.h>
3 #include <dt-bindings/gpio/gpio.h>
4
5 / {
6 aliases {
7 mmc0 = &sdhci;
8 rtc0 = &rtc_rv8263;
9 };
10
11 chosen {
12 stdout-path = "serial2:115200n8";
13 };
14
15 keys: keys {
16 compatible = "gpio-keys";
17 pinctrl-0 = <&reset_button_pin>;
18 pinctrl-names = "default";
19
20 key-reset {
21 label = "reset";
22 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25 };
26
27 leds: leds {
28 compatible = "gpio-leds";
29
30 led-0 {
31 color = <LED_COLOR_ID_GREEN>;
32 function = LED_FUNCTION_DISK;
33 gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
34 label = "hdd1:green:disk";
35 linux,default-trigger = "disk-activity";
36 pinctrl-names = "default";
37 pinctrl-0 = <&hdd1_led_pin>;
38 };
39 };
40
41 dc_12v: regulator-dc-12v {
42 compatible = "regulator-fixed";
43 regulator-name = "dc_12v";
44 regulator-always-on;
45 regulator-boot-on;
46 regulator-min-microvolt = <12000000>;
47 regulator-max-microvolt = <12000000>;
48 };
49
50 vcc3v3_sys: regulator-vcc3v3-sys {
51 compatible = "regulator-fixed";
52 regulator-name = "vcc3v3_sys";
53 regulator-always-on;
54 regulator-boot-on;
55 regulator-min-microvolt = <3300000>;
56 regulator-max-microvolt = <3300000>;
57 vin-supply = <&dc_12v>;
58 };
59
60 vcc5v0_host: regulator-vcc5v0-host {
61 compatible = "regulator-fixed";
62 enable-active-high;
63 pinctrl-names = "default";
64 pinctrl-0 = <&vcc5v0_host_en>;
65 gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
66 regulator-name = "vcc5v0_host";
67 regulator-always-on;
68 regulator-boot-on;
69 regulator-min-microvolt = <5000000>;
70 regulator-max-microvolt = <5000000>;
71 vin-supply = <&vcc5v0_usb>;
72 };
73
74 vcc5v0_otg: regulator-vcc5v0-otg {
75 compatible = "regulator-fixed";
76 enable-active-high;
77 gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
78 pinctrl-names = "default";
79 pinctrl-0 = <&vcc5v0_otg_en>;
80 regulator-name = "vcc5v0_otg";
81 regulator-always-on;
82 regulator-boot-on;
83 regulator-min-microvolt = <5000000>;
84 regulator-max-microvolt = <5000000>;
85 vin-supply = <&vcc5v0_usb>;
86 };
87
88 vcc5v0_sys: regulator-vcc5v0-sys {
89 compatible = "regulator-fixed";
90 regulator-name = "vcc5v0_sys";
91 regulator-always-on;
92 regulator-boot-on;
93 regulator-min-microvolt = <5000000>;
94 regulator-max-microvolt = <5000000>;
95 vin-supply = <&dc_12v>;
96 };
97
98 vcc5v0_usb: regulator-vcc5v0-usb {
99 compatible = "regulator-fixed";
100 regulator-name = "vcc5v0_usb";
101 regulator-always-on;
102 regulator-boot-on;
103 regulator-min-microvolt = <5000000>;
104 regulator-max-microvolt = <5000000>;
105 vin-supply = <&dc_12v>;
106 };
107 };
108
109 /* Connected USB3 on TS133 / SATA1 on all the others */
110 &combphy1 {
111 status = "okay";
112 };
113
114 /* Connected to SATA2 */
115 &combphy2 {
116 status = "okay";
117 };
118
119 &cpu0 {
120 cpu-supply = <&vdd_cpu>;
121 };
122
123 &cpu1 {
124 cpu-supply = <&vdd_cpu>;
125 };
126
127 &cpu2 {
128 cpu-supply = <&vdd_cpu>;
129 };
130
131 &cpu3 {
132 cpu-supply = <&vdd_cpu>;
133 };
134
135 /*
136 * The MCU can provide system temperature too, but only by polling and of
137 * course also cannot set trip points. So attach to the cpu thermal-zone
138 * instead to control the fan.
139 */
140 &cpu_thermal {
141 trips {
142 case_fan0: case-fan0 {
143 hysteresis = <2000>;
144 temperature = <35000>;
145 type = "active";
146 };
147
148 case_fan1: case-fan1 {
149 hysteresis = <2000>;
150 temperature = <45000>;
151 type = "active";
152 };
153
154 case_fan2: case-fan2 {
155 hysteresis = <2000>;
156 temperature = <65000>;
157 type = "active";
158 };
159 };
160
161 cooling-maps {
162 /*
163 * Always provide some air movement, due to small case
164 * full of harddrives.
165 */
166 map1 {
167 cooling-device = <&fan THERMAL_NO_LIMIT 1>;
168 trip = <&case_fan0>;
169 };
170
171 map2 {
172 cooling-device = <&fan 2 3>;
173 trip = <&case_fan1>;
174 };
175
176 map3 {
177 cooling-device = <&fan 4 THERMAL_NO_LIMIT>;
178 trip = <&case_fan2>;
179 };
180 };
181 };
182
183 &gpu {
184 mali-supply = <&vdd_gpu>;
185 status = "okay";
186 };
187
188 &i2c0 {
189 status = "okay";
190
191 pmic@20 {
192 compatible = "rockchip,rk809";
193 reg = <0x20>;
194 interrupt-parent = <&gpio0>;
195 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
196 #clock-cells = <1>;
197 pinctrl-names = "default";
198 pinctrl-0 = <&pmic_int_l>;
199 system-power-controller;
200 vcc1-supply = <&vcc3v3_sys>;
201 vcc2-supply = <&vcc3v3_sys>;
202 vcc3-supply = <&vcc3v3_sys>;
203 vcc4-supply = <&vcc3v3_sys>;
204 vcc5-supply = <&vcc3v3_sys>;
205 vcc6-supply = <&vcc3v3_sys>;
206 vcc7-supply = <&vcc3v3_sys>;
207 vcc8-supply = <&vcc3v3_sys>;
208 vcc9-supply = <&vcc3v3_sys>;
209 wakeup-source;
210
211 regulators {
212 vdd_logic: DCDC_REG1 {
213 regulator-name = "vdd_logic";
214 regulator-always-on;
215 regulator-boot-on;
216 regulator-initial-mode = <0x2>;
217 regulator-min-microvolt = <500000>;
218 regulator-max-microvolt = <1350000>;
219 regulator-ramp-delay = <6001>;
220
221 regulator-state-mem {
222 regulator-off-in-suspend;
223 };
224 };
225
226 vdd_gpu: DCDC_REG2 {
227 regulator-name = "vdd_gpu";
228 regulator-always-on;
229 regulator-initial-mode = <0x2>;
230 regulator-min-microvolt = <500000>;
231 regulator-max-microvolt = <1350000>;
232 regulator-ramp-delay = <6001>;
233
234 regulator-state-mem {
235 regulator-off-in-suspend;
236 };
237 };
238
239 vcc_ddr: DCDC_REG3 {
240 regulator-name = "vcc_ddr";
241 regulator-always-on;
242 regulator-boot-on;
243 regulator-initial-mode = <0x2>;
244
245 regulator-state-mem {
246 regulator-on-in-suspend;
247 };
248 };
249
250 vdd_npu: DCDC_REG4 {
251 regulator-name = "vdd_npu";
252 regulator-initial-mode = <0x2>;
253 regulator-min-microvolt = <500000>;
254 regulator-max-microvolt = <1350000>;
255 regulator-ramp-delay = <6001>;
256
257 regulator-state-mem {
258 regulator-off-in-suspend;
259 };
260 };
261
262 vcc_1v8: DCDC_REG5 {
263 regulator-name = "vcc_1v8";
264 regulator-always-on;
265 regulator-boot-on;
266 regulator-min-microvolt = <1800000>;
267 regulator-max-microvolt = <1800000>;
268
269 regulator-state-mem {
270 regulator-off-in-suspend;
271 };
272 };
273
274 vdda0v9_image: LDO_REG1 {
275 regulator-name = "vdda0v9_image";
276 regulator-always-on;
277 regulator-min-microvolt = <900000>;
278 regulator-max-microvolt = <900000>;
279
280 regulator-state-mem {
281 regulator-off-in-suspend;
282 };
283 };
284
285 vdda_0v9: LDO_REG2 {
286 regulator-name = "vdda_0v9";
287 regulator-always-on;
288 regulator-boot-on;
289 regulator-min-microvolt = <900000>;
290 regulator-max-microvolt = <900000>;
291
292 regulator-state-mem {
293 regulator-off-in-suspend;
294 };
295 };
296
297 vdda0v9_pmu: LDO_REG3 {
298 regulator-name = "vdda0v9_pmu";
299 regulator-always-on;
300 regulator-boot-on;
301 regulator-min-microvolt = <900000>;
302 regulator-max-microvolt = <900000>;
303
304 regulator-state-mem {
305 regulator-on-in-suspend;
306 regulator-suspend-microvolt = <900000>;
307 };
308 };
309
310 vccio_acodec: LDO_REG4 {
311 regulator-name = "vccio_acodec";
312 regulator-always-on;
313 regulator-boot-on;
314 regulator-min-microvolt = <3300000>;
315 regulator-max-microvolt = <3300000>;
316
317 regulator-state-mem {
318 regulator-off-in-suspend;
319 };
320 };
321
322 vccio_sd: LDO_REG5 {
323 regulator-name = "vccio_sd";
324 regulator-min-microvolt = <1800000>;
325 regulator-max-microvolt = <3300000>;
326
327 regulator-state-mem {
328 regulator-off-in-suspend;
329 };
330 };
331
332 vcc3v3_pmu: LDO_REG6 {
333 regulator-name = "vcc3v3_pmu";
334 regulator-always-on;
335 regulator-boot-on;
336 regulator-min-microvolt = <3300000>;
337 regulator-max-microvolt = <3300000>;
338
339 regulator-state-mem {
340 regulator-on-in-suspend;
341 regulator-suspend-microvolt = <3300000>;
342 };
343 };
344
345 vcca_1v8: LDO_REG7 {
346 regulator-name = "vcca_1v8";
347 regulator-always-on;
348 regulator-boot-on;
349 regulator-min-microvolt = <1800000>;
350 regulator-max-microvolt = <1800000>;
351
352 regulator-state-mem {
353 regulator-off-in-suspend;
354 };
355 };
356
357 vcca1v8_pmu: LDO_REG8 {
358 regulator-name = "vcca1v8_pmu";
359 regulator-always-on;
360 regulator-boot-on;
361 regulator-min-microvolt = <1800000>;
362 regulator-max-microvolt = <1800000>;
363
364 regulator-state-mem {
365 regulator-on-in-suspend;
366 regulator-suspend-microvolt = <1800000>;
367 };
368 };
369
370 vcca1v8_image: LDO_REG9 {
371 regulator-name = "vcca1v8_image";
372 regulator-always-on;
373 regulator-min-microvolt = <1800000>;
374 regulator-max-microvolt = <1800000>;
375
376 regulator-state-mem {
377 regulator-off-in-suspend;
378 };
379 };
380
381 vcc_3v3: SWITCH_REG1 {
382 regulator-name = "vcc_3v3";
383 regulator-always-on;
384 regulator-boot-on;
385
386 regulator-state-mem {
387 regulator-off-in-suspend;
388 };
389 };
390
391 vcc3v3_sd: SWITCH_REG2 {
392 regulator-name = "vcc3v3_sd";
393 /*
394 * turning this off, breaks access to both
395 * PCIe controllers, refclk generator perhaps
396 */
397 regulator-always-on;
398 regulator-boot-on;
399
400 regulator-state-mem {
401 regulator-off-in-suspend;
402 };
403 };
404 };
405 };
406
407 vdd_cpu: regulator@40 {
408 compatible = "silergy,syr827";
409 reg = <0x40>;
410 fcs,suspend-voltage-selector = <1>;
411 regulator-name = "vdd_cpu";
412 regulator-always-on;
413 regulator-boot-on;
414 regulator-min-microvolt = <712500>;
415 regulator-max-microvolt = <1390000>;
416 regulator-ramp-delay = <2300>;
417 vin-supply = <&vcc5v0_sys>;
418 };
419 };
420
421 &i2c1 {
422 status = "okay";
423
424 rtc_rv8263: rtc@51 {
425 compatible = "microcrystal,rv8263";
426 reg = <0x51>;
427 wakeup-source;
428 };
429
430 /* eeprom for vital-product-data on the mainboard */
431 eeprom@54 {
432 compatible = "giantec,gt24c04a", "atmel,24c04";
433 reg = <0x54>;
434 label = "VPD_MB";
435 num-addresses = <2>;
436 pagesize = <16>;
437 read-only;
438 };
439 };
440
441 &pinctrl {
442 keys {
443 copy_button_pin: copy-button-pin {
444 rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
445 };
446
447 reset_button_pin: reset-button-pin {
448 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
449 };
450 };
451
452 leds {
453 hdd1_led_pin: hdd1-led-pin {
454 rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
455 };
456 };
457
458 pmic {
459 pmic_int_l: pmic-int-l {
460 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
461 };
462 };
463
464 usb {
465 vcc5v0_host_en: vcc5v0-host-en {
466 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
467 };
468
469 vcc5v0_otg_en: vcc5v0-otg-en {
470 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
471 };
472 };
473 };
474
475 &pmu_io_domains {
476 vccio4-supply = <&vcc_1v8>;
477 vccio6-supply = <&vcc_1v8>;
478 status = "okay";
479 };
480
481 &sata2 {
482 status = "okay";
483 };
484
485 &sdhci {
486 bus-width = <8>;
487 max-frequency = <200000000>;
488 non-removable;
489 pinctrl-names = "default";
490 pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
491 status = "okay";
492 };
493
494 &tsadc {
495 rockchip,hw-tshut-mode = <1>;
496 rockchip,hw-tshut-polarity = <0>;
497 status = "okay";
498 };
499
500 /*
501 * Connected to an MCU, that provides access to more LEDs,
502 * buzzer, fan control and more.
503 */
504 &uart0 {
505 status = "okay";
506
507 mcu: mcu {
508 fan: fan-0 {
509 #cooling-cells = <2>;
510 cooling-levels = <0 64 89 128 166 204 221 238>;
511 };
512
513 nvmem-layout {
514 compatible = "fixed-layout";
515 #address-cells = <1>;
516 #size-cells = <1>;
517
518 serial-number@0 {
519 reg = <0x0 0x13>;
520 };
521
522 ext-port@22 {
523 reg = <0x22 0x2>;
524 };
525
526 mac0: mac@24 {
527 compatible = "mac-base";
528 reg = <0x24 0x11>;
529 #nvmem-cell-cells = <1>;
530 };
531
532 mac1: mac@35 {
533 compatible = "mac-base";
534 reg = <0x35 0x11>;
535 #nvmem-cell-cells = <1>;
536 };
537
538 mac2: mac@46 {
539 compatible = "mac-base";
540 reg = <0x46 0x11>;
541 #nvmem-cell-cells = <1>;
542 };
543
544 mac3: mac@57 {
545 compatible = "mac-base";
546 reg = <0x57 0x11>;
547 #nvmem-cell-cells = <1>;
548 };
549
550 mac4: mac@68 {
551 compatible = "mac-base";
552 reg = <0x68 0x11>;
553 #nvmem-cell-cells = <1>;
554 };
555
556 mac5: mac@79 {
557 compatible = "mac-base";
558 reg = <0x79 0x11>;
559 #nvmem-cell-cells = <1>;
560 };
561
562 mac6: mac@8a {
563 compatible = "mac-base";
564 reg = <0x8a 0x11>;
565 #nvmem-cell-cells = <1>;
566 };
567
568 mac7: mac@9b {
569 compatible = "mac-base";
570 reg = <0x9b 0x11>;
571 #nvmem-cell-cells = <1>;
572 };
573 };
574 };
575 };
576
577 /*
578 * Pins available on CN3 connector at TTL voltage level (3V3).
579 * ,_ _.
580 * |1234| 1=TX 2=VCC
581 * `----' 3=RX 4=GND
582 */
583 &uart2 {
584 status = "okay";
585 };
586
587 &usb2phy0 {
588 status = "okay";
589 };
590
591 /* connected to usb_host0_xhci */
592 &usb2phy0_otg {
593 phy-supply = <&vcc5v0_otg>;
594 status = "okay";
595 };
596
597 /* front port */
598 &usb_host0_xhci {
599 dr_mode = "host";
600 status = "okay";
601 };