Debian Codegraph @

scripts/dtc/include-prefixes/arm64/allwinner/sun55i-t527-avaota-a1.dts

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