Skip to content
Open
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
32 changes: 28 additions & 4 deletions .github/local/Makefile.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
UBOOT_PRODUCTS := radxa-cubie-a5e
UBOOT_PRODUCTS := radxa-cubie-a5e radxa-cubie-a7s

CUSTOM_DEBUILD_ENV := DEB_BUILD_OPTIONS='parallel=1' DEB_CFLAGS_MAINT_SET= DEB_LDFLAGS_MAINT_SET= DEB_OBJCFLAGS_MAINT_SET=

#
# Common supporting targets
Expand All @@ -10,16 +12,21 @@ clean: clean_atf
clean_atf:
$(MAKE) -j$(shell nproc) -C atf clean

atf/build/sun55i_a523/debug/bl31.bin:
CFLAGS= $(MAKE) -C atf CROSS_COMPILE=$(CROSS_COMPILE) PLAT=sun55i_a523 DEBUG=1
atf/build/%/debug/bl31.bin:
$(MAKE) -j$(shell nproc) -C atf CROSS_COMPILE=$(CROSS_COMPILE) PLAT=$* DEBUG=1

src/boot_package-%.fex: awbin/%/boot_package.cfg
cat awbin/$*/header-info.bin src/u-boot-sunxi-with-spl.bin > src/u-boot-sunxi-with-spl-with-head.bin
cd src/ && ../tools/pack/pctools/linux/openssl/dragonsecboot -pack ../awbin/$*/boot_package.cfg
mv src/boot_package.fex $@

#
# Device build targets
#

.PHONY: radxa-cubie-a5e_defconfig
radxa-cubie-a5e_defconfig: clean_config
$(UMAKE) radxa-a5e_defconfig
$(UMAKE) radxa-cubie-a5e_defconfig

.PHONY: radxa-cubie-a5e_build
radxa-cubie-a5e_build: radxa-cubie-a5e_defconfig atf/build/sun55i_a523/debug/bl31.bin
Expand All @@ -30,3 +37,20 @@ radxa-cubie-a5e: radxa-cubie-a5e_build
mkdir -p out/$@
cp src/u-boot-sunxi-with-spl.bin out/$@/
cp setup/u-boot_setup-allwinner.sh out/$@/setup.sh

.PHONY: radxa-cubie-a7s_defconfig
radxa-cubie-a7s_defconfig: clean_config
$(UMAKE) radxa-cubie-a7s_defconfig

.PHONY: radxa-cubie-a7s_build
radxa-cubie-a7s_build: radxa-cubie-a7s_defconfig atf/build/sun60i_a733/debug/bl31.bin
$(UMAKE) BL31=../atf/build/sun60i_a733/debug/bl31.bin
rm -f src/boot_package-a733.fex

.PHONY: radxa-cubie-a7s
radxa-cubie-a7s: radxa-cubie-a7s_build src/boot_package-a733.fex
mkdir -p out/$@
cp awbin/a733/boot0_*.bin out/$@/
cp awbin/a733/sys_partition_nor.bin out/$@/
cp src/boot_package-a733.fex out/$@/boot_package.fex
cp setup/u-boot_setup-allwinner.sh out/$@/setup.sh
12 changes: 8 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
[submodule "src"]
path = src
url = https://github.com/apritzel/u-boot.git
branch = a523-beta
url = https://github.com/dlan17/u-boot
branch = allwinner/A733/boot
[submodule "atf"]
path = atf
url = https://github.com/jernejsk/arm-trusted-firmware.git
branch = a523
url = https://github.com/dlan17/trusted-firmware-a
branch = A733
[submodule "tools"]
path = tools
url = https://gitlab.com/tina5.0_aiot/lichee/tools.git
branch = product-aiot-stable
Binary file added awbin/a733/boot0_sdcard.bin
Binary file not shown.
Binary file added awbin/a733/boot0_spinor.bin
Binary file not shown.
Binary file added awbin/a733/boot0_ufs.bin
Binary file not shown.
3 changes: 3 additions & 0 deletions awbin/a733/boot_package.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[package]
item=u-boot, u-boot-sunxi-with-spl-with-head.bin
item=dtb, u-boot-sunxi-with-spl.fit.fit
Binary file added awbin/a733/header-info.bin
Binary file not shown.
Binary file added awbin/a733/sys_partition_nor.bin
Binary file not shown.
18 changes: 18 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,21 @@ Section: admin
Priority: optional
Description: Radxa U-Boot meta-package for Radxa Cubie A5E.
This package provides the prebuilt U-Boot for Radxa Cubie A5E.

Package: u-boot-radxa-cubie-a7s
Architecture: all
Depends: u-boot-dlan17,
${misc:Depends},
Section: admin
Priority: optional
Description: Radxa U-Boot meta-package for Radxa Cubie A7S.
This package provides the prebuilt U-Boot for Radxa Cubie A7S.

Package: u-boot-radxa-a733
Architecture: all
Depends: u-boot-dlan17,
${misc:Depends},
Section: admin
Priority: optional
Description: Radxa U-Boot meta-package for Radxa A733 products
This package provides the prebuilt U-Boot for Radxa A733 products.
4 changes: 1 addition & 3 deletions debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ License: GPL-3+
General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301, USA.
along with this program. If not, see <https://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-3.
3 changes: 3 additions & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
u-boot/0001-feat-add-radxa-cubie-a7s-supports.patch
u-boot/0002-spl-only-a733-use-ram-as-boot-device.patch
u-boot/0003-sunxi-a527-radxa-reduce-DDR-clock-frequency.patch
271 changes: 271 additions & 0 deletions debian/patches/u-boot/0001-feat-add-radxa-cubie-a7s-supports.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
From 543191d8a919c3e1f1e3ea155da8d62059da1636 Mon Sep 17 00:00:00 2001
From: Jiali Chen <[email protected]>
Date: Mon, 26 Jan 2026 06:15:43 +0000
Subject: [PATCH] feat: add radxa-cubie-a7s supports

