xref: /linux/arch/arm64/boot/dts/rockchip/rk3328-a1.dts (revision 95298d63c67673c654c08952672d016212b26054)
1// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
2// Copyright (c) 2017-2019 Arm Ltd.
3
4/dts-v1/;
5#include "rk3328.dtsi"
6
7/ {
8	model = "Beelink A1";
9	compatible = "azw,beelink-a1", "rockchip,rk3328";
10
11	/*
12	 * UART pins, as viewed with bottom of case removed:
13	 *
14	 *           Front
15	 *        /-------
16	 *  L    / o <- Gnd
17	 *  e   / o <-- Rx
18	 *  f  / o <--- Tx
19	 *  t / o <---- +3.3v
20	 *    |
21	 */
22	chosen {
23		stdout-path = "serial2:1500000n8";
24	};
25
26	gmac_clkin: external-gmac-clock {
27		compatible = "fixed-clock";
28		clock-frequency = <125000000>;
29		clock-output-names = "gmac_clkin";
30		#clock-cells = <0>;
31	};
32
33	vcc_host_5v: usb3-current-switch {
34		compatible = "regulator-fixed";
35		enable-active-high;
36		gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
37		pinctrl-names = "default";
38		pinctrl-0 = <&usb30_host_drv>;
39		regulator-name = "vcc_host_5v";
40		vin-supply = <&vcc_sys>;
41	};
42
43	vcc_sys: vcc-sys {
44		compatible = "regulator-fixed";
45		regulator-name = "vcc_sys";
46		regulator-min-microvolt = <5000000>;
47		regulator-max-microvolt = <5000000>;
48	};
49
50	ir-receiver {
51		compatible = "gpio-ir-receiver";
52		gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
53		linux,rc-map-name = "rc-beelink-gs1";
54	};
55};
56
57&analog_sound {
58	simple-audio-card,name = "Analog A/V";
59	status = "okay";
60};
61
62&codec {
63	mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
64	status = "okay";
65};
66
67&cpu0 {
68	cpu-supply = <&vdd_arm>;
69};
70
71&cpu1 {
72	cpu-supply = <&vdd_arm>;
73};
74
75&cpu2 {
76	cpu-supply = <&vdd_arm>;
77};
78
79&cpu3 {
80	cpu-supply = <&vdd_arm>;
81};
82
83&emmc {
84	bus-width = <8>;
85	cap-mmc-highspeed;
86	mmc-ddr-1_8v;
87	mmc-hs200-1_8v;
88	no-sd;
89	no-sdio;
90	non-removable;
91	pinctrl-names = "default";
92	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
93	vmmc-supply = <&vcc_io>;
94	vqmmc-supply = <&vcc18_emmc>;
95	status = "okay";
96};
97
98&gmac2io {
99	assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
100	assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
101	clock_in_out = "input";
102	phy-handle = <&rtl8211f>;
103	phy-mode = "rgmii";
104	phy-supply = <&vcc_io>;
105	pinctrl-names = "default";
106	pinctrl-0 = <&rgmiim1_pins>;
107	snps,aal;
108	snps,pbl = <0x4>;
109	tx_delay = <0x26>;
110	rx_delay = <0x11>;
111	status = "okay";
112
113	mdio {
114		compatible = "snps,dwmac-mdio";
115		#address-cells = <1>;
116		#size-cells = <0>;
117
118		rtl8211f: ethernet-phy@0 {
119			reg = <0>;
120			reset-assert-us = <10000>;
121			reset-deassert-us = <30000>;
122			reset-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_LOW>;
123		};
124	};
125};
126
127&gpu {
128	mali-supply = <&vdd_logic>;
129};
130
131&hdmi {
132	status = "okay";
133};
134
135&hdmiphy {
136	status = "okay";
137};
138
139&hdmi_sound {
140	status = "okay";
141};
142
143&i2c1 {
144	clock-frequency = <1000000>;
145	i2c-scl-falling-time-ns = <5>;
146	i2c-scl-rising-time-ns = <83>;
147	status = "okay";
148
149	pmic@18 {
150		compatible = "rockchip,rk805";
151		reg = <0x18>;
152		interrupt-parent = <&gpio2>;
153		interrupts = <RK_PA6 IRQ_TYPE_LEVEL_LOW>;
154		pinctrl-names = "default";
155		pinctrl-0 = <&pmic_int_l>;
156		rockchip,system-power-controller;
157		wakeup-source;
158
159		vcc1-supply = <&vcc_sys>;
160		vcc2-supply = <&vcc_sys>;
161		vcc3-supply = <&vcc_sys>;
162		vcc4-supply = <&vcc_sys>;
163		vcc5-supply = <&vcc_io>;
164		vcc6-supply = <&vcc_io>;
165
166		regulators {
167			vdd_logic: DCDC_REG1 {
168				regulator-name = "vdd_logic";
169				regulator-min-microvolt = <700000>;
170				regulator-max-microvolt = <1350000>;
171				regulator-always-on;
172				regulator-boot-on;
173				regulator-state-mem {
174					regulator-on-in-suspend;
175					regulator-suspend-microvolt = <1000000>;
176				};
177			};
178
179			vdd_arm: DCDC_REG2 {
180				regulator-name = "vdd_arm";
181				regulator-min-microvolt = <700000>;
182				regulator-max-microvolt = <1350000>;
183				regulator-always-on;
184				regulator-boot-on;
185				regulator-state-mem {
186					regulator-on-in-suspend;
187					regulator-suspend-microvolt = <950000>;
188				};
189			};
190
191			vcc_ddr: DCDC_REG3 {
192				regulator-name = "vcc_ddr";
193				regulator-always-on;
194				regulator-boot-on;
195				regulator-state-mem {
196					regulator-on-in-suspend;
197				};
198			};
199
200			vcc_io: DCDC_REG4 {
201				regulator-name = "vcc_io";
202				regulator-min-microvolt = <3300000>;
203				regulator-max-microvolt = <3300000>;
204				regulator-always-on;
205				regulator-boot-on;
206				regulator-state-mem {
207					regulator-on-in-suspend;
208					regulator-suspend-microvolt = <3300000>;
209				};
210			};
211
212			vdd_18: LDO_REG1 {
213				regulator-name = "vdd_18";
214				regulator-min-microvolt = <1800000>;
215				regulator-max-microvolt = <1800000>;
216				regulator-always-on;
217				regulator-boot-on;
218				regulator-state-mem {
219					regulator-on-in-suspend;
220					regulator-suspend-microvolt = <1800000>;
221				};
222			};
223
224			vcc18_emmc: LDO_REG2 {
225				regulator-name = "vcc_18emmc";
226				regulator-min-microvolt = <1800000>;
227				regulator-max-microvolt = <1800000>;
228				regulator-always-on;
229				regulator-boot-on;
230				regulator-state-mem {
231					regulator-on-in-suspend;
232					regulator-suspend-microvolt = <1800000>;
233				};
234			};
235
236			vdd_11: LDO_REG3 {
237				regulator-name = "vdd_11";
238				regulator-min-microvolt = <1100000>;
239				regulator-max-microvolt = <1100000>;
240				regulator-always-on;
241				regulator-boot-on;
242				regulator-state-mem {
243					regulator-on-in-suspend;
244					regulator-suspend-microvolt = <1100000>;
245				};
246			};
247		};
248	};
249};
250
251&i2s0 {
252	status = "okay";
253};
254
255&i2s1 {
256	status = "okay";
257};
258
259&io_domains {
260	vccio1-supply = <&vcc_io>;
261	vccio2-supply = <&vcc18_emmc>;
262	vccio3-supply = <&vcc_io>;
263	vccio4-supply = <&vdd_18>;
264	vccio5-supply = <&vcc_io>;
265	vccio6-supply = <&vdd_18>;
266	pmuio-supply = <&vcc_io>;
267	status = "okay";
268};
269
270&pinctrl {
271	pmic {
272		pmic_int_l: pmic-int-l {
273			rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
274		};
275	};
276
277	usb3 {
278		usb30_host_drv: usb30-host-drv {
279			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
280		};
281	};
282
283	wifi {
284		bt_dis: bt-dis {
285			rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_output_low>;
286		};
287
288		bt_wake_host: bt-wake-host {
289			rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>;
290		};
291
292		chip_en: chip-en {
293			rockchip,pins = <2 RK_PC3 RK_FUNC_GPIO &pcfg_output_low>;
294		};
295
296		host_wake_bt: host-wake-bt {
297			rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_output_high>;
298		};
299
300		wl_dis: wl-dis {
301			rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_output_low>;
302		};
303
304		wl_wake_host: wl-wake-host {
305			rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
306		};
307	};
308};
309
310&sdmmc {
311	bus-width = <4>;
312	cap-mmc-highspeed;
313	cap-sd-highspeed;
314	disable-wp;
315	pinctrl-names = "default";
316	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
317	vmmc-supply = <&vcc_io>;
318	vqmmc-supply = <&vcc_io>;
319	status = "okay";
320};
321
322&tsadc {
323	rockchip,hw-tshut-mode = <0>;
324	rockchip,hw-tshut-polarity = <0>;
325	status = "okay";
326};
327
328&uart2 {
329	status = "okay";
330};
331
332&u2phy {
333	status = "okay";
334};
335
336&u2phy_host {
337	status = "okay";
338};
339
340&u2phy_otg {
341	status = "okay";
342};
343
344&usb20_otg {
345	dr_mode = "host";
346	status = "okay";
347};
348
349&usb_host0_ehci {
350	pinctrl-names = "default";
351	pinctrl-0 = <&bt_dis &bt_wake_host &chip_en &host_wake_bt &wl_dis &wl_wake_host>;
352	status = "okay";
353};
354
355&vop {
356	status = "okay";
357};
358
359&vop_mmu {
360	status = "okay";
361};
362