[BPI-R4] No link on 2.5G interface

Hi folks, I am a new owner of BPI-R4, version with 2.5GbE interface and trying to find my ways around… What I have noticed is that no matter what I try, I cannot get the link detected over the 2.5GbE. Card is detected by the OS (latest snapshot of OpenWrt), drivers are there, yet can’t get the link to work.

How it looks from the end user perspective? You plug the cable and the LEDs are still off. On both sides of the cable. As simple as that. If not the fact that I see the interface from inside the OS, I would simply think that it is disabled.

A bunch of logs, let me know if anything more may be of a value

root@BPI-R4:~# ethtool eth1
Settings for eth1:
	Supported ports: [ ]
	Supported link modes:   100baseT/Full
	                        1000baseT/Full
	                        2500baseT/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  100baseT/Full
	                        1000baseT/Full
	                        2500baseT/Full
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Speed: Unknown!
	Duplex: Unknown! (255)
	Port: Twisted Pair
	PHYAD: 15
	Transceiver: external
	Auto-negotiation: on
	MDI-X: Unknown
	Current message level: 0x000000ff (255)
			       drv probe link timer ifdown ifup rx_err tx_err
	Link detected: no
root@BPI-R4:~# dmesg
[...]
[    0.000000] Linux version 6.6.52 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.0 r27608-3f98f68573) 13.3.0, GNU ld (GNU Binutils) 2.42) #0 SMP Sun Sep 29 22:04:34 2024
[    0.000000] Machine model: Bananapi BPI-R4 2.5GE PoE
[...]
[    3.807402] FIT: Detected U-Boot 2024.07-OpenWrt-r27466-f368e2d5ec
[    3.813580] FIT: Selected configuration: "config-mt7988a-bananapi-bpi-r4-poe" (OpenWrt bananapi_bpi-r4-poe)
[    3.823317] FIT:           kernel sub-image 0x00001000..0x005a3441 "kernel-1" (ARM64 OpenWrt Linux-6.6.52)
[    3.833052] FIT:          flat_dt sub-image 0x005a4000..0x005ae9ae "fdt-1" (ARM64 OpenWrt bananapi_bpi-r4-poe device tree blob)
[    3.844610] FIT:          flat_dt sub-image 0x005af000..0x005af609 "fdt-mt7988a-bananapi-bpi-r4-emmc" (ARM64 OpenWrt bananapi_bpi-r4-poe device tree overlay mt7988a-bananapi-bpi-r4-emmc)
[    3.861289] FIT:          flat_dt sub-image 0x005b0000..0x005b011c "fdt-mt7988a-bananapi-bpi-r4-rtc" (ARM64 OpenWrt bananapi_bpi-r4-poe device tree overlay mt7988a-bananapi-bpi-r4-rtc)
[    3.877792] FIT:          flat_dt sub-image 0x005b1000..0x005b15c1 "fdt-mt7988a-bananapi-bpi-r4-sd" (ARM64 OpenWrt bananapi_bpi-r4-poe device tree overlay mt7988a-bananapi-bpi-r4-sd)
[    3.894120] FIT:          flat_dt sub-image 0x005b2000..0x005b28f0 "fdt-mt7988a-bananapi-bpi-r4-wifi-mt7996a" (ARM64 OpenWrt bananapi_bpi-r4-poe device tree overlay mt7988a-bananapi-bpi-r4-wifi-mt7996a)
[    3.912182] FIT:       filesystem sub-image 0x005b3000..0x00efbfff "rootfs-1" (ARM64 OpenWrt bananapi_bpi-r4-poe rootfs)
[    3.923393] block mmcblk0p7: mapped 1 uImage.FIT filesystem sub-image as /dev/fit0
[    3.931131] block mmcblk0p7: mapped remaining space as /dev/fitrw
[    4.062656] mtk_soc_eth 15100000.ethernet: generated random MAC address 65:74:68:25:64:00
[    4.075235] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc082880000, irq 103
[    4.084923] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc082880000, irq 103
[    4.094604] mtk_soc_eth 15100000.ethernet eth2: mediatek frame engine at 0xffffffc082880000, irq 103
[    4.186789] mt7530-mmio 15020000.switch: configuring for fixed/internal link mode
[    4.194301] mt7530-mmio 15020000.switch: Link is Up - 10Gbps/Full - flow control rx/tx
[    4.221076] mt7530-mmio 15020000.switch wan (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7988 PHY] (irq=112)
[    4.258805] mt7530-mmio 15020000.switch lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7988 PHY] (irq=113)
[    4.296498] mt7530-mmio 15020000.switch lan2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7988 PHY] (irq=114)
[    4.334518] mt7530-mmio 15020000.switch lan3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7988 PHY] (irq=115)
[...]
[   13.851327] MediaTek MT7988 2.5GbE PHY mdio-bus:0f: Firmware date code: 0/0/0, version: 0.0
[   13.867769] MediaTek MT7988 2.5GbE PHY mdio-bus:0f: Firmware loading/trigger ok.
[   13.876094] mtk_soc_eth 15100000.ethernet eth1: PHY [mdio-bus:0f] driver [MediaTek MT7988 2.5GbE PHY] (irq=POLL)
[   13.886346] mtk_soc_eth 15100000.ethernet eth1: configuring for phy/internal link mode
[   13.895657] br-lan: port 1(eth1) entered blocking state
[   13.900895] br-lan: port 1(eth1) entered disabled state
[   13.906155] mtk_soc_eth 15100000.ethernet eth1: entered allmulticast mode
[   13.913048] mtk_soc_eth 15100000.ethernet eth1: entered promiscuous mode
[...]

