xref: /linux/arch/arm64/boot/dts/rockchip/rk3562-evb2-v10.dts (revision ec71f661a572a770d7c861cd52a50cbbb0e1a8d1)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2024-2025 Rockchip Electronics Co., Ltd.
4 *
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 "rk3562.dtsi"
14
15/ {
16	model = "Rockchip RK3562 EVB V20 Board";
17	compatible = "rockchip,rk3562-evb2-v10", "rockchip,rk3562";
18
19	chosen: chosen {
20		stdout-path = "serial0:1500000n8";
21	};
22
23	adc_keys: adc-keys {
24		compatible = "adc-keys";
25		io-channels = <&saradc0 1>;
26		io-channel-names = "buttons";
27		keyup-threshold-microvolt = <1800000>;
28		poll-interval = <100>;
29
30		button-vol-up {
31			linux,code = <KEY_VOLUMEUP>;
32			label = "volume up";
33			press-threshold-microvolt = <17000>;
34		};
35
36		button-vol-down {
37			linux,code = <KEY_VOLUMEDOWN>;
38			label = "volume down";
39			press-threshold-microvolt = <414000>;
40		};
41
42		button-menu {
43			linux,code = <KEY_MENU>;
44			label = "menu";
45			press-threshold-microvolt = <800000>;
46		};
47
48		button-back {
49			linux,code = <KEY_BACK>;
50			label = "back";
51			press-threshold-microvolt = <1200000>;
52		};
53	};
54
55	leds: leds {
56		compatible = "gpio-leds";
57
58		work_led: led-0 {
59			gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
60			linux,default-trigger = "heartbeat";
61		};
62	};
63
64	sdio_pwrseq: sdio-pwrseq {
65		compatible = "mmc-pwrseq-simple";
66		clocks = <&rk809 1>;
67		clock-names = "ext_clock";
68		pinctrl-names = "default";
69		pinctrl-0 = <&wifi_enable_h>;
70
71		/*
72		 * On the module itself this is one of these (depending
73		 * on the actual card populated):
74		 * - SDIO_RESET_L_WL_REG_ON
75		 * - PDN (power down when low)
76		 */
77		post-power-on-delay-ms = <200>;
78		reset-gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
79	};
80
81	vcc12v_dcin: regulator-vcc12v-dcin {
82		compatible = "regulator-fixed";
83		regulator-name = "vcc12v_dcin";
84		regulator-always-on;
85		regulator-boot-on;
86		regulator-min-microvolt = <12000000>;
87		regulator-max-microvolt = <12000000>;
88	};
89
90	vcc3v3_pcie20: regulator-vcc3v3-pcie20 {
91		compatible = "regulator-fixed";
92		regulator-name = "vcc3v3_pcie20";
93		regulator-min-microvolt = <3300000>;
94		regulator-max-microvolt = <3300000>;
95		enable-active-high;
96		gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
97		startup-delay-us = <5000>;
98		vin-supply = <&vcc12v_dcin>;
99	};
100
101	vcc5v0_sys: regulator-vcc5v0-sys {
102		compatible = "regulator-fixed";
103		regulator-name = "vcc5v0_sys";
104		regulator-always-on;
105		regulator-boot-on;
106		regulator-min-microvolt = <5000000>;
107		regulator-max-microvolt = <5000000>;
108		vin-supply = <&vcc12v_dcin>;
109	};
110
111	vcc5v0_usb: regulator-vcc5v0-usb {
112		compatible = "regulator-fixed";
113		regulator-name = "vcc5v0_usb";
114		regulator-always-on;
115		regulator-boot-on;
116		regulator-min-microvolt = <5000000>;
117		regulator-max-microvolt = <5000000>;
118		vin-supply = <&vcc12v_dcin>;
119	};
120
121	vcc5v0_usb_host: regulator-vcc5v0-usb-host {
122		compatible = "regulator-fixed";
123		regulator-name = "vcc5v0_usb_host";
124		regulator-boot-on;
125		regulator-always-on;
126		regulator-min-microvolt = <5000000>;
127		regulator-max-microvolt = <5000000>;
128		enable-active-high;
129		gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
130		vin-supply = <&vcc5v0_usb>;
131		pinctrl-names = "default";
132		pinctrl-0 = <&usb_host_pwren>;
133	};
134
135	vcc5v0_usb_otg: regulator-vcc5v0-usb-otg {
136		compatible = "regulator-fixed";
137		regulator-name = "vcc5v0_usb_otg";
138		regulator-min-microvolt = <5000000>;
139		regulator-max-microvolt = <5000000>;
140		enable-active-high;
141		gpio = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
142		vin-supply = <&vcc5v0_usb>;
143		pinctrl-names = "default";
144		pinctrl-0 = <&usb_otg_pwren>;
145	};
146
147	vcc3v3_clk: regulator-vcc3v3-clk {
148		compatible = "regulator-fixed";
149		regulator-name = "vcc3v3_clk";
150		regulator-min-microvolt = <3300000>;
151		regulator-max-microvolt = <3300000>;
152		vin-supply = <&vcc5v0_sys>;
153	};
154
155	vcc3v3_sys: regulator-vcc-sys {
156		compatible = "regulator-fixed";
157		regulator-name = "vcc3v3_sys";
158		regulator-always-on;
159		regulator-boot-on;
160		regulator-min-microvolt = <3300000>;
161		regulator-max-microvolt = <3300000>;
162		vin-supply = <&vcc12v_dcin>;
163	};
164};
165
166&combphy {
167	status = "okay";
168};
169
170&i2c0 {
171	status = "okay";
172
173	rk809: pmic@20 {
174		compatible = "rockchip,rk809";
175		reg = <0x20>;
176		interrupt-parent = <&gpio0>;
177		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
178
179		pinctrl-names = "default", "pmic-sleep",
180			"pmic-power-off", "pmic-reset";
181		pinctrl-0 = <&pmic_int>;
182		rockchip,system-power-controller;
183		wakeup-source;
184		#clock-cells = <1>;
185		clock-output-names = "rk808-clkout1", "rk808-clkout2";
186
187		vcc1-supply = <&vcc3v3_sys>;
188		vcc2-supply = <&vcc3v3_sys>;
189		vcc3-supply = <&vcc3v3_sys>;
190		vcc4-supply = <&vcc3v3_sys>;
191		vcc5-supply = <&vcc3v3_sys>;
192		vcc6-supply = <&vcc3v3_sys>;
193		vcc7-supply = <&vcc3v3_sys>;
194		vcc8-supply = <&vcc3v3_sys>;
195		vcc9-supply = <&vcc3v3_sys>;
196
197		regulators {
198			vdd_logic: DCDC_REG1 {
199				regulator-always-on;
200				regulator-boot-on;
201				regulator-min-microvolt = <500000>;
202				regulator-max-microvolt = <1350000>;
203				regulator-ramp-delay = <6001>;
204				regulator-initial-mode = <0x2>;
205				regulator-name = "vdd_logic";
206				regulator-state-mem {
207					regulator-off-in-suspend;
208				};
209			};
210
211			vdd_cpu: DCDC_REG2 {
212				regulator-always-on;
213				regulator-boot-on;
214				regulator-min-microvolt = <500000>;
215				regulator-max-microvolt = <1350000>;
216				regulator-ramp-delay = <6001>;
217				regulator-initial-mode = <0x2>;
218				regulator-name = "vdd_cpu";
219				regulator-state-mem {
220					regulator-off-in-suspend;
221				};
222			};
223
224			vcc_ddr: DCDC_REG3 {
225				regulator-always-on;
226				regulator-boot-on;
227				regulator-initial-mode = <0x2>;
228				regulator-name = "vcc_ddr";
229				regulator-state-mem {
230					regulator-on-in-suspend;
231				};
232			};
233
234			vdd_gpu: DCDC_REG4 {
235				regulator-always-on;
236				regulator-boot-on;
237				regulator-min-microvolt = <500000>;
238				regulator-max-microvolt = <1350000>;
239				regulator-ramp-delay = <6001>;
240				regulator-initial-mode = <0x2>;
241				regulator-name = "vdd_gpu";
242				regulator-state-mem {
243					regulator-off-in-suspend;
244				};
245			};
246
247			vcc2v8_dvp: LDO_REG1 {
248				regulator-min-microvolt = <2800000>;
249				regulator-max-microvolt = <2800000>;
250				regulator-name = "vcc2v8_dvp";
251				regulator-state-mem {
252					regulator-off-in-suspend;
253				};
254			};
255
256			vdda_0v9: LDO_REG2 {
257				regulator-always-on;
258				regulator-boot-on;
259				regulator-min-microvolt = <900000>;
260				regulator-max-microvolt = <900000>;
261				regulator-name = "vdda_0v9";
262				regulator-state-mem {
263					regulator-off-in-suspend;
264				};
265			};
266
267			vdda0v9_pmu: LDO_REG3 {
268				regulator-always-on;
269				regulator-boot-on;
270				regulator-min-microvolt = <900000>;
271				regulator-max-microvolt = <900000>;
272				regulator-name = "vdda0v9_pmu";
273				regulator-state-mem {
274				regulator-on-in-suspend;
275					regulator-suspend-microvolt = <900000>;
276				};
277			};
278
279			vccio_acodec: LDO_REG4 {
280				regulator-always-on;
281				regulator-boot-on;
282				regulator-min-microvolt = <3000000>;
283				regulator-max-microvolt = <3000000>;
284				regulator-name = "vccio_acodec";
285				regulator-state-mem {
286					regulator-off-in-suspend;
287				};
288			};
289
290			vccio_sd: LDO_REG5 {
291				regulator-always-on;
292				regulator-boot-on;
293				regulator-min-microvolt = <1800000>;
294				regulator-max-microvolt = <3300000>;
295				regulator-name = "vccio_sd";
296				regulator-state-mem {
297					regulator-off-in-suspend;
298				};
299			};
300
301			vcc3v3_pmu: LDO_REG6 {
302				regulator-always-on;
303				regulator-boot-on;
304				regulator-min-microvolt = <3300000>;
305				regulator-max-microvolt = <3300000>;
306				regulator-name = "vcc3v3_pmu";
307				regulator-state-mem {
308					regulator-on-in-suspend;
309					regulator-suspend-microvolt = <3300000>;
310				};
311			};
312
313			vcca_1v8: LDO_REG7 {
314				regulator-always-on;
315				regulator-boot-on;
316				regulator-min-microvolt = <1800000>;
317				regulator-max-microvolt = <1800000>;
318				regulator-name = "vcca_1v8";
319				regulator-state-mem {
320					regulator-off-in-suspend;
321				};
322			};
323
324			vcca1v8_pmu: LDO_REG8 {
325				regulator-always-on;
326				regulator-boot-on;
327				regulator-min-microvolt = <1800000>;
328				regulator-max-microvolt = <1800000>;
329				regulator-name = "vcca1v8_pmu";
330				regulator-state-mem {
331				regulator-on-in-suspend;
332					regulator-suspend-microvolt = <1800000>;
333				};
334			};
335
336			vcc1v8_dvp: LDO_REG9 {
337				regulator-min-microvolt = <1800000>;
338				regulator-max-microvolt = <1800000>;
339				regulator-name = "vcc1v8_dvp";
340				regulator-state-mem {
341					regulator-off-in-suspend;
342				};
343			};
344
345			vcc_1v8: DCDC_REG5 {
346				regulator-always-on;
347				regulator-boot-on;
348				regulator-min-microvolt = <1800000>;
349				regulator-max-microvolt = <1800000>;
350				regulator-name = "vcc_1v8";
351				regulator-state-mem {
352					regulator-off-in-suspend;
353				};
354			};
355
356			vcc_3v3: SWITCH_REG1 {
357				regulator-always-on;
358				regulator-boot-on;
359				regulator-name = "vcc_3v3";
360				regulator-state-mem {
361					regulator-off-in-suspend;
362				};
363			};
364
365			vcc3v3_sd: SWITCH_REG2 {
366				regulator-always-on;
367				regulator-boot-on;
368				regulator-name = "vcc3v3_sd";
369				regulator-state-mem {
370					regulator-off-in-suspend;
371				};
372			};
373		};
374	};
375};
376
377&pcie2x1 {
378	reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
379	vpcie3v3-supply = <&vcc3v3_pcie20>;
380	status = "okay";
381};
382
383&pinctrl {
384	sdio-pwrseq {
385		wifi_enable_h: wifi-enable-h {
386			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
387		};
388	};
389
390	usb {
391		usb_host_pwren: usb-host-pwren {
392			rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
393		};
394
395		usb_otg_pwren: usb-otg-pwren {
396			rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
397		};
398	};
399};
400
401&saradc0 {
402	vref-supply = <&vcc_1v8>;
403	status = "okay";
404};
405
406&sdhci {
407	bus-width = <8>;
408	no-sdio;
409	no-sd;
410	non-removable;
411	mmc-hs400-1_8v;
412	mmc-hs400-enhanced-strobe;
413	full-pwr-cycle-in-suspend;
414	status = "okay";
415};
416
417&sdmmc0 {
418	no-sdio;
419	no-mmc;
420	bus-width = <4>;
421	cap-mmc-highspeed;
422	cap-sd-highspeed;
423	disable-wp;
424	pinctrl-names = "default";
425	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
426	sd-uhs-sdr104;
427	vmmc-supply = <&vcc3v3_sd>;
428	vqmmc-supply = <&vccio_sd>;
429	status = "okay";
430};
431
432&sdmmc1 {
433	no-sd;
434	no-mmc;
435	bus-width = <4>;
436	disable-wp;
437	cap-sd-highspeed;
438	cap-sdio-irq;
439	keep-power-in-suspend;
440	mmc-pwrseq = <&sdio_pwrseq>;
441	non-removable;
442	pinctrl-names = "default";
443	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
444	sd-uhs-sdr104;
445	status = "okay";
446};
447
448&uart0 {
449	status = "okay";
450};
451
452&uart1 {
453	pinctrl-names = "default";
454	pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
455	status = "okay";
456};
457