Skip to content

Add support for Banana Pi BPI-R4#1470

Merged
troglobit merged 4 commits intomainfrom
bpi-r4-support
Apr 10, 2026
Merged

Add support for Banana Pi BPI-R4#1470
troglobit merged 4 commits intomainfrom
bpi-r4-support

Conversation

@troglobit
Copy link
Copy Markdown
Contributor

@troglobit troglobit commented Apr 10, 2026

Description

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.

Also adds MT7988/MT7996 firmware support to the buildroot linux-firmware package, for 2.5 GbE port PHY and WiFi7 extension board.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

@troglobit troglobit requested a review from mattiaswal April 10, 2026 04:33
@troglobit troglobit force-pushed the bpi-r4-support branch 2 times, most recently from fcdd782 to a8ac1a1 Compare April 10, 2026 07:22
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>
Add missing *.hash files for all board packages using the ix-board macro;
they declare LICENSE_FILES = LICENSE but had no hash file, producing a
warning during make legal-info.

Fix the date-cpp package where the hash file was named date.hash instead
of date-cpp.hash (package name is derived from the directory, not the mk
filename), causing Buildroot to skip the hash check entirely.

Add hash files for local-site packages confd-test-mode, netd, and
onieprom that declared LICENSE_FILES but provided no hash.

Also, rename package/date-cpp/date.mk to date-cpp.mk.  Buildroot derives
the package name from the directory name, so the mk file must match. To
handle the archive name different we set DATE_CPP_SOURCE.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Missing BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y caused Buildroot to default
to legacy Makefile build system, which requires BR2_TARGET_UBOOT_BOARDNAME
instead of BR2_TARGET_UBOOT_BOARD_DEFCONFIG, resulting in a build error.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Also, simplify board README a bit now that we know that you don't need
to flip the boot switch to program eMMC.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@mattiaswal mattiaswal self-requested a review April 10, 2026 11:49
@troglobit troglobit merged commit fadffef into main Apr 10, 2026
@troglobit troglobit deleted the bpi-r4-support branch April 10, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants