Skip to content

mediatek: add support for BananaPi BPi-R4 Pro 8X#21083

Open
andrewjlamarche wants to merge 2 commits into
openwrt:mainfrom
andrewjlamarche:bpi-r4-pro
Open

mediatek: add support for BananaPi BPi-R4 Pro 8X#21083
andrewjlamarche wants to merge 2 commits into
openwrt:mainfrom
andrewjlamarche:bpi-r4-pro

Conversation

@andrewjlamarche
Copy link
Copy Markdown
Contributor

@andrewjlamarche andrewjlamarche commented Dec 8, 2025

The BPi-R4 Pro 8X is a Wi-Fi 7 router board based on the MT7988A SoC.

Specification

  • SoC: Mediatek MT7988A (4x Cortex-A73 @1.8GHz)
  • RAM: 8GB DDR4
  • Flash: 256MB SPI-NAND, 8GB eMMC, microSD Slot
  • Switch: MT7988A built-in, MxL86252C
  • PHYs: 2x AS21010P
  • Ports: 9 ports, 7 usable simultaneously
    • 1x 1G RJ45 LAN
    • 4x 2.5G RJ45 LAN
    • 1x 10G RJ45/SFP Combo
    • 1x 10G RJ45/SFP Combo
  • Buttons: Reset, WPS
  • LEDs: Power
  • USB: On-board VIA VL822 USB3.2/USB2.0 hub
    • 1x USB-A 2.0 connector
    • 1x USB-A 3.2 connector
    • 3x NGFF-KEYB
  • PCIe:
    • 2x mini-PCIe slots with PCIe 3.0 2-lane interface
    • 2x M.2 M-Key slots with PCIe 3.0 1-lane interface (switchable PCIe signal with M.2 B-Key)
  • Debug: USB Type-C console port
  • Power: USB Type-C PD 20V or DC barrel connector

Installation

Uncompress *sdcard.img.gz and write to microSD card, eg. using 'dd'. Use bootloader menu on the serial console to install SPI-NAND once installed to SPI-NAND you can used the bootloader menu to install to eMMC. See instructions for BananaPi R4 for details.

@github-actions github-actions Bot added the target/mediatek pull request/issue for mediatek target label Dec 8, 2025
@andrewjlamarche andrewjlamarche force-pushed the bpi-r4-pro branch 3 times, most recently from 212fb50 to 4ed79d2 Compare December 8, 2025 19:44
@pameruoso
Copy link
Copy Markdown
Contributor

pameruoso commented Dec 10, 2025

Hi @andrewjlamarche is this a draft? because the build jobs are failing for missing dtso. two patches look missing... can you describe what is working and what not? Thanks for the efforts.

@andrewjlamarche
Copy link
Copy Markdown
Contributor Author

Yes, there’s a draft indicator near the top. There is still quite a lot missing upstream to make this work.

@frank-w
Copy link
Copy Markdown
Contributor

frank-w commented Dec 10, 2025

Thank you for working on openwrt support.

The uci network config is wrong. Currently only the port from mt7988 internal switch is working. I have renamed it based on suggestion from @dangowrt.

Mainline misses at least

  • maxlinear switch driver (mxl_lan0-mxl_lan3 and lan-sfp+phy) - daniel is currently upstreaming a base version
  • an update for aeonsemi phy (i use upported downstream driver)
  • mux changes (mtk_eth + mxl driver) which should be based on phy-port patches from maxime (in my repo modified downstream change)
  • usxgmii pcs and serdes support patches (afaik these are in openwrt,so you could support the sfp when adding the eth-mux changes)

So basicly in mainline it is currently no router yet because of depencies. But you have to add mmc and pcie overlays here and fix the uci config

Feel free adding patch from here when keeping author information:
https://github.com/frank-w/BPI-Router-Linux/commits/6.18-main/

@pameruoso
Copy link
Copy Markdown
Contributor

pameruoso commented Dec 10, 2025

  • mux changes (mtk_eth + mxl driver) which should be based on phy-port patches from maxime (in my repo modified downstream change)

@frank-w I believe you are talking about this: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028841&state=%2A&archive=both
Are we sure we are waiting for that... I mean.. I see 21 versions, that has been stale for 1 year probably as series and now AI is even asking to review stuff that maintainers are not able to explain... (just thinking out loud).

@frank-w
Copy link
Copy Markdown
Contributor

frank-w commented Dec 10, 2025

  • mux changes (mtk_eth + mxl driver) which should be based on phy-port patches from maxime (in my repo modified downstream change)

@frank-w I believe you are talking about this: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028841&state=*
Are we sure we are waiting for that... I mean.. I see 21 versions, that has been stale for 1 year probably as series and now AI is even asking to review stuff that maintainers are not able to explain... (just thinking out loud).

Yes this should be base for ethmux
v21 is from 2025-11-29 with state changes requested
https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

But till this is mainline and the mux patches available you could use the downstream version (if accepted by openwrt maintainers).

@pameruoso
Copy link
Copy Markdown
Contributor

But till this is mainline and the mux patches available you could use the downstream version (if accepted by openwrt maintainers).

@dangowrt could this be acceptable? (using downstream stuff in openwrt temporarely) I believe that the series from maxime will come in kernel 7.0...

@dangowrt
Copy link
Copy Markdown
Member

I'd prefer the mux to be done via upstream backports of Maxime's upcoming series which should land soon. The downstream hack to have the mux support added into the ethernet and switch drivers is too ugly and may even break things on other boards... Regarding the DSA driver for the 2.5G switch it's ok to temporarily use downstream driver until upstream is ready (I'm working on that now).

@andrewjlamarche
Copy link
Copy Markdown
Contributor Author

The uci network config is wrong. Currently only the port from mt7988 internal switch is working. I have renamed it based on suggestion from @dangowrt.

You mean labeling it mgmt? Personally, I'm a fan of the lanX nomenclature, but the official case doesn't have any labels, and obviously mgmt was accepted upstream. I'll change it up here.

@frank-w
Copy link
Copy Markdown
Contributor

frank-w commented Dec 11, 2025

The uci network config is wrong. Currently only the port from mt7988 internal switch is working. I have renamed it based on suggestion from @dangowrt.

You mean labeling it mgmt? Personally, I'm a fan of the lanX nomenclature, but the official case doesn't have any labels, and obviously mgmt was accepted upstream. I'll change it up here.

I'm too,but as you have ports with different speeds, we have choosen this name (port is available on uboot too) and not numbering all ports lanX which would have the effect that lan0-lan3 are 2.5g,lan4 is 1G and lan5 is 10g.

