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