Skip to content

Commit b902f6e

Browse files
juanesfCopilot
andauthored
Update for Radxa Cubie A5E (#9626)
* Enable WiFi & BT on Radxa Cubie A5E * fix BT and WiFi patches for Radxa Cubie A5E * Update WiFi patches for Radxa Cubie A5E * Update BT & WiFi patches * update to last changes * update wifi patches for cubie a5e * Latest changes to make wifi work with wifi pwr seq * Update 21-Enable-uart1-on-Radxa-Cubie-A5E.patch - As suggested by @coderabbitai * Update patch with coderabbitai suggestion (6.18 https://paste.armbian.eu/yosofigeve) * update patch for add frecuency stability (https://paste.armbian.eu/owuradonuh) * sync patch with 6.18 (tested) https://paste.armbian.eu/efibeyequx * Update 22-Enable-wifi-on-Radxa-Cubie-A5E.patch update "max-frequency" to 40 Mhz. (tested) * Update 21-Enable-uart1-on-Radxa-Cubie-A5E.patch "delete" compatible * Update 22-Enable-wifi-on-Radxa-Cubie-A5E.patch sync with 6.18 * Update 21-Enable-uart1-on-Radxa-Cubie-A5E.patch sync with 6.18 * Potential fix for pull request finding (copilot) - fix missing space Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update radxa-cubie-a5e.csc Add hardware descriptors (suggested by @EvilOlaf) * Upload aic8800 driver patch (from warpme/MiniMyth2) for kernel 7.0 * add firmware path for aic8800d80 * Revert "Upload aic8800 driver patch (from warpme/MiniMyth2) for kernel 7.0" This reverts commit 0733a2f. --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 4a09ca3 commit b902f6e

15 files changed

Lines changed: 412 additions & 98 deletions

config/boards/radxa-cubie-a5e.csc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Allwinner Cortex-A55 octa core 1/2/4GB RAM SoC
1+
# Allwinner Cortex-A55 octa core SoC 2/4GB-RAM, 2x GBe, WiFi/BT, M.2 2230/USB3, NPU
22
BOARD_NAME="radxa cubie a5e"
33
BOARD_VENDOR="radxa"
44
BOARDFAMILY="sun55iw3"
@@ -9,12 +9,7 @@ OVERLAY_PREFIX="sun55i-a527"
99
#BOOT_LOGO="desktop"
1010
KERNEL_TARGET="edge"
1111
BOOT_FDT_FILE="sun55i-a527-cubie-a5e.dtb"
12-
IMAGE_PARTITION_TABLE="gpt"
13-
#IMAGE_PARTITION_TABLE="msdos"
14-
BOOTFS_TYPE="fat"
15-
BOOTSTART="1"
16-
BOOTSIZE="512"
17-
ROOTSTART="513"
12+
HAS_VIDEO_OUTPUT=no
1813

1914
PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools"
2015

config/sources/families/sun55iw3.conf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@
99
source "${BASH_SOURCE%/*}/include/sunxi64_common.inc"
1010

1111
declare -g ATFSOURCE='https://github.com/jernejsk/arm-trusted-firmware'
12-
declare -g ATF_TARGET_MAP="PLAT=sun55i_a523 DEBUG=1 bl31;;build/sun55i_a523/debug/bl31.bin"
12+
declare -g ATF_TARGET_MAP="PLAT=sun55i_a523 DEBUG=1;;build/sun55i_a523/debug/bl31.bin"
1313
declare -g ATFBRANCH="branch:a523-v4"
1414
declare -g BOOTBRANCH="tag:v2026.01"
1515
declare -g BOOTPATCHDIR="v2026.01"
1616

17-
write_uboot_platform() {
18-
dd if=$1/u-boot-sunxi-with-spl.bin of=$2 bs=512 seek=256 status=noxfer > /dev/null 2>&1
19-
}

patch/kernel/archive/sunxi-6.18/patches.backports/20-Add-wifi-to-Radxa-Cubie-A5E.patch

Lines changed: 0 additions & 66 deletions
This file was deleted.
Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,54 @@
11
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
22
From: Juan Sanchez <juanesf91@gmail.com>
3-
Date: Tue, 5 Aug 2025 14:55:52 -0400
4-
Subject: Enable uart1 (bluetooth) on Radxa Cubie A5E
3+
Date: Tue, 31 Mar 2026 22:37:03 -0300
4+
Subject: Enable BT on Radxa Cubie A5E
55

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

1111
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 111111111111..222222222222 100644
12+
index 5df8058e85be..75df77cc2099 100644
1313
--- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
1414
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
15-
@@ -17,6 +17,7 @@ aliases {
15+
@@ -14,10 +14,11 @@ / {
16+
17+
aliases {
18+
ethernet0 = &gmac0;
1619
ethernet1 = &gmac1;
17-
ethernet2 = &sdio_wifi;
1820
serial0 = &uart0;
1921
+ serial1 = &uart1;
2022
};
2123

2224
chosen {
23-
@@ -381,6 +382,14 @@ &uart0 {
25+
stdout-path = "serial0:115200n8";
26+
};
27+
@@ -381,10 +382,24 @@ &uart0 {
28+
pinctrl-names = "default";
29+
pinctrl-0 = <&uart0_pb_pins>;
2430
status = "okay";
2531
};
2632

27-
+/* Bluetooth */
2833
+&uart1 {
2934
+ pinctrl-names = "default";
3035
+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
3136
+ uart-has-rtscts;
3237
+ status = "okay";
38+
+
39+
+ bluetooth {
40+
+ /* aic8800-bt */
41+
+ shutdown-gpios = <&r_pio 1 2 GPIO_ACTIVE_LOW>;
42+
+ host-wakeup-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>;
43+
+ device-wakeup-gpios = <&r_pio 1 3 GPIO_ACTIVE_HIGH>;
44+
+ };
3345
+};
3446
+
3547
&usb_otg {
3648
/*
3749
* The USB-C port is the primary power supply, so in this configuration
50+
* relies on the other end of the USB cable to supply the VBUS power.
51+
* So use this port in peripheral mode.
3852
--
39-
Armbian
53+
Created with Armbian build tools https://github.com/armbian/build
4054

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Juan Sanchez <juanesf91@gmail.com>
3+
Date: Thu, 14 May 2026 21:10:49 -0400
4+
Subject: Update WiFi node patch on Radxa Cubie A5E
5+
6+
Signed-off-by: Juan Sanchez <juanesf91@gmail.com>
7+
---
8+
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 33 ++++++++++
9+
1 file changed, 33 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 989a357f13be..5ce05a799615 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+
@@ -45,10 +45,25 @@ iio-hwmon {
16+
compatible = "iio-hwmon";
17+
io-channels = <&axp717_adc 3>, /* vsys_v */
18+
<&axp717_adc 4>; /* pmic_temp */
19+
};
20+
21+
+ reg_3v3_wifi: 3v3-wifi {
22+
+ compatible = "regulator-fixed";
23+
+ regulator-name = "3v3-wifi";
24+
+ regulator-min-microvolt = <3300000>;
25+
+ regulator-max-microvolt = <3300000>;
26+
+ gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>;
27+
+ enable-active-high;
28+
+ };
29+
+
30+
+ wifi_pwrseq: wifi-pwrseq {
31+
+ compatible = "mmc-pwrseq-simple";
32+
+ reset-gpios = <&r_pio 1 1 GPIO_ACTIVE_LOW>;
33+
+ post-power-on-delay-ms = <200>;
34+
+ };
35+
+
36+
reg_vcc5v: vcc5v {
37+
/* board wide 5V supply from the USB-C connector */
38+
compatible = "regulator-fixed";
39+
regulator-name = "vcc-5v";
40+
regulator-min-microvolt = <5000000>;
41+
@@ -160,10 +175,29 @@ &mmc0 {
42+
cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
43+
bus-width = <4>;
44+
status = "okay";
45+
};
46+
47+
+&mmc1 {
48+
+ bus-width = <4>;
49+
+ max-frequency = <40000000>;
50+
+ mmc-pwrseq = <&wifi_pwrseq>;
51+
+ non-removable;
52+
+ pinctrl-names = "default";
53+
+ pinctrl-0 = <&mmc1_pins>;
54+
+ vmmc-supply = <&reg_3v3_wifi>;
55+
+ vqmmc-supply = <&reg_bldo1>;
56+
+ status = "okay";
57+
+
58+
+ wifi@1 {
59+
+ reg = <1>;
60+
+ interrupt-parent = <&r_pio>;
61+
+ interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>;
62+
+ interrupt-names = "host-wake";
63+
+ };
64+
+};
65+
+
66+
&ohci0 {
67+
status = "okay";
68+
};
69+
70+
&ohci1 {
71+
--
72+
Created with Armbian build tools https://github.com/armbian/build
73+

patch/kernel/archive/sunxi-6.18/patches.backports/30-allwinner-a523-support-spi-controllers.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ index 111111111111..222222222222 100644
152152
+ interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
153153
+ clocks = <&r_ccu CLK_BUS_R_SPI>, <&r_ccu CLK_R_SPI>;
154154
+ clock-names = "ahb", "mod";
155-
+ dmas = <&dma 53>, <&dma 53>;
155+
+ dmas = <&mcu_dma 13>, <&mcu_dma 13>;
156156
+ dma-names = "rx", "tx";
157157
+ resets = <&r_ccu RST_BUS_R_SPI>;
158158
+ status = "disabled";
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
From fb20ccf70cf695f178d7c32e2d33b376560df0ff Mon Sep 17 00:00:00 2001
2+
From: Chen-Yu Tsai <wens@kernel.org>
3+
Date: Tue, 17 Feb 2026 17:30:03 +0800
4+
Subject: clk: sunxi-ng: sun55i-a523-r: Add missing r-spi module clock
5+
6+
When the PRCM clk driver was added, somehow the r-spi module clock
7+
was skipped over.
8+
9+
Add it so that r-spi can actually work.
10+
11+
Fixes: 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU")
12+
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
13+
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
14+
Link: https://patch.msgid.link/20260217093004.3239051-1-wens@kernel.org
15+
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
16+
---
17+
drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 17 ++++++++++++++++-
18+
1 file changed, 16 insertions(+), 1 deletion(-)
19+
20+
diff --git a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
21+
index 0339c4af0fe5b..db0e36d8838e7 100644
22+
--- a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
23+
+++ b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
24+
@@ -83,9 +83,22 @@ static SUNXI_CCU_MUX_DATA_WITH_GATE(r_pwmctrl_clk, "r-pwmctrl",
25+
static SUNXI_CCU_GATE_HW(bus_r_pwmctrl_clk, "bus-r-pwmctrl",
26+
&r_apb0_clk.common.hw, 0x13c, BIT(0), 0);
27+
28+
-/* SPI clock is /M/N (same as new MMC?) */
29+
+static const struct clk_parent_data r_spi_parents[] = {
30+
+ { .fw_name = "hosc" },
31+
+ { .fw_name = "pll-periph" },
32+
+ { .name = "pll-periph0-300M" },
33+
+ { .name = "pll-periph1-300M" },
34+
+ { .name = "pll-audio" },
35+
+};
36+
+static SUNXI_CCU_DUALDIV_MUX_GATE(r_spi_clk, "r-spi", r_spi_parents, 0x150,
37+
+ 0, 5, /* M */
38+
+ 8, 5, /* P */
39+
+ 24, 3, /* mux */
40+
+ BIT(31), /* gate */
41+
+ 0);
42+
static SUNXI_CCU_GATE_HW(bus_r_spi_clk, "bus-r-spi",
43+
&r_ahb_clk.common.hw, 0x15c, BIT(0), 0);
44+
+
45+
static SUNXI_CCU_GATE_HW(bus_r_spinlock_clk, "bus-r-spinlock",
46+
&r_ahb_clk.common.hw, 0x16c, BIT(0), 0);
47+
static SUNXI_CCU_GATE_HW(bus_r_msgbox_clk, "bus-r-msgbox",
48+
@@ -138,6 +151,7 @@ static struct ccu_common *sun55i_a523_r_ccu_clks[] = {
49+
&bus_r_twd_clk.common,
50+
&r_pwmctrl_clk.common,
51+
&bus_r_pwmctrl_clk.common,
52+
+ &r_spi_clk.common,
53+
&bus_r_spi_clk.common,
54+
&bus_r_spinlock_clk.common,
55+
&bus_r_msgbox_clk.common,
56+
@@ -169,6 +183,7 @@ static struct clk_hw_onecell_data sun55i_a523_r_hw_clks = {
57+
[CLK_BUS_R_TWD] = &bus_r_twd_clk.common.hw,
58+
[CLK_R_PWMCTRL] = &r_pwmctrl_clk.common.hw,
59+
[CLK_BUS_R_PWMCTRL] = &bus_r_pwmctrl_clk.common.hw,
60+
+ [CLK_R_SPI] = &r_spi_clk.common.hw,
61+
[CLK_BUS_R_SPI] = &bus_r_spi_clk.common.hw,
62+
[CLK_BUS_R_SPINLOCK] = &bus_r_spinlock_clk.common.hw,
63+
[CLK_BUS_R_MSGBOX] = &bus_r_msgbox_clk.common.hw,
64+
--
65+
cgit 1.3-korg
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
The Allwinner A10 and H3 SoCs cannot read the state of a GPIO line when
2+
that line is muxed for IRQ triggering (muxval 6), but only if it's
3+
explicitly muxed for GPIO input (muxval 0). Other SoCs do not show this
4+
behaviour, so we added a optional workaround, triggered by a quirk bit,
5+
which triggers remuxing the pin when it's configured for IRQ, while we
6+
need to read its value.
7+
8+
For some reasons this quirk flag was copied over to newer SoCs, even
9+
though they don't show this behaviour, and the GPIO data register
10+
reflects the true GPIO state even with a pin muxed to IRQ trigger.
11+
12+
Remove the unneeded quirk from the A523 family, where it's definitely
13+
not needed (confirmed by experiments), and where it actually breaks,
14+
because the workaround is not compatible with the newer generation
15+
pinctrl IP used in that chip.
16+
17+
Together with a DT change this fixes GPIO IRQ operation on the A523
18+
family of SoCs, as for instance used for the SD card detection.
19+
20+
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
21+
Fixes: b8a51e95b376 ("pinctrl: sunxi: Add support for the secondary A523 GPIO ports")
22+
---
23+
drivers/pinctrl/sunxi/pinctrl-sun55i-a523-r.c | 1 -
24+
drivers/pinctrl/sunxi/pinctrl-sun55i-a523.c | 1 -
25+
2 files changed, 2 deletions(-)
26+
27+
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun55i-a523-r.c b/drivers/pinctrl/sunxi/pinctrl-sun55i-a523-r.c
28+
index 69cd2b4ebd7d..462aa1c4a5fa 100644
29+
--- a/drivers/pinctrl/sunxi/pinctrl-sun55i-a523-r.c
30+
+++ b/drivers/pinctrl/sunxi/pinctrl-sun55i-a523-r.c
31+
@@ -26,7 +26,6 @@ static const u8 a523_r_irq_bank_muxes[SUNXI_PINCTRL_MAX_BANKS] =
32+
static struct sunxi_pinctrl_desc a523_r_pinctrl_data = {
33+
.irq_banks = ARRAY_SIZE(a523_r_irq_bank_map),
34+
.irq_bank_map = a523_r_irq_bank_map,
35+
- .irq_read_needs_mux = true,
36+
.io_bias_cfg_variant = BIAS_VOLTAGE_PIO_POW_MODE_SEL,
37+
.pin_base = PL_BASE,
38+
};
39+
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun55i-a523.c b/drivers/pinctrl/sunxi/pinctrl-sun55i-a523.c
40+
index 7d2308c37d29..b6f78f1f30ac 100644
41+
--- a/drivers/pinctrl/sunxi/pinctrl-sun55i-a523.c
42+
+++ b/drivers/pinctrl/sunxi/pinctrl-sun55i-a523.c
43+
@@ -26,7 +26,6 @@ static const u8 a523_irq_bank_muxes[SUNXI_PINCTRL_MAX_BANKS] =
44+
static struct sunxi_pinctrl_desc a523_pinctrl_data = {
45+
.irq_banks = ARRAY_SIZE(a523_irq_bank_map),
46+
.irq_bank_map = a523_irq_bank_map,
47+
- .irq_read_needs_mux = true,
48+
.io_bias_cfg_variant = BIAS_VOLTAGE_PIO_POW_MODE_SEL,
49+
};
50+
51+
--
52+
2.43.0
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Even though the Allwinner A523 SoC implements 10 GPIO banks, it has
2+
actually registers for 11 IRQ banks, and even an interrupt assigned to
3+
the first, non-implemented IRQ bank.
4+
Add that first interrupt to the list of GPIO interrupts, to correct the
5+
association between IRQs and GPIO banks.
6+
7+
This fixes GPIO IRQ operation on boards with A523 SoCs, as seen by
8+
broken SD card detect functionality, for instance.
9+
10+
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
11+
Fixes: 35ac96f79664 ("arm64: dts: allwinner: Add Allwinner A523 .dtsi file")
12+
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
13+
---
14+
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 3 ++-
15+
1 file changed, 2 insertions(+), 1 deletion(-)
16+
17+
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
18+
index 9335977751e2..cea5b166c00f 100644
19+
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
20+
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
21+
@@ -128,7 +128,8 @@ gpu: gpu@1800000 {
22+
pio: pinctrl@2000000 {
23+
compatible = "allwinner,sun55i-a523-pinctrl";
24+
reg = <0x2000000 0x800>;
25+
- interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
26+
+ interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
27+
+ <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
28+
<GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
29+
<GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
30+
<GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
31+
--
32+
2.43.0

0 commit comments

Comments
 (0)