Directly copied from radxa-cubie-a7a,
only modified some name field

Signed-off-by: Jiali Chen <[email protected]>
---
src/arch/arm/dts/sun60i-a733-cubie-a7s.dts | 211 +++++++++++++++++++++++++
src/configs/radxa-cubie-a7s_defconfig | 29 ++++
2 files changed, 240 insertions(+)
create mode 100644 src/arch/arm/dts/sun60i-a733-cubie-a7s.dts
create mode 100644 src/configs/radxa-cubie-a7s_defconfig

diff --git a/src/arch/arm/dts/sun60i-a733-cubie-a7s.dts b/src/arch/arm/dts/sun60i-a733-cubie-a7s.dts
new file mode 100644
index 00000000000..6b2cff2d6e7
--- /dev/null
+++ b/src/arch/arm/dts/sun60i-a733-cubie-a7s.dts
@@ -0,0 +1,211 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
+// Copyright (C) 2025 Arm Ltd.
+
+/dts-v1/;
+
+#include "sun60i-a733.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "Radxa A7S";
+ compatible = "radxa,cubie-a7s", "allwinner,sun60i-a733";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ reg_vcc5v: vcc5v {
+ /* board wide 5V supply from the USB-C connector */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ reg_usb_vbus: vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&reg_vcc5v>;
+ gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
+ enable-active-high;
+ };
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pb_pins>;
+ status = "okay";
+};
+
+&mmc0 {
+ bus-width = <4>;
+ status = "okay";
+};
+
+&mmc2 {
+ bus-width = <8>;
+ cap-mmc-hw-reset;
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
+ non-removable;
+ vmmc-supply = <&reg_cldo5>;
+ vqmmc-supply = <&reg_dc1sw2>;
+ status = "okay";
+};
+
+&usb_otg {
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+&usbphy {
+ usb0_vbus-supply = <&reg_vcc5v>;
+ usb1_vbus-supply = <&reg_usb_vbus>;
+ status = "okay";
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&gmac0 {
+ phy-mode = "rgmii-id";
+ phy-handle = <&ext_rgmii1_phy>;
+ phy-supply = <&reg_dc1sw1>;
+
+ tx-internal-delay-ps = <1200>;
+ rx-internal-delay-ps = <1000>;
+
+ status = "okay";
+};
+
+&mdio0 {
+ ext_rgmii1_phy: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ reset-gpios = <&pio 7 16 GPIO_ACTIVE_LOW>; /* PH16 */
+ reset-assert-us = <10000>;
+ reset-deassert-us = <150000>;
+ };
+};
+
+&r_i2c0 {
+ status = "okay";
+
+ axp318w: pmic@36 {
+ compatible = "x-powers,axp318w";
+ reg = <0x36>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ interrupt-parent = <&nmi_intc>;
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+ status = "okay";
+
+ vin1-supply = <&reg_vcc5v>;
+ vin2-supply = <&reg_vcc5v>;
+ vin3-supply = <&reg_vcc5v>;
+
+ regulators {
+ reg_dcdc1: dcdc1 {
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1160000>;
+ regulator-name = "vdd-cpul";
+ };
+
+ reg_dc1sw1: dc1sw1 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vdd-swout1";
+ };
+
+ reg_dc1sw2: dc1sw2 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vdd-swout2";
+ };
+
+ aldo1 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-mipi-dsi";
+ };
+
+ /* Supplies the SYSFB */
+ reg_dcdc2_323: dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-name = "vdd-sys";
+ };
+
+ /* Supplies the "big" cluster (1.8 GHz cores) */
+ reg_dcdc3_323: dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-name = "vdd-cpub";
+ };
+
+ /* DCDC4 is polyphased with DCDC1 */
+
+ /* Supplies the "small" cluster (1.8 GHz cores) */
+ reg_dcdc5_323: dcdc5 {
+ regulator-always-on;
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-name = "vdd-cpul";
+ };
+
+ reg_cldo1: cldo1 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-pm";
+ };
+
+ reg_cldo2: cldo2 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-hdmi";
+ };
+
+ reg_cldo3: cldo3 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-dram";
+ };
+
+ reg_cldo4: cldo4 {
+ /* not connected */
+ };
+
+ reg_cldo5: cldo5 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-pc";
+ };
+ };
+ };
+};
diff --git a/src/configs/radxa-cubie-a7s_defconfig b/src/configs/radxa-cubie-a7s_defconfig
new file mode 100644
index 00000000000..0ae73a5dbd9
--- /dev/null
+++ b/src/configs/radxa-cubie-a7s_defconfig
@@ -0,0 +1,29 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4F000000
+CONFIG_DEFAULT_DEVICE_TREE="sun60i-a733-cubie-a7s"
+CONFIG_SPL=y
+CONFIG_MACH_SUN60I_A733=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+# CONFIG_VIDEO_SUNXI is not set
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL_LOAD_FIT_ADDRESS=0x48200000
+CONFIG_BOOTDELAY=3
+CONFIG_SPL_RAM_DEVICE=y
+CONFIG_CMD_DFU=y
+CONFIG_CMD_I2C=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SYS_I2C_MVTWSI=y
+CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_DM_MDIO=y
+CONFIG_DM_ETH_PHY=y
+CONFIG_DWC_ETH_QOS=y
+CONFIG_DWC_ETH_QOS_SUNXI=y
+CONFIG_RGMII=y
+CONFIG_RMII=y
+CONFIG_REGULATOR_AXP=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_ETH_CDC=y
--
2.52.0

Loading