Skip to content

Commit 5c7776a

Browse files
committed
board: add support for Banana Pi BPI-R4
Add board support for the BananaPi BPI-R4 router board, based on the MediaTek MT7988A (Filogic 880) SoC with quad-core Cortex-A73 CPU. The BPI-R4 is the successor to the BPI-R3 but uses entirely different silicon: the internal switch runs at 2.5 GbE per port, the two SFP+ uplinks use native USXGMII at up to 10 Gbps, and WiFi is provided by a MediaTek MT7996E PCIe module supporting tri-band WiFi 7 (2.4/5/6 GHz). Two board variants, BPI-R4-2g5 and BPI-R4P, replace one SFP+ cage with a 2.5 GbE RJ45 port (using the MT7988A internal 2.5G PHY); the R4P adds an optional PoE daughterboard on that port. Both use the upstream mt7988a-bananapi-bpi-r4-2g5 device tree. Interfaces: - Standard R4: eth1 (gmac1/sfp2 LAN cage) → sfp2, eth2 (gmac2/sfp1 WAN cage) → sfp1 - R4-2g5/R4P: eth1 (2.5G PHY) → wan, eth2 (gmac2/sfp1 WAN cage) → sfp1 Factory reset / WPS button (GPIO14, active-low): detected by U-Boot at boot for factory reset; reused by Linux as KEY_WPS_BUTTON at runtime. eMMC install note: the MT7988A eMMC (pins 38-49) and SD card (pins 32-37) use separate physical pads so there is no electrical bus sharing, unlike some BPi-R3 configurations. However, a single MMC controller (mmc@11230000) handles both, so only one is active per boot session. The eMMC install procedure therefore still requires an intermediate SPI NAND bootloader step until a Linux-side install path is tested. SD card build (bpi_r4_sd_boot_defconfig) now uses the new mt7988a_bpir4_sd U-Boot defconfig with cap-sd-highspeed enabled, giving 50 MHz SD transfers instead of the previous 25 MHz legacy mode. Also adds MT7988/MT7996 firmware support to the buildroot linux-firmware package, for 2.5 GbE port PHY and WiFi7 extension board, and updates the aarch64_defconfig, aarch64_minimal_defconfig, the arch README, CI boot/image workflows, mkimage.sh, and the ChangeLog. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent 19c8c80 commit 5c7776a

59 files changed

Lines changed: 6376 additions & 8 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-boot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
- aarch64_qemu_boot
2020
- bpi_r3_sd_boot
2121
- bpi_r3_emmc_boot
22+
- bpi_r4_sd_boot
23+
- bpi_r4_emmc_boot
2224
- bpi_r64_sd_boot
2325
- bpi_r64_emmc_boot
2426
- cn9130_crb_boot

.github/workflows/build-image.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- raspberrypi-rpi2
1212
- raspberrypi-rpi64
1313
- bananapi-bpi-r3
14+
- bananapi-bpi-r4
1415
- bananapi-bpi-r64
1516
- friendlyarm-nanopi-r2s
1617
- microchip-sama7g54-ek
@@ -68,6 +69,12 @@ jobs:
6869
echo "ARCH=aarch64" >> $GITHUB_ENV
6970
echo "BUILD_EMMC=true" >> $GITHUB_ENV
7071
;;
72+
bananapi-bpi-r4)
73+
echo "BOOTLOADER_SD=bpi-r4-sd-boot" >> $GITHUB_ENV
74+
echo "BOOTLOADER_EMMC=bpi-r4-emmc-boot" >> $GITHUB_ENV
75+
echo "ARCH=aarch64" >> $GITHUB_ENV
76+
echo "BUILD_EMMC=true" >> $GITHUB_ENV
77+
;;
7178
bananapi-bpi-r64)
7279
echo "BOOTLOADER_SD=bpi-r64-sd-boot" >> $GITHUB_ENV
7380
echo "BOOTLOADER_EMMC=bpi-r64-emmc-boot" >> $GITHUB_ENV

board/aarch64/Config.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ if BR2_aarch64
22

33
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/alder-alder/Config.in"
44
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/bananapi-bpi-r3/Config.in"
5+
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/bananapi-bpi-r4/Config.in"
56
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/bananapi-bpi-r64/Config.in"
67
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/freescale-imx8mp-evk/Config.in"
78
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/friendlyarm-nanopi-r2s/Config.in"

board/aarch64/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ aarch64
44
Board Specific Documentation
55
----------------------------
66

7-
- [Banana Pi BPi-R3](banana-pi-r3/)
8-
- [Banana Pi BPi-R64](banana-pi-r64/)
9-
- [Marvell CN9130-CRB](cn9130-crb/)
10-
- [Microchip SparX-5i PCB135 (eMMC)](sparx5-pcb135/)
11-
- [NanoPi R2S](r2s/)
12-
- [Raspberry Pi 64-bit](raspberry-pi64/)
7+
- [Banana Pi BPi-R3](bananapi-bpi-r3/)
8+
- [Banana Pi BPi-R4](bananapi-bpi-r4/)
9+
- [Banana Pi BPi-R64](bananapi-bpi-r64/)
10+
- [Marvell CN9130-CRB](marvell-cn9130-crb/)
11+
- [Microchip SparX-5i PCB135 (eMMC)](microchip-sparx5-pcb135/)
12+
- [NanoPi R2S](friendlyarm-nanopi-r2s/)
13+
- [Raspberry Pi 64-bit](raspberrypi-rpi64/)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
config BR2_PACKAGE_BANANAPI_BPI_R4
2+
bool "Banana Pi R4"
3+
depends on BR2_aarch64
4+
select BR2_PACKAGE_FEATURE_WIFI
5+
select BR2_PACKAGE_LINUX_FIRMWARE
6+
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK
7+
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7988
8+
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7996
9+
select SDCARD_AUX
10+
help
11+
Build Banana PI R4 support
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2026 The KernelKit Authors
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted, provided that the above
5+
copyright notice and this permission notice appear in all copies.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

0 commit comments

Comments
 (0)