Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3568-hinlink-opc.dtsi

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6 #include <dt-bindings/pinctrl/rockchip.h>
7 #include <dt-bindings/soc/rockchip,vop2.h>
8 #include "rk3568.dtsi"
9
10 / {
11 aliases {
12 mmc0 = &sdhci;
13 mmc1 = &sdmmc0;
14 };
15
16 chosen {
17 stdout-path = "serial2:1500000n8";
18 };
19
20 hdmi-con {
21 compatible = "hdmi-connector";
22 type = "a";
23
24 port {
25 hdmi_con_in: endpoint {
26 remote-endpoint = <&hdmi_out_con>;
27 };
28 };
29 };
30
31 ir-receiver {
32 compatible = "gpio-ir-receiver";
33 gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
34 pinctrl-names = "default";
35 pinctrl-0 = <&pwm3_ir_m0>;
36 };
37
38 keys {
39 compatible = "gpio-keys";
40 pinctrl-names = "default";
41 pinctrl-0 = <&factory>;
42
43 button-factory {
44 label = "factory";
45 linux,code = <KEY_RESTART>;
46 gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
47 debounce-interval = <50>;
48 };
49 };
50
51 leds {
52 compatible = "gpio-leds";
53 pinctrl-names = "default";
54 pinctrl-0 = <&green_led>, <&red_led>, <&work_led>;
55
56 led-0 {
57 color = <LED_COLOR_ID_BLUE>;
58 function = LED_FUNCTION_WAN;
59 gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
60 linux,default-trigger = "netdev";
61 };
62
63 led-1 {
64 color = <LED_COLOR_ID_AMBER>;
65 function = LED_FUNCTION_DISK;
66 gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
67 };
68
69 led-2 {
70 color = <LED_COLOR_ID_GREEN>;
71 function = LED_FUNCTION_STATUS;
72 gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
73 linux,default-trigger = "default-on";
74 };
75 };
76
77 vcc0v9_2g5: regulator-0v9-vcc-2g5 {
78 compatible = "regulator-fixed";
79 regulator-name = "vcc0v9_2g5";
80 regulator-always-on;
81 regulator-boot-on;
82 regulator-min-microvolt = <900000>;
83 regulator-max-microvolt = <900000>;
84 vin-supply = <&vcc5v0_sys>;
85 };
86
87 vcc12v_dcinp: regulator-12v-vcc-dcinp {
88 compatible = "regulator-fixed";
89 regulator-name = "vcc12v_dcinp";
90 regulator-always-on;
91 regulator-boot-on;
92 regulator-min-microvolt = <12000000>;
93 regulator-max-microvolt = <12000000>;
94 };
95
96 vcc3v3_pi6c_05: regulator-3v3-vcc-pi6c-05 {
97 compatible = "regulator-fixed";
98 enable-active-high;
99 gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
100 pinctrl-names = "default";
101 pinctrl-0 = <&lan_power_en>;
102 regulator-name = "vcc3v3_pi6c_05";
103 regulator-min-microvolt = <3300000>;
104 regulator-max-microvolt = <3300000>;
105 vin-supply = <&vcc5v0_sys>;
106 };
107
108 vcc3v3_sd: regulator-3v3-vcc-sd {
109 compatible = "regulator-fixed";
110 enable-active-high;
111 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
112 pinctrl-names = "default";
113 pinctrl-0 = <&sd_pwren>;
114 regulator-name = "vcc3v3_sd";
115 regulator-min-microvolt = <3300000>;
116 regulator-max-microvolt = <3300000>;
117 vin-supply = <&vcc3v3_sys>;
118 };
119
120 vcc3v3_sys: regulator-3v3-vcc-sys {
121 compatible = "regulator-fixed";
122 regulator-name = "vcc3v3_sys";
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
130 vcc5v0_sys: regulator-5v0-vcc-sys {
131 compatible = "regulator-fixed";
132 regulator-name = "vcc5v0_sys";
133 regulator-always-on;
134 regulator-boot-on;
135 regulator-min-microvolt = <5000000>;
136 regulator-max-microvolt = <5000000>;
137 vin-supply = <&vcc12v_dcinp>;
138 };
139
140 vcc5v0_usb30_otg0: regulator-5v0-vcc-usb30-otg0 {
141 compatible = "regulator-fixed";
142 enable-active-high;
143 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
144 pinctrl-names = "default";
145 pinctrl-0 = <&usb_power_en>;
146 regulator-name = "vcc5v0_usb30_otg0";
147 regulator-min-microvolt = <5000000>;
148 regulator-max-microvolt = <5000000>;
149 vin-supply = <&vcc5v0_sys>;
150 };
151 };
152
153 &combphy0 {
154 status = "okay";
155 };
156
157 &combphy1 {
158 status = "okay";
159 };
160
161 &combphy2 {
162 status = "okay";
163 };
164
165 &cpu0 {
166 cpu-supply = <&vdd_cpu>;
167 };
168
169 &cpu1 {
170 cpu-supply = <&vdd_cpu>;
171 };
172
173 &cpu2 {
174 cpu-supply = <&vdd_cpu>;
175 };
176
177 &cpu3 {
178 cpu-supply = <&vdd_cpu>;
179 };
180
181 &gpu {
182 mali-supply = <&vdd_gpu>;
183 status = "okay";
184 };
185
186 &hdmi {
187 avdd-0v9-supply = <&vdda0v9_image>;
188 avdd-1v8-supply = <&vcca1v8_image>;
189 status = "okay";
190 };
191
192 &hdmi_in {
193 hdmi_in_vp0: endpoint {
194 remote-endpoint = <&vp0_out_hdmi>;
195 };
196 };
197
198 &hdmi_out {
199 hdmi_out_con: endpoint {
200 remote-endpoint = <&hdmi_con_in>;
201 };
202 };
203
204 &hdmi_sound {
205 status = "okay";
206 };
207
208 &i2c0 {
209 status = "okay";
210
211 vdd_cpu: regulator@1c {
212 compatible = "tcs,tcs4525";
213 reg = <0x1c>;
214 fcs,suspend-voltage-selector = <1>;
215 regulator-name = "vdd_cpu";
216 regulator-always-on;
217 regulator-boot-on;
218 regulator-min-microvolt = <800000>;
219 regulator-max-microvolt = <1150000>;
220 regulator-ramp-delay = <2300>;
221 vin-supply = <&vcc5v0_sys>;
222
223 regulator-state-mem {
224 regulator-off-in-suspend;
225 };
226 };
227
228 rk809: pmic@20 {
229 compatible = "rockchip,rk809";
230 reg = <0x20>;
231 #clock-cells = <1>;
232 interrupt-parent = <&gpio0>;
233 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
234 pinctrl-names = "default";
235 pinctrl-0 = <&pmic_int>;
236 system-power-controller;
237 wakeup-source;
238
239 vcc1-supply = <&vcc3v3_sys>;
240 vcc2-supply = <&vcc3v3_sys>;
241 vcc3-supply = <&vcc3v3_sys>;
242 vcc4-supply = <&vcc3v3_sys>;
243 vcc5-supply = <&vcc3v3_sys>;
244 vcc6-supply = <&vcc3v3_sys>;
245 vcc7-supply = <&vcc3v3_sys>;
246 vcc8-supply = <&vcc3v3_sys>;
247 vcc9-supply = <&vcc3v3_sys>;
248
249 regulators {
250 vdd_logic: DCDC_REG1 {
251 regulator-name = "vdd_logic";
252 regulator-always-on;
253 regulator-boot-on;
254 regulator-initial-mode = <0x2>;
255 regulator-min-microvolt = <500000>;
256 regulator-max-microvolt = <1350000>;
257 regulator-ramp-delay = <6001>;
258
259 regulator-state-mem {
260 regulator-off-in-suspend;
261 };
262 };
263
264 vdd_gpu: DCDC_REG2 {
265 regulator-name = "vdd_gpu";
266 regulator-always-on;
267 regulator-boot-on;
268 regulator-initial-mode = <0x2>;
269 regulator-min-microvolt = <500000>;
270 regulator-max-microvolt = <1350000>;
271 regulator-ramp-delay = <6001>;
272
273 regulator-state-mem {
274 regulator-off-in-suspend;
275 };
276 };
277
278 vcc_ddr: DCDC_REG3 {
279 regulator-name = "vcc_ddr";
280 regulator-always-on;
281 regulator-boot-on;
282 regulator-initial-mode = <0x2>;
283
284 regulator-state-mem {
285 regulator-on-in-suspend;
286 };
287 };
288
289 vdd_npu: DCDC_REG4 {
290 regulator-name = "vdd_npu";
291 regulator-initial-mode = <0x2>;
292 regulator-min-microvolt = <500000>;
293 regulator-max-microvolt = <1350000>;
294 regulator-ramp-delay = <6001>;
295
296 regulator-state-mem {
297 regulator-off-in-suspend;
298 };
299 };
300
301 vcc_1v8: DCDC_REG5 {
302 regulator-name = "vcc_1v8";
303 regulator-always-on;
304 regulator-boot-on;
305 regulator-min-microvolt = <1800000>;
306 regulator-max-microvolt = <1800000>;
307
308 regulator-state-mem {
309 regulator-off-in-suspend;
310 };
311 };
312
313 vdda0v9_image: LDO_REG1 {
314 regulator-name = "vdda0v9_image";
315 regulator-min-microvolt = <900000>;
316 regulator-max-microvolt = <900000>;
317
318 regulator-state-mem {
319 regulator-off-in-suspend;
320 };
321 };
322
323 vdda_0v9: LDO_REG2 {
324 regulator-name = "vdda_0v9";
325 regulator-always-on;
326 regulator-boot-on;
327 regulator-min-microvolt = <900000>;
328 regulator-max-microvolt = <900000>;
329
330 regulator-state-mem {
331 regulator-off-in-suspend;
332 };
333 };
334
335 vdda0v9_pmu: LDO_REG3 {
336 regulator-name = "vdda0v9_pmu";
337 regulator-always-on;
338 regulator-boot-on;
339 regulator-min-microvolt = <900000>;
340 regulator-max-microvolt = <900000>;
341
342 regulator-state-mem {
343 regulator-on-in-suspend;
344 regulator-suspend-microvolt = <900000>;
345 };
346 };
347
348 vccio_acodec: LDO_REG4 {
349 regulator-name = "vccio_acodec";
350 regulator-always-on;
351 regulator-min-microvolt = <3300000>;
352 regulator-max-microvolt = <3300000>;
353
354 regulator-state-mem {
355 regulator-off-in-suspend;
356 };
357 };
358
359 vccio_sd: LDO_REG5 {
360 regulator-name = "vccio_sd";
361 regulator-min-microvolt = <1800000>;
362 regulator-max-microvolt = <3300000>;
363
364 regulator-state-mem {
365 regulator-off-in-suspend;
366 };
367 };
368
369 vcc3v3_pmu: LDO_REG6 {
370 regulator-name = "vcc3v3_pmu";
371 regulator-always-on;
372 regulator-boot-on;
373 regulator-min-microvolt = <3300000>;
374 regulator-max-microvolt = <3300000>;
375
376 regulator-state-mem {
377 regulator-on-in-suspend;
378 regulator-suspend-microvolt = <3300000>;
379 };
380 };
381
382 vcca_1v8: LDO_REG7 {
383 regulator-name = "vcca_1v8";
384 regulator-always-on;
385 regulator-boot-on;
386 regulator-min-microvolt = <1800000>;
387 regulator-max-microvolt = <1800000>;
388
389 regulator-state-mem {
390 regulator-off-in-suspend;
391 };
392 };
393
394 vcca1v8_pmu: LDO_REG8 {
395 regulator-name = "vcca1v8_pmu";
396 regulator-always-on;
397 regulator-boot-on;
398 regulator-min-microvolt = <1800000>;
399 regulator-max-microvolt = <1800000>;
400
401 regulator-state-mem {
402 regulator-on-in-suspend;
403 regulator-suspend-microvolt = <1800000>;
404 };
405 };
406
407 vcca1v8_image: LDO_REG9 {
408 regulator-name = "vcca1v8_image";
409 regulator-min-microvolt = <1800000>;
410 regulator-max-microvolt = <1800000>;
411
412 regulator-state-mem {
413 regulator-off-in-suspend;
414 };
415 };
416
417 vcc_3v3: SWITCH_REG1 {
418 regulator-name = "vcc_3v3";
419 regulator-always-on;
420 regulator-boot-on;
421
422 regulator-state-mem {
423 regulator-off-in-suspend;
424 };
425 };
426
427 vcc3v3: SWITCH_REG2 {
428 regulator-name = "vcc3v3";
429 regulator-always-on;
430 regulator-boot-on;
431
432 regulator-state-mem {
433 regulator-off-in-suspend;
434 };
435 };
436 };
437 };
438 };
439
440 &i2c2 {
441 pinctrl-names = "default";
442 pinctrl-0 = <&i2c2m1_xfer>;
443 status = "okay";
444 };
445
446 &i2s0_8ch {
447 status = "okay";
448 };
449
450 &pcie2x1 {
451 pinctrl-names = "default";
452 pinctrl-0 = <&wifi_perstn>;
453 reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
454 vpcie3v3-supply = <&vcc3v3_pi6c_05>;
455 status = "okay";
456 };
457
458 &pcie30phy {
459 data-lanes = <1 2>;
460 status = "okay";
461 };
462
463 &pcie3x1 {
464 num-lanes = <1>;
465 pinctrl-names = "default";
466 pinctrl-0 = <&lan_resetb>;
467 reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
468 vpcie3v3-supply = <&vcc3v3_pi6c_05>;
469 status = "okay";
470 };
471
472 &pcie3x2 {
473 num-lanes = <1>;
474 pinctrl-names = "default";
475 pinctrl-0 = <&lan_reseta>;
476 reset-gpios = <&gpio2 RK_PD0 GPIO_ACTIVE_HIGH>;
477 vpcie3v3-supply = <&vcc3v3_pi6c_05>;
478 status = "okay";
479 };
480
481 &pinctrl {
482 keys {
483 factory: factory {
484 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
485 };
486 };
487
488 leds {
489 green_led: green-led {
490 rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
491 };
492
493 red_led: red-led {
494 rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
495 };
496
497 work_led: work-led {
498 rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
499 };
500 };
501
502 ir {
503 pwm3_ir_m0: pwm3-ir-m0 {
504 rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
505 };
506 };
507
508 mmc {
509 sd_pwren: sd-pwren {
510 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
511 };
512 };
513
514 pcie {
515 lan_power_en: lan-power-en {
516 rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
517 };
518
519 lan_reseta: lan-reseta {
520 rockchip,pins = <2 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
521 };
522
523 lan_resetb: lan-resetb {
524 rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
525 };
526
527 wifi_perstn: wifi-perstn {
528 rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
529 };
530 };
531
532 pmic {
533 pmic_int: pmic-int {
534 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
535 };
536 };
537
538 usb {
539 usb_power_en: usb-power-en {
540 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
541 };
542 };
543 };
544
545 &pmu_io_domains {
546 pmuio1-supply = <&vcc3v3_pmu>;
547 pmuio2-supply = <&vcc3v3_pmu>;
548 vccio1-supply = <&vccio_acodec>;
549 vccio2-supply = <&vcc_1v8>;
550 vccio3-supply = <&vccio_sd>;
551 vccio4-supply = <&vcc_1v8>;
552 vccio5-supply = <&vcc_3v3>;
553 vccio6-supply = <&vcc_1v8>;
554 vccio7-supply = <&vcc_3v3>;
555 status = "okay";
556 };
557
558 &pwm0 {
559 status = "okay";
560 };
561
562 &saradc {
563 vref-supply = <&vcca_1v8>;
564 status = "okay";
565 };
566
567 /* Via Type-C adapter */
568 &sata0 {
569 status = "okay";
570 };
571
572 &sdhci {
573 bus-width = <8>;
574 cap-mmc-highspeed;
575 max-frequency = <200000000>;
576 mmc-hs200-1_8v;
577 non-removable;
578 pinctrl-names = "default";
579 pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
580 vmmc-supply = <&vcc_3v3>;
581 vqmmc-supply = <&vcc_1v8>;
582 status = "okay";
583 };
584
585 &sdmmc0 {
586 bus-width = <4>;
587 cap-sd-highspeed;
588 cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
589 disable-wp;
590 pinctrl-names = "default";
591 pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
592 sd-uhs-sdr50;
593 vmmc-supply = <&vcc3v3_sd>;
594 vqmmc-supply = <&vccio_sd>;
595 status = "okay";
596 };
597
598 &tsadc {
599 rockchip,hw-tshut-mode = <1>;
600 rockchip,hw-tshut-polarity = <0>;
601 status = "okay";
602 };
603
604 &uart2 {
605 status = "okay";
606 };
607
608 &usb_host0_ehci {
609 status = "okay";
610 };
611
612 &usb_host0_ohci {
613 status = "okay";
614 };
615
616 &usb_host1_ehci {
617 status = "okay";
618 };
619
620 &usb_host1_ohci {
621 status = "okay";
622 };
623
624 &usb_host1_xhci {
625 status = "okay";
626 };
627
628 &usb2phy0 {
629 status = "okay";
630 };
631
632 &usb2phy0_host {
633 phy-supply = <&vcc5v0_usb30_otg0>;
634 status = "okay";
635 };
636
637 &usb2phy1 {
638 status = "okay";
639 };
640
641 &usb2phy1_host {
642 phy-supply = <&vcc5v0_usb30_otg0>;
643 status = "okay";
644 };
645
646 &usb2phy1_otg {
647 phy-supply = <&vcc5v0_usb30_otg0>;
648 status = "okay";
649 };
650
651 &vop {
652 assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
653 assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
654 status = "okay";
655 };
656
657 &vop_mmu {
658 status = "okay";
659 };
660
661 &vp0 {
662 vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
663 reg = <ROCKCHIP_VOP2_EP_HDMI0>;
664 remote-endpoint = <&hdmi_in_vp0>;
665 };
666 };