I would label only the 2.5g ports lanX,not sure about the combo-ports as wan is directly connected to mac which afaik cannot be renamed on upstream but the lan-combo is also a dsa port so can have a label.

Imho you should check resulting image is working before starting pull request :) as the overlays are still missing i'm sure it does not (and their integration needs more work).

@andrewjlamarche andrewjlamarche changed the title mediatek: add support for BananaPi BPi-R4 Pro 8X [WIP] mediatek: add support for BananaPi BPi-R4 Pro 8X Dec 15, 2025
@andrewjlamarche andrewjlamarche force-pushed the bpi-r4-pro branch 4 times, most recently from 5a2cbc4 to 7cadf44 Compare December 18, 2025 04:30
@github-actions github-actions Bot added the core packages pull request/issue for core (in-tree) packages label Dec 18, 2025
@frank-w
Copy link
Copy Markdown
Contributor

frank-w commented Dec 18, 2025

I do not see adding uboot dts. You reference it in config (with missing dash for at least emmc).

Btw. You do not need variants in uboot.

Please be aware of sdcard issue.
https://forum.banana-pi.org/t/confusing-boot-switch-behavior-sd-card-issues/26310/7?u=frank-w

@dangowrt
Copy link
Copy Markdown
Member

@frank-w we do need variants of U-Boot because

  • U-Boot on SD card has to offer installation to SPI-NAND
  • U-Boot on SPI-NAND has to offer installation to eMMC
  • depending on whether U-Boot was loaded from SD card, SPI-NAND or eMMC we also want to load OpenWrt uImage.FIT from the same storage media

This all looks correct in this PR.

@andrewjlamarche
Copy link
Copy Markdown
Contributor Author

I do not see adding uboot dts. You reference it in config (with missing dash for at least emmc).

im aware :) as I was working on this last night, I noticed it was very late and I decided to push what I had. Will continue.

@andrewjlamarche andrewjlamarche force-pushed the bpi-r4-pro branch 6 times, most recently from 6d4c2ff to e7cb2e1 Compare December 18, 2025 18:54
Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed both new commits ("uboot-mediatek: add support for BananaPi BPi-R4 Pro 8X" and "mediatek: add support for BananaPi BPi-R4 Pro 8X").

Commit checks

  • The "mediatek: add support for BananaPi BPi-R4 Pro 8X" commit message has a thorough Hardware specification section and an adequate Installation section, but is missing the MAC address layout section required by the project's review rules for new device additions. Please add one line per interface (LAN1-4 via MxL switch, LAN5 via MT7530, LAN6 via mxl port 13, WAN via gmac1/sfp2, plus any Wi-Fi cards) describing where each MAC comes from (factory partition + offset, U-Boot env ethaddr/eth1addr, derived, etc.). The 99_fwenv-store-ethaddr.sh change in this PR shows that ethaddr and eth1addr end up in U-Boot env, but the readers cannot tell from the commit message what is assigned to LAN vs WAN.
  • The commit message Hardware spec line Switch: MT7988A built-in, MxL86252C in the PR description disagrees with Switch: MT7530, MxL86252C in the commit body. Both are technically correct (MT7988A integrates an MT7530-class switch) but please make them consistent.
  • The Installation section is on the terse side: it references "instructions for BananaPi R4 for details" rather than giving the verbatim bootloader-menu entries / TFTP filename(s) needed. A stranger reading just this commit message cannot flash the device without consulting another commit. Consider expanding it (the references in the LLM review rules — commits 986ca4c887f4 and a2dcbd79a4 — are the recommended bar).

Inline comments cover: an incomplete cherry-pick in 063 (diffstat says 2 files, body has 1), a dtsi-level bootargs that bakes UBI semantics into a multi-medium board, the OpenWrt-only patch 968 mixing openwrt,netdev-name with an upstream-bound patch slot, two stale copyright years in patch 048, and a couple of nits on package selection in filogic.mk.

CI status on head 8bc113038e is all green (kernel patches check, mediatek/filogic build, malta/be, x86/64 build, package checks, test formalities).


Generated by Claude Code

Comment thread target/linux/mediatek/image/filogic.mk
@EPinci
Copy link
Copy Markdown
Contributor

EPinci commented May 27, 2026

This PR needs a rebase?

error: patch failed: package/boot/uboot-mediatek/Makefile:1084
error: package/boot/uboot-mediatek/Makefile: patch does not apply

as a matter of fact line 1084 is different between ToT and this.

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • 81116a5 "mediatek: add support for BananaPi BPi-R4 Pro 8X" — missing required MAC address layout section. The PR wires MAC handling through 99_fwenv-store-ethaddr.sh (uses eth0/address and derives eth1addr as +1), but the commit message does not document where each interface's MAC comes from. Per the new-device rules a stranger should be able to learn from the commit alone where LAN/WAN/2.4G/5G MACs originate.

Generated by Claude Code

ucidef_set_led_netdev "sfp0" "sfp0" "green:sfp" "sfp0" "link tx rx"
;;
bananapi,bpi-r4-pro-8x)
ucidef_set_led_netdev "lan5" "lan5" "mt7530-0:00:green:lan" "lan5" "link tx rx"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sysfs LED name mt7530-0:00:green:lan will not match what the kernel registers. In patch 046-v6.19-...add-dts.patch &gsw_phy0_led0 is set to color = <LED_COLOR_ID_YELLOW>; and no function property, so the LED name produced by the PHY LED binding does not include green nor :lan. Either align the DTS (set color = <LED_COLOR_ID_GREEN> and function = LED_FUNCTION_LAN, like other R4 variants do) or update this entry to use the actual color/function produced by the DTS — otherwise the netdev trigger won't bind and the port LED stays inactive.


Generated by Claude Code

+ sfp = <&sfp2>;
+ managed = "in-band-status";
+ phy-mode = "usxgmii";
+ openwrt,netdev-name = "wan";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: subject/description claim this patch only adds the SFP gpio-hog, but the hunks also enable &gmac1 as the WAN port, add MXL port@13 (lan6) with sfp = <&sfp1>, and set openwrt,netdev-name = "wan". Either split this into separate patches (gmac1/wan setup, lan6/sfp1 port, gpio-hogs) or update the subject/commit message to describe the full scope so future archaeologists can find these bits.


