BPI R3 no wan/lan connection on openwrt

Hello, i recently brought BPI R3 and installed openwrt 24.10.5. It works fine, but after reboot i has “no link” on wan and lan ports. I tried to load clean image from sd card, but it doesn’t help. If i plugin ethernet cable there is a green light on port with rare blinks, but on pc i didn’t get address (ping 192.168.1.1 returns “network is unreachable”). Via wireless 5g and 2.4g dhcp works fine. Had someone something similar?

It seems that there is a problem with the R3’s network port.

Seems like I have the same issue but I use Arch Linux with my build of vanilla’s kernel 6.19.7. There are not any ethernet interfaces shown at all. Kernel just doesn’t recognize them.

In my case probe function returns -EINVAL (-22) status:

[ 1.338944] mtk_soc_eth 15100000.ethernet: probe with driver mtk_soc_eth failed with error -22

Edit: quick workaround: take dtb files from older kernel like for example 6.17.13:

  • mt7986a-bananapi-bpi-r3-sd.dtbo
  • mt7986a-bananapi-bpi-r3.dtb

For me it works.

I dig a little and found the reason of -EINVAL (-22) error. it is returned bu mtk_setup_legacy_sram() procedure when:

if (res->start + MTK_ETH_SRAM_OFFSET + MTK_ETH_NETSYS_V2_SRAM_SIZE - 1 > res->end) which causes the ethernet driver exits.

I also noticed that there is some commit probably from @frank-w in the kernel: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0c970091abf11805cb629f20760c0e67eb73f82

which reduces size of the region from 0x80000 to 0x40000. Seems like this change causes issues in my system in kernel 6.19.7.

@frank-w: I’d like to ask what is the reason to decrease this region size? I’m just asking because I have no access to specification of the ethernet controller. Maybe this reduction is ok but I missed something or misconfigured my kernel?

Did you add

CONFIG_SRAM=y

It was requirement in upstream process for R4 to define sram not via reg property and use dedicated node/driver for this.

As eric says you have to enable CONFIG_SRAM.

I didn’t know that. Now with CONFIG_SRAM enabled kernel on my R3 properly recognizes ethernet. Thank you both!

For enable sram i need to recompile kernel or i can somehow enable it in current build from firmware selector?

Openwrt I do not know, I was replying to someone that builds his own kernel.

On openwrt it should be set correctly already in the buildsystem, I would assume…

In openwrt you can do make kernel_menuconfig and set this option in case it would be missing. But as R3,R4 and other mt798x boards use same defconfig (filogic) it should be set.