Skip to content

Commit 83f33fa

Browse files
authored
Migrate Radxa Cubie A5E to mainline 6.16 (#8447)
* migrate u-boot and kernel to mainline * Add patches for 6.17 * fix compile for patches addes * Orderer patches, switch kernel config to sunxi64, recreate some patches for fix build * Update linux-sunxi64-edge.config after pm-domain & sun55i-gmac200 activate * enable wifi and bluetooth * revert linux-sunxi64-edge.config - Revert linux-sunxi64-edge.config - Add modules: CONFIG_IOMMUFD, CONFIG_SUN50I_IOMMU, CONFIG_SUN55I_PCK600. * drop sunxi-dev-6.14 and cleanup involved patches * Update radxa-cubie-a5e.csc make change proposed by igorpecovnik
1 parent 750d4ed commit 83f33fa

File tree

38 files changed

+2455
-93902
lines changed

38 files changed

+2455
-93902
lines changed

config/boards/radxa-cubie-a5e.csc

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
BOARD_NAME="radxa cubie a5e"
33
BOARDFAMILY="sun55iw3"
44
BOARD_MAINTAINER=""
5-
BOOTCONFIG="radxa-a5e_defconfig"
5+
BOOTCONFIG="radxa-cubie-a5e_defconfig"
66
OVERLAY_PREFIX="sun55i-a527"
77
#BOOT_LOGO="desktop"
8-
KERNEL_TARGET="dev"
8+
KERNEL_TARGET="edge"
99
BOOT_FDT_FILE="dtb/allwinner/sun55i-a527-radxa-a5e.dtb"
1010
IMAGE_PARTITION_TABLE="gpt"
1111
#IMAGE_PARTITION_TABLE="msdos"
@@ -14,9 +14,42 @@ BOOTSTART="1"
1414
BOOTSIZE="512"
1515
ROOTSTART="513"
1616

17-
function post_family_tweaks__radxa_cubie-a5e() {
18-
display_alert "Applying wifi firmware"
19-
pushd "$SDCARD/lib/firmware"
20-
ln -s "aic8800/SDIO/aic8800D80" "aic8800_sdio" # use armbian-firmware
21-
popd
17+
PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools"
18+
19+
# AIC8800
20+
AIC8800_TYPE="sdio"
21+
enable_extension "radxa-aic8800"
22+
23+
# AIC8800 Wireless
24+
function post_family_tweaks_bsp__aic8800_wireless() {
25+
display_alert "$BOARD" "Installing AIC8800 Tweaks" "info"
26+
mkdir -p "${destination}"/etc/modprobe.d
27+
mkdir -p "${destination}"/etc/modules-load.d
28+
# Add wireless conf
29+
cat > "${destination}"/etc/modprobe.d/aic8800-wireless.conf <<- EOT
30+
options aic8800_fdrv_sdio aicwf_dbg_level=0 custregd=0 ps_on=0
31+
#options aic8800_bsp_sdio aic_fw_path=/lib/firmware/aic8800_fw/SDIO/aic8800
32+
EOT
33+
# Add needed bluetooth modules
34+
cat > "${destination}"/etc/modules-load.d/aic8800-btlpm.conf <<- EOT
35+
hidp
36+
rfcomm
37+
bnep
38+
aic8800_btlpm_sdio
39+
EOT
40+
# Add AIC8800 Bluetooth Service and Script
41+
if [[ -d "$SRC/packages/bsp/aic8800" ]]; then
42+
mkdir -p "${destination}"/etc/systemd/system
43+
mkdir -p "${destination}"/usr/bin
44+
cp -f "$SRC/packages/bsp/aic8800/aic-bluetooth" "${destination}"/usr/bin
45+
chmod +x "${destination}"/usr/bin/aic-bluetooth
46+
cp -f "$SRC/packages/bsp/aic8800/aic-bluetooth.service" "${destination}"/etc/systemd/system
47+
fi
2248
}
49+
50+
# Enable AIC8800 Bluetooth Service
51+
function post_family_tweaks__enable_aic8800_bluetooth_service() {
52+
display_alert "$BOARD" "Enabling AIC8800 Bluetooth Service" "info"
53+
chroot_sdcard systemctl --no-reload enable aic-bluetooth.service
54+
}
55+

config/kernel/linux-sunxi64-edge.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,10 +2234,13 @@ CONFIG_SUN50I_IOMMU=y
22342234
CONFIG_ARM_SMMU=m
22352235
CONFIG_ARM_SMMU_V3=m
22362236
CONFIG_ARM_SMMU_V3_SVA=y
2237+
CONFIG_IOMMUFD=m
2238+
CONFIG_SUN50I_IOMMU=y
22372239
CONFIG_REMOTEPROC=y
22382240
CONFIG_REMOTEPROC_CDEV=y
22392241
CONFIG_SUN20I_PPU=y
22402242
CONFIG_SUN50I_H6_PRCM_PPU=m
2243+
CONFIG_SUN55I_PCK600=y
22412244
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
22422245
CONFIG_DEVFREQ_GOV_POWERSAVE=y
22432246
CONFIG_DEVFREQ_GOV_USERSPACE=y

config/sources/families/sun55iw3.conf

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,21 @@ declare -g ATF_TARGET_MAP="PLAT=sun55i_a523 DEBUG=1 bl31;;build/sun55i_a523/debu
1313
declare -g ATFBRANCH="branch:a523"
1414
declare -g BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
1515
declare -g BOOTDELAY=1
16-
declare -g BOOTSOURCE='https://github.com/jernejsk/u-boot/'
16+
declare -g BOOTSOURCE='https://github.com/u-boot/u-boot.git'
1717
declare -g BOOTPATCHDIR="sunxi-dev-${BOOTPATCHDIR:-"u-boot-a523"}"
18-
declare -g BOOTBRANCH="${BOOTBRANCH:-"branch:a523"}"
18+
declare -g BOOTBRANCH="${BOOTBRANCH:-"branch:master"}"
1919
declare -g BOOTENV_FILE='sunxi.txt'
2020
declare -g UBOOT_TARGET_MAP="${UBOOT_TARGET_MAP:-BINMAN_ALLOW_MISSING=1;;u-boot-sunxi-with-spl.bin}"
2121
declare -g OVERLAY_DIR="/boot/dtb/allwinner/overlay"
22-
declare -g LINUXFAMILY="sun55iw3"
22+
declare -g LINUXFAMILY="sunxi64"
2323

2424
case "${BRANCH}" in
2525

26-
dev)
27-
declare -g KERNELSOURCE='https://github.com/apritzel/linux'
28-
declare -g KERNELBRANCH='branch:a523-v3'
29-
declare -g KERNEL_MAJOR_MINOR="6.14" # Major and minor versions of this kernel.
30-
KERNELPATCHDIR="archive/sunxi-dev-${KERNEL_MAJOR_MINOR}"
26+
edge)
27+
declare -g KERNEL_MAJOR_MINOR="6.16" # Major and minor versions of this kernel.
28+
declare -g KERNELBRANCH="tag:v6.16"
29+
KERNELPATCHDIR="archive/sunxi-${KERNEL_MAJOR_MINOR}"
3130
;;
32-
3331
esac
3432

