Repository navigation
Bpi r3 nvmem mac - #1702
Merged
Merged
Bpi r3 nvmem mac#1702
Conversation
The ports in the bridge had an ipv6 container but the bridge, which carries the LAN address, had none, so the router had no link-local address on the LAN side. Add it on every static factory config with a LAN bridge. Signed-off-by: Mattias Walström <lazzer@gmail.com>
A bound nvmem layout has added all the cells it will ever have, so a missing one is -ENOENT, not -EPROBE_DEFER. Lets a board with an empty VPD come up with random port addresses instead of no Ethernet at all.
Copy /vpd.bin to vpd_addr_r on boards that define it, where the kernel picks it up as nvmem. The region is zeroed first so a removed file does not survive a warm reboot.
Describe the VPD U-Boot loads into RAM as an nvmem-rmem node with an ONIE layout and let each port reference its base MAC offset from it. The kernel then sets a permanent address, so confd can restore it when a custom MAC is removed, which the userspace macaddr script never allowed.
The BPI-R3 VPD now reaches the system through the device tree like any other, so revert 9d67172 and document the aux file instead.
Same scheme as the BPI-R3 it derives from: the VPD U-Boot loads from the aux partition is an nvmem-rmem node, and each port takes its base MAC offset from it.
Keep the hardware offload path off until it is offered as an opt-in feature. Seen some stability issues with it, but most likely it works in some use cases. Signed-off-by: Mattias Walström <lazzer@gmail.com>
mattiaswal
marked this pull request as ready for review
October 13, 2026 12:19
Unlocked page selects from the regmap-irq thread interleave with the driver's locked register sequences and clobber SYS_INT_EN, after which no PHY link change on an MT7531 is ever reported again. Seen on the BPI-R3 rig as ports stuck at no-link after a bounce.
troglobit
approved these changes
Oct 13, 2026
troglobit
left a comment
Contributor
There was a problem hiding this comment.
Very cool, love the AFK discussion today that led up to this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add proper VPD for devices without I2C eeprom, BPI-r3, tactical, other (seems rather common)
A file for this is kept in /mnt/aux/vpd.bin which is supposed to be read by the bootloader.
Description
Checklist
Tick relevant boxes, this PR is-a or has-a: