[openwrt/openwrt] realtek: switch Netgear RTL8380 devices to NVMEM
LEDE Commits
lede-commits at lists.infradead.org
Fri Feb 20 15:32:19 PST 2026
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3bf55d8bd4eb04f14c39d666e85b778468e6c388
commit 3bf55d8bd4eb04f14c39d666e85b778468e6c388
Author: Jan Hoffmann <jan at 3e8.eu>
AuthorDate: Mon Feb 16 21:36:05 2026 +0100
realtek: switch Netgear RTL8380 devices to NVMEM
Use NVMEM in device tree to set the label and eth0 MAC address based on
the U-Boot environment.
Invididual port MAC addresses and bridge MAC are still handled in the
02_network script to maintain the current assignment.
Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/22055
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/realtek/base-files/etc/board.d/02_network | 10 +++++-----
target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi | 17 +++++++++++++++++
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network
index 528ca4f342..1d1f3e733f 100644
--- a/target/linux/realtek/base-files/etc/board.d/02_network
+++ b/target/linux/realtek/base-files/etc/board.d/02_network
@@ -53,6 +53,11 @@ realtek_setup_macs()
case $board in
edgecore,ecs4100-12ph|\
+ netgear,gs108t-v3|\
+ netgear,gs110tpp-v1|\
+ netgear,gs110tup-v1|\
+ netgear,gs308t-v1|\
+ netgear,gs310tp-v1|\
tplink,sg2008p-v1|\
tplink,sg2210p-v3|\
tplink,sg2452p-v4|\
@@ -119,11 +124,6 @@ realtek_setup_macs()
linksys,lgs310c|\
linksys,lgs328c|\
linksys,lgs352c|\
- netgear,gs108t-v3|\
- netgear,gs110tpp-v1|\
- netgear,gs110tup-v1|\
- netgear,gs308t-v1|\
- netgear,gs310tp-v1|\
netgear,gs750e|\
panasonic,m16eg-pn28160k|\
panasonic,m24eg-pn28240k|\
diff --git a/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi b/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi
index 662f8db652..cd48e2f14a 100644
--- a/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi
+++ b/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi
@@ -8,6 +8,10 @@
/ {
compatible = "realtek,rtl838x-soc";
+ aliases {
+ label-mac-device = ðernet0;
+ };
+
memory at 0 {
device_type = "memory";
reg = <0x0 0x8000000>;
@@ -84,6 +88,14 @@
partition at e0000 {
label = "u-boot-env";
reg = <0x00e0000 0x0010000>;
+
+ nvmem-layout {
+ compatible = "u-boot,env";
+
+ macaddr_ubootenv_ethaddr: ethaddr {
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
partition at f0000 {
@@ -118,6 +130,11 @@
};
};
+ðernet0 {
+ nvmem-cells = <&macaddr_ubootenv_ethaddr 0>;
+ nvmem-cell-names = "mac-address";
+};
+
&switch0 {
ports {
#address-cells = <1>;
More information about the lede-commits
mailing list