3533
family_tweaks() {
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Juan Sanchez <[email protected]>
3+
Date: Sat, 14 Jun 2025 19:07:52 -0400
4+
Subject: Add leds to Radxa Cubie A5E
5+
6+
Signed-off-by: Juan Sanchez <[email protected]>
7+
---
8+
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 16 ++++++++++
9+
1 file changed, 16 insertions(+)
10+
11+
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
12+
index 0f58d92a6adc..1c56306dffa1 100644
13+
--- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
14+
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
15+
@@ -18,10 +18,26 @@ aliases {
16+
17+
chosen {
18+
stdout-path = "serial0:115200n8";
19+
};
20+
21+
+ leds {
22+
+ compatible = "gpio-leds";
23+
+
24+
+ led-0 {
25+
+ label = "radxa:green:power";
26+
+ gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */
27+
+ linux,default-trigger = "heartbeat";
28+
+ };
29+
+
30+
+ led-1 {
31+
+ label = "radxa:blue:user";
32+
+ gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
33+
+ linux,default-trigger = "default-on";
34+
+ };
35+
+ };
36+
+
37+
ext_osc32k: ext-osc32k-clk {
38+
#clock-cells = <0>;
39+
compatible = "fixed-clock";
40+
clock-frequency = <32768>;
41+
clock-output-names = "ext_osc32k";
42+
--
43+
Created with Armbian build tools https://github.com/armbian/build
44+
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Juan Sanchez <[email protected]>
3+
Date: Fri, 4 Jul 2025 15:17:54 -0400
4+
Subject: Add wifi (mmc1) to Radxa Cubie A5E
5+
6+
Signed-off-by: Juan Sanchez <[email protected]>
7+
---
8+
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 28 ++++++++++
9+
1 file changed, 28 insertions(+)
10+
11+
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
12+
index 1c56306dffa1..d9bbfb916090 100644
13+
--- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
14+
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
15+
@@ -11,10 +11,11 @@ / {
16+
model = "Radxa Cubie A5E";
17+
compatible = "radxa,cubie-a5e", "allwinner,sun55i-a527";
18+
19+
aliases {
20+
ethernet0 = &gmac0;
21+
+ ethernet2 = &sdio_wifi;
22+
serial0 = &uart0;
23+
};
24+
25+
chosen {
26+
stdout-path = "serial0:115200n8";
27+
@@ -41,10 +42,20 @@ ext_osc32k: ext-osc32k-clk {
28+
compatible = "fixed-clock";
29+
clock-frequency = <32768>;
30+
clock-output-names = "ext_osc32k";
31+
};
32+
33+
+ reg_3v3_wifi: 3v3-wifi {
34+
+ compatible = "regulator-fixed";
35+
+ regulator-name = "3v3-wifi";
36+
+ regulator-min-microvolt = <3300000>;
37+
+ regulator-max-microvolt = <3300000>;
38+
+ vin-supply = <&reg_vcc5v>;
39+
+ gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
40+
+ enable-active-high;
41+
+ };
42+
+
43+
reg_vcc5v: vcc5v {
44+
/* board wide 5V supply from the USB-C connector */
45+
compatible = "regulator-fixed";
46+
regulator-name = "vcc-5v";
47+
regulator-min-microvolt = <5000000>;
48+
@@ -94,10 +105,27 @@ &mmc0 {
49+
cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
50+
bus-width = <4>;
51+
status = "okay";
52+
};
53+
54+
+&mmc1_pins {
55+
+ drive-strength = <40>;
56+
+};
57+
+
58+
+&mmc1 {
59+
+ bus-width = <4>;
60+
+ vmmc-supply = <&reg_3v3_wifi>;
61+
+ non-removable;
62+
+ // todo: investigate why clock above 40MHz makes data errors
63+
+ max-frequency = <35000000>;
64+
+ status = "okay";
65+
+
66+
+ sdio_wifi: wifi@1 {
67+
+ reg = <1>;
68+
+ };
69+
+};
70+
+
71+
&ohci0 {
72+
status = "okay";
73+
};
74+
75+
&ohci1 {
76+
--
77+
Created with Armbian build tools https://github.com/armbian/build
78+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From: Mikhail Kalashnikov <[email protected]>
2+
3+
The Allwinner A523 SoC features the Mali-G57 MC1 GPU, which belongs
4+
to the Mali Valhall (v9) family. There is a power domain specifically
5+
for this GPU that needs to be enabled to utilize it.
6+
7+
To enable in a specific device, we need to enable the gpu node and specify
8+
the “mali-supply” regulator additionally in the device tree.
9+
10+
Signed-off-by: Mikhail Kalashnikov <[email protected]>
11+
---
12+
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 15 +++++++++++++++
13+
1 file changed, 15 insertions(+)
14+
15+
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
16+
index dd6fa22f9..d3528d498 100644
17+
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
18+
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
19+
@@ -108,6 +108,21 @@ soc {
20+
#size-cells = <1>;
21+
ranges = <0x0 0x0 0x0 0x40000000>;
22+
23+
+ gpu: gpu@1800000 {
24+
+ compatible = "allwinner,sun55i-a523-mali",
25+
+ "arm,mali-valhall-jm";
26+
+ reg = <0x1800000 0x10000>;
27+
+ interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
28+
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
29+
+ <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
30+
+ interrupt-names = "job", "mmu", "gpu";
31+
+ clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
32+
+ clock-names = "core", "bus";
33+
+ power-domains = <&pck600 PD_GPU>;
34+
+ resets = <&ccu RST_BUS_GPU>;
35+
+ status = "disabled";
36+
+ };
37+
+
38+
pio: pinctrl@2000000 {
39+
compatible = "allwinner,sun55i-a523-pinctrl";
40+
reg = <0x2000000 0x800>;
41+
--
42+
2.50.0
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
From: Chen-Yu Tsai <[email protected]>
2+
3+
The A523 SoC family has two power controllers, one based on the existing
4+
PPU, and one newer one based on ARM's PCK-600.
5+
6+
Add device nodes for both of them.
7+
8+
Signed-off-by: Chen-Yu Tsai <[email protected]>
9+
---
10+
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 18 ++++++++++++++++++
11+
1 file changed, 18 insertions(+)
12+
13+
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
14+
index 6f62201fd739..255e0ef98219 100644
15+
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
16+
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
17+
@@ -7,6 +7,8 @@
18+
#include <dt-bindings/clock/sun55i-a523-r-ccu.h>
19+
#include <dt-bindings/reset/sun55i-a523-ccu.h>
20+
#include <dt-bindings/reset/sun55i-a523-r-ccu.h>
21+
+#include <dt-bindings/power/allwinner,sun55i-a523-ppu.h>
22+
+#include <dt-bindings/power/allwinner,sun55i-a523-pck600.h>
23+
24+
/ {
25+
interrupt-parent = <&gic>;
26+
@@ -576,6 +578,14 @@ mdio0: mdio {
27+
};
28+
};
29+
30+
+ ppu: power-controller@7001400 {
31+
+ compatible = "allwinner,sun55i-a523-ppu";
32+
+ reg = <0x07001400 0x400>;
33+
+ clocks = <&r_ccu CLK_BUS_R_PPU1>;
34+
+ resets = <&r_ccu RST_BUS_R_PPU1>;
35+
+ #power-domain-cells = <1>;
36+
+ };
37+
+
38+
r_ccu: clock-controller@7010000 {
39+
compatible = "allwinner,sun55i-a523-r-ccu";
40+
reg = <0x7010000 0x250>;
41+
@@ -622,6 +632,14 @@ r_i2c_pins: r-i2c-pins {
42+
};
43+
};
44+
45+
+ pck600: power-controller@7060000 {
46+
+ compatible = "allwinner,sun55i-a523-pck-600";
47+
+ reg = <0x07060000 0x8000>;
48+
+ clocks = <&r_ccu CLK_BUS_R_PPU0>;
49+
+ resets = <&r_ccu RST_BUS_R_PPU0>;
50+
+ #power-domain-cells = <1>;
51+
+ };
52+
+
53+
r_i2c0: i2c@7081400 {
54+
compatible = "allwinner,sun55i-a523-i2c",
55+
"allwinner,sun8i-v536-i2c",
56+
--
57+
2.39.5
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From: Chen-Yu Tsai <[email protected]>
2+
3+
UART1 is normally used to connect to the Bluetooth side of a Broadcom
4+
WiFi+BT combo chip. The connection uses 4 pins.
5+
6+
Add pinmux nodes for UART1, one for the RX/TX pins, and one for the
7+
RTS/CTS pins.
8+
9+
Reviewed-by: Andre Przywara <[email protected]>
10+
Signed-off-by: Chen-Yu Tsai <[email protected]>
11+
---
12+
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 14 ++++++++++++++
13+
1 file changed, 14 insertions(+)
14+
15+
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
16+
index 4839411e51cf..cf0bc39aab04 100644
17+
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
18+
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
19+
@@ -168,6 +168,20 @@ uart0_pb_pins: uart0-pb-pins {
20+
allwinner,pinmux = <2>;
21+
function = "uart0";
22+
};
23+
+
24+
+ /omit-if-no-ref/
25+
+ uart1_pins: uart1-pins {
26+
+ pins = "PG6", "PG7";
27+
+ function = "uart1";
28+
+ allwinner,pinmux = <2>;
29+
+ };
30+
+
31+
+ /omit-if-no-ref/
32+
+ uart1_rts_cts_pins: uart1-rts-cts-pins {
33+
+ pins = "PG8", "PG9";
34+
+ function = "uart1";
35+
+ allwinner,pinmux = <2>;
36+
+ };
37+
};
38+
39+
ccu: clock-controller@2001000 {
40+
--
41+
2.39.5

0 commit comments

Comments
 (0)