xref: /openbmc/linux/arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts (revision 06b53b02945e3021addc6af2da3ac999d2221d23)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/*
4 * Author: Piotr Oniszczuk piotr.oniszczuk@gmail.com
5 * Based on Quartz64 DT by: Peter Geis pgwipeout@gmail.com
6 */
7
8/dts-v1/;
9
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/leds/common.h>
12#include <dt-bindings/pinctrl/rockchip.h>
13#include <dt-bindings/soc/rockchip,vop2.h>
14#include "rk3566.dtsi"
15
16/ {
17	model = "Rockchip RK3566 BOX DEMO Board";
18	compatible = "rockchip,rk3566-box-demo", "rockchip,rk3566";
19
20	aliases {
21		ethernet0 = &gmac1;
22		mmc0 = &sdmmc0;
23		mmc1 = &sdmmc1;
24		mmc2 = &sdhci;
25	};
26
27	chosen: chosen {
28		stdout-path = "serial2:1500000n8";
29	};
30
31	gmac1_clkin: external-gmac1-clock {
32		compatible = "fixed-clock";
33		clock-frequency = <125000000>;
34		clock-output-names = "gmac1_clkin";
35		#clock-cells = <0>;
36	};
37
38	hdmi-con {
39		compatible = "hdmi-connector";
40		type = "a";
41
42		port {
43			hdmi_con_in: endpoint {
44				remote-endpoint = <&hdmi_out_con>;
45			};
46		};
47	};
48
49	ir-receiver {
50		compatible = "gpio-ir-receiver";
51		gpios = <&gpio4 RK_PC3 GPIO_ACTIVE_LOW>;
52		pinctrl-0 = <&ir_int>;
53		linux,rc-map-name = "rc-beelink-gs1";
54		status = "okay";
55	};
56
57	leds {
58		compatible = "gpio-leds";
59
60		led_work: led-0 {
61			gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
62			function = LED_FUNCTION_HEARTBEAT;
63			color = <LED_COLOR_ID_BLUE>;
64			linux,default-trigger = "heartbeat";
65			pinctrl-names = "default";
66			pinctrl-0 = <&led_work_en>;
67		};
68	};
69
70	sdio_pwrseq: sdio-pwrseq {
71		status = "okay";
72		compatible = "mmc-pwrseq-simple";
73		clocks = <&pmucru CLK_RTC_32K>;
74		clock-names = "ext_clock";
75		pinctrl-names = "default";
76		pinctrl-0 = <&wifi_enable_h &wifi_32k>;
77		reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
78	};
79
80	spdif_dit: spdif-dit {
81		compatible = "linux,spdif-dit";
82		#sound-dai-cells = <0>;
83	};
84
85	spdif_sound: spdif-sound {
86		compatible = "simple-audio-card";
87		simple-audio-card,name = "SPDIF";
88
89		simple-audio-card,cpu {
90			sound-dai = <&spdif>;
91		};
92
93		simple-audio-card,codec {
94			sound-dai = <&spdif_dit>;
95		};
96	};
97
98	vcc12v0_dcin: regulator-vcc12v0-dcin {
99		compatible = "regulator-fixed";
100		regulator-name = "vcc12v0_dcin";
101		regulator-always-on;
102		regulator-boot-on;
103		regulator-min-microvolt = <12000000>;
104		regulator-max-microvolt = <12000000>;
105	};
106
107	vcc5v0_sys: regulator-vcc5v0-sys {
108		compatible = "regulator-fixed";
109		regulator-name = "vcc5v0_sys";
110		regulator-always-on;
111		regulator-boot-on;
112		regulator-min-microvolt = <5000000>;
113		regulator-max-microvolt = <5000000>;
114		vin-supply = <&vcc12v0_dcin>;
115	};
116
117	vcc3v3_sys: regulator-vcc3v3-sys {
118		compatible = "regulator-fixed";
119		regulator-name = "vcc3v3_sys";
120		regulator-always-on;
121		regulator-boot-on;
122		regulator-min-microvolt = <3300000>;
123		regulator-max-microvolt = <3300000>;
124		vin-supply = <&vcc12v0_dcin>;
125	};
126
127	vcc_3v3: regulator-vcc-3v3 {
128		compatible = "regulator-fixed";
129		regulator-name = "vcc_3v3";
130		regulator-always-on;
131		regulator-boot-on;
132		regulator-min-microvolt = <3300000>;
133		regulator-max-microvolt = <3300000>;
134		vin-supply = <&vcc3v3_sys>;
135	};
136
137	vcc5v0_usb_host: regulator-vcc5v0-usb-host {
138		compatible = "regulator-fixed";
139		enable-active-high;
140		gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
141		pinctrl-names = "default";
142		pinctrl-0 = <&vcc5v0_usb_host_en>;
143		regulator-name = "vcc5v0_usb_host";
144		regulator-min-microvolt = <5000000>;
145		regulator-max-microvolt = <5000000>;
146		vin-supply = <&vcc5v0_sys>;
147	};
148
149	vcc5v0_usb2_otg: regulator-vcc5v0-usb2-otg {
150		compatible = "regulator-fixed";
151		enable-active-high;
152		gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
153		pinctrl-names = "default";
154		pinctrl-0 = <&vcc5v0_usb2_otg_en>;
155		regulator-name = "vcc5v0_usb_otg";
156		regulator-min-microvolt = <5000000>;
157		regulator-max-microvolt = <5000000>;
158		vin-supply = <&vcc5v0_sys>;
159	};
160
161	vcca_1v8: regulator-vcca-1v8 {
162		compatible = "regulator-fixed";
163		regulator-name = "vcca_1v8";
164		regulator-always-on;
165		regulator-boot-on;
166		regulator-min-microvolt = <1800000>;
167		regulator-max-microvolt = <1800000>;
168		vin-supply = <&vcc3v3_sys>;
169	};
170
171	vdda_0v9: regulator-vdda-0v9 {
172		compatible = "regulator-fixed";
173		regulator-name = "vdda_0v9";
174		regulator-always-on;
175		regulator-boot-on;
176		regulator-min-microvolt = <900000>;
177		regulator-max-microvolt = <900000>;
178		vin-supply = <&vcc3v3_sys>;
179	};
180
181	vdd_fixed: regulator-vdd-fixed {
182		compatible = "regulator-fixed";
183		regulator-name = "vdd_fixed";
184		regulator-min-microvolt = <950000>;
185		regulator-max-microvolt = <950000>;
186		regulator-always-on;
187		regulator-boot-on;
188		vin-supply = <&vcc5v0_sys>;
189	};
190
191	vdd_cpu: regulator-vdd-cpu {
192		compatible = "pwm-regulator";
193		pwms = <&pwm0 0 5000 1>;
194		regulator-name = "vdd_cpu";
195		regulator-min-microvolt = <800000>;
196		regulator-max-microvolt = <1200000>;
197		regulator-always-on;
198		regulator-boot-on;
199		regulator-settling-time-up-us = <250>;
200		pwm-supply = <&vcc5v0_sys>;
201	};
202
203	vdd_logic: regulator-vdd-logic {
204		compatible = "pwm-regulator";
205		pwms = <&pwm1 0 5000 1>;
206		regulator-name = "vdd_logic";
207		regulator-min-microvolt = <800000>;
208		regulator-max-microvolt = <1100000>;
209		regulator-always-on;
210		regulator-boot-on;
211		regulator-settling-time-up-us = <250>;
212		pwm-supply = <&vcc5v0_sys>;
213	};
214};
215
216&combphy1 {
217	status = "okay";
218};
219
220&combphy2 {
221	status = "okay";
222};
223
224&cpu0 {
225	cpu-supply = <&vdd_cpu>;
226};
227
228&cpu1 {
229	cpu-supply = <&vdd_cpu>;
230};
231
232&cpu2 {
233	cpu-supply = <&vdd_cpu>;
234};
235
236&cpu3 {
237	cpu-supply = <&vdd_cpu>;
238};
239
240&gmac1 {
241	assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
242	assigned-clock-parents =  <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
243	phy-mode = "rgmii";
244	clock_in_out = "input";
245	pinctrl-names = "default";
246	pinctrl-0 = <&gmac1m1_miim
247		    &gmac1m1_tx_bus2
248		    &gmac1m1_rx_bus2
249		    &gmac1m1_rgmii_clk
250		    &gmac1m1_rgmii_bus
251		    &gmac1m1_clkinout>;
252	snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
253	snps,reset-active-low;
254	/* Reset time is 20ms, 100ms for rtl8211f */
255	snps,reset-delays-us = <0 20000 100000>;
256
257	tx_delay = <0x4f>;
258	rx_delay = <0x2d>;
259	phy-handle = <&rgmii_phy1>;
260	status = "okay";
261};
262
263&mdio1 {
264	rgmii_phy1: ethernet-phy@1 {
265		compatible = "ethernet-phy-ieee802.3-c22";
266		reg = <0x1>;
267	};
268};
269
270&hdmi {
271	assigned-clocks = <&cru CLK_HDMI_CEC>;
272	assigned-clock-rates = <32768>;
273	avdd-0v9-supply = <&vdda_0v9>;
274	avdd-1v8-supply = <&vcca_1v8>;
275	status = "okay";
276};
277
278&hdmi_in {
279	hdmi_in_vp0: endpoint {
280		remote-endpoint = <&vp0_out_hdmi>;
281	};
282};
283
284&hdmi_out {
285	hdmi_out_con: endpoint {
286		remote-endpoint = <&hdmi_con_in>;
287	};
288};
289
290&hdmi_sound {
291	status = "okay";
292};
293
294&gpu {
295	status = "okay";
296};
297
298&i2s0_8ch {
299	status = "okay";
300};
301
302&i2s1_8ch {
303	rockchip,trcm-sync-tx-only;
304	status = "okay";
305};
306
307&pinctrl {
308	bt {
309		bt_enable_h: bt-enable-h {
310			rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
311		};
312
313		bt_host_wake_l: bt-host-wake-l {
314			rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_down>;
315		};
316
317		bt_wake_l: bt-wake-l {
318			rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
319		};
320	};
321
322	sdio-pwrseq {
323		wifi_enable_h: wifi-enable-h {
324			rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
325		};
326
327		wifi_32k: wifi-32k {
328			rockchip,pins = <0 RK_PB0 2 &pcfg_pull_none>;
329		};
330	};
331
332	usb {
333		vcc5v0_usb_host_en: vcc5v0_usb_host_en {
334			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
335		};
336
337		vcc5v0_usb2_otg_en: vcc5v0_usb2_otg_en {
338			rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
339		};
340
341	};
342
343	ir {
344		ir_int: ir-int {
345			rockchip,pins = <4 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
346		};
347	};
348
349	led {
350		led_work_en: led_work_en {
351			rockchip,pins = <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
352		};
353	};
354};
355
356&pmu_io_domains {
357	pmuio2-supply = <&vcc_3v3>;
358	vccio1-supply = <&vcc_3v3>;
359	vccio3-supply = <&vcc_3v3>;
360	vccio4-supply = <&vcca_1v8>;
361	vccio5-supply = <&vcc_3v3>;
362	vccio6-supply = <&vcca_1v8>;
363	vccio7-supply = <&vcc_3v3>;
364	status = "okay";
365};
366
367&pwm0 {
368	status = "okay";
369};
370
371&pwm1 {
372	status = "okay";
373};
374
375&sdhci {
376	bus-width = <8>;
377	mmc-hs200-1_8v;
378	non-removable;
379	status = "okay";
380};
381
382&sdmmc0 {
383	bus-width = <4>;
384	cap-sd-highspeed;
385	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
386	disable-wp;
387	pinctrl-names = "default";
388	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
389	vmmc-supply = <&vcc_3v3>;
390	status = "okay";
391};
392
393&sdmmc1 {
394	bus-width = <4>;
395	cap-sd-highspeed;
396	disable-wp;
397	mmc-pwrseq = <&sdio_pwrseq>;
398	non-removable;
399	pinctrl-names = "default";
400	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
401	vmmc-supply = <&vcc_3v3>;
402	vqmmc-supply = <&vcca_1v8>;
403	status = "okay";
404};
405
406&spdif {
407	status = "okay";
408};
409
410&spi1 {
411	pinctrl-names = "default";
412	pinctrl-0 = <&spi1m1_cs0 &spi1m1_pins>;
413};
414
415&tsadc {
416	/* tshut mode 0:CRU 1:GPIO */
417	rockchip,hw-tshut-mode = <1>;
418	/* tshut polarity 0:LOW 1:HIGH */
419	rockchip,hw-tshut-polarity = <0>;
420	status = "okay";
421};
422
423&uart1 {
424	pinctrl-names = "default";
425	pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
426	status = "okay";
427	uart-has-rtscts;
428
429	bluetooth {
430		compatible = "brcm,bcm43438-bt";
431		clocks = <&pmucru CLK_RTC_32K>;
432		clock-names = "ext_clock";
433		device-wake-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
434		host-wake-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
435		shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
436		pinctrl-names = "default";
437		pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
438		vbat-supply = <&vcc3v3_sys>;
439		vddio-supply = <&vcca_1v8>;
440	};
441};
442
443&uart2 {
444	status = "okay";
445};
446
447&vop {
448	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
449	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
450	status = "okay";
451};
452
453&vop_mmu {
454	status = "okay";
455};
456
457&vp0 {
458	vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
459		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
460		remote-endpoint = <&hdmi_in_vp0>;
461	};
462};
463
464&vpu {
465	status = "okay";
466};
467
468&vdpu_mmu {
469	status = "okay";
470};
471
472&usb2phy0_host {
473	phy-supply = <&vcc5v0_usb_host>;
474	status = "okay";
475};
476
477&usb2phy0_otg {
478	vbus-supply = <&vcc5v0_usb2_otg>;
479	status = "okay";
480};
481
482&usb2phy1_host {
483	phy-supply = <&vcc5v0_usb_host>;
484	status = "okay";
485};
486
487&usb2phy1_otg {
488	phy-supply = <&vcc5v0_usb_host>;
489	status = "okay";
490};
491
492&usb2phy1 {
493	status = "okay";
494};
495
496&usb_host0_ehci {
497	status = "okay";
498};
499
500&usb_host0_ohci {
501	status = "okay";
502};
503
504&usb_host1_ehci {
505	status = "okay";
506};
507
508&usb_host1_ohci {
509	status = "okay";
510};
511
512&usb_host1_xhci {
513	status = "okay";
514};
515