xref: /freebsd/sys/contrib/device-tree/src/arm64/allwinner/sun50i-h6-beelink-gs1.dts (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2// Copyright (C) 2019 Clément Péron <peron.clem@gmail.com>
3
4/dts-v1/;
5
6#include "sun50i-h6.dtsi"
7#include "sun50i-h6-cpu-opp.dtsi"
8
9#include <dt-bindings/gpio/gpio.h>
10
11/ {
12	model = "Beelink GS1";
13	compatible = "azw,beelink-gs1", "allwinner,sun50i-h6";
14
15	aliases {
16		ethernet0 = &emac;
17		serial0 = &uart0;
18	};
19
20	chosen {
21		stdout-path = "serial0:115200n8";
22	};
23
24	connector {
25		compatible = "hdmi-connector";
26		type = "a";
27		ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
28
29		port {
30			hdmi_con_in: endpoint {
31				remote-endpoint = <&hdmi_out_con>;
32			};
33		};
34	};
35
36	ext_osc32k: ext_osc32k_clk {
37		#clock-cells = <0>;
38		compatible = "fixed-clock";
39		clock-frequency = <32768>;
40		clock-output-names = "ext_osc32k";
41	};
42
43	leds {
44		compatible = "gpio-leds";
45
46		power {
47			label = "beelink:white:power";
48			gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
49			default-state = "on";
50		};
51	};
52
53	reg_vcc5v: vcc5v {
54		/* board wide 5V supply directly from the DC jack */
55		compatible = "regulator-fixed";
56		regulator-name = "vcc-5v";
57		regulator-min-microvolt = <5000000>;
58		regulator-max-microvolt = <5000000>;
59		regulator-always-on;
60	};
61
62	sound-spdif {
63		compatible = "simple-audio-card";
64		simple-audio-card,name = "sun50i-h6-spdif";
65
66		simple-audio-card,cpu {
67			sound-dai = <&spdif>;
68		};
69
70		simple-audio-card,codec {
71			sound-dai = <&spdif_out>;
72		};
73	};
74
75	spdif_out: spdif-out {
76		#sound-dai-cells = <0>;
77		compatible = "linux,spdif-dit";
78	};
79};
80
81&cpu0 {
82	cpu-supply = <&reg_dcdca>;
83};
84
85&de {
86	status = "okay";
87};
88
89&dwc3 {
90	status = "okay";
91};
92
93&ehci0 {
94	status = "okay";
95};
96
97&emac {
98	pinctrl-names = "default";
99	pinctrl-0 = <&ext_rgmii_pins>;
100	phy-mode = "rgmii";
101	phy-handle = <&ext_rgmii_phy>;
102	phy-supply = <&reg_aldo2>;
103	status = "okay";
104};
105
106&gpu {
107	mali-supply = <&reg_dcdcc>;
108	status = "okay";
109};
110
111&hdmi {
112	status = "okay";
113};
114
115&hdmi_out {
116	hdmi_out_con: endpoint {
117		remote-endpoint = <&hdmi_con_in>;
118	};
119};
120
121&mdio {
122	ext_rgmii_phy: ethernet-phy@1 {
123		compatible = "ethernet-phy-ieee802.3-c22";
124		reg = <1>;
125	};
126};
127
128&mmc0 {
129	vmmc-supply = <&reg_cldo1>;
130	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
131	bus-width = <4>;
132	status = "okay";
133};
134
135&mmc2 {
136	vmmc-supply = <&reg_cldo1>;
137	vqmmc-supply = <&reg_bldo2>;
138	non-removable;
139	cap-mmc-hw-reset;
140	bus-width = <8>;
141	status = "okay";
142};
143
144&ohci0 {
145	status = "okay";
146};
147
148&pio {
149	vcc-pd-supply = <&reg_cldo1>;
150	vcc-pg-supply = <&reg_aldo1>;
151};
152
153&r_i2c {
154	status = "okay";
155
156	axp805: pmic@36 {
157		compatible = "x-powers,axp805", "x-powers,axp806";
158		reg = <0x36>;
159		interrupt-parent = <&r_intc>;
160		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
161		interrupt-controller;
162		#interrupt-cells = <1>;
163		x-powers,self-working-mode;
164		vina-supply = <&reg_vcc5v>;
165		vinb-supply = <&reg_vcc5v>;
166		vinc-supply = <&reg_vcc5v>;
167		vind-supply = <&reg_vcc5v>;
168		vine-supply = <&reg_vcc5v>;
169		aldoin-supply = <&reg_vcc5v>;
170		bldoin-supply = <&reg_vcc5v>;
171		cldoin-supply = <&reg_vcc5v>;
172
173		regulators {
174			reg_aldo1: aldo1 {
175				regulator-always-on;
176				regulator-min-microvolt = <3300000>;
177				regulator-max-microvolt = <3300000>;
178				regulator-name = "vcc-pl";
179			};
180
181			reg_aldo2: aldo2 {
182				regulator-min-microvolt = <3300000>;
183				regulator-max-microvolt = <3300000>;
184				regulator-name = "vcc-ac200";
185				regulator-enable-ramp-delay = <100000>;
186			};
187
188			reg_aldo3: aldo3 {
189				regulator-always-on;
190				regulator-min-microvolt = <3300000>;
191				regulator-max-microvolt = <3300000>;
192				regulator-name = "vcc25-dram";
193			};
194
195			reg_bldo1: bldo1 {
196				regulator-always-on;
197				regulator-min-microvolt = <1800000>;
198				regulator-max-microvolt = <1800000>;
199				regulator-name = "vcc-bias-pll";
200			};
201
202			reg_bldo2: bldo2 {
203				regulator-always-on;
204				regulator-min-microvolt = <1800000>;
205				regulator-max-microvolt = <1800000>;
206				regulator-name = "vcc-efuse-pcie-hdmi-io";
207			};
208
209			reg_bldo3: bldo3 {
210				regulator-always-on;
211				regulator-min-microvolt = <1800000>;
212				regulator-max-microvolt = <1800000>;
213				regulator-name = "vcc-dcxoio";
214			};
215
216			bldo4 {
217				/* unused */
218			};
219
220			reg_cldo1: cldo1 {
221				regulator-always-on;
222				regulator-min-microvolt = <3300000>;
223				regulator-max-microvolt = <3300000>;
224				regulator-name = "vcc-3v3";
225			};
226
227			reg_cldo2: cldo2 {
228				regulator-min-microvolt = <3300000>;
229				regulator-max-microvolt = <3300000>;
230				regulator-name = "vcc-wifi-1";
231			};
232
233			reg_cldo3: cldo3 {
234				regulator-min-microvolt = <3300000>;
235				regulator-max-microvolt = <3300000>;
236				regulator-name = "vcc-wifi-2";
237			};
238
239			reg_dcdca: dcdca {
240				regulator-always-on;
241				regulator-min-microvolt = <810000>;
242				regulator-max-microvolt = <1160000>;
243				regulator-ramp-delay = <2500>;
244				regulator-name = "vdd-cpu";
245			};
246
247			reg_dcdcc: dcdcc {
248				regulator-enable-ramp-delay = <32000>;
249				regulator-min-microvolt = <810000>;
250				regulator-max-microvolt = <1080000>;
251				regulator-ramp-delay = <2500>;
252				regulator-name = "vdd-gpu";
253			};
254
255			reg_dcdcd: dcdcd {
256				regulator-always-on;
257				regulator-min-microvolt = <960000>;
258				regulator-max-microvolt = <960000>;
259				regulator-name = "vdd-sys";
260			};
261
262			reg_dcdce: dcdce {
263				regulator-always-on;
264				regulator-min-microvolt = <1200000>;
265				regulator-max-microvolt = <1200000>;
266				regulator-name = "vcc-dram";
267			};
268
269			sw {
270				/* unused */
271			};
272		};
273	};
274};
275
276&r_ir {
277	linux,rc-map-name = "rc-beelink-gs1";
278	status = "okay";
279};
280
281&r_pio {
282	/*
283	 * PL0 and PL1 are used for PMIC I2C
284	 * don't enable the pl-supply else
285	 * it will fail at boot
286	 *
287	 * vcc-pl-supply = <&reg_aldo1>;
288	 */
289	vcc-pm-supply = <&reg_aldo1>;
290};
291
292&rtc {
293	clocks = <&ext_osc32k>;
294};
295
296&spdif {
297	status = "okay";
298};
299
300&uart0 {
301	pinctrl-names = "default";
302	pinctrl-0 = <&uart0_ph_pins>;
303	status = "okay";
304};
305
306&usb2otg {
307	dr_mode = "host";
308	status = "okay";
309};
310
311&usb2phy {
312	usb0_vbus-supply = <&reg_vcc5v>;
313	status = "okay";
314};
315
316&usb3phy {
317	status = "okay";
318};
319