Generated by Claude Code

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regarding this gpio-hog. Considering the 2nd series from Maxime is taking deserved time and a third series would need at least 6months to understand how to implement muxing at runtime (there are no pocs afaik). What if someone wants to use the wan phy and lan SFP? here in this pull request we are forcing everything on sfp. I understand too it is not possible to create a single overlay for each muxing combination (1 sfplan+sfpwan, 2 sfplan+phywan, 3 phylan+sfpwan and 4 phylan+phywan). Am I correct that anyone that needs a special combination will have to just flip the gpio hog to modify the dts and compile by himself the preferred version? @frank-w @andrewjlamarche @dangowrt

@pprindeville
Copy link
Copy Markdown
Member

pprindeville commented May 28, 2026

@dangowrt I put your daniel@box key here:

ssh -p 22002 [email protected]
ssh -p 22003 [email protected]

The first one has a 5G modem and SIM. The 2nd one has 5G modem and WiFi, but I haven't yet gotten the SIM activated by T-Mobile. Working on that this week but they're incredibly slow.

Oh, and both have 10G SFP+ LAN modules.

root@OpenWrt-r4-bis:~# ip link set up dev lan6
[  223.318727] mxl862xx mdio-bus:10 lan6: configuring for inband/10gbase-r link mode
root@OpenWrt-r4-bis:~# brctl addif br-lan lan6
[  262.420036] br-lan: port 6(lan6) entered blocking state
[  262.425286] br-lan: port 6(lan6) entered disabled state
[  262.430531] mxl862xx mdio-bus:10 lan6: entered allmulticast mode
[  262.457036] mxl862xx mdio-bus:10 lan6: entered promiscuous mode
root@OpenWrt-r4-bis:~# 

Still don't see traffic on the lan6 port, however.

And restarting the network...
root@OpenWrt-r4-bis:~# /etc/init.d/network restart
[  416.457146] mxl862xx mdio-bus:10 lan1: left allmulticast mode
[  416.462920] mxl862xx mdio-bus:10 lan1: left promiscuous mode
[  416.468787] br-lan: port 1(lan1) entered disabled state
[  416.522750] mxl862xx mdio-bus:10 lan2: left allmulticast mode
[  416.528557] mxl862xx mdio-bus:10 lan2: left promiscuous mode
[  416.534309] br-lan: port 2(lan2) entered disabled state
[  416.584994] mxl862xx mdio-bus:10 lan3: left allmulticast mode
[  416.590764] mxl862xx mdio-bus:10 lan3: left promiscuous mode
[  416.596531] br-lan: port 3(lan3) entered disabled state
[  416.644469] mxl862xx mdio-bus:10 lan4: left allmulticast mode
[  416.650233] mxl862xx mdio-bus:10 lan4: left promiscuous mode
[  416.655981] br-lan: port 4(lan4) entered disabled state
[  416.702709] mtk_soc_eth 15100000.ethernet eth2: Link is Down
[  416.711281] mt7530-mmio 15020000.switch lan5: left allmulticast mode
[  416.717655] mtk_soc_eth 15100000.ethernet eth0: left allmulticast mode
[  416.724173] mt7530-mmio 15020000.switch lan5: left promiscuous mode
[  416.730513] br-lan: port 5(lan5) entered disabled state
[  416.738662] mtk_soc_eth 15100000.ethernet eth0: Link is Down
[  416.746405] mxl862xx mdio-bus:10 lan6: left allmulticast mode
[  416.752167] mtk_soc_eth 15100000.ethernet eth2: left allmulticast mode
[  416.758729] mxl862xx mdio-bus:10 lan6: left promiscuous mode
[  416.764475] br-lan: port 6(lan6) entered disabled state
[  417.210940] mtk_soc_eth 15100000.ethernet wan: left allmulticast mode
[  417.217410] mtk_soc_eth 15100000.ethernet wan: left promiscuous mode
[  417.223790] br-wan: port 1(wan) entered disabled state
[  419.046577] mtk_soc_eth 15100000.ethernet eth2: configuring for fixed/10gbase-r link mode
[  419.075056] mxl862xx mdio-bus:10 lan1: configuring for phy/internal link mode
[  419.096787] br-lan: port 1(lan1) entered blocking state
[  419.102009] br-lan: port 1(lan1) entered disabled state
[  419.103058] mtk_soc_eth 15100000.ethernet eth2: Link is Up - 10Gbps/Full - flow control rx/tx
[  419.107278] mxl862xx mdio-bus:10 lan1: entered allmulticast mode
[  419.121766] mtk_soc_eth 15100000.ethernet eth2: entered allmulticast mode
[  419.159629] mxl862xx mdio-bus:10 lan1: entered promiscuous mode
[  419.201477] mxl862xx mdio-bus:10 lan2: configuring for phy/internal link mode
[  419.223195] br-lan: port 2(lan2) entered blocking state
[  419.228474] br-lan: port 2(lan2) entered disabled state
[  419.233726] mxl862xx mdio-bus:10 lan2: entered allmulticast mode
[  419.252836] mxl862xx mdio-bus:10 lan2: entered promiscuous mode
[  419.287502] mxl862xx mdio-bus:10 lan3: configuring for phy/internal link mode
[  419.309038] br-lan: port 3(lan3) entered blocking state
[  419.314271] br-lan: port 3(lan3) entered disabled state
[  419.319558] mxl862xx mdio-bus:10 lan3: entered allmulticast mode
[  419.341098] mxl862xx mdio-bus:10 lan3: entered promiscuous mode
[  419.375456] mxl862xx mdio-bus:10 lan4: configuring for phy/internal link mode
[  419.397152] br-lan: port 4(lan4) entered blocking state
[  419.402376] br-lan: port 4(lan4) entered disabled state
[  419.407621] mxl862xx mdio-bus:10 lan4: entered allmulticast mode
[  419.431008] mxl862xx mdio-bus:10 lan4: entered promiscuous mode
[  419.471348] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/internal link mode
[  419.479480] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 10Gbps/Full - flow control rx/tx
[  419.480216] mt7530-mmio 15020000.switch lan5: configuring for phy/internal link mode
[  419.496518] br-lan: port 5(lan5) entered blocking state
[  419.501737] br-lan: port 5(lan5) entered disabled state
[  419.506978] mt7530-mmio 15020000.switch lan5: entered allmulticast mode
[  419.513582] mtk_soc_eth 15100000.ethernet eth0: entered allmulticast mode
[  419.520595] mt7530-mmio 15020000.switch lan5: entered promiscuous mode
[  419.537048] mxl862xx mdio-bus:10 lan6: configuring for inband/10gbase-r link mode
[  419.546453] mxl862xx mdio-bus:10 lan6: Link is Up - 10Gbps/Full - flow control off
[  419.549867] br-lan: port 6(lan6) entered blocking state
[  419.559234] br-lan: port 6(lan6) entered disabled state
[  419.564465] mxl862xx mdio-bus:10 lan6: entered allmulticast mode
[  419.590282] mxl862xx mdio-bus:10 lan6: entered promiscuous mode
[  419.607191] br-lan: port 6(lan6) entered blocking state
[  419.612422] br-lan: port 6(lan6) entered forwarding state
[  419.695707] mtk_soc_eth 15100000.ethernet wan: configuring for inband/usxgmii link mode
[  419.730148] br-wan: port 1(wan) entered blocking state
[  419.735323] br-wan: port 1(wan) entered disabled state
[  419.740491] mtk_soc_eth 15100000.ethernet wan: entered allmulticast mode
[  419.747379] mtk_soc_eth 15100000.ethernet wan: entered promiscuous mode
[  422.636250] mxl862xx mdio-bus:10 lan6: Link is Down
[  422.636276] br-lan: port 6(lan6) entered disabled state

