Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 40 additions & 7 deletions config/boards/radxa-cubie-a5e.csc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
BOARD_NAME="radxa cubie a5e"
BOARDFAMILY="sun55iw3"
BOARD_MAINTAINER=""
BOOTCONFIG="radxa-a5e_defconfig"
BOOTCONFIG="radxa-cubie-a5e_defconfig"
OVERLAY_PREFIX="sun55i-a527"
#BOOT_LOGO="desktop"
KERNEL_TARGET="dev"
KERNEL_TARGET="edge"
BOOT_FDT_FILE="dtb/allwinner/sun55i-a527-radxa-a5e.dtb"
IMAGE_PARTITION_TABLE="gpt"
#IMAGE_PARTITION_TABLE="msdos"
Expand All @@ -14,9 +14,42 @@ BOOTSTART="1"
BOOTSIZE="512"
ROOTSTART="513"

function post_family_tweaks__radxa_cubie-a5e() {
display_alert "Applying wifi firmware"
pushd "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800D80" "aic8800_sdio" # use armbian-firmware
popd
PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools"

# AIC8800
AIC8800_TYPE="sdio"
enable_extension "radxa-aic8800"

# AIC8800 Wireless
function post_family_tweaks_bsp__aic8800_wireless() {
display_alert "$BOARD" "Installing AIC8800 Tweaks" "info"
mkdir -p "${destination}"/etc/modprobe.d
mkdir -p "${destination}"/etc/modules-load.d
# Add wireless conf
cat > "${destination}"/etc/modprobe.d/aic8800-wireless.conf <<- EOT
options aic8800_fdrv_sdio aicwf_dbg_level=0 custregd=0 ps_on=0
#options aic8800_bsp_sdio aic_fw_path=/lib/firmware/aic8800_fw/SDIO/aic8800
EOT
# Add needed bluetooth modules
cat > "${destination}"/etc/modules-load.d/aic8800-btlpm.conf <<- EOT
hidp
rfcomm
bnep
aic8800_btlpm_sdio
EOT
# Add AIC8800 Bluetooth Service and Script
if [[ -d "$SRC/packages/bsp/aic8800" ]]; then
mkdir -p "${destination}"/etc/systemd/system
mkdir -p "${destination}"/usr/bin
cp -f "$SRC/packages/bsp/aic8800/aic-bluetooth" "${destination}"/usr/bin
chmod +x "${destination}"/usr/bin/aic-bluetooth
cp -f "$SRC/packages/bsp/aic8800/aic-bluetooth.service" "${destination}"/etc/systemd/system
fi
}

# Enable AIC8800 Bluetooth Service
function post_family_tweaks__enable_aic8800_bluetooth_service() {
display_alert "$BOARD" "Enabling AIC8800 Bluetooth Service" "info"
chroot_sdcard systemctl --no-reload enable aic-bluetooth.service
}

3 changes: 3 additions & 0 deletions config/kernel/linux-sunxi64-edge.config
Original file line number Diff line number Diff line change
Expand Up @@ -2234,10 +2234,13 @@ CONFIG_SUN50I_IOMMU=y
CONFIG_ARM_SMMU=m
CONFIG_ARM_SMMU_V3=m
CONFIG_ARM_SMMU_V3_SVA=y
CONFIG_IOMMUFD=m
CONFIG_SUN50I_IOMMU=y
CONFIG_REMOTEPROC=y
CONFIG_REMOTEPROC_CDEV=y
CONFIG_SUN20I_PPU=y
CONFIG_SUN50I_H6_PRCM_PPU=m
CONFIG_SUN55I_PCK600=y
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
CONFIG_DEVFREQ_GOV_POWERSAVE=y
CONFIG_DEVFREQ_GOV_USERSPACE=y
Expand Down
16 changes: 7 additions & 9 deletions config/sources/families/sun55iw3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,21 @@ declare -g ATF_TARGET_MAP="PLAT=sun55i_a523 DEBUG=1 bl31;;build/sun55i_a523/debu
declare -g ATFBRANCH="branch:a523"
declare -g BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
declare -g BOOTDELAY=1
declare -g BOOTSOURCE='https://github.com/jernejsk/u-boot/'
declare -g BOOTSOURCE='https://github.com/u-boot/u-boot.git'
declare -g BOOTPATCHDIR="sunxi-dev-${BOOTPATCHDIR:-"u-boot-a523"}"
declare -g BOOTBRANCH="${BOOTBRANCH:-"branch:a523"}"
declare -g BOOTBRANCH="${BOOTBRANCH:-"branch:master"}"
declare -g BOOTENV_FILE='sunxi.txt'
declare -g UBOOT_TARGET_MAP="${UBOOT_TARGET_MAP:-BINMAN_ALLOW_MISSING=1;;u-boot-sunxi-with-spl.bin}"
declare -g OVERLAY_DIR="/boot/dtb/allwinner/overlay"
declare -g LINUXFAMILY="sun55iw3"
declare -g LINUXFAMILY="sunxi64"

case "${BRANCH}" in

dev)
declare -g KERNELSOURCE='https://github.com/apritzel/linux'
declare -g KERNELBRANCH='branch:a523-v3'
declare -g KERNEL_MAJOR_MINOR="6.14" # Major and minor versions of this kernel.
KERNELPATCHDIR="archive/sunxi-dev-${KERNEL_MAJOR_MINOR}"
edge)
declare -g KERNEL_MAJOR_MINOR="6.16" # Major and minor versions of this kernel.
declare -g KERNELBRANCH="tag:v6.16"
KERNELPATCHDIR="archive/sunxi-${KERNEL_MAJOR_MINOR}"
;;

