Skip to content

Commit 5236139

Browse files
committed
sunxi: mellowflyc5: port U-Boot to v2026.07
This commit ports the Mellow Fly-C5 board support in U-Boot to the newer v2026.07 branch. What was done: 1. Removed `BOOTPATCHDIR="u-boot-sunxi"` from the board configuration file `config/boards/mellowflyc5.csc` to inherit the family default U-Boot directory `v2026.07-sunxi64`. 2. Deleted the legacy and incompatible U-Boot patches under `patch/u-boot/u-boot-sunxi/board_mellowflyc5/`. 3. Created a new porting patch `001-mellowflyc5-dts-and-defconfig.patch` under `patch/u-boot/v2026.07-sunxi64/board_mellowflyc5/` supporting OF_UPSTREAM: - Added the upstream-aligned device tree under `dts/upstream/src/arm64/allwinner/sun50i-h618-mellow-fly-c5.dts`. - Updated `configs/mellow_fly_c5_defconfig` to map all DRAM configuration variables to the newer `DRAM_SUNXI_*` names (e.g. DRAM_SUNXI_TPR0, DRAM_SUNXI_TPR10, etc.) and set the default device tree to `allwinner/sun50i-h618-mellow-fly-c5`. Why it was done: U-Boot for the sunxi64 family has moved to `v2026.07`, which uses the `v2026.07-sunxi64` patch directory. Keeping legacy patches in the old `u-boot-sunxi` directory was causing build failures because the old patches were incompatible with the newer U-Boot structure. Captured boot serial log (compiled with uboot-swig-fix): ``` U-Boot SPL 2026.07-rc4_armbian-2026.07-rc4-S1296-P5b04-H1daf-V0a73-Bb190-R448a (Jul 12 2026 - 16:57:38 +1000) DRAM: 1024 MiB Trying to boot from MMC2 NOTICE: BL31: v2.12.9(debug):armbian NOTICE: BL31: Built : 02:30:58, Jul 12 2026 NOTICE: BL31: Detected Allwinner H616 SoC (1823) NOTICE: BL31: Found U-Boot DTB at 0x4a0b4fc8, model: Mellow Fly-C5 INFO: ARM GICv2 driver initialized INFO: Configuring SPC Controller INFO: Probing for PMIC on I2C: INFO: PMIC: found AXP313 INFO: BL31: Platform setup done INFO: BL31: Initializing runtime services INFO: BL31: cortex_a53: CPU workaround for erratum 855873 was applied INFO: BL31: cortex_a53: CPU workaround for erratum 1530924 was applied INFO: PSCI: Suspend is unavailable INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x4a000000 INFO: SPSR = 0x3c9 INFO: Changed devicetree. U-Boot 2026.07-rc4_armbian-2026.07-rc4-S1296-P5b04-H1daf-V0a73-Bb190-R448a (Jul 12 2026 - 16:57:38 +1000) Allwinner Technology CPU: Allwinner H616 (SUN50I) Model: Mellow Fly-C5 DRAM: 1 GiB Core: 71 devices, 23 uclasses, devicetree: separate WDT: Not starting watchdog@30090a0 MMC: mmc@4020000: 0, mmc@4022000: 1 Loading Environment from FAT... Unable to use mmc 1:1... In: serial Out: serial Err: serial Allwinner mUSB OTG (Peripheral) Net: using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in MAC de:ad:be:ef:00:01 HOST MAC de:ad:be:ef:00:00 RNDIS ready eth1: usb_ether ``` Signed-off-by: Alastair D'Silva <alastair@d-silva.org> Assisted-by: Antigravity <antigravity-ai@google.com>
1 parent 815a50b commit 5236139

4 files changed

Lines changed: 53 additions & 179 deletions

File tree

config/boards/mellowflyc5.csc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Allwinner H618 quad core 1GB RAM SoC 100M Ethernet WiFi
22
BOARD_NAME="Mellow Fly-C5"
3-
BOOTPATCHDIR="u-boot-sunxi"
43

54
BOARD_VENDOR="mellow"
65
BOARDFAMILY="sun50iw9"

patch/u-boot/u-boot-sunxi/board_mellowflyc5/0002-add-defconfig.patch

Lines changed: 0 additions & 50 deletions
This file was deleted.

patch/u-boot/u-boot-sunxi/board_mellowflyc5/0003-sunxi-mmc-Improve-reset-procedure-and-limit-emmc-frequency.patch

Lines changed: 0 additions & 114 deletions
This file was deleted.

patch/u-boot/u-boot-sunxi/board_mellowflyc5/0001-add-dts.patch renamed to patch/u-boot/v2026.07-sunxi64/board_mellowflyc5/001-mellowflyc5-dts-and-defconfig.patch