root@OpenWrt-r4-bis:~# 
Replacing the 10G SFP+ with a 1G SFP
[  661.836311] mxl862xx mdio-bus:10 lan6: Link is Up - 10Gbps/Full - flow control off
[  661.837783] br-lan: port 6(lan6) entered blocking state
[  661.849108] br-lan: port 6(lan6) entered forwarding state
[  662.536804] sfp sfp1: module removed
[  662.540405] mxl862xx mdio-bus:10 lan6: Link is Down
[  662.545334] br-lan: port 6(lan6) entered disabled state
[  667.765845] sfp sfp1: module OEM              SFP-GE-T         rev      sn CS3GE1P40271     dc 250427  
[  667.879047] mxl862xx mdio-bus:10 lan6: PHY i2c:sfp1:16 (id 0x01410cc1) has no driver loaded
[  667.887435] mxl862xx mdio-bus:10 lan6: Drivers which handle known common cases: CONFIG_BCM84881_PHY, CONFIG_MARVELL_PHY
[  667.898287] sfp sfp1: sfp_add_phy failed: -EINVAL

@pprindeville
Copy link
Copy Markdown
Member

Does the branch need to be rebased to master to pick up updates to other packages?

@pprindeville
Copy link
Copy Markdown
Member

pprindeville commented May 28, 2026

Okay, figured it out. Still had sfp-lan on one of the two boxes (openwrt-r4) so the bridge wasn't coming up completely, changed that to lan6, restarted the network... also if one side is an 1G and the other side is a 10G, they won't downgrade to to 1G... so the autonegotation doesn't seem to be working at this point.

root@OpenWrt-r4-bis:~# ethtool -s lan6 autoneg on
netlink error: link settings update failed
netlink error: Invalid argument
root@OpenWrt-r4-bis:~# 

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • mediatek: add support for BananaPi BPi-R4 Pro 8X — this commit adds a new device (new .dts/.dtsi and a define Device/bananapi_bpi-r4-pro-8x block), so per the new-device convention the commit message should carry a MAC address layout section in addition to the Hardware specification and Installation sections it already has. There is no MAC layout described, and the DTS has no nvmem-cells/label-mac for the interfaces (MACs are seeded into U-Boot env from eth0 by 99_fwenv-store-ethaddr.sh). Please add a short per-interface MAC origin section (LAN/WAN/lan5/lan6/…), using xx:xx:xx for unit-specific bytes.
  • The same commit's spec block lists Switch: MT7530, MxL86252C, but the PR body lists MT7988A built-in, MxL86252C and the DTS uses the MT7988 built-in switch (&gsw_*), not an MT7530. Minor, but worth aligning the commit text with the actual hardware.

One inline comment on the lan5 LED definition.


Generated by Claude Code

ucidef_set_led_netdev "sfp0" "sfp0" "green:sfp" "sfp0" "link tx rx"
;;
bananapi,bpi-r4-pro-8x)
ucidef_set_led_netdev "lan5" "lan5" "mt7530-0:00:green:lan" "lan5" "link tx rx"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LED sysfs name mt7530-0:00:green:lan likely won't resolve to the actual PHY LED. In the DTS (patch 046-...add-dts.patch), &gsw_phy0_led0 is configured with only color = <LED_COLOR_ID_YELLOW> and status = "okay" — it has no function. The Linux PHY-LED name is built as <device>:<color>:<function>, so this LED ends up named mt7530-0:00:yellow (no :lan), not mt7530-0:00:green:lan.

Sibling devices set both properties consistently and match them in 01_leds (e.g. keenetic-kn-1812 uses color = <LED_COLOR_ID_GREEN> + function = LED_FUNCTION_LAN...:green:lan; the bpi-r4 base also uses green + LED_FUNCTION_LAN).

Two mismatches to reconcile: the color (DTS YELLOW vs green here) and the missing function = LED_FUNCTION_LAN in &gsw_phy0_led0. Either align this string to the actual DT color and add function = LED_FUNCTION_LAN to the DT node, so the netdev trigger binds.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the two commits adding BPi-R4 Pro 8X support (kernel/DTS + uboot-mediatek). The DTS patches are an upstream backport (v6.19/v7.0/v7.1) plus OpenWrt-specific glue, and the image/board.d/uboot wiring matches the bpi-r4 siblings. Both commit messages match their diffs and the new-device commit carries the required hardware-spec and installation sections. Two minor points inline (one LED-name mismatch worth confirming, one commit-message nit); no blocking issues found.


Generated by Claude Code

ucidef_set_led_netdev "sfp0" "sfp0" "green:sfp" "sfp0" "link tx rx"
;;
bananapi,bpi-r4-pro-8x)
ucidef_set_led_netdev "lan5" "lan5" "mt7530-0:00:green:lan" "lan5" "link tx rx"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This references the LED sysfs name mt7530-0:00:green:lan, but the DTS defines gsw_phy0_led0 with color = <LED_COLOR_ID_YELLOW> and no function (in 046-...-add-dts.patch).With that color/function, the kernel registers the LED asmt7530-0:00:yellow, not green:lan`, so this netdev trigger won't bind to any LED.

The sibling bpi-r4 sets the matching LED as function = LED_FUNCTION_LAN; color = <LED_COLOR_ID_GREEN>; to produce mt7530-0:00:green:lan (in 184-...-configure-switch-phys-and-leds.patch).Either align the DTSgsw_phy0_led0tocolor = <LED_COLOR_ID_GREEN>+function = LED_FUNCTION_LAN, or change this name to match the actual DTS color (mt7530-0:00:yellow`).


