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