0/0/0 version 0.0, so maybe the firmware is missing?

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek/mt7988/i2p5ge-phy-pmb.bin

Package: mt7988-2p5g-phy-firmware

I also have the 2.5GbE model and have to wonder why there appears to be a split in the available current release builds. Why was there ever a separate version for this board? Are the firmware/drivers not compatible with the dual SFP+ boards? Will there be a merged version when OpenWRT releases an “official” version?

The package is there,

Package mt7988-2p5g-phy-firmware (20240909-r1) installed in root is up to date.

The device is very similar to the en8811h. This device needs to load the firmware very early in the bootstage. Booting linux, it needs to be added to initramfs, so it is available when it is needed. So only adding to /lib/firmware/ is not enough on linux, for the en8811h.

I think the mt7988-2p5g-phy will have the same problem, and needs an openwrt specific solution to have the firmware avaiable in early boot…

Sadly, I do not use openwrt.

Edit:

Perhaps you can see how the firmware is handled for the R3mini and/or OpenWrt-One in openwrt

Which version of the snapshot did you use? Works for me with the 2.5GE version. If you use the normal one I get the same results as you even with the firmware package loaded.

Where did you get your snapshot image? Could you please provide the link?

https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=mediatek%2Ffilogic&id=bananapi_bpi-r4-poe

This one SDCARD.IMG.GZ?

Yes, assuming you want to put it on an SD card.

POE is working fine, but no link.

I can’t remember what eth1 is configured for out of the box but if you connect to lan3 you can use luci or /etc/config/network to configure it.

  GNU nano 8.2                                                                             /etc/config/network                                                                                        

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd28:61e5:ced7::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'eth1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'br-wan'
        option type 'bridge'
        list ports 'wan'
        list ports 'eth2'

config interface 'wan'
        option device 'br-wan'
        option proto 'dhcp'

config interface 'wan6'
        option device 'br-wan'
        option proto 'dhcpv6'


Do you think that this could be a hardware issue?

That was my first thought, that I am using the regular one and not for 2.5GbE version. But the log confirms that I do use the correct version for my board.

All testing happens on the latest snapshot, I upgrade daily

Hey @crapbasket, can you please paste output of fw_printenv if you have a working 2.5 GbE version?


For completeness, here comes mine