Generated by Claude Code

ucidef_set_led_netdev "sfp0" "sfp0" "green:sfp" "sfp0" "link tx rx"
;;
bananapi,bpi-r4-pro-8x)
ucidef_set_led_netdev "lan5" "lan5" "mt7530-0:00:green:lan" "lan5" "link tx rx"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The commit message spec header lists Switch: MT7530, MxL86252C, but this board's internal switch is the MT7988A built-in switch (compatible = "mediatek,mt7988-switch" in mt7988a.dtsi), not an MT7530. The PR description body already states it correctly as "MT7988A built-in, MxL86252C". Worth aligning the commit message to avoid confusion (the mt7530-0:00 LED string here is just the kernel's legacy mdio-bus naming, not the actual switch part).


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • 81116a54 "mediatek: add support for BananaPi BPi-R4 Pro 8X" — this commit adds a new device (new .dts/.dtsi plus a new define Device/bananapi_bpi-r4-pro-8x block), so per the new-device convention the message should carry three sections; it has Hardware specification and Installation, but is missing the MAC address layout section. The board derives its MACs from the U-Boot environment (99_fwenv-store-ethaddr.sh sets ethaddr/eth1addr from eth0/eth1), so please document where each interface's MAC comes from (one line per interface).

Note: the device-tree patches 046049/063/094097 are upstream cherry-picks (v6.19/v7.0/v7.1) so their content was not flagged for in-tree style; the inline notes are on the OpenWrt-specific glue.


Generated by Claude Code

