User Tools

Site Tools


Translations of this page:

en:bpi-r4pro:start

BPi-R4 Pro

Hardware

https://forum.banana-pi.org/t/banana-pi-bpi-r4-pro-wifi7-router-board-with-mediatek-mt7988a-8g-ram-8g-emmc-4x2-5g-and-2x10g-network-port/23400/

The R4Pro will come in two versions: the R4Pro-8X and the R4Pro-4E.

The main difference between the two versions is that the 8X features 8GB of DDR and two 10G PHYs that are mounted. The 4E version features 4GB of DDR, without the two 10G PHYs, it uses the MT7988's built-in 1G and 2.5G.

  • MediaTek MT7988A Quad-core Arm Corex-A73,1.8GHz processor
  • 4GB/8GB DDR4
  • 8GB eMMC flash
  • 256MB SPI-NAND Flash
  • Micro SD card slot
  • 1x 10G SFP WAN / 10G phy (Aeonsemi As21011 is the same as Airoha AN8831) - only 8X
  • 1x 10G SFP LAN / 10G phy (Aeonsemi As21011 is the same as Airoha AN8831) - only 8X
  • 1x 2.5G RJ45 WAN (Option with 1x 10G SFP WAN, support POE with POE Module soldered) - only 4E
  • 4x 2.5G RJ45 LAN (MxL86252C)
  • 1x 1G RJ45 LAN (SoC builtin mt753x)
  • 2x 1G LAN (FPC Connector)
  • 2x miniPCIe slots with PCIe3.0 2lane interface for Wi-Fi 7 NIC
  • 2x M.2 M-KEY slots with PCIe3.0 1lane interface for NVME SSD (PCIe can switch to M.2 B-KEY slot)
  • 3x M.2 B-KEY slots with USB3.2 for 5G Module (2 are sharing pcie-lane with key-m slots)
  • 1x USB3.2 slot
  • 1x USB2.0 slot
  • 1x USB TypeC Debug Console
  • 2×13 PIN Header for expanding application

https://forum.banana-pi.org/t/bpi-r4-pro-design-with-mt7988-update-version-for-bpi-r4-any-good-idea/22686/

R4Pro-4E:

R4Pro-8X:


v00:


v1.0:


Network

USB-A lan1 lan2 lan3 lan4 mgmt/lan5 (internal) LAN PHY SFP-LAN SFP-WAN WAN PHY 12V
eth2 eth0 behind mxl switch and eth-mux/overlay eth1 (eth-mux/overlay)

PCIe

pcie2 (0x11280000) cn13/15 and pcie3 (0x11290000) cn14/18 share lanes between key-b and key-m and can be switched by gpio (dt-overlay). Only one in one pair can be active. pcie2 needs xsphy and so it cannot be used for nvme in uboot because there is no xsphy driver in uboot (cn14 for system-ssd preferred).

mpcie CN9 pcie0@11300000 2L0 SIM4 m.2 key-b CN15/SIM1 gpio79=low - (key-m CN13 gpio79=high) pcie2@11280000/xsphy + USB3
mpcie CN7 pcie1@11310000 2L1 SIM5 m.2 key-b CN18/SIM2 gpio63=low - (key-m CN14 gpio63=high) pcie3@11290000 + USB3
m.2 key-b CN21/SIM3 USB3-only

USB is on key-b only.

This is how the gpio can be changed at runtime without overlay (but since the gpio-hog is defined in base dts it blocks the gpio resulting in “ressource busy”):

https://forum.banana-pi.org/t/m-2-m-key-connector-cn-14-does-not-work-on-bpi-r4-pro/26379/2?u=frank-w

In openwrt the env variable bootconf_extra is used for selecting the right overlays. By default it is set to both key-m,but you can change it like this to key-b (setenv in uboot,fw_setenv in linux):

fw_setenv bootconf_extra mt7988a-bananapi-bpi-r4-pro-cn15#mt7988a-bananapi-bpi-r4-pro-cn18 

Power adjustment: https://forum.banana-pi.org/t/bpi-r4-power-consumption-of-m-2-to-sata-adapters/26057/11?u=frank-w

Software

U-boot

https://github.com/frank-w/u-boot/tree/2025-10-bpi

note:

in my tests sdmmc speed has to be changed to 48MHz else i got mmc errors

