xref: /linux/scripts/dtc/include-prefixes/arm64/rockchip/rk3576-nanopi-m5.dts (revision 115e74a29b530d121891238e9551c4bcdf7b04b5)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2025 FriendlyElec Computer Tech. Co., Ltd.
4 * Copyright (c) 2025 John Clark <inindev@gmail.com>
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/leds/common.h>
12#include <dt-bindings/pinctrl/rockchip.h>
13#include <dt-bindings/pwm/pwm.h>
14#include <dt-bindings/soc/rockchip,vop2.h>
15#include <dt-bindings/usb/pd.h>
16#include "rk3576.dtsi"
17
18/ {
19	model = "FriendlyElec NanoPi M5";
20	compatible = "friendlyarm,nanopi-m5", "rockchip,rk3576";
21
22	aliases {
23		ethernet0 = &gmac0;
24		ethernet1 = &gmac1;
25		mmc0 = &sdmmc;
26	};
27
28	chosen {
29		stdout-path = "serial0:1500000n8";
30	};
31
32	hdmi-con {
33		compatible = "hdmi-connector";
34		hdmi-pwr-supply = <&vcc5v_hdmi_tx>;
35		type = "a";
36
37		port {
38			hdmi_con_in: endpoint {
39				remote-endpoint = <&hdmi_out_con>;
40			};
41		};
42	};
43
44	keys {
45		compatible = "gpio-keys";
46
47		usr_button: key-1 {
48			debounce-interval = <50>;
49			gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_LOW>;
50			label = "user";
51			linux,code = <BTN_1>;
52			pinctrl-names = "default";
53			pinctrl-0 = <&usr_button_l>;
54			wakeup-source;
55		};
56	};
57
58	leds {
59		compatible = "gpio-leds";
60
61		led_sys: led-0 {
62			color = <LED_COLOR_ID_RED>;
63			function = LED_FUNCTION_HEARTBEAT;
64			gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_HIGH>;
65			label = "sys";
66			linux,default-trigger = "heartbeat";
67			pinctrl-names = "default";
68			pinctrl-0 = <&led_sys_h>;
69		};
70
71		led1: led-1 {
72			color = <LED_COLOR_ID_GREEN>;
73			function = LED_FUNCTION_LAN;
74			gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;
75			label = "led1";
76			linux,default-trigger = "netdev";
77			pinctrl-names = "default";
78			pinctrl-0 = <&led1_h>;
79		};
80
81		led2: led-2 {
82			color = <LED_COLOR_ID_GREEN>;
83			function = LED_FUNCTION_LAN;
84			gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_HIGH>;
85			label = "led2";
86			linux,default-trigger = "netdev";
87			pinctrl-names = "default";
88			pinctrl-0 = <&led2_h>;
89		};
90	};
91
92	usb3_port2_5v: regulator-usb3-port2-5v {
93		compatible = "regulator-fixed";
94		enable-active-high;
95		gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
96		pinctrl-names = "default";
97		pinctrl-0 = <&usb3_host_pwren_h>;
98		regulator-min-microvolt = <5000000>;
99		regulator-max-microvolt = <5000000>;
100		regulator-name = "usb3_port2_5v";
101		vin-supply = <&vcc5v0_sys_s5>;
102	};
103
104	vcc12v_dcin: regulator-vcc12v-dcin {
105		compatible = "regulator-fixed";
106		regulator-always-on;
107		regulator-boot-on;
108		regulator-min-microvolt = <12000000>;
109		regulator-max-microvolt = <12000000>;
110		regulator-name = "vcc12v_dcin";
111	};
112
113	vcc3v3_m2_keym: regulator-vcc3v3-m2-keym {
114		compatible = "regulator-fixed";
115		enable-active-high;
116		gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
117		pinctrl-names = "default";
118		pinctrl-0 = <&pcie0_pwren_h>;
119		regulator-min-microvolt = <3300000>;
120		regulator-max-microvolt = <3300000>;
121		regulator-name = "vcc3v3_m2_keym";
122		vin-supply = <&vcc5v0_sys_s5>;
123	};
124
125	vcc3v3_sd_s0: regulator-vcc3v3-sd-s0 {
126		compatible = "regulator-fixed";
127		enable-active-high;
128		gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
129		pinctrl-names = "default";
130		pinctrl-0 = <&sdmmc0_pwren_h>;
131		regulator-boot-on;
132		regulator-min-microvolt = <3300000>;
133		regulator-max-microvolt = <3300000>;
134		regulator-name = "vcc3v3_sd_s0";
135		vin-supply = <&vcc_3v3_s3>;
136	};
137
138	vcc5v0_sys_s5: regulator-vcc5v0-sys-s5 {
139		compatible = "regulator-fixed";
140		regulator-always-on;
141		regulator-boot-on;
142		regulator-min-microvolt = <5000000>;
143		regulator-max-microvolt = <5000000>;
144		regulator-name = "vcc5v0_sys_s5";
145		vin-supply = <&vcc12v_dcin>;
146	};
147
148	vcc5v0_usb_otg0: regulator-vcc5v0-usb-otg0 {
149		compatible = "regulator-fixed";
150		enable-active-high;
151		gpios = <&gpio0 RK_PD1 GPIO_ACTIVE_HIGH>;
152		pinctrl-names = "default";
153		pinctrl-0 = <&usb_otg0_pwren_h>;
154		regulator-min-microvolt = <5000000>;
155		regulator-max-microvolt = <5000000>;
156		regulator-name = "vcc5v0_usb_otg0";
157		vin-supply = <&vcc5v0_sys_s5>;
158	};
159
160	vcc5v_hdmi_tx: regulator-vcc5v-hdmi-tx {
161		compatible = "regulator-fixed";
162		regulator-always-on;
163		regulator-min-microvolt = <5000000>;
164		regulator-max-microvolt = <5000000>;
165		regulator-name = "vcc5v_hdmi_tx";
166		vin-supply = <&vcc5v0_sys_s5>;
167	};
168
169	vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
170		compatible = "regulator-fixed";
171		regulator-always-on;
172		regulator-boot-on;
173		regulator-min-microvolt = <1100000>;
174		regulator-max-microvolt = <1100000>;
175		regulator-name = "vcc_1v1_nldo_s3";
176		vin-supply = <&vcc5v0_sys_s5>;
177	};
178
179	vcc_2v0_pldo_s3: regulator-vcc-2v0-pldo-s3 {
180		compatible = "regulator-fixed";
181		regulator-always-on;
182		regulator-boot-on;
183		regulator-min-microvolt = <2000000>;
184		regulator-max-microvolt = <2000000>;
185		regulator-name = "vcc_2v0_pldo_s3";
186		vin-supply = <&vcc5v0_sys_s5>;
187	};
188
189	vcc_3v3_s0: regulator-vcc-3v3-s0 {
190		compatible = "regulator-fixed";
191		regulator-always-on;
192		regulator-boot-on;
193		regulator-min-microvolt = <3300000>;
194		regulator-max-microvolt = <3300000>;
195		regulator-name = "vcc_3v3_s0";
196		vin-supply = <&vcc_3v3_s3>;
197	};
198
199	sound {
200		compatible = "simple-audio-card";
201		pinctrl-names = "default";
202		pinctrl-0 = <&hp_det_l>;
203
204		simple-audio-card,format = "i2s";
205		simple-audio-card,hp-det-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>;
206		simple-audio-card,mclk-fs = <256>;
207		simple-audio-card,name = "realtek,rt5616-codec";
208
209		simple-audio-card,routing =
210			"Headphones", "HPOL",
211			"Headphones", "HPOR",
212			"IN1P", "Microphone Jack";
213		simple-audio-card,widgets =
214			"Headphone", "Headphone Jack",
215			"Microphone", "Microphone Jack";
216
217		simple-audio-card,codec {
218			sound-dai = <&rt5616>;
219		};
220
221		simple-audio-card,cpu {
222			sound-dai = <&sai2>;
223		};
224	};
225};
226
227&combphy0_ps {
228	status = "okay";
229};
230
231&combphy1_psu {
232	status = "okay";
233};
234
235&cpu_b0 {
236	cpu-supply = <&vdd_cpu_big_s0>;
237};
238
239&cpu_b1 {
240	cpu-supply = <&vdd_cpu_big_s0>;
241};
242
243&cpu_b2 {
244	cpu-supply = <&vdd_cpu_big_s0>;
245};
246
247&cpu_b3 {
248	cpu-supply = <&vdd_cpu_big_s0>;
249};
250
251&cpu_l0 {
252	cpu-supply = <&vdd_cpu_lit_s0>;
253};
254
255&cpu_l1 {
256	cpu-supply = <&vdd_cpu_lit_s0>;
257};
258
259&cpu_l2 {
260	cpu-supply = <&vdd_cpu_lit_s0>;
261};
262
263&cpu_l3 {
264	cpu-supply = <&vdd_cpu_lit_s0>;
265};
266
267&fspi1m1_pins {
268	/* gpio1_d5, gpio1_c4-c7 (clk, d0-d4) are for spi nor flash */
269	/* gpio1_d0-d4 muxed to sai2 audio functions */
270	rockchip,pins =
271		<1 RK_PD5 3 &pcfg_pull_none>,
272		<1 RK_PC4 3 &pcfg_pull_none>,
273		<1 RK_PC5 3 &pcfg_pull_none>,
274		<1 RK_PC6 3 &pcfg_pull_none>,
275		<1 RK_PC7 3 &pcfg_pull_none>;
276};
277
278&gmac0 {
279	clock_in_out = "output";
280	phy-handle = <&rgmii_phy0>;
281	phy-mode = "rgmii-id";
282	phy-supply = <&vcc_3v3_s3>;
283	pinctrl-names = "default";
284	pinctrl-0 = <&eth0m0_miim>,
285		    <&eth0m0_tx_bus2>,
286		    <&eth0m0_rx_bus2>,
287		    <&eth0m0_rgmii_clk>,
288		    <&eth0m0_rgmii_bus>;
289	status = "okay";
290};
291
292&gmac1 {
293	clock_in_out = "output";
294	phy-handle = <&rgmii_phy1>;
295	phy-mode = "rgmii-id";
296	phy-supply = <&vcc_3v3_s3>;
297	pinctrl-names = "default";
298	pinctrl-0 = <&eth1m0_miim>,
299		    <&eth1m0_tx_bus2>,
300		    <&eth1m0_rx_bus2>,
301		    <&eth1m0_rgmii_clk>,
302		    <&eth1m0_rgmii_bus>;
303	status = "okay";
304};
305
306&gpu {
307	mali-supply = <&vdd_gpu_s0>;
308	status = "okay";
309};
310
311&hdmi {
312	status = "okay";
313};
314
315&hdmi_in {
316	hdmi_in_vp0: endpoint {
317		remote-endpoint = <&vp0_out_hdmi>;
318	};
319};
320
321&hdmi_out {
322	hdmi_out_con: endpoint {
323		remote-endpoint = <&hdmi_con_in>;
324	};
325};
326
327&hdptxphy {
328	status = "okay";
329};
330
331&i2c1 {
332	status = "okay";
333
334	pmic@23 {
335		compatible = "rockchip,rk806";
336		reg = <0x23>;
337		#gpio-cells = <2>;
338		gpio-controller;
339		interrupt-parent = <&gpio0>;
340		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
341		pinctrl-names = "default";
342		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
343			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
344		system-power-controller;
345
346		vcc1-supply = <&vcc5v0_sys_s5>;
347		vcc2-supply = <&vcc5v0_sys_s5>;
348		vcc3-supply = <&vcc5v0_sys_s5>;
349		vcc4-supply = <&vcc5v0_sys_s5>;
350		vcc5-supply = <&vcc5v0_sys_s5>;
351		vcc6-supply = <&vcc5v0_sys_s5>;
352		vcc7-supply = <&vcc5v0_sys_s5>;
353		vcc8-supply = <&vcc5v0_sys_s5>;
354		vcc9-supply = <&vcc5v0_sys_s5>;
355		vcc10-supply = <&vcc5v0_sys_s5>;
356		vcc11-supply = <&vcc_2v0_pldo_s3>;
357		vcc12-supply = <&vcc5v0_sys_s5>;
358		vcc13-supply = <&vcc_1v1_nldo_s3>;
359		vcc14-supply = <&vcc_1v1_nldo_s3>;
360		vcca-supply = <&vcc5v0_sys_s5>;
361
362		rk806_dvs1_null: dvs1-null-pins {
363			pins = "gpio_pwrctrl1";
364			function = "pin_fun0";
365		};
366
367		rk806_dvs1_slp: dvs1-slp-pins {
368			pins = "gpio_pwrctrl1";
369			function = "pin_fun1";
370		};
371
372		rk806_dvs1_pwrdn: dvs1-pwrdn-pins {
373			pins = "gpio_pwrctrl1";
374			function = "pin_fun2";
375		};
376
377		rk806_dvs1_rst: dvs1-rst-pins {
378			pins = "gpio_pwrctrl1";
379			function = "pin_fun3";
380		};
381
382		rk806_dvs2_null: dvs2-null-pins {
383			pins = "gpio_pwrctrl2";
384			function = "pin_fun0";
385		};
386
387		rk806_dvs2_slp: dvs2-slp-pins {
388			pins = "gpio_pwrctrl2";
389			function = "pin_fun1";
390		};
391
392		rk806_dvs2_pwrdn: dvs2-pwrdn-pins {
393			pins = "gpio_pwrctrl2";
394			function = "pin_fun2";
395		};
396
397		rk806_dvs2_rst: dvs2-rst-pins {
398			pins = "gpio_pwrctrl2";
399			function = "pin_fun3";
400		};
401
402		rk806_dvs2_dvs: dvs2-dvs-pins {
403			pins = "gpio_pwrctrl2";
404			function = "pin_fun4";
405		};
406
407		rk806_dvs2_gpio: dvs2-gpio-pins {
408			pins = "gpio_pwrctrl2";
409			function = "pin_fun5";
410		};
411
412		rk806_dvs3_null: dvs3-null-pins {
413			pins = "gpio_pwrctrl3";
414			function = "pin_fun0";
415		};
416
417		rk806_dvs3_slp: dvs3-slp-pins {
418			pins = "gpio_pwrctrl3";
419			function = "pin_fun1";
420		};
421
422		rk806_dvs3_pwrdn: dvs3-pwrdn-pins {
423			pins = "gpio_pwrctrl3";
424			function = "pin_fun2";
425		};
426
427		rk806_dvs3_rst: dvs3-rst-pins {
428			pins = "gpio_pwrctrl3";
429			function = "pin_fun3";
430		};
431
432		rk806_dvs3_dvs: dvs3-dvs-pins {
433			pins = "gpio_pwrctrl3";
434			function = "pin_fun4";
435		};
436
437		rk806_dvs3_gpio: dvs3-gpio-pins {
438			pins = "gpio_pwrctrl3";
439			function = "pin_fun5";
440		};
441
442		regulators {
443			vdd_cpu_big_s0: dcdc-reg1 {
444				regulator-always-on;
445				regulator-boot-on;
446				regulator-enable-ramp-delay = <400>;
447				regulator-min-microvolt = <550000>;
448				regulator-max-microvolt = <950000>;
449				regulator-name = "vdd_cpu_big_s0";
450				regulator-ramp-delay = <12500>;
451
452				regulator-state-mem {
453					regulator-off-in-suspend;
454				};
455			};
456
457			vdd_npu_s0: dcdc-reg2 {
458				regulator-boot-on;
459				regulator-enable-ramp-delay = <400>;
460				regulator-min-microvolt = <550000>;
461				regulator-max-microvolt = <950000>;
462				regulator-name = "vdd_npu_s0";
463				regulator-ramp-delay = <12500>;
464
465				regulator-state-mem {
466					regulator-off-in-suspend;
467				};
468			};
469
470			vdd_cpu_lit_s0: dcdc-reg3 {
471				regulator-always-on;
472				regulator-boot-on;
473				regulator-min-microvolt = <550000>;
474				regulator-max-microvolt = <950000>;
475				regulator-name = "vdd_cpu_lit_s0";
476				regulator-ramp-delay = <12500>;
477
478				regulator-state-mem {
479					regulator-off-in-suspend;
480					regulator-suspend-microvolt = <750000>;
481				};
482			};
483
484			vcc_3v3_s3: dcdc-reg4 {
485				regulator-always-on;
486				regulator-boot-on;
487				regulator-min-microvolt = <3300000>;
488				regulator-max-microvolt = <3300000>;
489				regulator-name = "vcc_3v3_s3";
490
491				regulator-state-mem {
492					regulator-on-in-suspend;
493					regulator-suspend-microvolt = <3300000>;
494				};
495			};
496
497			vdd_gpu_s0: dcdc-reg5 {
498				regulator-boot-on;
499				regulator-enable-ramp-delay = <400>;
500				regulator-min-microvolt = <550000>;
501				regulator-max-microvolt = <900000>;
502				regulator-name = "vdd_gpu_s0";
503				regulator-ramp-delay = <12500>;
504
505				regulator-state-mem {
506					regulator-off-in-suspend;
507					regulator-suspend-microvolt = <850000>;
508				};
509			};
510
511			vddq_ddr_s0: dcdc-reg6 {
512				regulator-always-on;
513				regulator-boot-on;
514				regulator-name = "vddq_ddr_s0";
515
516				regulator-state-mem {
517					regulator-off-in-suspend;
518				};
519			};
520
521			vdd_logic_s0: dcdc-reg7 {
522				regulator-always-on;
523				regulator-boot-on;
524				regulator-min-microvolt = <550000>;
525				regulator-max-microvolt = <800000>;
526				regulator-name = "vdd_logic_s0";
527
528				regulator-state-mem {
529					regulator-off-in-suspend;
530				};
531			};
532
533			vcc_1v8_s3: dcdc-reg8 {
534				regulator-always-on;
535				regulator-boot-on;
536				regulator-min-microvolt = <1800000>;
537				regulator-max-microvolt = <1800000>;
538				regulator-name = "vcc_1v8_s3";
539
540				regulator-state-mem {
541					regulator-on-in-suspend;
542					regulator-suspend-microvolt = <1800000>;
543				};
544			};
545
546			vdd2_ddr_s3: dcdc-reg9 {
547				regulator-always-on;
548				regulator-boot-on;
549				regulator-name = "vdd2_ddr_s3";
550
551				regulator-state-mem {
552					regulator-on-in-suspend;
553				};
554			};
555
556			vdd_ddr_s0: dcdc-reg10 {
557				regulator-always-on;
558				regulator-boot-on;
559				regulator-min-microvolt = <550000>;
560				regulator-max-microvolt = <1200000>;
561				regulator-name = "vdd_ddr_s0";
562
563				regulator-state-mem {
564					regulator-off-in-suspend;
565				};
566			};
567
568			vcca_1v8_s0: pldo-reg1 {
569				regulator-always-on;
570				regulator-boot-on;
571				regulator-min-microvolt = <1800000>;
572				regulator-max-microvolt = <1800000>;
573				regulator-name = "vcca_1v8_s0";
574
575				regulator-state-mem {
576					regulator-off-in-suspend;
577				};
578			};
579
580			vcca1v8_pldo2_s0: pldo-reg2 {
581				regulator-always-on;
582				regulator-boot-on;
583				regulator-min-microvolt = <1800000>;
584				regulator-max-microvolt = <1800000>;
585				regulator-name = "vcca1v8_pldo2_s0";
586
587				regulator-state-mem {
588					regulator-off-in-suspend;
589				};
590			};
591
592			vdda_1v2_s0: pldo-reg3 {
593				regulator-always-on;
594				regulator-boot-on;
595				regulator-min-microvolt = <1200000>;
596				regulator-max-microvolt = <1200000>;
597				regulator-name = "vdda_1v2_s0";
598
599				regulator-state-mem {
600					regulator-off-in-suspend;
601				};
602			};
603
604			vcca_3v3_s0: pldo-reg4 {
605				regulator-always-on;
606				regulator-boot-on;
607				regulator-min-microvolt = <3300000>;
608				regulator-max-microvolt = <3300000>;
609				regulator-name = "vcca_3v3_s0";
610
611				regulator-state-mem {
612					regulator-off-in-suspend;
613				};
614			};
615
616			vccio_sd_s0: pldo-reg5 {
617				regulator-always-on;
618				regulator-boot-on;
619				regulator-min-microvolt = <1800000>;
620				regulator-max-microvolt = <3300000>;
621				regulator-name = "vccio_sd_s0";
622
623				regulator-state-mem {
624					regulator-off-in-suspend;
625				};
626			};
627
628			vcca1v8_pldo6_s3: pldo-reg6 {
629				regulator-always-on;
630				regulator-boot-on;
631				regulator-min-microvolt = <1800000>;
632				regulator-max-microvolt = <1800000>;
633				regulator-name = "vcca1v8_pldo6_s3";
634
635				regulator-state-mem {
636					regulator-on-in-suspend;
637					regulator-suspend-microvolt = <1800000>;
638				};
639			};
640
641			vdd_0v75_s3: nldo-reg1 {
642				regulator-always-on;
643				regulator-boot-on;
644				regulator-min-microvolt = <750000>;
645				regulator-max-microvolt = <750000>;
646				regulator-name = "vdd_0v75_s3";
647
648				regulator-state-mem {
649					regulator-on-in-suspend;
650					regulator-suspend-microvolt = <750000>;
651				};
652			};
653
654			vdda_ddr_pll_s0: nldo-reg2 {
655				regulator-always-on;
656				regulator-boot-on;
657				regulator-min-microvolt = <850000>;
658				regulator-max-microvolt = <850000>;
659				regulator-name = "vdda_ddr_pll_s0";
660
661				regulator-state-mem {
662					regulator-off-in-suspend;
663				};
664			};
665
666			vdda0v75_hdmi_s0: nldo-reg3 {
667				regulator-always-on;
668				regulator-boot-on;
669				regulator-min-microvolt = <837500>;
670				regulator-max-microvolt = <837500>;
671				regulator-name = "vdda0v75_hdmi_s0";
672
673				regulator-state-mem {
674					regulator-off-in-suspend;
675				};
676			};
677
678			vdda_0v85_s0: nldo-reg4 {
679				regulator-always-on;
680				regulator-boot-on;
681				regulator-min-microvolt = <850000>;
682				regulator-max-microvolt = <850000>;
683				regulator-name = "vdda_0v85_s0";
684
685				regulator-state-mem {
686					regulator-off-in-suspend;
687				};
688			};
689
690			vdda_0v75_s0: nldo-reg5 {
691				regulator-always-on;
692				regulator-boot-on;
693				regulator-min-microvolt = <750000>;
694				regulator-max-microvolt = <750000>;
695				regulator-name = "vdda_0v75_s0";
696
697				regulator-state-mem {
698					regulator-off-in-suspend;
699				};
700			};
701		};
702	};
703};
704
705&i2c2 {
706	status = "okay";
707
708	hym8563: rtc@51 {
709		compatible = "haoyu,hym8563";
710		reg = <0x51>;
711		#clock-cells = <0>;
712		clock-output-names = "hym8563";
713		interrupt-parent = <&gpio0>;
714		interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
715		pinctrl-names = "default";
716		pinctrl-0 = <&hym8563_int>;
717		wakeup-source;
718	};
719};
720
721&i2c5 {
722	clock-frequency = <200000>;
723	pinctrl-names = "default";
724	pinctrl-0 = <&i2c5m3_xfer>;
725	status = "okay";
726
727	rt5616: audio-codec@1b {
728		compatible = "realtek,rt5616";
729		reg = <0x1b>;
730		assigned-clocks = <&cru CLK_SAI2_MCLKOUT>;
731		assigned-clock-rates = <12288000>;
732		clocks = <&cru CLK_SAI2_MCLKOUT>;
733		clock-names = "mclk";
734		#sound-dai-cells = <0>;
735	};
736};
737
738&mdio0 {
739	rgmii_phy0: phy@1 {
740		compatible = "ethernet-phy-ieee802.3-c22";
741		reg = <0x1>;
742		clocks = <&cru REFCLKO25M_GMAC0_OUT>;
743		interrupt-parent = <&gpio2>;
744		interrupts = <RK_PB1 IRQ_TYPE_LEVEL_LOW>;
745		pinctrl-names = "default";
746		pinctrl-0 = <&gmac0_int>, <&gmac0_rst>;
747		reset-assert-us = <20000>;
748		reset-deassert-us = <100000>;
749		reset-gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
750	};
751};
752
753&mdio1 {
754	rgmii_phy1: phy@1 {
755		compatible = "ethernet-phy-ieee802.3-c22";
756		reg = <0x1>;
757		clocks = <&cru REFCLKO25M_GMAC1_OUT>;
758		interrupt-parent = <&gpio3>;
759		interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
760		pinctrl-names = "default";
761		pinctrl-0 = <&gmac1_int>, <&gmac1_rst>;
762		reset-assert-us = <20000>;
763		reset-deassert-us = <100000>;
764		reset-gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;
765	};
766};
767
768&pcie0 {
769	pinctrl-names = "default";
770	pinctrl-0 = <&pcie0_perstn>;
771	reset-gpios = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>;
772	vpcie3v3-supply = <&vcc3v3_m2_keym>;
773	status = "okay";
774};
775
776&pinctrl {
777	gmac {
778		gmac0_int: gmac0-int {
779			rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
780		};
781		gmac0_rst: gmac0-rst {
782			rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
783		};
784		gmac1_int: gmac1-int {
785			rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
786		};
787		gmac1_rst: gmac1-rst {
788			rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
789		};
790	};
791
792	hym8563 {
793		hym8563_int: hym8563-int {
794			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
795		};
796	};
797
798	keys {
799		usr_button_l: usr-button-l {
800			rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
801		};
802	};
803
804	leds {
805		led_sys_h: led-sys-h {
806			rockchip,pins = <2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
807		};
808		led1_h: led1-h {
809			rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
810		};
811		led2_h: led2-h {
812			rockchip,pins = <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
813		};
814	};
815
816	pcie {
817		pcie0_pwren_h: pcie0-pwren-h {
818			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
819		};
820		pcie0_perstn: pcie0-perstn {
821			rockchip,pins = <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
822		};
823	};
824
825	sdmmc {
826		sdmmc0_pwren_h: sdmmc0-pwren-h {
827			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
828		};
829	};
830
831	sound {
832		hp_det_l: hp-det-l {
833			rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
834		};
835	};
836
837	usb {
838		usb3_host_pwren_h: usb3-host-pwren-h {
839			rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
840		};
841		usb_otg0_pwren_h: usb-otg0-pwren-h {
842			rockchip,pins = <0 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
843		};
844	};
845};
846
847&sai2 {
848	status = "okay";
849};
850
851&saradc {
852	vref-supply = <&vcca_1v8_s0>;
853	status = "okay";
854};
855
856&sdmmc {
857	bus-width = <4>;
858	cap-mmc-highspeed;
859	cap-sd-highspeed;
860	disable-wp;
861	no-mmc;
862	no-sdio;
863	pinctrl-names = "default";
864	pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_det>, <&sdmmc0_bus4>;
865	sd-uhs-sdr104;
866	vmmc-supply = <&vcc_3v3_s3>;
867	vqmmc-supply = <&vcc3v3_sd_s0>;
868	status = "okay";
869};
870
871&sfc1 {
872	pinctrl-names = "default";
873	pinctrl-0 = <&fspi1m1_csn0>, <&fspi1m1_pins>;
874	status = "okay";
875
876	flash@0 {
877		compatible = "jedec,spi-nor";
878		reg = <0>;
879		m25p,fast-read;
880		spi-max-frequency = <50000000>;
881		spi-rx-bus-width = <4>;
882		spi-tx-bus-width = <1>;
883		vcc-supply = <&vcc_1v8_s3>;
884	};
885};
886
887&u2phy0 {
888	status = "okay";
889};
890
891&u2phy0_otg {
892	phy-supply = <&vcc5v0_usb_otg0>;
893	status = "okay";
894};
895
896&u2phy1 {
897	status = "okay";
898};
899
900&u2phy1_otg {
901	phy-supply = <&usb3_port2_5v>;
902	status = "okay";
903};
904
905&uart0 {
906	status = "okay";
907};
908
909&usbdp_phy {
910	status = "okay";
911};
912
913&usb_drd0_dwc3 {
914	dr_mode = "otg";
915	extcon = <&u2phy0>;
916	status = "okay";
917};
918
919&usb_drd1_dwc3 {
920	dr_mode = "host";
921	status = "okay";
922};
923
924&vop {
925	status = "okay";
926};
927
928&vop_mmu {
929	status = "okay";
930};
931
932&vp0 {
933	vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
934		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
935		remote-endpoint = <&hdmi_in_vp0>;
936	};
937};
938
939&wdt {
940	status = "okay";
941};
942