Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3566-orangepi-3b.dtsi

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