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
19 changes: 19 additions & 0 deletions config/boards/mellowflyc5.csc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Allwinner H618 quad core 1GB RAM SoC 100M Ethernet WiFi
BOARD_NAME="Mellow Fly-C5"
BOOTPATCHDIR="u-boot-sunxi"

BOARD_VENDOR="mellow"
BOARDFAMILY="sun50iw9"
BOARD_MAINTAINER=""
BOOTCONFIG="mellow_fly_c5_defconfig"
OVERLAY_PREFIX="sun50i-h616"
BOOT_FDT_FILE="allwinner/sun50i-h618-mellow-fly-c5.dtb"
BOOT_LOGO="desktop"
KERNEL_TARGET="current,edge"
KERNEL_TEST_TARGET="current"
FORCE_BOOTSCRIPT_UPDATE="yes"

# WiFi RTL8821CS
PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools"
Comment on lines +16 to +17
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Bluetooth packages look premature here.

Both kernel DTS copies only model the SDIO Wi‑Fi side of the RTL8821CS; I don't see any Bluetooth transport or serdev node under the enabled UARTs in patch/kernel/archive/sunxi-6.18/dt_64/sun50i-h618-mellow-fly-c5.dts Line 159-Line 169 and Line 273-Line 277, nor in the identical 6.19 copy. As-is, images will ship BlueZ packages even though the board support added here only describes Wi‑Fi.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/boards/mellowflyc5.csc` around lines 16 - 17, PACKAGE_LIST_BOARD
currently enables Bluetooth packages for mellowflyc5 though the device tree
(sun50i-h618-mellow-fly-c5.dts) only describes RTL8821CS SDIO Wi‑Fi and lacks
any Bluetooth transport/serdev/UART nodes; either remove "bluetooth" and
"bluez-tools" from PACKAGE_LIST_BOARD in mellowflyc5.csc to avoid shipping
unnecessary BlueZ packages, or add the appropriate Bluetooth transport/serdev DT
nodes and UART bindings in the DTS (the change must reference PACKAGE_LIST_BOARD
and the sun50i-h618-mellow-fly-c5.dts Bluetooth/serdev UART node definitions) so
the package list matches actual hardware support.



1 change: 1 addition & 0 deletions config/kernel/linux-sunxi64-current.config
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ CONFIG_R8169=m
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_SOCIONEXT is not set
CONFIG_STMMAC_ETH=y
CONFIG_SUNXI_GMAC=m
CONFIG_DWMAC_DWC_QOS_ETH=m
CONFIG_STMMAC_PCI=m
# CONFIG_NET_VENDOR_SUN is not set
Expand Down
1 change: 1 addition & 0 deletions config/kernel/linux-sunxi64-edge.config
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ CONFIG_R8169=m
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_SOCIONEXT is not set
CONFIG_STMMAC_ETH=y
CONFIG_SUNXI_GMAC=m
CONFIG_DWMAC_DWC_QOS_ETH=m
CONFIG_STMMAC_PCI=m
# CONFIG_NET_VENDOR_SUN is not set
Expand Down
1 change: 1 addition & 0 deletions lib/functions/compilation/patch/drivers_network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ driver_uwe5622() {

process_patch_file "${SRC}/patch/misc/wireless-uwe5622/wireless-uwe5622-Fix-compilation-with-6.7-kernel.patch" "applying"
process_patch_file "${SRC}/patch/misc/wireless-uwe5622/wireless-uwe5622-reduce-system-load.patch" "applying"
process_patch_file "${SRC}/patch/misc/wireless-uwe5622/uwe5622-missing-prototypes.patch" "applying"

if linux-version compare "${version}" ge 6.9; then
process_patch_file "${SRC}/patch/misc/wireless-uwe5622/uwe5622-v6.9.patch" "applying"
Expand Down
284 changes: 284 additions & 0 deletions patch/kernel/archive/sunxi-6.18/dt_64/sun50i-h618-mellow-fly-c5.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2026 Alastair D'Silva <alastair@d-silva.org>
*/

/dts-v1/;

#include "sun50i-h616.dtsi"
#include "sun50i-h616-cpu-opp.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/leds/common.h>

/ {
model = "Mellow Fly-C5";
compatible = "mellow,fly-c5", "allwinner,sun50i-h618";

aliases {
ethernet0 = &emac1;
ethernet1 = &rtl8821cs;
serial0 = &uart0;
};

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

reg_vcc5v: regulator-vcc5v {
/* Board wide 5V supply */
compatible = "regulator-fixed";
regulator-always-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-name = "vcc-5v";
};

reg_vcc3v3: regulator-vcc3v3 {
/* Fixed 3.3V for internal modules */
compatible = "regulator-fixed";
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-3v3";
vin-supply = <&reg_vcc5v>;
};

reg_vcc1v8: regulator-vcc1v8 {
/* Fixed 1.8V for internal modules */
compatible = "regulator-fixed";
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc-1v8";
vin-supply = <&reg_vcc3v3>;
};

wifi_pwrseq: wifi-pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&rtc CLK_OSC32K_FANOUT>;
clock-names = "ext_clock";
pinctrl-0 = <&x32clk_fanout_pin>;
pinctrl-names = "default";
post-power-on-delay-ms = <200>;
reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
};

leds {
compatible = "gpio-leds";

led-0 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
linux,default-trigger = "heartbeat";
};

led-1 {
function = LED_FUNCTION_ACTIVITY;
color = <LED_COLOR_ID_BLUE>;
gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
linux,default-trigger = "disk-activity";
};
};
};

&cpu0 {
cpu-supply = <&reg_dcdc2>;
};

&de {
status = "okay";
};

&ehci0 {
status = "okay";
};

