xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3568-evb1-v10.dts (revision b197d4b893974c9eb4d7b38704c6d5c486235d6f)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7/dts-v1/;
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/leds/common.h>
10#include <dt-bindings/pinctrl/rockchip.h>
11#include "rk3568.dtsi"
12
13/ {
14	model = "Rockchip RK3568 EVB1 DDR4 V10 Board";
15	compatible = "rockchip,rk3568-evb1-v10", "rockchip,rk3568";
16
17	aliases {
18		ethernet0 = &gmac0;
19		ethernet1 = &gmac1;
20		mmc0 = &sdmmc0;
21		mmc1 = &sdhci;
22	};
23
24	chosen: chosen {
25		stdout-path = "serial2:1500000n8";
26	};
27
28	dc_12v: dc-12v {
29		compatible = "regulator-fixed";
30		regulator-name = "dc_12v";
31		regulator-always-on;
32		regulator-boot-on;
33		regulator-min-microvolt = <12000000>;
34		regulator-max-microvolt = <12000000>;
35	};
36
37	leds {
38		compatible = "gpio-leds";
39
40		led_work: led-0 {
41			gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
42			function = LED_FUNCTION_HEARTBEAT;
43			color = <LED_COLOR_ID_BLUE>;
44			linux,default-trigger = "heartbeat";
45			pinctrl-names = "default";
46			pinctrl-0 = <&led_work_en>;
47		};
48	};
49
50	rk809-sound {
51		compatible = "simple-audio-card";
52		simple-audio-card,format = "i2s";
53		simple-audio-card,name = "Analog RK809";
54		simple-audio-card,mclk-fs = <256>;
55
56		simple-audio-card,cpu {
57			sound-dai = <&i2s1_8ch>;
58		};
59		simple-audio-card,codec {
60			sound-dai = <&rk809>;
61		};
62	};
63
64	vcc3v3_sys: vcc3v3-sys {
65		compatible = "regulator-fixed";
66		regulator-name = "vcc3v3_sys";
67		regulator-always-on;
68		regulator-boot-on;
69		regulator-min-microvolt = <3300000>;
70		regulator-max-microvolt = <3300000>;
71		vin-supply = <&dc_12v>;
72	};
73
74	vcc5v0_sys: vcc5v0-sys {
75		compatible = "regulator-fixed";
76		regulator-name = "vcc5v0_sys";
77		regulator-always-on;
78		regulator-boot-on;
79		regulator-min-microvolt = <5000000>;
80		regulator-max-microvolt = <5000000>;
81		vin-supply = <&dc_12v>;
82	};
83
84	vcc5v0_usb: vcc5v0-usb {
85		compatible = "regulator-fixed";
86		regulator-name = "vcc5v0_usb";
87		regulator-always-on;
88		regulator-boot-on;
89		regulator-min-microvolt = <5000000>;
90		regulator-max-microvolt = <5000000>;
91		vin-supply = <&dc_12v>;
92	};
93
94	vcc5v0_usb_host: vcc5v0-usb-host {
95		compatible = "regulator-fixed";
96		enable-active-high;
97		gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
98		pinctrl-names = "default";
99		pinctrl-0 = <&vcc5v0_usb_host_en>;
100		regulator-name = "vcc5v0_usb_host";
101		regulator-min-microvolt = <5000000>;
102		regulator-max-microvolt = <5000000>;
103		vin-supply = <&vcc5v0_usb>;
104	};
105
106	vcc3v3_lcd0_n: vcc3v3-lcd0-n {
107		compatible = "regulator-fixed";
108		regulator-name = "vcc3v3_lcd0_n";
109		regulator-min-microvolt = <3300000>;
110		regulator-max-microvolt = <3300000>;
111		enable-active-high;
112		gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
113		vin-supply = <&vcc3v3_sys>;
114		pinctrl-names = "default";
115		pinctrl-0 = <&vcc3v3_lcd0_n_en>;
116
117		regulator-state-mem {
118			regulator-off-in-suspend;
119		};
120	};
121
122	vcc3v3_lcd1_n: vcc3v3-lcd1-n {
123		compatible = "regulator-fixed";
124		regulator-name = "vcc3v3_lcd1_n";
125		regulator-min-microvolt = <3300000>;
126		regulator-max-microvolt = <3300000>;
127		enable-active-high;
128		gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
129		vin-supply = <&vcc3v3_sys>;
130		pinctrl-names = "default";
131		pinctrl-0 = <&vcc3v3_lcd1_n_en>;
132
133		regulator-state-mem {
134			regulator-off-in-suspend;
135		};
136	};
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&gmac0 {
156	assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
157	assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
158	assigned-clock-rates = <0>, <125000000>;
159	clock_in_out = "output";
160	phy-handle = <&rgmii_phy0>;
161	phy-mode = "rgmii-id";
162	pinctrl-names = "default";
163	pinctrl-0 = <&gmac0_miim
164		     &gmac0_tx_bus2
165		     &gmac0_rx_bus2
166		     &gmac0_rgmii_clk
167		     &gmac0_rgmii_bus>;
168	status = "okay";
169};
170
171&gmac1 {
172	assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
173	assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
174	assigned-clock-rates = <0>, <125000000>;
175	clock_in_out = "output";
176	phy-handle = <&rgmii_phy1>;
177	phy-mode = "rgmii-id";
178	pinctrl-names = "default";
179	pinctrl-0 = <&gmac1m1_miim
180		     &gmac1m1_tx_bus2
181		     &gmac1m1_rx_bus2
182		     &gmac1m1_rgmii_clk
183		     &gmac1m1_rgmii_bus>;
184	status = "okay";
185};
186
187&gpu {
188	mali-supply = <&vdd_gpu>;
189	status = "okay";
190};
191
192&i2c0 {
193	status = "okay";
194
195	vdd_cpu: regulator@1c {
196		compatible = "tcs,tcs4525";
197		reg = <0x1c>;
198		fcs,suspend-voltage-selector = <1>;
199		regulator-name = "vdd_cpu";
200		regulator-always-on;
201		regulator-boot-on;
202		regulator-min-microvolt = <800000>;
203		regulator-max-microvolt = <1150000>;
204		regulator-ramp-delay = <2300>;
205		vin-supply = <&vcc5v0_sys>;
206
207		regulator-state-mem {
208			regulator-off-in-suspend;
209		};
210	};
211
212	rk809: pmic@20 {
213		compatible = "rockchip,rk809";
214		reg = <0x20>;
215		interrupt-parent = <&gpio0>;
216		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
217		assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
218		assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
219		#clock-cells = <1>;
220		clock-names = "mclk";
221		clocks = <&cru I2S1_MCLKOUT_TX>;
222		pinctrl-names = "default";
223		pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
224		rockchip,system-power-controller;
225		#sound-dai-cells = <0>;
226		vcc1-supply = <&vcc3v3_sys>;
227		vcc2-supply = <&vcc3v3_sys>;
228		vcc3-supply = <&vcc3v3_sys>;
229		vcc4-supply = <&vcc3v3_sys>;
230		vcc5-supply = <&vcc3v3_sys>;
231		vcc6-supply = <&vcc3v3_sys>;
232		vcc7-supply = <&vcc3v3_sys>;
233		vcc8-supply = <&vcc3v3_sys>;
234		vcc9-supply = <&vcc3v3_sys>;
235		wakeup-source;
236
237		regulators {
238			vdd_logic: DCDC_REG1 {
239				regulator-name = "vdd_logic";
240				regulator-always-on;
241				regulator-boot-on;
242				regulator-init-microvolt = <900000>;
243				regulator-initial-mode = <0x2>;
244				regulator-min-microvolt = <500000>;
245				regulator-max-microvolt = <1350000>;
246				regulator-ramp-delay = <6001>;
247
248				regulator-state-mem {
249					regulator-off-in-suspend;
250				};
251			};
252
253			vdd_gpu: DCDC_REG2 {
254				regulator-name = "vdd_gpu";
255				regulator-always-on;
256				regulator-init-microvolt = <900000>;
257				regulator-initial-mode = <0x2>;
258				regulator-min-microvolt = <500000>;
259				regulator-max-microvolt = <1350000>;
260				regulator-ramp-delay = <6001>;
261
262				regulator-state-mem {
263					regulator-off-in-suspend;
264				};
265			};
266
267			vcc_ddr: DCDC_REG3 {
268				regulator-name = "vcc_ddr";
269				regulator-always-on;
270				regulator-boot-on;
271				regulator-initial-mode = <0x2>;
272
273				regulator-state-mem {
274					regulator-on-in-suspend;
275				};
276			};
277
278			vdd_npu: DCDC_REG4 {
279				regulator-name = "vdd_npu";
280				regulator-init-microvolt = <900000>;
281				regulator-initial-mode = <0x2>;
282				regulator-min-microvolt = <500000>;
283				regulator-max-microvolt = <1350000>;
284				regulator-ramp-delay = <6001>;
285
286				regulator-state-mem {
287					regulator-off-in-suspend;
288				};
289			};
290
291			vcc_1v8: DCDC_REG5 {
292				regulator-name = "vcc_1v8";
293				regulator-always-on;
294				regulator-boot-on;
295				regulator-min-microvolt = <1800000>;
296				regulator-max-microvolt = <1800000>;
297
298				regulator-state-mem {
299					regulator-off-in-suspend;
300				};
301			};
302
303			vdda0v9_image: LDO_REG1 {
304				regulator-name = "vdda0v9_image";
305				regulator-min-microvolt = <900000>;
306				regulator-max-microvolt = <900000>;
307
308				regulator-state-mem {
309					regulator-off-in-suspend;
310				};
311			};
312
313			vdda_0v9: LDO_REG2 {
314				regulator-name = "vdda_0v9";
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-off-in-suspend;
322				};
323			};
324
325			vdda0v9_pmu: LDO_REG3 {
326				regulator-name = "vdda0v9_pmu";
327				regulator-always-on;
328				regulator-boot-on;
329				regulator-min-microvolt = <900000>;
330				regulator-max-microvolt = <900000>;
331
332				regulator-state-mem {
333					regulator-on-in-suspend;
334					regulator-suspend-microvolt = <900000>;
335				};
336			};
337
338			vccio_acodec: LDO_REG4 {
339				regulator-name = "vccio_acodec";
340				regulator-always-on;
341				regulator-min-microvolt = <3300000>;
342				regulator-max-microvolt = <3300000>;
343
344				regulator-state-mem {
345					regulator-off-in-suspend;
346				};
347			};
348
349			vccio_sd: LDO_REG5 {
350				regulator-name = "vccio_sd";
351				regulator-min-microvolt = <1800000>;
352				regulator-max-microvolt = <3300000>;
353
354				regulator-state-mem {
355					regulator-off-in-suspend;
356				};
357			};
358
359			vcc3v3_pmu: LDO_REG6 {
360				regulator-name = "vcc3v3_pmu";
361				regulator-always-on;
362				regulator-boot-on;
363				regulator-min-microvolt = <3300000>;
364				regulator-max-microvolt = <3300000>;
365
366				regulator-state-mem {
367					regulator-on-in-suspend;
368					regulator-suspend-microvolt = <3300000>;
369				};
370			};
371
372			vcca_1v8: LDO_REG7 {
373				regulator-name = "vcca_1v8";
374				regulator-always-on;
375				regulator-boot-on;
376				regulator-min-microvolt = <1800000>;
377				regulator-max-microvolt = <1800000>;
378
379				regulator-state-mem {
380					regulator-off-in-suspend;
381				};
382			};
383
384			vcca1v8_pmu: LDO_REG8 {
385				regulator-name = "vcca1v8_pmu";
386				regulator-always-on;
387				regulator-boot-on;
388				regulator-min-microvolt = <1800000>;
389				regulator-max-microvolt = <1800000>;
390
391				regulator-state-mem {
392					regulator-on-in-suspend;
393					regulator-suspend-microvolt = <1800000>;
394				};
395			};
396
397			vcca1v8_image: LDO_REG9 {
398				regulator-name = "vcca1v8_image";
399				regulator-min-microvolt = <1800000>;
400				regulator-max-microvolt = <1800000>;
401
402				regulator-state-mem {
403					regulator-off-in-suspend;
404				};
405			};
406
407			vcc_3v3: SWITCH_REG1 {
408				regulator-name = "vcc_3v3";
409				regulator-always-on;
410				regulator-boot-on;
411
412				regulator-state-mem {
413					regulator-off-in-suspend;
414				};
415			};
416
417			vcc3v3_sd: SWITCH_REG2 {
418				regulator-name = "vcc3v3_sd";
419
420				regulator-state-mem {
421					regulator-off-in-suspend;
422				};
423			};
424		};
425
426		codec {
427			mic-in-differential;
428		};
429	};
430};
431
432&i2c1 {
433	status = "okay";
434
435	touchscreen0: goodix@14 {
436		compatible = "goodix,gt1151";
437		reg = <0x14>;
438		interrupt-parent = <&gpio0>;
439		interrupts = <RK_PB5 IRQ_TYPE_EDGE_FALLING>;
440		AVDD28-supply = <&vcc3v3_lcd0_n>;
441		irq-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
442		pinctrl-names = "default";
443		pinctrl-0 = <&touch_int &touch_rst>;
444		reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
445		VDDIO-supply = <&vcc3v3_lcd0_n>;
446	};
447};
448
449&i2s1_8ch {
450	rockchip,trcm-sync-tx-only;
451	status = "okay";
452};
453
454&mdio0 {
455	rgmii_phy0: ethernet-phy@0 {
456		compatible = "ethernet-phy-ieee802.3-c22";
457		reg = <0x0>;
458		reset-assert-us = <20000>;
459		reset-deassert-us = <100000>;
460		reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
461	};
462};
463
464&mdio1 {
465	rgmii_phy1: ethernet-phy@0 {
466		compatible = "ethernet-phy-ieee802.3-c22";
467		reg = <0x0>;
468		reset-assert-us = <20000>;
469		reset-deassert-us = <100000>;
470		reset-gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_LOW>;
471	};
472};
473
474&pinctrl {
475	display {
476		vcc3v3_lcd0_n_en: vcc3v3_lcd0_n_en {
477			rockchip,pins = <0 RK_PC7 0 &pcfg_pull_none>;
478		};
479		vcc3v3_lcd1_n_en: vcc3v3_lcd1_n_en {
480			rockchip,pins = <0 RK_PC5 0 &pcfg_pull_none>;
481		};
482	};
483
484	leds {
485		led_work_en: led_work_en {
486			rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
487		};
488	};
489
490	pmic {
491		pmic_int: pmic_int {
492			rockchip,pins =
493				<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
494		};
495	};
496
497	touchscreen {
498		touch_int: touch_int {
499			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
500		};
501		touch_rst: touch_rst {
502			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
503		};
504	};
505
506	usb {
507		vcc5v0_usb_host_en: vcc5v0_usb_host_en {
508			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
509		};
510	};
511};
512
513&pmu_io_domains {
514	pmuio1-supply = <&vcc3v3_pmu>;
515	pmuio2-supply = <&vcc3v3_pmu>;
516	vccio1-supply = <&vccio_acodec>;
517	vccio2-supply = <&vcc_1v8>;
518	vccio3-supply = <&vccio_sd>;
519	vccio4-supply = <&vcc_1v8>;
520	vccio5-supply = <&vcc_3v3>;
521	vccio6-supply = <&vcc_1v8>;
522	vccio7-supply = <&vcc_3v3>;
523	status = "okay";
524};
525
526&saradc {
527	vref-supply = <&vcca_1v8>;
528	status = "okay";
529};
530
531&sdhci {
532	bus-width = <8>;
533	max-frequency = <200000000>;
534	non-removable;
535	pinctrl-names = "default";
536	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
537	status = "okay";
538};
539
540&sdmmc0 {
541	bus-width = <4>;
542	cap-sd-highspeed;
543	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
544	disable-wp;
545	pinctrl-names = "default";
546	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
547	sd-uhs-sdr104;
548	vmmc-supply = <&vcc3v3_sd>;
549	vqmmc-supply = <&vccio_sd>;
550	status = "okay";
551};
552
553&tsadc {
554	rockchip,hw-tshut-mode = <1>;
555	rockchip,hw-tshut-polarity = <0>;
556	status = "okay";
557};
558
559&uart2 {
560	status = "okay";
561};
562
563&usb_host0_ehci {
564	status = "okay";
565};
566
567&usb_host0_ohci {
568	status = "okay";
569};
570
571&usb_host1_ehci {
572	status = "okay";
573};
574
575&usb_host1_ohci {
576	status = "okay";
577};
578
579&usb2phy1 {
580	status = "okay";
581};
582
583&usb2phy1_host {
584	phy-supply = <&vcc5v0_usb_host>;
585	status = "okay";
586};
587
588&usb2phy1_otg {
589	phy-supply = <&vcc5v0_usb_host>;
590	status = "okay";
591};
592