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