&ehci1 {
status = "okay";
};

&ehci2 {
status = "okay";
};

&ehci3 {
status = "okay";
};

&emac1 {
pinctrl-names = "default";
pinctrl-0 = <&rmii_pins>;
phy-mode = "rmii";
phy-handle = <&rmii_phy1>;
phy-supply = <&reg_dldo1>;
allwinner,rx-delay-ps = <3100>;
allwinner,tx-delay-ps = <700>;
phy-rst;
gmac-power0;
gmac-power1;
gmac-power2;
status = "okay";
};

&mdio1 {
rmii_phy1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
};

&gpu {
mali-supply = <&reg_dcdc1>;
status = "okay";
};

&hdmi {
hvcc-supply = <&reg_aldo1>;
vcc-hdmi-supply = <&reg_dldo1>;
status = "okay";
};

&hdmi_phy {
status = "okay";
};

&ir {
status = "okay";
};

&mmc0 {
vmmc-supply = <&reg_vcc3v3>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
bus-width = <4>;
status = "okay";
};

&mmc1 {
vmmc-supply = <&reg_vcc3v3>;
vqmmc-supply = <&reg_vcc1v8>;
mmc-pwrseq = <&wifi_pwrseq>;
bus-width = <4>;
non-removable;
status = "okay";

rtl8821cs: wifi@1 {
reg = <1>;
};
};

&mmc2 {
vmmc-supply = <&reg_vcc3v3>;
vqmmc-supply = <&reg_vcc1v8>;
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
status = "okay";
};

&ohci0 {
status = "okay";
};

&ohci1 {
status = "okay";
};

&ohci2 {
status = "okay";
};

&ohci3 {
status = "okay";
};

&pio {
vcc-pc-supply = <&reg_aldo1>;
vcc-pf-supply = <&reg_dldo1>;
vcc-pg-supply = <&reg_dldo1>;
vcc-ph-supply = <&reg_dldo1>;
vcc-pi-supply = <&reg_dldo1>;
};

&pwm3 {
/* Disable PWM3 to avoid conflict with UART0 on PH0 */
status = "disabled";
};

&r_i2c {
status = "okay";

axp313: pmic@36 {
compatible = "x-powers,axp313a";
reg = <0x36>;
#interrupt-cells = <1>;
interrupt-controller;
/*
* Omit interrupt to break dependency cycle with &pio.
* reg_dldo1 supplies &pio, so &pio depends on PMIC.
* PMIC interrupt on PC9 depends on &pio.
*/

vin1-supply = <&reg_vcc5v>;
vin2-supply = <&reg_vcc5v>;
vin3-supply = <&reg_vcc5v>;

regulators {
/* Supplies VCC-PLL and DRAM */
reg_aldo1: aldo1 {
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc1v8";
};

/* Supplies VCC-IO, so needs to be always on. */
reg_dldo1: dldo1 {
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc3v3";
};

reg_dcdc1: dcdc1 {
regulator-always-on;
regulator-min-microvolt = <810000>;
regulator-max-microvolt = <990000>;
regulator-name = "vdd-gpu-sys";
};

reg_dcdc2: dcdc2 {
regulator-always-on;
regulator-min-microvolt = <810000>;
regulator-max-microvolt = <1100000>;
regulator-name = "vdd-cpu";
};

reg_dcdc3: dcdc3 {
regulator-always-on;
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
regulator-name = "vdd-dram";
};
};
};
};

&ths {
status = "okay";
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_ph_pins>;
status = "okay";
};

&usbphy {
usb1_vbus-supply = <&reg_vcc5v>;
usb2_vbus-supply = <&reg_vcc5v>;
usb3_vbus-supply = <&reg_vcc5v>;
status = "okay";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 2edfa7bf4ab3..2f33c2f2aad3 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -45,6 +45,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h313-x96q.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-manta.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-pi.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-mellow-fly-c5.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-longanpi-3h.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb
1 change: 1 addition & 0 deletions patch/kernel/archive/sunxi-6.18/series.conf
Original file line number Diff line number Diff line change
Expand Up @@ -558,3 +558,4 @@
patches.armbian/drv-usb-gadget-composite-rename-serial-manufacturer.patch
patches.armbian/drv-video-st7796s-fb-tft-driver.patch
patches.armbian/include-uapi-drm_fourcc-add-ARM-tiled-format-modifier.patch
patches.armbian/add-mellowflyc5-to-allwinner-makefile.patch
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Inspect exact whitespace around Line 561 (showing control chars):"
sed -n '556,565p' patch/kernel/archive/sunxi-6.18/series.conf | cat -A

echo
echo "Show mellowflyc5 entry in both series files with visible whitespace:"
rg -n 'add-mellowflyc5-to-allwinner-makefile\.patch' \
  patch/kernel/archive/sunxi-6.18/series.conf \
  patch/kernel/archive/sunxi-6.19/series.conf | cat -A

Repository: armbian/build

Length of output: 822


Remove leading space before tab on Line 561.

Line 561 starts with a space followed by a tab, while all surrounding entries use only a tab. This inconsistency can cause parsing issues. Align with the standard format used elsewhere in the file.

Fix
- 	patches.armbian/add-mellowflyc5-to-allwinner-makefile.patch
+	patches.armbian/add-mellowflyc5-to-allwinner-makefile.patch
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@patch/kernel/archive/sunxi-6.18/series.conf` at line 561, In series.conf
remove the single leading space before the tab on the line containing
"patches.armbian/add-mellowflyc5-to-allwinner-makefile.patch" so the line begins
with a tab only (matching surrounding entries); edit that specific entry to
align formatting with other lines to avoid parsing issues.

Loading