Skip to content

Commit de713cc

Browse files
committed
arm64: dts: allwinner: t527: Add OrangePi 4A board
The OrangePi 4A is a typical Raspberry Pi model B sized development board from Xunlong designed around an Allwinner T527 SoC. The board has the following features: - Allwinner T527 SoC - AXP717B + AXP323 PMICs - Up to 4GB LPDDR4 DRAM - micro SD slot - optional eMMC module - M.2 slot for PCIe 2.0 x1 - 16 MB SPI-NOR flash - 4x USB 2.0 type-A ports (one can be used in gadget mode) - 1x Gigabit ethernet w/ Motorcomm PHY (through yet to be supported GMAC200) - 3.5mm audio jack via internal audio codec - HDMI 2.0 output - eDP, MIPI CSI (2-lane and 4-lane) and MIPI DSI (4-lane) connectors - USB type-C port purely for power - AP6256 (Broadcom BCM4345) WiFi 5.0 + BT 5.0 - unsoldered headers for ADC and an additional USB 2.0 host port - 40-pin GPIO header Add a device tree for it, enabling all peripherals currently supported. Reviewed-by: Andre Przywara <andre.przywara@arm.com> Link: https://patch.msgid.link/20250628161608.3072968-6-wens@kernel.org Signed-off-by: Chen-Yu Tsai <wens@csie.org>
1 parent 64f2f7b commit de713cc

2 files changed

Lines changed: 386 additions & 0 deletions

File tree