root@BPI-R4:~# fw_printenv
boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
boot_production=led $bootled_pwr on ; run sdmmc_read_production && bootm $loadaddr#$bootconf#$bootconf_sd#$bootconf_extra ; led $bootled_pwr off
boot_recovery=led $bootled_rec on ; run sdmmc_read_recovery && bootm $loadaddr#$bootconf#$bootconf_emmc ; led $bootled_rec off
boot_sdmmc=run boot_production ; run boot_recovery
boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf#$bootconf_sd
boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run sdmmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf#$bootconf_sd#$bootconf_extra ; fi
boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run sdmmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf#$bootconf_sd ; fi
bootargs=console=ttyS0,115200n1 pci=pcie_bus_perf root=/dev/fit0 rootwait
bootcmd=if pstore check ; then run boot_recovery ; else run boot_sdmmc ; fi
bootconf=config-mt7988a-bananapi-bpi-r4-poe
bootconf_emmc=mt7988a-bananapi-bpi-r4-emmc
bootconf_sd=mt7988a-bananapi-bpi-r4-sd
bootdelay=3
bootfile=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-initramfs-recovery.itb
bootfile_upg=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-squashfs-sysupgrade.itb
bootled_pwr=green:status
bootled_rec=blue:status
bootmenu_0=Run default boot command.=run boot_default
bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
bootmenu_2=Boot production system from SD card.=run boot_production ; run bootmenu_confirm_return
bootmenu_3=Boot recovery system from SD card.=run boot_recovery ; run bootmenu_confirm_return
bootmenu_4=Load production system via TFTP then write to SD card.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
bootmenu_5=Load recovery system via TFTP then write to SD card.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
bootmenu_6=Install bootloader, recovery and production to NAND.=if nand info ; then run ubi_init ; else echo "NAND not detected" ; fi ; run bootmenu_confirm_return
bootmenu_7=Reboot.=reset
bootmenu_8=Reset all settings to factory defaults.=run reset_factory ; reset
bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
bootmenu_default=0
bootmenu_delay=3
bootmenu_title=      ( ( ( OpenWrt ) ) )  [SD card]       U-Boot 2024.07-OpenWrt-r27466-f368e2d5ec (Sep 19 2024 - 21:11:58 +0000)
ethaddr=ee:92:dc:42:b6:d6
ipaddr=192.168.1.1
loadaddr=0x50000000
mmc_read_vol=mmc read $loadaddr $part_addr 0x100 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200
mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size
part_default=production
part_recovery=recovery
reset_factory=eraseenv && reset
sdmmc_read_emmc_install=part start mmc 0 install part_addr && setexpr offset $part_addr + 0x3800 && mmc read $loadaddr $offset 0x4000
sdmmc_read_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol
sdmmc_read_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol
sdmmc_read_snand_bl2=part start mmc 0 install part_addr && mmc read $loadaddr $part_addr 0x400
sdmmc_read_snand_fip=part start mmc 0 install part_addr && setexpr offset $part_addr + 0x800 && mmc read $loadaddr $offset 0x1000
sdmmc_write_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
sdmmc_write_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
serverip=192.168.1.254
snand_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr 0x0 0x80000 && mtd write bl2 $loadaddr 0x80000 0x80000 && mtd write bl2 $loadaddr 0x100000 0x80000 && mtd write bl2 $loadaddr 0x180000 0x80000
ubi_create_env=ubi create ubootenv 0x100000 dynamic ; ubi create ubootenv2 0x100000 dynamic
ubi_format=ubi detach ; mtd erase ubi && ubi part ubi
ubi_init=run ubi_format && run ubi_init_bl && run ubi_create_env && run ubi_init_openwrt && run ubi_init_emmc_install
ubi_init_bl=run sdmmc_read_snand_bl2 && run snand_write_bl2 && run sdmmc_read_snand_fip && run ubi_write_fip
ubi_init_emmc_install=run sdmmc_read_emmc_install && run ubi_write_emmc_install
ubi_init_openwrt=run sdmmc_read_recovery && iminfo $loadaddr && run ubi_write_recovery ; run sdmmc_read_production && iminfo $loadaddr && run ubi_write_production
ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
ubi_write_emmc_install=ubi check emmc_install && ubi remove emmc_install ; ubi create emmc_install 0x800000 dynamic ; ubi write $loadaddr emmc_install 0x800000
ubi_write_fip=run ubi_remove_rootfs ; ubi check fip && ubi remove fip ; ubi create fip 0x200000 static ; ubi write $loadaddr fip 0x200000
ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
ver=U-Boot 2024.07-OpenWrt-r27466-f368e2d5ec (Sep 19 2024 - 21:11:58 +0000)
eth1addr=ee:92:dc:42:b6:d7

Image link used from: Banana Pi BPI-R4 | BananaPi Docs

Written to SD card, no settings made except password for LuCI. Output self explanatory…

BusyBox v1.33.2 (2024-01-19 02:26:09 UTC) built-in shell (ash)


| |.-----.-----.-----.| | | |.----.| |_ | - || _ | -| || | | || || | |_____|| |||||___||| |____| || W I R E L E S S F R E E D O M

OpenWrt 21.02-SNAPSHOT, unknown

root@BPi-R4:~# fw_printenv

Cannot parse config file ‘/etc/fw_env.config’: No such file or directory

root@BPi-R4:~#

Edit: sorry for bold text… gremlins in the cut/paste!

Ah okay, so I missed this part, it’s the factory Banana image, the old 21.02; sadly not very helpful in my scenario. I explicitly want to use the latest snapshot. The problem with 2.5GbE interface happens on the image built by OpenWrt builder. Not sure how the build process was different between factory and OpenWrt builder, but something makes the latter one dodged.

Yeah, I tried a couple other builds but none started the 2.5GbE so I went back to the factory default. I didn’t have a USB-TTL device until now so have been more focused on trying to ensure that the board functioned pretty much using SSH and LuCI over ethernet. I’m hoping this board version doesn’t become some kind of “freckle-faced stepchild” and be ignored by developers. The current state of things doesn’t foster confidence. I actually assumed that having the integrated port would be a benefit as opposed to dealing with power hungry and possibly incompatible SFP+ adapters… silly me!

Could someone check if by using this manual, the image will work?

I was checking what changes were made that might affect the device and I suspect that it can be this especially that in the main commit, it was mentioned about this . I know @dangowrt that you are busy, but if you can give us a hint where could we check to resolve that issue would be awesome. Thanks.