xref: /freebsd/sys/contrib/device-tree/src/arm64/allwinner/sun55i-h728-x96qpro+.dts (revision 9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b)
1// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
2// Copyright (C) 2024 Arm Ltd.
3
4/dts-v1/;
5
6#include "sun55i-a523.dtsi"
7
8#include <dt-bindings/gpio/gpio.h>
9
10/ {
11	model = "X96Q Pro+";
12	compatible = "amediatech,x96q-pro-plus", "allwinner,sun55i-h728";
13
14	aliases {
15		serial0 = &uart0;
16	};
17
18	chosen {
19		stdout-path = "serial0:115200n8";
20	};
21
22	ext_osc32k: ext-osc32k-clk {
23		#clock-cells = <0>;
24		compatible = "fixed-clock";
25		clock-frequency = <32768>;
26		clock-output-names = "ext_osc32k";
27	};
28
29	reg_vcc5v: vcc5v {
30		/* board wide 5V supply from the barrel plug */
31		compatible = "regulator-fixed";
32		regulator-name = "vcc-5v";
33		regulator-min-microvolt = <5000000>;
34		regulator-max-microvolt = <5000000>;
35		regulator-always-on;
36	};
37
38	reg_vcc3v3: vcc3v3 {
39		/* 3.3V dummy supply for the SD card */
40		compatible = "regulator-fixed";
41		regulator-name = "vcc-3v3";
42		regulator-min-microvolt = <3300000>;
43		regulator-max-microvolt = <3300000>;
44		vin-supply = <&reg_vcc5v>;
45		regulator-always-on;
46	};
47};
48
49&ehci0 {
50	status = "okay";
51};
52
53&ehci1 {
54	status = "okay";
55};
56
57&gpu {
58	mali-supply = <&reg_dcdc2>;
59	status = "okay";
60};
61
62&mmc0 {
63	vmmc-supply = <&reg_vcc3v3>;
64	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
65	bus-width = <4>;
66	disable-wp;
67	status = "okay";
68};
69
70&mmc2 {
71	vmmc-supply = <&reg_cldo3>;
72	vqmmc-supply = <&reg_cldo1>;
73	bus-width = <8>;
74	non-removable;
75	cap-mmc-hw-reset;
76	mmc-ddr-1_8v;
77	mmc-hs200-1_8v;
78	status = "okay";
79};
80
81&ohci0 {
82	status = "okay";
83};
84
85&ohci1 {
86	status = "okay";
87};
88
89&pio {
90	vcc-pb-supply = <&reg_cldo3>;	/* via VCC-IO */
91	vcc-pc-supply = <&reg_cldo1>;
92	vcc-pd-supply = <&reg_dcdc4>;
93	vcc-pe-supply = <&reg_dcdc4>;
94	vcc-pf-supply = <&reg_cldo3>;	/* actually switchable */
95	vcc-pg-supply = <&reg_bldo1>;
96	vcc-ph-supply = <&reg_cldo3>;	/* via VCC-IO */
97	vcc-pi-supply = <&reg_dcdc4>;
98	vcc-pj-supply = <&reg_dcdc4>;
99	vcc-pk-supply = <&reg_bldo3>;
100};
101
102&r_i2c0 {
103	status = "okay";
104
105	axp717: pmic@34 {
106		compatible = "x-powers,axp717";
107		reg = <0x34>;
108		interrupt-controller;
109		#interrupt-cells = <1>;
110		interrupt-parent = <&nmi_intc>;
111		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
112
113		vin1-supply = <&reg_vcc5v>;
114		vin2-supply = <&reg_vcc5v>;
115		vin3-supply = <&reg_vcc5v>;
116		vin4-supply = <&reg_vcc5v>;
117		aldoin-supply = <&reg_vcc5v>;
118		bldoin-supply = <&reg_vcc5v>;
119		cldoin-supply = <&reg_vcc5v>;
120
121		regulators {
122			/* Supplies the "little" cluster (1.0(?) GHz cores) */
123			reg_dcdc1: dcdc1 {
124				regulator-always-on;
125				regulator-min-microvolt = <900000>;
126				regulator-max-microvolt = <1160000>;
127				regulator-name = "vdd-cpul";
128			};
129
130			reg_dcdc2: dcdc2 {
131				regulator-always-on;
132				regulator-min-microvolt = <920000>;
133				regulator-max-microvolt = <920000>;
134				regulator-name = "vdd-gpu-sys";
135			};
136
137			reg_dcdc3: dcdc3 {
138				regulator-always-on;
139				regulator-min-microvolt = <1360000>;
140				regulator-max-microvolt = <1360000>;
141				regulator-name = "vdd-dram";
142			};
143
144			reg_dcdc4: dcdc4 {
145				regulator-min-microvolt = <1000000>;
146				regulator-max-microvolt = <1000000>;
147				regulator-name = "vdd-dcdc4";
148			};
149
150			reg_aldo1: aldo1 {
151				/* not connected */
152			};
153
154			reg_aldo2: aldo2 {
155				/* not connected */
156			};
157
158			reg_aldo3: aldo3 {
159				regulator-always-on;
160				regulator-min-microvolt = <3300000>;
161				regulator-max-microvolt = <3300000>;
162				regulator-name = "vcc-aldo3";
163			};
164
165			reg_aldo4: aldo4 {
166				regulator-always-on;
167				regulator-min-microvolt = <1800000>;
168				regulator-max-microvolt = <1800000>;
169				regulator-name = "vcc-pll-dxco-avcc";
170			};
171
172			reg_bldo1: bldo1 {
173				regulator-min-microvolt = <1800000>;
174				regulator-max-microvolt = <1800000>;
175				regulator-name = "vcc-pg-wifi-lvds";
176			};
177
178			reg_bldo2: bldo2 {
179				regulator-always-on;
180				regulator-min-microvolt = <1800000>;
181				regulator-max-microvolt = <1800000>;
182				regulator-name = "vcc-dram-1v8";
183			};
184
185			reg_bldo3: bldo3 {
186				regulator-min-microvolt = <2800000>;
187				regulator-max-microvolt = <2800000>;
188				regulator-name = "vcc-bldo3";
189			};
190
191			reg_bldo4: bldo4 {
192				/* not connected */
193			};
194
195			reg_cldo1: cldo1 {
196				regulator-always-on;
197				regulator-min-microvolt = <1800000>;
198				regulator-max-microvolt = <1800000>;
199				regulator-name = "vcc-codec-sd";
200			};
201
202			reg_cldo2: cldo2 {
203			};
204
205			reg_cldo3: cldo3 {
206				regulator-min-microvolt = <3300000>;
207				regulator-max-microvolt = <3300000>;
208				regulator-name = "vcc-codec-eth-sd";
209			};
210
211			reg_cldo4: cldo4 {
212				regulator-min-microvolt = <3300000>;
213				regulator-max-microvolt = <3300000>;
214				regulator-name = "vcc-eth-phy";
215			};
216
217			reg_cpusldo: cpusldo {
218				/* supplies the management core */
219				regulator-always-on;
220				regulator-min-microvolt = <900000>;
221				regulator-max-microvolt = <900000>;
222				regulator-name = "vdd-cpus";
223			};
224		};
225	};
226
227	axp323: pmic@36 {
228		compatible = "x-powers,axp323";
229		reg = <0x36>;
230		#interrupt-cells = <1>;
231		interrupt-controller;
232		interrupt-parent = <&nmi_intc>;
233		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
234		status = "okay";
235
236		vin1-supply = <&reg_vcc5v>;
237		vin2-supply = <&reg_vcc5v>;
238		vin3-supply = <&reg_vcc5v>;
239
240		regulators {
241			aldo1 {
242				/* not connected */
243			};
244
245			dldo1 {
246				/* not connected */
247			};
248
249			/* Supplies the "big" cluster (1.8 GHz cores) */
250			reg_dcdc1_323: dcdc1 {
251				regulator-always-on;
252				regulator-min-microvolt = <900000>;
253				regulator-max-microvolt = <1160000>;
254				regulator-name = "vdd-cpub";
255			};
256
257			/* DCDC2 is polyphased with DCDC1 */
258
259			reg_dcdc3_323: dcdc3 {
260				regulator-always-on;
261				regulator-min-microvolt = <1050000>;
262				regulator-max-microvolt = <1050000>;
263				regulator-name = "vdd-dcdc3";
264			};
265		};
266	};
267};
268
269&r_pio {
270/*
271 * Specifying the supply would create a circular dependency.
272 *
273 *	vcc-pl-supply = <&reg_aldo3>;
274 */
275	vcc-pm-supply = <&reg_aldo3>;
276};
277
278&uart0 {
279	pinctrl-names = "default";
280	pinctrl-0 = <&uart0_pb_pins>;
281	status = "okay";
282};
283
284&usb_otg {
285	/* USB0 is a USB-A receptacle, always powered, so force host mode. */
286	dr_mode = "host";
287	status = "okay";
288};
289
290&usbphy {
291	status = "okay";
292};
293