xref: /freebsd/sys/contrib/device-tree/src/arm64/allwinner/sun55i-t527-avaota-a1.dts (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1ae5de77eSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
2ae5de77eSEmmanuel Vadot// Copyright (C) 2024 Arm Ltd.
3ae5de77eSEmmanuel Vadot
4ae5de77eSEmmanuel Vadot/dts-v1/;
5ae5de77eSEmmanuel Vadot
6ae5de77eSEmmanuel Vadot#include "sun55i-a523.dtsi"
7ae5de77eSEmmanuel Vadot
8ae5de77eSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
9ae5de77eSEmmanuel Vadot
10ae5de77eSEmmanuel Vadot/ {
11ae5de77eSEmmanuel Vadot	model = "Avaota A1";
12ae5de77eSEmmanuel Vadot	compatible = "yuzukihd,avaota-a1", "allwinner,sun55i-t527";
13ae5de77eSEmmanuel Vadot
14ae5de77eSEmmanuel Vadot	aliases {
15ae5de77eSEmmanuel Vadot		ethernet0 = &gmac0;
16ae5de77eSEmmanuel Vadot		serial0 = &uart0;
17ae5de77eSEmmanuel Vadot	};
18ae5de77eSEmmanuel Vadot
19ae5de77eSEmmanuel Vadot	chosen {
20ae5de77eSEmmanuel Vadot		stdout-path = "serial0:115200n8";
21ae5de77eSEmmanuel Vadot	};
22ae5de77eSEmmanuel Vadot
23ae5de77eSEmmanuel Vadot	ext_osc32k: ext-osc32k-clk {
24ae5de77eSEmmanuel Vadot		#clock-cells = <0>;
25ae5de77eSEmmanuel Vadot		compatible = "fixed-clock";
26ae5de77eSEmmanuel Vadot		clock-frequency = <32768>;
27ae5de77eSEmmanuel Vadot		clock-output-names = "ext_osc32k";
28ae5de77eSEmmanuel Vadot	};
29ae5de77eSEmmanuel Vadot
30ae5de77eSEmmanuel Vadot	reg_vcc12v: vcc12v {
31ae5de77eSEmmanuel Vadot		/* DC input jack */
32ae5de77eSEmmanuel Vadot		compatible = "regulator-fixed";
33ae5de77eSEmmanuel Vadot		regulator-name = "vcc-12v";
34ae5de77eSEmmanuel Vadot		regulator-min-microvolt = <12000000>;
35ae5de77eSEmmanuel Vadot		regulator-max-microvolt = <12000000>;
36ae5de77eSEmmanuel Vadot		regulator-always-on;
37ae5de77eSEmmanuel Vadot	};
38ae5de77eSEmmanuel Vadot
39ae5de77eSEmmanuel Vadot	reg_vcc5v: vcc5v {
40ae5de77eSEmmanuel Vadot		/* board wide 5V supply from the 12V->5V regulator */
41ae5de77eSEmmanuel Vadot		compatible = "regulator-fixed";
42ae5de77eSEmmanuel Vadot		regulator-name = "vcc-5v";
43ae5de77eSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
44ae5de77eSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
45ae5de77eSEmmanuel Vadot		vin-supply = <&reg_vcc12v>;
46ae5de77eSEmmanuel Vadot		regulator-always-on;
47ae5de77eSEmmanuel Vadot	};
48ae5de77eSEmmanuel Vadot
49ae5de77eSEmmanuel Vadot	reg_usb_vbus: vbus {
50ae5de77eSEmmanuel Vadot		compatible = "regulator-fixed";
51ae5de77eSEmmanuel Vadot		regulator-name = "usb-vbus";
52ae5de77eSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
53ae5de77eSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
54ae5de77eSEmmanuel Vadot		vin-supply = <&reg_vcc5v>;
55ae5de77eSEmmanuel Vadot		gpio = <&pio 8 12 GPIO_ACTIVE_HIGH>;	/* PI12 */
56ae5de77eSEmmanuel Vadot		enable-active-high;
57ae5de77eSEmmanuel Vadot	};
58ae5de77eSEmmanuel Vadot};
59ae5de77eSEmmanuel Vadot
60ae5de77eSEmmanuel Vadot&ehci0 {
61ae5de77eSEmmanuel Vadot	status = "okay";
62ae5de77eSEmmanuel Vadot};
63ae5de77eSEmmanuel Vadot
64ae5de77eSEmmanuel Vadot&ehci1 {
65ae5de77eSEmmanuel Vadot	status = "okay";
66ae5de77eSEmmanuel Vadot};
67ae5de77eSEmmanuel Vadot
68ae5de77eSEmmanuel Vadot&gmac0 {
69ae5de77eSEmmanuel Vadot	phy-mode = "rgmii-id";
70ae5de77eSEmmanuel Vadot	phy-handle = <&ext_rgmii_phy>;
71ae5de77eSEmmanuel Vadot	phy-supply = <&reg_dcdc4>;
72ae5de77eSEmmanuel Vadot
73ae5de77eSEmmanuel Vadot	allwinner,tx-delay-ps = <100>;
74ae5de77eSEmmanuel Vadot	allwinner,rx-delay-ps = <300>;
75ae5de77eSEmmanuel Vadot
76ae5de77eSEmmanuel Vadot	status = "okay";
77ae5de77eSEmmanuel Vadot};
78ae5de77eSEmmanuel Vadot
79*833e5d42SEmmanuel Vadot&gpu {
80*833e5d42SEmmanuel Vadot	mali-supply = <&reg_dcdc2>;
81*833e5d42SEmmanuel Vadot	status = "okay";
82*833e5d42SEmmanuel Vadot};
83*833e5d42SEmmanuel Vadot
84ae5de77eSEmmanuel Vadot&mdio0 {
85ae5de77eSEmmanuel Vadot	ext_rgmii_phy: ethernet-phy@1 {
86ae5de77eSEmmanuel Vadot		compatible = "ethernet-phy-ieee802.3-c22";
87ae5de77eSEmmanuel Vadot		reg = <1>;
88ae5de77eSEmmanuel Vadot	};
89ae5de77eSEmmanuel Vadot};
90ae5de77eSEmmanuel Vadot
91ae5de77eSEmmanuel Vadot&mmc0 {
92ae5de77eSEmmanuel Vadot	vmmc-supply = <&reg_cldo3>;
93ae5de77eSEmmanuel Vadot	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
94ae5de77eSEmmanuel Vadot	bus-width = <4>;
95ae5de77eSEmmanuel Vadot	status = "okay";
96ae5de77eSEmmanuel Vadot};
97ae5de77eSEmmanuel Vadot
98ae5de77eSEmmanuel Vadot&mmc2 {
99ae5de77eSEmmanuel Vadot	bus-width = <8>;
100ae5de77eSEmmanuel Vadot	cap-mmc-hw-reset;
101ae5de77eSEmmanuel Vadot	mmc-ddr-1_8v;
102ae5de77eSEmmanuel Vadot	mmc-hs200-1_8v;
103ae5de77eSEmmanuel Vadot	non-removable;
104ae5de77eSEmmanuel Vadot	vmmc-supply = <&reg_cldo3>;
105ae5de77eSEmmanuel Vadot	vqmmc-supply = <&reg_cldo1>;
106ae5de77eSEmmanuel Vadot	status = "okay";
107ae5de77eSEmmanuel Vadot};
108ae5de77eSEmmanuel Vadot
109ae5de77eSEmmanuel Vadot&ohci0 {
110ae5de77eSEmmanuel Vadot	status = "okay";
111ae5de77eSEmmanuel Vadot};
112ae5de77eSEmmanuel Vadot
113ae5de77eSEmmanuel Vadot&ohci1 {
114ae5de77eSEmmanuel Vadot	status = "okay";
115ae5de77eSEmmanuel Vadot};
116ae5de77eSEmmanuel Vadot
117ae5de77eSEmmanuel Vadot&pio {
118ae5de77eSEmmanuel Vadot	vcc-pb-supply = <&reg_cldo3>;	/* via VCC-IO */
119ae5de77eSEmmanuel Vadot	vcc-pc-supply = <&reg_cldo1>;
120ae5de77eSEmmanuel Vadot	vcc-pd-supply = <&reg_dcdc4>;
121ae5de77eSEmmanuel Vadot	vcc-pe-supply = <&reg_dcdc4>;
122ae5de77eSEmmanuel Vadot	vcc-pf-supply = <&reg_cldo3>;	/* actually switchable */
123ae5de77eSEmmanuel Vadot	vcc-pg-supply = <&reg_bldo1>;
124ae5de77eSEmmanuel Vadot	vcc-ph-supply = <&reg_cldo3>;	/* via VCC-IO */
125ae5de77eSEmmanuel Vadot	vcc-pi-supply = <&reg_dcdc4>;
126ae5de77eSEmmanuel Vadot	vcc-pj-supply = <&reg_dcdc4>;
127ae5de77eSEmmanuel Vadot	vcc-pk-supply = <&reg_bldo3>;
128ae5de77eSEmmanuel Vadot};
129ae5de77eSEmmanuel Vadot
130ae5de77eSEmmanuel Vadot&r_i2c0 {
131ae5de77eSEmmanuel Vadot	status = "okay";
132ae5de77eSEmmanuel Vadot
133ae5de77eSEmmanuel Vadot	axp717: pmic@35 {
134ae5de77eSEmmanuel Vadot		compatible = "x-powers,axp717";
135ae5de77eSEmmanuel Vadot		reg = <0x35>;
136ae5de77eSEmmanuel Vadot		interrupt-controller;
137ae5de77eSEmmanuel Vadot		#interrupt-cells = <1>;
138ae5de77eSEmmanuel Vadot		interrupt-parent = <&nmi_intc>;
139ae5de77eSEmmanuel Vadot		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
140ae5de77eSEmmanuel Vadot
141ae5de77eSEmmanuel Vadot		vin1-supply = <&reg_vcc5v>;
142ae5de77eSEmmanuel Vadot		vin2-supply = <&reg_vcc5v>;
143ae5de77eSEmmanuel Vadot		vin3-supply = <&reg_vcc5v>;
144ae5de77eSEmmanuel Vadot		vin4-supply = <&reg_vcc5v>;
145ae5de77eSEmmanuel Vadot		aldoin-supply = <&reg_vcc5v>;
146ae5de77eSEmmanuel Vadot		bldoin-supply = <&reg_vcc5v>;
147ae5de77eSEmmanuel Vadot		cldoin-supply = <&reg_vcc5v>;
148ae5de77eSEmmanuel Vadot
149ae5de77eSEmmanuel Vadot		regulators {
150ae5de77eSEmmanuel Vadot			/* Supplies the "little" cluster (1.4 GHz cores) */
151ae5de77eSEmmanuel Vadot			reg_dcdc1: dcdc1 {
152ae5de77eSEmmanuel Vadot				regulator-always-on;
153ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <900000>;
154ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <1160000>;
155ae5de77eSEmmanuel Vadot				regulator-name = "vdd-cpul";
156ae5de77eSEmmanuel Vadot			};
157ae5de77eSEmmanuel Vadot
158ae5de77eSEmmanuel Vadot			reg_dcdc2: dcdc2 {
159ae5de77eSEmmanuel Vadot				regulator-always-on;
160ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <920000>;
161ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <920000>;
162ae5de77eSEmmanuel Vadot				regulator-name = "vdd-gpu-sys";
163ae5de77eSEmmanuel Vadot			};
164ae5de77eSEmmanuel Vadot
165ae5de77eSEmmanuel Vadot			reg_dcdc3: dcdc3 {
166ae5de77eSEmmanuel Vadot				regulator-always-on;
167ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <1160000>;
168ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <1160000>;
169ae5de77eSEmmanuel Vadot				regulator-name = "vdd-dram";
170ae5de77eSEmmanuel Vadot			};
171ae5de77eSEmmanuel Vadot
172ae5de77eSEmmanuel Vadot			reg_dcdc4: dcdc4 {
173ae5de77eSEmmanuel Vadot				regulator-always-on;
174ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <3300000>;
175ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <3300000>;
176ae5de77eSEmmanuel Vadot				regulator-name = "vdd-io";
177ae5de77eSEmmanuel Vadot			};
178ae5de77eSEmmanuel Vadot
179ae5de77eSEmmanuel Vadot			reg_aldo1: aldo1 {
180ae5de77eSEmmanuel Vadot				/* not connected */
181ae5de77eSEmmanuel Vadot			};
182ae5de77eSEmmanuel Vadot
183ae5de77eSEmmanuel Vadot			reg_aldo2: aldo2 {
184ae5de77eSEmmanuel Vadot				/* not connected */
185ae5de77eSEmmanuel Vadot			};
186ae5de77eSEmmanuel Vadot
187ae5de77eSEmmanuel Vadot			reg_aldo3: aldo3 {
188ae5de77eSEmmanuel Vadot				/* supplies the I2C pins for this PMIC */
189ae5de77eSEmmanuel Vadot				regulator-always-on;
190ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <3300000>;
191ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <3300000>;
192ae5de77eSEmmanuel Vadot				regulator-name = "vcc-pl-pm";
193ae5de77eSEmmanuel Vadot			};
194ae5de77eSEmmanuel Vadot
195ae5de77eSEmmanuel Vadot			reg_aldo4: aldo4 {
196ae5de77eSEmmanuel Vadot				regulator-always-on;
197ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <1800000>;
198ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <1800000>;
199ae5de77eSEmmanuel Vadot				regulator-name = "vcc-pll-dxco-avcc";
200ae5de77eSEmmanuel Vadot			};
201ae5de77eSEmmanuel Vadot
202ae5de77eSEmmanuel Vadot			reg_bldo1: bldo1 {
203ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <1800000>;
204ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <1800000>;
205ae5de77eSEmmanuel Vadot				regulator-name = "vcc-pg-wifi-lvds";
206ae5de77eSEmmanuel Vadot			};
207ae5de77eSEmmanuel Vadot
208ae5de77eSEmmanuel Vadot			reg_bldo2: bldo2 {
209ae5de77eSEmmanuel Vadot				regulator-always-on;
210ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <1800000>;
211ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <1800000>;
212ae5de77eSEmmanuel Vadot				regulator-name = "vcc-dram-1v8";
213ae5de77eSEmmanuel Vadot			};
214ae5de77eSEmmanuel Vadot
215ae5de77eSEmmanuel Vadot			reg_bldo3: bldo3 {
216ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <1800000>;
217ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <1800000>;
218ae5de77eSEmmanuel Vadot				regulator-name = "vcc-cvp-pk-vid1v8";
219ae5de77eSEmmanuel Vadot			};
220ae5de77eSEmmanuel Vadot
221ae5de77eSEmmanuel Vadot			reg_bldo4: bldo4 {
222ae5de77eSEmmanuel Vadot				/* not connected */
223ae5de77eSEmmanuel Vadot			};
224ae5de77eSEmmanuel Vadot
225ae5de77eSEmmanuel Vadot			reg_cldo1: cldo1 {
226ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <1800000>;
227ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <1800000>;
228ae5de77eSEmmanuel Vadot				regulator-name = "vcc-pc";
229ae5de77eSEmmanuel Vadot			};
230ae5de77eSEmmanuel Vadot
231ae5de77eSEmmanuel Vadot			reg_cldo2: cldo2 {
232ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <1800000>;
233ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <1800000>;
234ae5de77eSEmmanuel Vadot				regulator-name = "vcc-efuse";
235ae5de77eSEmmanuel Vadot			};
236ae5de77eSEmmanuel Vadot
237ae5de77eSEmmanuel Vadot			reg_cldo3: cldo3 {
238ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <3300000>;
239ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <3300000>;
240ae5de77eSEmmanuel Vadot				regulator-name = "vcc-io-mmc-spi-ana";
241ae5de77eSEmmanuel Vadot			};
242ae5de77eSEmmanuel Vadot
243ae5de77eSEmmanuel Vadot			reg_cldo4: cldo4 {
244ae5de77eSEmmanuel Vadot				/* not connected */
245ae5de77eSEmmanuel Vadot			};
246ae5de77eSEmmanuel Vadot
247ae5de77eSEmmanuel Vadot			reg_cpusldo: cpusldo {
248ae5de77eSEmmanuel Vadot				/* supplies the management core */
249ae5de77eSEmmanuel Vadot				regulator-always-on;
250ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <900000>;
251ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <900000>;
252ae5de77eSEmmanuel Vadot				regulator-name = "vdd-cpus";
253ae5de77eSEmmanuel Vadot			};
254ae5de77eSEmmanuel Vadot		};
255ae5de77eSEmmanuel Vadot	};
256ae5de77eSEmmanuel Vadot
257ae5de77eSEmmanuel Vadot	axp323: pmic@36 {
258ae5de77eSEmmanuel Vadot		compatible = "x-powers,axp323";
259ae5de77eSEmmanuel Vadot		reg = <0x36>;
260ae5de77eSEmmanuel Vadot		#interrupt-cells = <1>;
261ae5de77eSEmmanuel Vadot		interrupt-controller;
262ae5de77eSEmmanuel Vadot		interrupt-parent = <&nmi_intc>;
263ae5de77eSEmmanuel Vadot		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
264ae5de77eSEmmanuel Vadot		status = "okay";
265ae5de77eSEmmanuel Vadot
266ae5de77eSEmmanuel Vadot		vin1-supply = <&reg_vcc5v>;
267ae5de77eSEmmanuel Vadot		vin2-supply = <&reg_vcc5v>;
268ae5de77eSEmmanuel Vadot		vin3-supply = <&reg_vcc5v>;
269ae5de77eSEmmanuel Vadot
270ae5de77eSEmmanuel Vadot		regulators {
271ae5de77eSEmmanuel Vadot			aldo1 {
272ae5de77eSEmmanuel Vadot				/* not connected */
273ae5de77eSEmmanuel Vadot			};
274ae5de77eSEmmanuel Vadot
275ae5de77eSEmmanuel Vadot			dldo1 {
276ae5de77eSEmmanuel Vadot				/* not connected */
277ae5de77eSEmmanuel Vadot			};
278ae5de77eSEmmanuel Vadot
279ae5de77eSEmmanuel Vadot			/* Supplies the "big" cluster (1.8 GHz cores) */
280ae5de77eSEmmanuel Vadot			reg_dcdc1_323: dcdc1 {
281ae5de77eSEmmanuel Vadot				regulator-always-on;
282ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <900000>;
283ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <1160000>;
284ae5de77eSEmmanuel Vadot				regulator-name = "vdd-cpub";
285ae5de77eSEmmanuel Vadot			};
286ae5de77eSEmmanuel Vadot
287ae5de77eSEmmanuel Vadot			/* DCDC2 is polyphased with DCDC1 */
288ae5de77eSEmmanuel Vadot
289ae5de77eSEmmanuel Vadot			/* Some RISC-V management core related voltage */
290ae5de77eSEmmanuel Vadot			reg_dcdc3_323: dcdc3 {
291ae5de77eSEmmanuel Vadot				regulator-always-on;
292ae5de77eSEmmanuel Vadot				regulator-min-microvolt = <900000>;
293ae5de77eSEmmanuel Vadot				regulator-max-microvolt = <900000>;
294ae5de77eSEmmanuel Vadot				regulator-name = "vdd-dnr";
295ae5de77eSEmmanuel Vadot			};
296ae5de77eSEmmanuel Vadot		};
297ae5de77eSEmmanuel Vadot	};
298ae5de77eSEmmanuel Vadot};
299ae5de77eSEmmanuel Vadot
300ae5de77eSEmmanuel Vadot&r_pio {
301ae5de77eSEmmanuel Vadot/*
302ae5de77eSEmmanuel Vadot * Specifying the supply would create a circular dependency.
303ae5de77eSEmmanuel Vadot *
304ae5de77eSEmmanuel Vadot *	vcc-pl-supply = <&reg_aldo3>;
305ae5de77eSEmmanuel Vadot */
306ae5de77eSEmmanuel Vadot	vcc-pm-supply = <&reg_aldo3>;
307ae5de77eSEmmanuel Vadot};
308ae5de77eSEmmanuel Vadot
309ae5de77eSEmmanuel Vadot&uart0 {
310ae5de77eSEmmanuel Vadot	pinctrl-names = "default";
311ae5de77eSEmmanuel Vadot	pinctrl-0 = <&uart0_pb_pins>;
312ae5de77eSEmmanuel Vadot	status = "okay";
313ae5de77eSEmmanuel Vadot};
314ae5de77eSEmmanuel Vadot
315ae5de77eSEmmanuel Vadot&usb_otg {
316ae5de77eSEmmanuel Vadot	 /*
317ae5de77eSEmmanuel Vadot	  * The CC pins of the USB-C port have two pull-down resistors
318ae5de77eSEmmanuel Vadot	  * connected to GND, which fixes this port to a peripheral role.
319ae5de77eSEmmanuel Vadot	  * There is a regulator, controlled by a GPIO, to provide VBUS power
320ae5de77eSEmmanuel Vadot	  * to the port, and a VBUSDET GPIO, to detect externally provided
321ae5de77eSEmmanuel Vadot	  * power, but without the CC pins there is no real way to do a
322ae5de77eSEmmanuel Vadot	  * runtime role detection.
323ae5de77eSEmmanuel Vadot	  */
324ae5de77eSEmmanuel Vadot	dr_mode = "peripheral";
325ae5de77eSEmmanuel Vadot	status = "okay";
326ae5de77eSEmmanuel Vadot};
327ae5de77eSEmmanuel Vadot
328ae5de77eSEmmanuel Vadot&usbphy {
329ae5de77eSEmmanuel Vadot	usb0_vbus-supply = <&reg_usb_vbus>;
330ae5de77eSEmmanuel Vadot	usb0_vbus_det-gpios = <&pio 8 13 GPIO_ACTIVE_HIGH>; /* PI13 */
331ae5de77eSEmmanuel Vadot	status = "okay";
332ae5de77eSEmmanuel Vadot};
333