ucidef_set_led_netdev "sfp0" "sfp0" "green:sfp" "sfp0" "link tx rx"
;;
bananapi,bpi-r4-pro-8x)
ucidef_set_led_netdev "lan5" "lan5" "mt7530-0:00:green:lan" "lan5" "link tx rx"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LED name here uses green, but the DTS sets this PHY LED to a different color. In 046-...add-dts.patch, &gsw_phy0_led0is defined ascolor = <LED_COLOR_ID_YELLOW>(with nofunction), so the sysfs LED node will carry yellow, not green. By contrast the existing bpi-r4 sets that LED to GREEN and matches it with mt7530-0:00:green:wan. As written, this ucidef_set_led_netdev` line will reference a non-existent LED and the trigger won't be applied. Please align the color (and the function suffix) with the name the DTS actually produces.


Generated by Claude Code

endef

define Device/bananapi_bpi-r4-pro-8x
DEVICE_MODEL := BPi-R4 Pro 8X
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the commit message's Specification block lists Switch: MT7530, MxL86252C, but the PR description lists Switch: MT7988A built-in, MxL86252C. The MT7988A integrates its own GbE switch (it does not use a discrete MT7530, which is the MT7986/R3-era part). The two descriptions disagree on the same fact; please make them consistent (the PR-description wording looks correct).


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • 81116a5 "mediatek: add support for BananaPi BPi-R4 Pro 8X" — the spec line Switch: MT7530, MxL86252C looks wrong. This MT7988A board has no MT7530; it uses the SoC's built-in switch (&gsw_port0/&gsw_phy0 in the dtsi) for the 1G port plus the MxL86252C for the four 2.5G ports. The PR description itself lists this as Switch: MT7988A built-in, MxL86252C. Please align the commit message with the hardware (and the PR body).

  • 81116a5 "mediatek: add support for BananaPi BPi-R4 Pro 8X" — this commit adds a new device (new .dts/.dtsi under target/linux/mediatek/.../dts/ plus a new define Device/bananapi_bpi-r4-pro-8x in image/filogic.mk), so per the project's new-device commit-message convention it should carry a MAC address layout section (one line per interface — LAN/WAN/SFP/... — stating where each MAC is derived from, using xx:xx:xx for the unit-specific bytes). The message currently has Hardware specification and an Installation/flash section but no MAC layout. The 99_fwenv-store-ethaddr.sh hook this PR touches suggests MACs come from the U-Boot environment (ethaddr/eth1addr); documenting the per-interface derivation would complete the section.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the 2 commits at head 81116a5. The DTS additions are upstream-tagged backports (v6.19/v7.0/v7.1) plus OpenWrt-specific switch/SFP/FIT patches, and the board.d / platform.sh / uboot-envtools wiring is consistent with the sibling BPi-R4 entries. Two inline notes below (one missing required commit-message section, one hardware-spec nit); no functional issues found in the diff.


Generated by Claude Code

endef

define Device/bananapi_bpi-r4-pro-8x
DEVICE_MODEL := BPi-R4 Pro 8X
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "mediatek: add support for BananaPi BPi-R4 Pro 8X" commit message documents the hardware spec and an installation path, but is missing a MAC address layout section. For a new device, the message should describe where each interface's MAC comes from (one line per LAN/WAN/etc. — e.g. derived from eth0/eth1 sysfs and stored via 99_fwenv-store-ethaddr.sh, since there is no nvmem-cells MAC source in the DTS). Please add that section so the provenance of each MAC is documented.


Generated by Claude Code

IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | pad-rootfs | append-metadata
endef

define Device/bananapi_bpi-r4-pro-8x
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the commit message's hardware spec lists Switch: MT7530, MxL86252C, but the MT7988A has no MT7530 — it uses the SoC's built-in gigabit switch (the single 1G port is gsw_port0 on the internal &switch, the 2.5G ports are on the maxlinear,mxl86252 switch). The PR body correctly says "MT7988A built-in, MxL86252C". Please align the commit message with the PR body / actual hardware.


Generated by Claude Code

@frank-w
Copy link
Copy Markdown
Contributor

frank-w commented Jun 1, 2026

Maybe you could add the base R4Pro-4e dts from my upstream patch too? There come first users of the board

https://forum.banana-pi.org/t/bpi-r4-pro-4e-openwrt-firmware-is-unusable-pls-update/27450

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 new commits (the full PR diff, no prior bot review on record).

Commit checks

  • 81116a5 "mediatek: add support for BananaPi BPi-R4 Pro 8X" — for a new-device commit the project rules require a MAC address layout section (one line per interface: where each MAC comes from). The message has "Specification" and "Installation" but no MAC section. MACs here are populated from the U-Boot env (ethaddr/eth1addr via 99_fwenv-store-ethaddr.sh, read from eth0/eth1); please document that per interface (LAN / WAN / 2.4G / 5G, using xx:xx:xx for unit bytes). Minor: the "Installation" path mostly defers to "instructions for BananaPi R4 for details" — a self-contained path (recovery state + verbatim IP/menu strings) would meet the "could a stranger flash this from the message alone" bar.
  • 81116a5 — the commit lists Switch: MT7530, MxL86252C while the PR body lists Switch: MT7988A built-in, MxL86252C. Both refer to the SoC's internal switch (kernel label mt7530), so this is just a cosmetic body/commit disagreement worth aligning.

The OpenWrt integration (image recipe in target/linux/mediatek/image/filogic.mk, board.d/01_leds + 02_network, platform.sh, uboot-envtools and the uboot-mediatek Makefile) is consistent with the existing BPi-R4 family and the port topology (lan1-4 = MxL switch, lan5 = internal switch port0, lan6 = SFP1 DSA port, wan = gmac1/SFP2) is internally coherent. All overlays referenced by DEVICE_DTS_OVERLAY (emmc, sd, cn13-15, cn18) are generated. The patches-6.18/ DTS patches carry upstream provenance (v6.19/v7.1 subjects, MediaTek/Daniel Golle sign-offs), so style/design there is upstream's domain and not flagged. No code bugs found.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • mediatek: add support for BananaPi BPi-R4 Pro 8X (81116a5): this is the commit introducing the new device (adds mt7988a-bananapi-bpi-r4-pro-8x.dts and define Device/bananapi_bpi-r4-pro-8x), so per the project's new-device rules the message needs a MAC address layout section in addition to the Specification and Installation sections it already has. The message currently has no per-interface MAC layout (LAN/WAN/2.4G/5G...). Since the board derives MACs from the U-Boot ethaddr/eth1addr env (it is added to 99_fwenv-store-ethaddr.sh), a short section stating that — one line per interface, using xx:xx:xx for unit-specific bytes — would satisfy the requirement.

  • uboot-mediatek: add support for BananaPi BPi-R4 Pro 8X (46a3fb2): message matches the changes (Makefile targets + u-boot patch for emmc/sdmmc/snand boot). No issues.

The DTS patches under patches-6.18/ carry upstream provenance (046-v6.19-... etc. via their From <sha>/Subject headers) and the 9xx patches are OpenWrt-local with proper Signed-off-by; their content was treated as upstream/local per the backport rules. No other new issues found in the OpenWrt glue (image Makefile, board.d, platform.sh, envtools) — the new Device/bananapi_bpi-r4-pro-common block follows the existing bananapi_bpi-r4-common conventions (vendor casing, un-wrapped IMAGE_SIZE, artifact pipeline).


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • mediatek: add support for BananaPi BPi-R4 Pro 8X — the commit message has a Specification and an Installation section but is missing the MAC address layout section required for new-device commits (one line per interface saying where each MAC comes from). Since the U-Boot config uses CONFIG_NET_RANDOM_ETHADDR=y and 99_fwenv-store-ethaddr.sh persists the generated eth0 MAC into the U-Boot env, a stranger can't tell from the message whether MACs are board-provisioned or randomly generated. Please add a short MAC-layout section documenting this.

Generated by Claude Code

ucidef_set_led_netdev "sfp0" "sfp0" "green:sfp" "sfp0" "link tx rx"
;;
bananapi,bpi-r4-pro-8x)
ucidef_set_led_netdev "lan5" "lan5" "mt7530-0:00:green:lan" "lan5" "link tx rx"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LED name mt7530-0:00:green:lan will not match the LED this board actually registers. The DTS for this device (patch 046-v6.19-...add-dts.patch) configures the port-0 PHY LED as:

&gsw_phy0_led0 {
	color = <LED_COLOR_ID_YELLOW>;
	status = "okay";
};

i.e. color yellow and no function. The kernel builds the LED class device name from devicename + color (+ function), so it will be mt7530-0:00:yellow, not mt7530-0:00:green:lan. The netdev trigger configured here will therefore never bind.

Compare the in-tree bananapi,bpi-r4 entry which uses mt7530-0:00:green:wan because its DTS sets gsw_phy0_led0 { color = <LED_COLOR_ID_GREEN>; function = LED_FUNCTION_WAN; } (

ucidef_set_led_netdev "wan" "wan" "mt7530-0:00:green:wan" "wan" "link tx rx"
).

Either align this line with the LED node's actual color/function, or add a matching function (and the intended color) to &gsw_phy0_led0 in the DTS so the resolved name matches.

Suggested change
ucidef_set_led_netdev "lan5" "lan5" "mt7530-0:00:green:lan" "lan5" "link tx rx"
ucidef_set_led_netdev "lan5" "lan5" "mt7530-0:00:yellow" "lan5" "link tx rx"

Generated by Claude Code

@andrewjlamarche
Copy link
Copy Markdown
Contributor Author

Maybe you could add the base R4Pro-4e dts from my upstream patch too? There come first users of the board

https://forum.banana-pi.org/t/bpi-r4-pro-4e-openwrt-firmware-is-unusable-pls-update/27450

I think this would probably be best left for a separate PR, no?

andrewjlamarche and others added 2 commits June 3, 2026 01:51
The BPi R4 Pro 8X can boot from microSD, SPI-NAND and eMMC. Add support
for each storage option.

Co-authored-by: Frank Wunderlich <[email protected]>
Signed-off-by: Andrew LaMarche <[email protected]>
The BPi-R4 Pro 8X is a Wi-Fi 7 router board based on the MT7988A SoC.

Specification
-------------

- SoC:		Mediatek MT7988A (4x Cortex-A73 @1.8GHz)
- RAM:		8GB DDR4
- Flash: 	256MB SPI-NAND, 8GB eMMC, microSD Slot
- Switch:	MT7530, MxL86252C
- PHYs:		2x AS21010P
- Ports:	9 ports, 7 usable simultaneously
	* 1x 1G RJ45 LAN
	* 4x 2.5G RJ45 LAN
	* 1x 10G RJ45/SFP Combo
	* 1x 10G RJ45/SFP Combo
- Buttons:	Reset, WPS
- LEDs:		Power
- USB:		On-board VIA VL822 USB3.2/USB2.0 hub
	* 1x USB-A 2.0 connector
	* 1x USB-A 3.2 connector
	* 3x NGFF-KEYB
- PCIe:
	* 2x mini-PCIe slots with PCIe 3.0 2-lane interface
	* 2x M.2 M-Key slots with PCIe 3.0 1-lane interface (switchable
	  PCIe signal with M.2 B-Key)
- Debug:	USB Type-C console port
- Power:	USB Type-C PD 20V or DC barrel connector

Installation
------------

Uncompress *sdcard.img.gz and write to microSD card, eg. using 'dd'. Use
bootloader menu on the serial console to install SPI-NAND once installed
to SPI-NAND you can used the bootloader menu to install to eMMC. See
instructions for BananaPi R4 for details.

Co-authored-by: Frank Wunderlich <[email protected]>
Signed-off-by: Andrew LaMarche <[email protected]>
Signed-off-by: Daniel Golle <[email protected]>
@frank-w
Copy link
Copy Markdown
Contributor

frank-w commented Jun 3, 2026

Maybe you could add the base R4Pro-4e dts from my upstream patch too? There come first users of the board
https://forum.banana-pi.org/t/bpi-r4-pro-4e-openwrt-firmware-is-unusable-pls-update/27450

I think this would probably be best left for a separate PR, no?

The support itself yes,but it would be great if you can add the dts part as it was part of my original dts patch... currently prepare the other parts

Edit: seems you still add dts part (thought you dropped 4e here)

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • fdd68b5 "mediatek: add support for BananaPi BPi-R4 Pro 8X" — this commit adds a new device (new .dts under target/linux/mediatek/.../dts/ plus a new define Device/bananapi_bpi-r4-pro-8x in target/linux/mediatek/image/filogic.mk), so per project convention the commit message needs Hardware specification, Flash instructions and a MAC address layout section. The first two are present, but the MAC address layout section is missing. The board derives MACs from the U-Boot env (99_fwenv-store-ethaddr.sh seeds ethaddr/eth1addr from eth0), so a short per-interface line (LAN/WAN/2.5G/10G — where each MAC originates) would satisfy the requirement.

  • nit: fdd68b5 — the message's hardware spec lists Switch: MT7530, MxL86252C, but the 1G RJ45 LAN is handled by the MT7988A's built-in gigabit switch (the DTS wires it through &gsw_phy0/&gsw_port0, and the upstream DTS commit describes it as "MT7988 internal switch"), not an external MT7530. The PR body correctly says MT7988A built-in, MxL86252C. Please reconcile the commit message with the PR body.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed both commits in this new-device PR (no prior openwrt-ai review; reviewed at head fdd68b5).

Both commit messages match their diffs. The vendored kernel DTS patches (046–049, 063, 094–097) carry proper upstream commit headers and the OpenWrt-local patches (192, 967, 968) are scoped correctly. Overlay names referenced in filogic.mk (-emmc, -sd, -cn13, -cn14, -cn15, -cn18) all resolve to .dtso files created across the overlay/rework patches. The board.d / platform.sh / uboot-envtools / fwenv additions are consistent with the bpi-r4 siblings, and the U-Boot snand defconfig reusing the -emmc DT matches the existing bpi-r4 convention. One inline note on the missing MAC-address-layout section in the device commit message.


Generated by Claude Code

endef

define Device/bananapi_bpi-r4-pro-8x
DEVICE_MODEL := BPi-R4 Pro 8X
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block (plus the new .dts/.dtsi) makes the "mediatek: add support for BananaPi BPi-R4 Pro 8X" commit a new-device commit, so its message is expected to carry a MAC address layout section in addition to the hardware spec and installation sections it already has. The message currently has no per-interface MAC source. The board derives MACs from the U-Boot env (99_fwenv-store-ethaddr.sh seeds ethaddr/eth1addr from eth0), so a short section documenting where LAN/WAN/lanN MACs come from would make the device flashable/diagnosable from the commit alone.

nit: while here, the commit-message spec lists Switch: MT7530, MxL86252C, but the PR body lists Switch: MT7988A built-in, MxL86252C. The MT7988A has an integrated switch (driven by the mt7530 driver) rather than a discrete MT7530 — worth aligning the two so they agree on the same fact.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • fdd68b5 "mediatek: add support for BananaPi BPi-R4 Pro 8X" — new-device commit is missing the MAC address layout section. The message has hardware spec + installation, but per project convention a new-device commit should document where each interface's MAC comes from (one line per LAN/WAN/2.5G/SFP...). Here MACs are seeded from the U-Boot environment via 99_fwenv-store-ethaddr.sh, so a short note to that effect would satisfy it. (Minor: the body lists the switch as "MT7988A built-in, MxL86252C" while the commit message says "MT7530, MxL86252C" — harmless, the DTS uses the MT7530-compatible internal gsw.)

Note: the DTS patches (046/047/... carrying upstream v6.19/v7.0/v7.1 tags) are imports of accepted upstream commits targeting kernel ≥6.19; they could not be diffed against the available reference refs (linux v6.18.34 is older), so they were reviewed for OpenWrt-side integration only, not byte-for-byte against upstream.


Generated by Claude Code

ucidef_set_led_netdev "sfp0" "sfp0" "green:sfp" "sfp0" "link tx rx"
;;
bananapi,bpi-r4-pro-8x)
ucidef_set_led_netdev "lan5" "lan5" "mt7530-0:00:green:lan" "lan5" "link tx rx"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The netdev LED label here uses color green, but the matching PHY LED in the DTS (&gsw_phy0_led0) is defined as color = <LED_COLOR_ID_YELLOW>; (in 046-v6.19-arm64-dts-mediatek-mt7988a-bpi-r4-pro-add-dts.patch). The kernel builds the LED class name from <device>:<color>:<function>, so this LED should appear as mt7530-0:00:yellow:lan, not :green:. Should this be mt7530-0:00:yellow:lan so the trigger actually binds? (The existing bananapi,bpi-r4 entry works because its gsw_phy0_led0 is green.)


Generated by Claude Code

@@ -0,0 +1,41 @@
From e4e6f0c5a4dc238684acef079e792c81d37e3226 Mon Sep 17 00:00:00 2001
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI ("Check Kernel patches (mediatek, filogic)") fails on this patch:

target/linux/mediatek/patches-6.18/063-v7.0-fix-incorrect-model-string-in-devicetree-for-bpi-r4-pro.patch
Kernel patches for mediatek/filogic require refresh. (run 'make target/linux/refresh' and force push this pr)

The hunk context/offsets in this patch have drifted (it sits after the other new bpi-r4-pro patches). Regenerate it with make target/linux/refresh (mediatek/filogic selected in .config) and commit the result.


Generated by Claude Code

@pprindeville
Copy link
Copy Markdown
Member

Hmm. Rebased, recompiled, downloaded, sysupgraded and.... I only see 3 NIC's now: eth0, eth2, and lan5. Digging...

@CAMOBAP
Copy link
Copy Markdown

CAMOBAP commented Jun 5, 2026

Hmm. Rebased, recompiled, downloaded, sysupgraded and.... I only see 3 NIC's now: eth0, eth2, and lan5. Digging...

Check conversation at #23477

@pprindeville
Copy link
Copy Markdown
Member

pprindeville commented Jun 5, 2026

Hmm. Rebased, recompiled, downloaded, sysupgraded and.... I only see 3 NIC's now: eth0, eth2, and lan5. Digging...

Check conversation at #23477

So we need to update the firmware… but the firmware hasn’t been released?

Or cherry-pick this commit into our cloning.

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the 2 new commits (full PR diff, first automated review).

Commit checks

  • mediatek: add support for BananaPi BPi-R4 Pro 8X — the Specification block lists Switch: MT7530, MxL86252C, but this board has no MT7530: LAN1-4/lan6 come from the MaxLinear MXL86252 DSA switch (maxlinear,mxl86252) and lan5 from the MT7988A's built-in switch (&switch). The PR description itself says MT7988A built-in, MxL86252C. Please correct the commit message to match.
  • mediatek: add support for BananaPi BPi-R4 Pro 8X — new-device commits are expected to document the per-interface MAC address layout (one line per LAN/WAN/2.4G/5G...). This commit has Specification and Installation sections but no MAC layout. Here MACs are populated from the U-Boot env via 99_fwenv-store-ethaddr.sh rather than a factory partition — a one-line note to that effect would satisfy the requirement; is the omission intentional?

The remaining patch series (upstream-tagged DTS backports v6.19/v7.0/v7.1, U-Boot support, and filogic glue) is internally consistent: the four PCIe overlays (cn13/cn14/cn15/cn18) and emmc/sd overlays are all defined and wired into DEVICE_DTS_OVERLAY, and the lan1-6/wan netdev names line up with 02_network. See the inline comment for the failing CI patch-refresh check.


Generated by Claude Code

@@ -0,0 +1,41 @@
From e4e6f0c5a4dc238684acef079e792c81d37e3226 Mon Sep 17 00:00:00 2001
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI "Check Kernel patches (mediatek, filogic)" fails because this patch is not refreshed:

target/linux/mediatek/patches-6.18/063-v7.0-fix-incorrect-model-string-in-devicetree-for-bpi-r4-pro.patch
Kernel patches for mediatek/filogic require refresh. (run 'make target/linux/refresh' and force push this pr)
##[error]Process completed with exit code 1.

make target/linux/refresh (with mediatek/filogic selected in .config) regenerates this patch's hunk headers/context; commit the resulting change to 063 so the patch-check passes.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • mediatek: add support for BananaPi BPi-R4 Pro 8X — new-device commit; missing the MAC address layout section (see inline note). Hardware spec and installation/flash instructions are present.
  • Minor: the commit message lists the integrated switch as MT7530, MxL86252C whereas the PR body says MT7988A built-in, MxL86252C. Both refer to the same MT7988 internal (mt7530-family) switch, so this is just an inconsistency between the two descriptions, not a code issue.

The remaining kernel DTS patches (046/047/048/049/063/094097) carry upstream From:/Subject:/Signed-off-by: metadata for commits queued for v6.19/v7.0/v7.1 and are backports; their content was not flagged for upstream style. The OpenWrt-local glue (filogic.mk, uboot-mediatek/Makefile, board.d/{01_leds,02_network}, platform.sh, 99_fwenv-store-ethaddr.sh, and the 192/967/968 local patches) is consistent with the sister BPi-R4 entries; no functional issues found. CI status on the head commit is pending with no completed checks.


Generated by Claude Code

DEVICE_DTS := mt7988a-bananapi-bpi-r4-pro-8x
DEVICE_DTS_CONFIG := config-mt7988a-bananapi-bpi-r4-pro-8x
DEVICE_BL2 := comb-4bg
$(call Device/bananapi_bpi-r4-pro-common)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "mediatek: add support..." commit adds a new device (.dts + define Device/bananapi_bpi-r4-pro-8x), so its message should document where each interface's MAC address comes from. The message currently has Hardware spec and Installation, but no MAC address layout section. Since MACs here are seeded into the U-Boot env (99_fwenv-store-ethaddr.sh sets ethaddr from eth0 and eth1addr), a short per-interface note (LAN / WAN / lan5 / lan6, using xx:xx:xx for unit-specific bytes) would let someone understand the addressing without reading the boot scripts.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

@openwrt-ai openwrt-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 new commits.

Commit checks

  • mediatek: add support for BananaPi BPi-R4 Pro 8X — Two issues in the commit message:
    • The Switch: line reads MT7530, MxL86252C, but there is no MT7530 on this board. The DTS uses the MT7988A's built-in switch (&gsw_port0, relabelled lan5) plus the external MaxLinear maxlinear,mxl86252 (switch@16). The PR description itself says MT7988A built-in, MxL86252C. Please correct the commit body to match (MT7988A built-in, MxL86252C).
    • Per the new-device support requirements, the message is missing the MAC address layout section. Hardware specification and (terse) flash instructions are present, but there is no per-interface MAC origin documented (e.g. where LAN/WAN/lan1-6 MACs come from — factory partition + offset, derived from a label, stored via the 99_fwenv-store-ethaddr.sh path this PR extends, etc.). Add one line per interface using xx:xx:xx for the unit-specific bytes.

The uboot-mediatek commit (uboot-mediatek: add support for BananaPi BPi-R4 Pro 8X) is consistent: the three U-Boot/...-{emmc,sdmmc,snand} defines, UBOOT_TARGETS entries, and the configs/mt7988a_bananapi_bpi-r4-pro-8x-*_defconfig files in patch 472 all line up.

Note: the kernel DTS additions (patches 046/047/048/049 and the v7.0/v7.1 fix patches) carry real upstream provenance headers and were not style-reviewed, since those land via the upstream kernel; the model-string fix (063) and mgmtlan5 rename (094) are correctly included. The edits to existing patches 173/186/188 are context refreshes caused by inserting the new ssusb0 label and Makefile entries, not arbitrary changes.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core packages pull request/issue for core (in-tree) packages kernel pull request/issue with Linux kernel related changes target/mediatek pull request/issue for mediatek target

Projects

None yet

Development

Successfully merging this pull request may close these issues.