esac

family_tweaks() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Juan Sanchez <juanesf91@gmail.com>
Date: Sat, 14 Jun 2025 19:07:52 -0400
Subject: Add leds to Radxa Cubie A5E

Signed-off-by: Juan Sanchez <juanesf91@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 16 ++++++++++
1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
index 0f58d92a6adc..1c56306dffa1 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
@@ -18,10 +18,26 @@ aliases {

chosen {
stdout-path = "serial0:115200n8";
};

+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ label = "radxa:green:power";
+ gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-1 {
+ label = "radxa:blue:user";
+ gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
+ linux,default-trigger = "default-on";
+ };
+ };
+
ext_osc32k: ext-osc32k-clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <32768>;
clock-output-names = "ext_osc32k";
--
Created with Armbian build tools https://github.com/armbian/build

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Juan Sanchez <juanesf91@gmail.com>
Date: Fri, 4 Jul 2025 15:17:54 -0400
Subject: Add wifi (mmc1) to Radxa Cubie A5E

Signed-off-by: Juan Sanchez <juanesf91@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 28 ++++++++++
1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
index 1c56306dffa1..d9bbfb916090 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
@@ -11,10 +11,11 @@ / {
model = "Radxa Cubie A5E";
compatible = "radxa,cubie-a5e", "allwinner,sun55i-a527";

aliases {
ethernet0 = &gmac0;
+ ethernet2 = &sdio_wifi;
serial0 = &uart0;
};

chosen {
stdout-path = "serial0:115200n8";
@@ -41,10 +42,20 @@ ext_osc32k: ext-osc32k-clk {
compatible = "fixed-clock";
clock-frequency = <32768>;
clock-output-names = "ext_osc32k";
};

+ reg_3v3_wifi: 3v3-wifi {
+ compatible = "regulator-fixed";
+ regulator-name = "3v3-wifi";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&reg_vcc5v>;
+ gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
+ enable-active-high;
+ };
+
reg_vcc5v: vcc5v {
/* board wide 5V supply from the USB-C connector */
compatible = "regulator-fixed";
regulator-name = "vcc-5v";
regulator-min-microvolt = <5000000>;
@@ -94,10 +105,27 @@ &mmc0 {
cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
bus-width = <4>;
status = "okay";
};

+&mmc1_pins {
+ drive-strength = <40>;
+};
+
+&mmc1 {
+ bus-width = <4>;
+ vmmc-supply = <&reg_3v3_wifi>;
+ non-removable;
+ // todo: investigate why clock above 40MHz makes data errors
+ max-frequency = <35000000>;
+ status = "okay";
+
+ sdio_wifi: wifi@1 {
+ reg = <1>;
+ };
+};
+
&ohci0 {
status = "okay";
};

&ohci1 {
--
Created with Armbian build tools https://github.com/armbian/build

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From: Mikhail Kalashnikov <iuncuim@gmail.com>

The Allwinner A523 SoC features the Mali-G57 MC1 GPU, which belongs
to the Mali Valhall (v9) family. There is a power domain specifically
for this GPU that needs to be enabled to utilize it.

To enable in a specific device, we need to enable the gpu node and specify
the “mali-supply” regulator additionally in the device tree.

Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index dd6fa22f9..d3528d498 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -108,6 +108,21 @@ soc {
#size-cells = <1>;
ranges = <0x0 0x0 0x0 0x40000000>;

+ gpu: gpu@1800000 {
+ compatible = "allwinner,sun55i-a523-mali",
+ "arm,mali-valhall-jm";
+ reg = <0x1800000 0x10000>;
+ interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "job", "mmu", "gpu";
+ clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
+ clock-names = "core", "bus";
+ power-domains = <&pck600 PD_GPU>;
+ resets = <&ccu RST_BUS_GPU>;
+ status = "disabled";
+ };
+
pio: pinctrl@2000000 {
compatible = "allwinner,sun55i-a523-pinctrl";
reg = <0x2000000 0x800>;
--
2.50.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
From: Chen-Yu Tsai <wens@csie.org>

The A523 SoC family has two power controllers, one based on the existing
PPU, and one newer one based on ARM's PCK-600.

Add device nodes for both of them.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index 6f62201fd739..255e0ef98219 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -7,6 +7,8 @@
#include <dt-bindings/clock/sun55i-a523-r-ccu.h>
#include <dt-bindings/reset/sun55i-a523-ccu.h>
#include <dt-bindings/reset/sun55i-a523-r-ccu.h>
+#include <dt-bindings/power/allwinner,sun55i-a523-ppu.h>
+#include <dt-bindings/power/allwinner,sun55i-a523-pck600.h>

/ {
interrupt-parent = <&gic>;
@@ -576,6 +578,14 @@ mdio0: mdio {
};
};

+ ppu: power-controller@7001400 {
+ compatible = "allwinner,sun55i-a523-ppu";
+ reg = <0x07001400 0x400>;
+ clocks = <&r_ccu CLK_BUS_R_PPU1>;
+ resets = <&r_ccu RST_BUS_R_PPU1>;
+ #power-domain-cells = <1>;
+ };
+
r_ccu: clock-controller@7010000 {
compatible = "allwinner,sun55i-a523-r-ccu";
reg = <0x7010000 0x250>;
@@ -622,6 +632,14 @@ r_i2c_pins: r-i2c-pins {
};
};

+ pck600: power-controller@7060000 {
+ compatible = "allwinner,sun55i-a523-pck-600";
+ reg = <0x07060000 0x8000>;
+ clocks = <&r_ccu CLK_BUS_R_PPU0>;
+ resets = <&r_ccu RST_BUS_R_PPU0>;
+ #power-domain-cells = <1>;
+ };
+
r_i2c0: i2c@7081400 {
compatible = "allwinner,sun55i-a523-i2c",
"allwinner,sun8i-v536-i2c",
--
2.39.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From: Chen-Yu Tsai <wens@csie.org>

UART1 is normally used to connect to the Bluetooth side of a Broadcom
WiFi+BT combo chip. The connection uses 4 pins.

Add pinmux nodes for UART1, one for the RX/TX pins, and one for the
RTS/CTS pins.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index 4839411e51cf..cf0bc39aab04 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -168,6 +168,20 @@ uart0_pb_pins: uart0-pb-pins {
allwinner,pinmux = <2>;
function = "uart0";
};
+
+ /omit-if-no-ref/
+ uart1_pins: uart1-pins {
+ pins = "PG6", "PG7";
+ function = "uart1";
+ allwinner,pinmux = <2>;
+ };
+
+ /omit-if-no-ref/
+ uart1_rts_cts_pins: uart1-rts-cts-pins {
+ pins = "PG8", "PG9";
+ function = "uart1";
+ allwinner,pinmux = <2>;
+ };
};

ccu: clock-controller@2001000 {
--
2.39.5
Loading