Debian Codegraph @

scripts/dtc/include-prefixes/arm64/allwinner/sun55i-a527-cubie-a5e.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0-only OR MIT)
2 // Copyright (C) 2025 Arm Ltd.
3
4 /dts-v1/;
5
6 #include "sun55i-a523.dtsi"
7
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/leds/common.h>
10
11 / {
12 model = "Radxa Cubie A5E";
13 compatible = "radxa,cubie-a5e", "allwinner,sun55i-a527";
14
15 aliases {
16 ethernet0 = &gmac0;
17 ethernet1 = &gmac1;
18 serial0 = &uart0;
19 };
20
21 chosen {
22 stdout-path = "serial0:115200n8";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 power-led {
29 function = LED_FUNCTION_POWER;
30 color = <LED_COLOR_ID_GREEN>;
31 gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */
32 default-state = "on";
33 linux,default-trigger = "heartbeat";
34 };
35
36 use-led {
37 function = LED_FUNCTION_ACTIVITY;
38 color = <LED_COLOR_ID_BLUE>;
39 gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
40 };
41 };
42
43 iio-hwmon {
44 compatible = "iio-hwmon";
45 io-channels = <&axp717_adc 3>, /* vsys_v */
46 <&axp717_adc 4>; /* pmic_temp */
47 };
48
49 reg_vcc5v: vcc5v {
50 /* board wide 5V supply from the USB-C connector */
51 compatible = "regulator-fixed";
52 regulator-name = "vcc-5v";
53 regulator-min-microvolt = <5000000>;
54 regulator-max-microvolt = <5000000>;
55 regulator-always-on;
56 };
57
58 reg_usb_vbus: vbus {
59 compatible = "regulator-fixed";
60 regulator-name = "usb-vbus";
61 regulator-min-microvolt = <5000000>;
62 regulator-max-microvolt = <5000000>;
63 vin-supply = <&reg_vcc5v>;
64 gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
65 enable-active-high;
66 };
67 };
68
69 &ehci0 {
70 status = "okay";
71 };
72
73 &ehci1 {
74 status = "okay";
75 };
76
77 &gmac0 {
78 phy-mode = "rgmii-id";
79 phy-handle = <&ext_rgmii0_phy>;
80 phy-supply = <&reg_cldo3>;
81
82 allwinner,tx-delay-ps = <300>;
83 allwinner,rx-delay-ps = <400>;
84
85 status = "okay";
86 };
87
88 &gmac1 {
89 phy-mode = "rgmii-id";
90 phy-handle = <&ext_rgmii1_phy>;
91 phy-supply = <&reg_cldo4>;
92
93 tx-internal-delay-ps = <300>;
94 rx-internal-delay-ps = <400>;
95
96 status = "okay";
97 };
98
99 &gpu {
100 mali-supply = <&reg_dcdc2>;
101 status = "okay";
102 };
103
104 &mdio0 {
105 ext_rgmii0_phy: ethernet-phy@1 {
106 compatible = "ethernet-phy-ieee802.3-c22";
107 reg = <1>;
108 reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
109 reset-assert-us = <10000>;
110 reset-deassert-us = <150000>;
111 };
112 };
113
114 &mdio1 {
115 ext_rgmii1_phy: ethernet-phy@1 {
116 compatible = "ethernet-phy-ieee802.3-c22";
117 reg = <1>;
118 reset-gpios = <&pio 9 16 GPIO_ACTIVE_LOW>; /* PJ16 */
119 reset-assert-us = <10000>;
120 reset-deassert-us = <150000>;
121 };
122 };
123
124 &mmc0 {
125 vmmc-supply = <&reg_cldo3>;
126 cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
127 bus-width = <4>;
128 status = "okay";
129 };
130
131 &ohci0 {
132 status = "okay";
133 };
134
135 &ohci1 {
136 status = "okay";
137 };
138
139 &pio {
140 vcc-pb-supply = <&reg_cldo3>; /* via VCC-IO */
141 vcc-pc-supply = <&reg_cldo1>;
142 vcc-pd-supply = <&reg_cldo3>;
143 vcc-pe-supply = <&reg_aldo2>;
144 vcc-pf-supply = <&reg_cldo3>; /* actually switchable */
145 vcc-pg-supply = <&reg_bldo1>;
146 vcc-ph-supply = <&reg_cldo3>; /* via VCC-IO */
147 vcc-pi-supply = <&reg_cldo3>;
148 vcc-pj-supply = <&reg_cldo4>;
149 vcc-pk-supply = <&reg_cldo1>;
150 };
151
152 &r_i2c0 {
153 status = "okay";
154
155 axp717: pmic@34 {
156 compatible = "x-powers,axp717";
157 reg = <0x34>;
158 interrupt-controller;
159 #interrupt-cells = <1>;
160 interrupt-parent = <&nmi_intc>;
161 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
162
163 vin1-supply = <&reg_vcc5v>;
164 vin2-supply = <&reg_vcc5v>;
165 vin3-supply = <&reg_vcc5v>;
166 vin4-supply = <&reg_vcc5v>;
167 aldoin-supply = <&reg_vcc5v>;
168 bldoin-supply = <&reg_vcc5v>;
169 cldoin-supply = <&reg_vcc5v>;
170
171 axp717_adc: adc {
172 compatible = "x-powers,axp717-adc";
173 #io-channel-cells = <1>;
174 };
175
176 battery-power {
177 compatible = "x-powers,axp717-battery-power-supply";
178 /* charger mode design but has no battery terminal */
179 status = "disabled";
180 };
181
182 regulators {
183 /* Supplies the "little" cluster (1.4 GHz cores) */
184 reg_dcdc1: dcdc1 {
185 regulator-always-on;
186 regulator-min-microvolt = <900000>;
187 regulator-max-microvolt = <1160000>;
188 regulator-name = "vdd-cpul";
189 };
190
191 reg_dcdc2: dcdc2 {
192 regulator-always-on;
193 regulator-min-microvolt = <920000>;
194 regulator-max-microvolt = <920000>;
195 regulator-name = "vdd-gpu-sys";
196 };
197
198 reg_dcdc3: dcdc3 {
199 regulator-always-on;
200 regulator-min-microvolt = <1100000>;
201 regulator-max-microvolt = <1100000>;
202 regulator-name = "vdd-dram";
203 };
204
205 reg_aldo1: aldo1 {
206 /* not connected */
207 };
208
209 reg_aldo2: aldo2 {
210 regulator-min-microvolt = <1800000>;
211 regulator-max-microvolt = <1800000>;
212 regulator-name = "vcc-pe";
213 };
214
215 reg_aldo3: aldo3 {
216 /* supplies the I2C pins for this PMIC */
217 regulator-always-on;
218 regulator-min-microvolt = <3300000>;
219 regulator-max-microvolt = <3300000>;
220 regulator-name = "vcc-pl-usb";
221 };
222
223 reg_aldo4: aldo4 {
224 regulator-always-on;
225 regulator-min-microvolt = <1800000>;
226 regulator-max-microvolt = <1800000>;
227 regulator-name = "vcc-pll-dxco-avcc";
228 };
229
230 reg_bldo1: bldo1 {
231 regulator-min-microvolt = <1800000>;
232 regulator-max-microvolt = <1800000>;
233 regulator-name = "vcc-pg-iowifi";
234 };
235
236 reg_bldo2: bldo2 {
237 regulator-always-on;
238 regulator-min-microvolt = <1800000>;
239 regulator-max-microvolt = <1800000>;
240 regulator-name = "vcc-pm-lpddr4";
241 };
242
243 reg_bldo3: bldo3 {
244 regulator-min-microvolt = <3300000>;
245 regulator-max-microvolt = <3300000>;
246 regulator-name = "vcc-mipi-cam";
247 };
248
249 reg_bldo4: bldo4 {
250 /* not connected */
251 };
252
253 reg_cldo1: cldo1 {
254 regulator-min-microvolt = <1800000>;
255 regulator-max-microvolt = <1800000>;
256 regulator-name = "vcc-pc-and-their-dog";
257 };
258
259 reg_cldo2: cldo2 {
260 /* not connected */
261 };
262
263 reg_cldo3: cldo3 {
264 /* IO, USB-2, 3V3, card, NAND, sensor, PI */
265 regulator-always-on;
266 regulator-min-microvolt = <3300000>;
267 regulator-max-microvolt = <3300000>;
268 regulator-name = "vcc-io-mmc-spi-ana";
269 };
270
271 reg_cldo4: cldo4 {
272 regulator-min-microvolt = <3300000>;
273 regulator-max-microvolt = <3300000>;
274 regulator-name = "vcc-pj-phy";
275 /* enough time for the PHY to fully power on */
276 regulator-enable-ramp-delay = <150000>;
277 };
278
279 reg_cpusldo: cpusldo {
280 /* supplies the management core */
281 regulator-always-on;
282 regulator-min-microvolt = <900000>;
283 regulator-max-microvolt = <900000>;
284 regulator-name = "vdd-cpus";
285 };
286 };
287
288 usb-power {
289 compatible = "x-powers,axp717-usb-power-supply";
290 };
291 };
292
293 axp323: pmic@36 {
294 compatible = "x-powers,axp323";
295 reg = <0x36>;
296 #interrupt-cells = <1>;
297 interrupt-controller;
298 interrupt-parent = <&nmi_intc>;
299 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
300 status = "okay";
301
302 vin1-supply = <&reg_vcc5v>;
303 vin2-supply = <&reg_vcc5v>;
304 vin3-supply = <&reg_vcc5v>;
305
306 regulators {
307 aldo1 {
308 regulator-min-microvolt = <1800000>;
309 regulator-max-microvolt = <1800000>;
310 regulator-name = "vcc-mipi-dsi";
311 };
312
313 dldo1 {
314 /* not connected */
315 };
316
317 /* Supplies the "big" cluster (1.8 GHz cores) */
318 reg_dcdc1_323: dcdc1 {
319 regulator-always-on;
320 regulator-min-microvolt = <900000>;
321 regulator-max-microvolt = <1160000>;
322 regulator-name = "vdd-cpub";
323 };
324
325 /* DCDC2 is polyphased with DCDC1 */
326
327 /* RISC-V management core supply */
328 reg_dcdc3_323: dcdc3 {
329 regulator-always-on;
330 regulator-min-microvolt = <900000>;
331 regulator-max-microvolt = <900000>;
332 regulator-name = "vdd-dnr";
333 };
334 };
335 };
336 };
337
338 &r_pio {
339 /*
340 * Specifying the supply would create a circular dependency.
341 *
342 * vcc-pl-supply = <&reg_aldo3>;
343 */
344 vcc-pm-supply = <&reg_aldo3>;
345 };
346
347 &uart0 {
348 pinctrl-names = "default";
349 pinctrl-0 = <&uart0_pb_pins>;
350 status = "okay";
351 };
352
353 &usb_otg {
354 /*
355 * The USB-C port is the primary power supply, so in this configuration
356 * relies on the other end of the USB cable to supply the VBUS power.
357 * So use this port in peripheral mode.
358 * It is possible to supply the board with the 5V pins on the GPIO
359 * header, and since the DCIN_5V line is hardwired to the USB-C VBUS
360 * pins, the port turns into a host port, unconditionally supplying
361 * power. The dr_mode property should be changed to "host" here, if
362 * users choose this setup.
363 */
364 dr_mode = "peripheral";
365 status = "okay";
366 };
367
368 /*
369 * The schematic describes USB0_ID (PL10), measuring VBUS_5V, which looks to
370 * be always on. Also there is USB-VBUSDET (PL2), which is measuring the same
371 * VBUS_5V. There is also DCIN_DET, which measures DCIN_5V, so the power
372 * input rail.
373 * None of them seem to make any sense in relation to detecting USB devices
374 * or whether there is power provided via any USB pins: they would always
375 * report high, otherwise the system wouldn't be running.
376 * The AXP717C provides proper USB-C CC pin functionality, but the PMIC is
377 * not connected to those pins of the USB-C connector.
378 */
379 &usbphy {
380 usb0_vbus-supply = <&reg_vcc5v>;
381 usb1_vbus-supply = <&reg_usb_vbus>;
382 status = "okay";
383 };