arch/arm/dts/mt7988-sd-rfb.dts

&mmc0 {
	pinctrl-names = "default";
	pinctrl-0 = <&mmc1_pins_default>;
-	max-frequency = <52000000>;
+	max-frequency = <48000000>;

this can't reproduced by bpi/mtk so possibly an issue with my sandisk cards…

nand

ubinized image working.

Warnings (NOTICE: UBI: Bad EC magic in block 1008-2031 ffffffff) caused by too small ubi mtd partition on r4pro (has 256 fixed in dts).

BPI-R4> fatload usb 0:1 $loadaddr bpi-r4pro_spim-nand_ubi_bl2.img
263029 bytes read in 32 ms (7.8 MiB/s)
BPI-R4> mtd write spi-nand0 $loadaddr 0x0 0x100000               
Writing 1048576 byte(s) (512 page(s)) at offset 0x00000000
BPI-R4> mtd erase spi-nand0 0x200000       
BPI-R4> fatload usb 0:1 $loadaddr bpi-r4pro_nand.img
30408704 bytes read in 2559 ms (11.3 MiB/s)
BPI-R4> mtd write spi-nand0 $loadaddr 0x200000 $filesize
Writing 30408704 byte(s) (14848 page(s)) at offset 0x00200000

Linux

Issues

Currently my development state:

V1.0 (6.17-main+):

  • SDMMC still only works with reduced speed (48MHz works, 50MHz produces many errors)
  • mxl-switch working now
  • both usb and pcie working
  • mPCIe slots working, m.2 (with switch)
  • I2c-mux now detected

V00:

  • SDMMC only works with reduced speed
  • Trace when mxl port is set to up (if phy not detected before - most times)
  • 10G phys not detected and main mdio cannot be scanned
  • Eth-Mux not tested because phys were not detected
  • Trace for one usb (ssusb0,front=ssusb1 working)
  • mPCIe slots working, m.2 (with switch)
  • I2c-mux not detected
  • SSD-leds behaving weired (off when ssd inserted/recognized, going on system halt)

Openwrt

sdk

MTK instructions:

Click to display ⇲

Click to hide ⇱

git clone --branch openwrt-24.10 https://git.openwrt.org/openwrt/openwrt.git openwrt

cd openwrt; git checkout de44a349084af8481aa5f67ceacf424e06b0a166; cd -;

#Get mtk-openwrt-feeds source code

git clone --branch master https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds

cd mtk-openwrt-feeds; git checkout 9970cd78a93f02b2acc445082e6ef011b2c22190; cd -;

# Go to openwrt folder

cd openwrt

#vim ../mtk-openwrt-feeds/autobuild/unified/feed_revision

packages b910bc1231c2ce3ff206935df1c4790e37c765f2

luci 923f8d991a49dc3d899fd24fc92ae7b1653ee4d0

routing bdbd09d1338066832fbc33fb10d28daea6fe121f

# Select Bpi-R4-Pro SKU to build (1st Build)

bash ../mtk-openwrt-feeds/autobuild/unified/autobuild.sh filogic-mac80211-mt7988_rfb log_file=make

# MTK SDK image for BPI-R4-Pro is:

openwrt-mediatek-filogic-bananapi_bpi-r4-pro-squashfs-sysupgrade.itb

main branches:

git clone --branch openwrt-24.10 https://git.openwrt.org/openwrt/openwrt.git openwrt
git clone --branch master https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds

cd openwrt

# Select Bpi-R4-Pro SKU to build (1st Build)
bash ../mtk-openwrt-feeds/autobuild/unified/autobuild.sh filogic-mac80211-mt7988_rfb log_file=make

# MTK SDK image for BPI-R4-Pro is:

openwrt-mediatek-filogic-bananapi_bpi-r4-pro-squashfs-sysupgrade.itb
openwrt-mediatek-filogic-bananapi_bpi-r4-pro-initramfs-recovery.itb

my version

https://github.com/frank-w/openwrt/tree/R4Pro_newmxl3

setenv loadaddr 0x50000000
usb start
load usb 0:1 $loadaddr openwrt-mediatek-filogic-bananapi_bpi-r4-pro-8x-initramfs-recovery.itb
bootm $loadaddr#$bootconf#$bootconf_sd
en/bpi-r4pro/start.txt · Last modified: by frank