Lines changed: 53 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,58 @@
1-
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
2-
index 99f97d5..5392fd2 100644
3-
--- a/arch/arm/dts/Makefile
4-
+++ b/arch/arm/dts/Makefile
5-
@@ -1,4 +1,5 @@
6-
dtb-$(CONFIG_MACH_SUN50I_H616) += \
7-
sun50i-h616-orangepi-zero2.dtb \
8-
sun50i-h618-orangepi-zero3.dtb \
9-
+ sun50i-h618-mellow-fly-c5.dtb \
10-
sun50i-h616-x96-mate.dtb
11-
diff --git a/arch/arm/dts/sun50i-h618-mellow-fly-c5.dts b/arch/arm/dts/sun50i-h618-mellow-fly-c5.dts
1+
diff --git a/configs/mellow_fly_c5_defconfig b/configs/mellow_fly_c5_defconfig
122
new file mode 100644
13-
index 0000000..2f2daa7
3+
index 00000000000..84f142dd689
144
--- /dev/null
15-
+++ b/arch/arm/dts/sun50i-h618-mellow-fly-c5.dts
16-
@@ -0,0 +1,118 @@
5+
+++ b/configs/mellow_fly_c5_defconfig
6+
@@ -0,0 +1,43 @@
7+
+CONFIG_ARM=y
8+
+CONFIG_ARCH_SUNXI=y
9+
+CONFIG_DEFAULT_DEVICE_TREE="allwinner/sun50i-h618-mellow-fly-c5"
10+
+CONFIG_SPL=y
11+
+CONFIG_DRAM_SUNXI_DX_ODT=0x07070707
12+
+CONFIG_DRAM_SUNXI_DX_DRI=0x0e0e0e0e
13+
+CONFIG_DRAM_SUNXI_CA_DRI=0x0e0e
14+
+CONFIG_DRAM_SUNXI_ODT_EN=0xaaaaeeee
15+
+CONFIG_DRAM_SUNXI_TPR6=0x44000000
16+
+CONFIG_DRAM_SUNXI_TPR10=0x402f6663
17+
+CONFIG_DRAM_SUNXI_TPR11=0x24242624
18+
+CONFIG_DRAM_SUNXI_TPR12=0x0f0f100f
19+
+CONFIG_MACH_SUN50I_H616=y
20+
+CONFIG_SUNXI_DRAM_H616_LPDDR4=y
21+
+CONFIG_DRAM_CLK=600
22+
+CONFIG_DRAM_ZQ=3881977
23+
+CONFIG_MMC0_CD_PIN="PF6"
24+
+CONFIG_R_I2C_ENABLE=y
25+
+CONFIG_SPL_SPI_SUNXI=y
26+
+CONFIG_CONS_INDEX=1
27+
+CONFIG_BOOTDELAY=5
28+
+CONFIG_SYS_MALLOC_F_LEN=0x4000
29+
+CONFIG_SUPPORT_EMMC_BOOT=y
30+
+CONFIG_AXP313_POWER=y
31+
+CONFIG_AXP_DCDC3_VOLT=1200
32+
+CONFIG_SPL_I2C=y
33+
+CONFIG_SPL_SYS_I2C_LEGACY=y
34+
+CONFIG_SYS_I2C_MVTWSI=y
35+
+CONFIG_SYS_I2C_SLAVE=0x7f
36+
+CONFIG_SYS_I2C_SPEED=400000
37+
+CONFIG_SPI_FLASH_ZBIT=y
38+
+CONFIG_PHY_MOTORCOMM=y
39+
+# CONFIG_SUN8I_EMAC is not set
40+
+CONFIG_SPI=y
41+
+CONFIG_USB_EHCI_HCD=y
42+
+CONFIG_USB_OHCI_HCD=y
43+
+CONFIG_USB_MUSB_GADGET=y
44+
+CONFIG_USB_MUSB_PIO_ONLY=y
45+
+CONFIG_USB_GADGET=y
46+
+CONFIG_USB_GADGET_DOWNLOAD=y
47+
+CONFIG_ARM64_SUPPORT_AARCH32=y
48+
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
49+
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
50+
diff --git a/dts/upstream/src/arm64/allwinner/sun50i-h618-mellow-fly-c5.dts b/dts/upstream/src/arm64/allwinner/sun50i-h618-mellow-fly-c5.dts
51+
new file mode 100644
52+
index 00000000000..2eb526b7f2d
53+
--- /dev/null
54+
+++ b/dts/upstream/src/arm64/allwinner/sun50i-h618-mellow-fly-c5.dts
55+
@@ -0,0 +1,122 @@
1756
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
1857
+/*
1958
+ * Copyright (C) 2023 Arm Ltd.

0 commit comments

Comments
 (0)