arch/arm64/boot/dts/allwinner/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h700-anbernic-rg35xx-sp.dtb
5757
dtb-$(CONFIG_ARCH_SUNXI) += sun55i-a527-cubie-a5e.dtb
5858
dtb-$(CONFIG_ARCH_SUNXI) += sun55i-h728-x96qpro+.dtb
5959
dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-avaota-a1.dtb
60+
dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-orangepi-4a.dtb
Lines changed: 385 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,385 @@
1+
// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
2+
/*
3+
* Copyright (C) 2025 Chen-Yu Tsai <wens@csie.org>
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include "sun55i-a523.dtsi"
9+
10+
#include <dt-bindings/gpio/gpio.h>
11+
#include <dt-bindings/leds/common.h>
12+
13+
/ {
14+
model = "OrangePi 4A";
15+
compatible = "xunlong,orangepi-4a", "allwinner,sun55i-t527";
16+
17+
aliases {
18+
serial0 = &uart0;
19+
};
20+
21+
chosen {
22+
stdout-path = "serial0:115200n8";
23+
};
24+
25+
ext_osc32k: ext-osc32k-clk {
26+
#clock-cells = <0>;
27+
compatible = "fixed-clock";
28+
clock-frequency = <32768>;
29+
clock-output-names = "ext_osc32k";
30+
};
31+
32+
leds {
33+
compatible = "gpio-leds";
34+
35+
/* PWM capable pin, but PWM isn't supported yet. */
36+
led {
37+
function = LED_FUNCTION_STATUS;
38+
color = <LED_COLOR_ID_GREEN>;
39+
gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
40+
};
41+
};
42+
43+
wifi_pwrseq: pwrseq {
44+
compatible = "mmc-pwrseq-simple";
45+
reset-gpios = <&r_pio 1 1 GPIO_ACTIVE_LOW>; /* PM1 */
46+
clocks = <&rtc CLK_OSC32K_FANOUT>;
47+
clock-names = "ext_clock";
48+
};
49+
50+
reg_otg_vbus: regulator-otg-vbus {
51+
compatible = "regulator-fixed";
52+
regulator-name = "otg-vbus";
53+
regulator-min-microvolt = <5000000>;
54+
regulator-max-microvolt = <5000000>;
55+
vin-supply = <&reg_vcc5v>;
56+
gpio = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
57+
enable-active-high;
58+
};
59+
60+
reg_pcie_vcc3v3: regulator-pcie-vcc3v3 {
61+
compatible = "regulator-fixed";
62+
regulator-name = "vcc-pcie-3v3";
63+
regulator-min-microvolt = <3300000>;
64+
regulator-max-microvolt = <3300000>;
65+
vin-supply = <&reg_vcc5v>;
66+
gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
67+
enable-active-high;
68+
};
69+
70+
reg_usb_vbus: regulator-usb-vbus {
71+
compatible = "regulator-fixed";
72+
regulator-name = "usb-vbus";
73+
regulator-min-microvolt = <5000000>;
74+
regulator-max-microvolt = <5000000>;
75+
vin-supply = <&reg_vcc5v>;
76+
gpio = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /* PL12 */
77+
enable-active-high;
78+
};
79+
80+
reg_vcc5v: regulator-vcc5v {
81+
/* board wide 5V supply from USB type-C port */
82+
compatible = "regulator-fixed";
83+
regulator-name = "vcc-5v";
84+
regulator-min-microvolt = <5000000>;
85+
regulator-max-microvolt = <5000000>;
86+
regulator-always-on;
87+
};
88+
};
89+
90+
&ehci0 {
91+
status = "okay";
92+
};
93+
94+
&ehci1 {
95+
status = "okay";
96+
};
97+
98+
&mmc0 {
99+
vmmc-supply = <&reg_cldo3>;
100+
cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
101+
bus-width = <4>;
102+
status = "okay";
103+
};
104+
105+
&mmc1 {
106+
bus-width = <4>;
107+
mmc-pwrseq = <&wifi_pwrseq>;
108+
non-removable;
109+
vmmc-supply = <&reg_dldo1_323>;
110+
vqmmc-supply = <&reg_bldo1>;
111+
status = "okay";
112+
113+
brcmf: wifi@1 {
114+
compatible = "brcm,bcm4329-fmac";
115+
reg = <1>;
116+
interrupt-parent = <&r_pio>;
117+
interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* PM0 */
118+
interrupt-names = "host-wake";
119+
};
120+
};
121+
122+
&mmc2 {
123+
bus-width = <8>;
124+
cap-mmc-hw-reset;
125+
mmc-ddr-1_8v;
126+
mmc-hs200-1_8v;
127+
non-removable;
128+
vmmc-supply = <&reg_cldo3>;
129+
vqmmc-supply = <&reg_cldo1>;
130+
status = "okay";
131+
};
132+
133+
&ohci0 {
134+
status = "okay";
135+
};
136+
137+
&ohci1 {
138+
status = "okay";
139+
};
140+
141+
&pio {
142+
vcc-pb-supply = <&reg_cldo3>; /* via VCC-IO */
143+
vcc-pc-supply = <&reg_cldo1>;
144+
vcc-pd-supply = <&reg_cldo3>;
145+
vcc-pe-supply = <&reg_aldo2>;
146+
vcc-pf-supply = <&reg_cldo3>; /* VCC-IO for 3.3v; VCC-MCSI for 1.8v */
147+
vcc-pg-supply = <&reg_bldo1>;
148+
vcc-ph-supply = <&reg_cldo3>; /* via VCC-IO */
149+
vcc-pi-supply = <&reg_cldo3>;
150+
vcc-pj-supply = <&reg_cldo1>;
151+
vcc-pk-supply = <&reg_cldo1>;
152+
};
153+
154+
&r_i2c0 {
155+
status = "okay";
156+
157+
axp717: pmic@35 {
158+
compatible = "x-powers,axp717";
159+
reg = <0x35>;
160+
interrupt-controller;
161+
#interrupt-cells = <1>;
162+
interrupts-extended = <&nmi_intc 0 IRQ_TYPE_LEVEL_LOW>;
163+
164+
vin1-supply = <&reg_vcc5v>;
165+
vin2-supply = <&reg_vcc5v>;
166+
vin3-supply = <&reg_vcc5v>;
167+
vin4-supply = <&reg_vcc5v>;
168+
aldoin-supply = <&reg_vcc5v>;
169+
bldoin-supply = <&reg_vcc5v>;
170+
cldoin-supply = <&reg_vcc5v>;
171+
172+
regulators {
173+
/* Supplies the "little" cluster (1.4 GHz cores) */
174+
reg_dcdc1: dcdc1 {
175+
regulator-always-on;
176+
regulator-min-microvolt = <900000>;
177+
regulator-max-microvolt = <1160000>;
178+
regulator-name = "vdd-cpul";
179+
};
180+
181+
reg_dcdc2: dcdc2 {
182+
regulator-always-on;
183+
regulator-min-microvolt = <920000>;
184+
regulator-max-microvolt = <920000>;
185+
regulator-name = "vdd-gpu-sys";
186+
};
187+
188+
reg_dcdc3: dcdc3 {
189+
regulator-always-on;
190+
regulator-min-microvolt = <1160000>;
191+
regulator-max-microvolt = <1160000>;
192+
regulator-name = "vcc-dram";
193+
};
194+
195+
reg_dcdc4: dcdc4 {
196+
/* feeds 3.3V pin on GPIO header */
197+
regulator-always-on;
198+
regulator-min-microvolt = <3300000>;
199+
regulator-max-microvolt = <3300000>;
200+
regulator-name = "vdd-io";
201+
};
202+
203+
aldo1 {
204+
/* not actually connected */
205+
regulator-name = "avdd-csi";
206+
};
207+
208+
reg_aldo2: aldo2 {
209+
regulator-min-microvolt = <1800000>;
210+
regulator-max-microvolt = <1800000>;
211+
regulator-name = "vcc-pe";
212+
};
213+
214+
reg_aldo3: aldo3 {
215+
/* supplies the I2C pins for this PMIC */
216+
regulator-always-on;
217+
regulator-min-microvolt = <3300000>;
218+
regulator-max-microvolt = <3300000>;
219+
regulator-name = "vcc-pl-usb";
220+
};
221+
222+
reg_aldo4: aldo4 {
223+
regulator-always-on;
224+
regulator-min-microvolt = <1800000>;
225+
regulator-max-microvolt = <1800000>;
226+
regulator-name = "vcc-pll-dxco-avcc";
227+
};
228+
229+
reg_bldo1: bldo1 {
230+
regulator-min-microvolt = <1800000>;
231+
regulator-max-microvolt = <1800000>;
232+
regulator-name = "vcc-pg-wifi";
233+
};
234+
235+
reg_bldo2: bldo2 {
236+
regulator-always-on;
237+
regulator-min-microvolt = <1800000>;
238+
regulator-max-microvolt = <1800000>;
239+
regulator-name = "vcc-pm-lpddr";
240+
};
241+
242+
bldo3 {
243+
/* not actually connected */
244+
regulator-name = "afvcc-csi";
245+
};
246+
247+
bldo4 {
248+
/* not actually connected */
249+
regulator-name = "dvdd-csi";
250+
};
251+
252+
reg_cldo1: cldo1 {
253+
regulator-always-on;
254+
regulator-min-microvolt = <1800000>;
255+
regulator-max-microvolt = <1800000>;
256+
regulator-name = "vcc-cvp-pc-lvds-mcsi-pk-efuse-pcie-edp-1v8";
257+
};
258+
259+
reg_cldo2: cldo2 {
260+
regulator-min-microvolt = <3300000>;
261+
regulator-max-microvolt = <3300000>;
262+
regulator-name = "vcc3v3-csi";
263+
};
264+
265+
reg_cldo3: cldo3 {
266+
regulator-always-on;
267+
regulator-min-microvolt = <3300000>;
268+
regulator-max-microvolt = <3300000>;
269+
regulator-name = "vcc-io-mmc-nand-pd-pi-usb";
270+
};
271+
272+
reg_cldo4: cldo4 {
273+
regulator-min-microvolt = <3300000>;
274+
regulator-max-microvolt = <3300000>;
275+
regulator-name = "vcc-3v3-phy1-lcd";
276+
};
277+
278+
reg_cpusldo: cpusldo {
279+
/* supplies the management core */
280+
regulator-always-on;
281+
regulator-min-microvolt = <900000>;
282+
regulator-max-microvolt = <900000>;
283+
regulator-name = "vdd-cpus-usb-0v9";
284+
};
285+
};
286+
};
287+
288+
axp323: pmic@36 {
289+
compatible = "x-powers,axp323";
290+
reg = <0x36>;
291+
#interrupt-cells = <1>;
292+
interrupt-controller;
293+
status = "okay";
294+
295+
vin1-supply = <&reg_vcc5v>;
296+
vin2-supply = <&reg_vcc5v>;
297+
vin3-supply = <&reg_vcc5v>;
298+
299+
regulators {
300+
reg_aldo1_323: aldo1 {
301+
/* less capable and shares load with dldo1 */
302+
regulator-min-microvolt = <3300000>;
303+
regulator-max-microvolt = <3300000>;
304+
regulator-name = "vcc-wifi";
305+
};
306+
307+
reg_dldo1_323: dldo1 {
308+
/* more capable and shares load with aldo1 */
309+
regulator-min-microvolt = <3300000>;
310+
regulator-max-microvolt = <3300000>;
311+
regulator-name = "vcc-wifi2";
312+
};
313+
314+
/* Supplies the "big" cluster (1.8 GHz cores) */
315+
reg_dcdc1_323: dcdc1 {
316+
regulator-always-on;
317+
regulator-min-microvolt = <900000>;
318+
regulator-max-microvolt = <1150000>;
319+
regulator-name = "vdd-cpub";
320+
};
321+
322+
/* DCDC2 is polyphased with DCDC1 */
323+
324+
/* Some RISC-V management core related voltage */
325+
reg_dcdc3_323: dcdc3 {
326+
regulator-always-on;
327+
regulator-min-microvolt = <900000>;
328+
regulator-max-microvolt = <900000>;
329+
regulator-name = "vdd-dnr";
330+
};
331+
};
332+
};
333+
};
334+
335+
&r_pio {
336+
/*
337+
* Specifying the supply would create a circular dependency.
338+
*
339+
* vcc-pl-supply = <&reg_aldo3>;
340+
*/
341+
vcc-pm-supply = <&reg_bldo2>;
342+
};
343+
344+
&uart0 {
345+
pinctrl-names = "default";
346+
pinctrl-0 = <&uart0_pb_pins>;
347+
status = "okay";
348+
};
349+
350+
&uart1 {
351+
pinctrl-names = "default";
352+
pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
353+
uart-has-rtscts;
354+
status = "okay";
355+
356+
bluetooth {
357+
compatible = "brcm,bcm4345c5";
358+
clocks = <&rtc CLK_OSC32K_FANOUT>;
359+
clock-names = "lpo";
360+
vbat-supply = <&reg_aldo1_323>;
361+
vddio-supply = <&reg_bldo1>;
362+
device-wakeup-gpios = <&r_pio 1 3 GPIO_ACTIVE_HIGH>; /* PM3 */
363+
host-wakeup-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
364+
shutdown-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
365+
};
366+
};
367+
368+
&usb_otg {
369+
/*
370+
* The OTG controller is connected to one of the type-A ports.
371+
* There is a regulator, controlled by a GPIO, to provide VBUS power
372+
* to the port, and a VBUSDET GPIO, to detect externally provided
373+
* power. But without ID or CC pins there is no real way to do a
374+
* runtime role detection.
375+
*/
376+
dr_mode = "host";
377+
status = "okay";
378+
};
379+
380+
&usbphy {
381+
usb0_vbus-supply = <&reg_otg_vbus>;
382+
usb0_vbus_det-gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
383+
usb1_vbus-supply = <&reg_usb_vbus>;
384+
status = "okay";
385+
};

0 commit comments

Comments
 (0)