Skip to contentSkip to conversation

ARM: dts: bcm470x: set MACs where missing

PATCH In review Rosen Penev 2 participants 12 messages Feb 20

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ARM: dts: bcm470x: set MACs where missing

I believe these predate the bcm,nvram driver, which makes this possible. Downstream OpenWrt currently assigns these in userspace.

Rosen Penev (5):
ARM: dts: bcm4709-linksys-ea9200: set WAN MAC
ARM: dts: bcm47094-linksys-panamera: set WAN MAC
ARM: dts: bcm4709-asus-rt-ac87u: specify switch
ARM: dts: bcm4708-linksys-ea6300-v1: specify switch
ARM: dts: bcm47094-phicomm-k3: specify switch

 .../broadcom/bcm4708-linksys-ea6300-v1.dts    | 45 +++++++++++++++++++
 .../dts/broadcom/bcm4709-asus-rt-ac87u.dts    | 37 +++++++++++++++
 .../dts/broadcom/bcm4709-linksys-ea9200.dts   |  7 +++
 .../broadcom/bcm47094-linksys-panamera.dts    |  7 +++
 .../boot/dts/broadcom/bcm47094-phicomm-k3.dts | 43 ++++++++++++++++++
 5 files changed, 139 insertions(+)

--
2.53.0

#1 lore raw

PATCH 1/5 ARM: dts: bcm4709-linksys-ea9200: set WAN MAC

The MAC address from the stock firmare is offset by 1. Define it properly to avoid having to override it in userspace.

---
 arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts +7 -0
index 2ba5adf2b7e7..7c6ad7787945 100644
@@ -25,6 +25,10 @@ memory@0 {
 	nvram@1c080000 {
 		compatible = "brcm,nvram";
 		reg = <0x1c080000 0x180000>;
+
+		et2macaddr: et2macaddr {
+			#nvmem-cell-cells = <1>;
+		};
 	};
 
 	gpio-keys {
@@ -70,6 +74,9 @@ port@3 {
 
 		port@4 {
 			label = "wan";
+
+			nvmem-cells = <&et2macaddr 1>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port@5 {
Signature · 1 line
2.53.0
#2 lore raw

PATCH 2/5 ARM: dts: bcm47094-linksys-panamera: set WAN MAC

In reply to Rosen Penev

The MAC address from the stock firmare is offset by 1. Define it properly to avoid having to override it in userspace.

---
 arch/arm/boot/dts/broadcom/bcm47094-linksys-panamera.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/broadcom/bcm47094-linksys-panamera.dts +7 -0
index 2b5c80d835e9..74161b76008a 100644
@@ -25,6 +25,10 @@ memory@0 {
 	nvram@1c080000 {
 		compatible = "brcm,nvram";
 		reg = <0x1c080000 0x100000>;
+
+		et2macaddr: et2macaddr {
+			#nvmem-cell-cells = <1>;
+		};
 	};
 
 	gpio-keys {
@@ -230,6 +234,9 @@ port@3 {
 
 		port@4 {
 			label = "wan";
+
+			nvmem-cells = <&et2macaddr 1>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port@5 {
Signature · 1 line
2.53.0
#3 lore raw

PATCH 3/5 ARM: dts: bcm4709-asus-rt-ac87u: specify switch

In reply to Rosen Penev

bcm-ns.dtsi specifies a default layout that is not correct for the RT-AC87U. Also allows setting the WAN MAC address properly.

---
 .../dts/broadcom/bcm4709-asus-rt-ac87u.dts    | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
arch/arm/boot/dts/broadcom/bcm4709-asus-rt-ac87u.dts +37 -0
index 59400217f8c3..f48c44ff01c0 100644
@@ -77,6 +77,43 @@ &usb3_phy {
 	status = "okay";
 };
 
+&srab {
+	status = "okay";
+
+	ports {
+		port@0 {
+			label = "wan";
+
+			nvmem-cells = <&et1macaddr 1>;
+			nvmem-cell-names = "mac-address";
+		};
+
+		port@1 {
+			label = "lan1";
+		};
+
+		port@2 {
+			label = "lan2";
+		};
+
+		port@3 {
+			label = "lan3";
+		};
+
+		port@5 {
+			status = "disabled";
+		};
+
+		port@7 {
+			label = "cpu";
+		};
+
+		port@8 {
+			status = "disabled";
+		};
+	};
+};
+
 &nandcs {
 	partitions {
 		compatible = "fixed-partitions";
Signature · 1 line
2.53.0
#7 lore raw

PATCH 4/5 ARM: dts: bcm4708-linksys-ea6300-v1: specify switch

In reply to Rosen Penev

bcm-ns.dtsi specifies a default layout that is not correct for the EA6300. Also allows setting the WAN MAC address properly.

---
 .../broadcom/bcm4708-linksys-ea6300-v1.dts    | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/broadcom/bcm4708-linksys-ea6300-v1.dts +45 -0
index 0ed25bf71f0d..44cf867b223d 100644
@@ -24,6 +24,10 @@ memory@0 {
 	nvram@1c080000 {
 		compatible = "brcm,nvram";
 		reg = <0x1c080000 0x180000>;
+
+		et0macaddr: et0macaddr {
+			#nvmem-cell-cells = <1>;
+		};
 	};
 
 	gpio-keys {
@@ -46,3 +50,44 @@ button-restart {
 &usb3_phy {
 	status = "okay";
 };
+
+&srab {
+	status = "okay";
+
+	ports {
+		port@0 {
+			label = "lan1";
+		};
+
+		port@1 {
+			label = "lan2";
+		};
+
+		port@2 {
+			label = "lan3";
+		};
+
+		port@3 {
+			label = "lan4";
+		};
+
+		port@4 {
+			label = "wan";
+
+			nvmem-cells = <&et0macaddr 1>;
+			nvmem-cell-names = "mac-address";
+		};
+
+		port@5 {
+			label = "cpu";
+		};
+
+		port@7 {
+			status = "disabled";
+		};
+
+		port@8 {
+			status = "disabled";
+		};
+	};
+};
Signature · 1 line
2.53.0
#8 lore raw

PATCH 5/5 ARM: dts: bcm47094-phicomm-k3: specify switch

In reply to Rosen Penev

bcm-ns.dtsi specifies a default layout that is not correct for the K3. Also allows setting the WAN MAC address properly.

---
 .../boot/dts/broadcom/bcm47094-phicomm-k3.dts | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
arch/arm/boot/dts/broadcom/bcm47094-phicomm-k3.dts +43 -0
index bb1bc4e61bc2..5ed284b8f156 100644
@@ -19,6 +19,12 @@ memory@0 {
 		      <0x88000000 0x18000000>;
 	};
 
+	nvram@1c080000 {
+		et0macaddr: et0macaddr {
+			#nvmem-cell-cells = <1>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -38,6 +44,43 @@ &usb3_phy {
 	status = "okay";
 };
 
+&srab {
+	status = "okay";
+
+	ports {
+		port@0 {
+			label = "lan1";
+		};
+
+		port@1 {
+			label = "lan2";
+		};
+
+		port@2 {
+			label = "lan3";
+		};
+
+		port@3 {
+			label = "wan";
+
+			nvmem-cells = <&et0macaddr 1>;
+			nvmem-cell-names = "mac-address";
+		};
+
+		port@5 {
+			label = "cpu";
+		};
+
+		port@7 {
+			status = "disabled";
+		};
+
+		port@8 {
+			status = "disabled";
+		};
+	};
+};
+
 &nandcs {
 	partitions {
 		compatible = "fixed-partitions";
Signature · 1 line
2.53.0
maintainer
#4 lore raw

Re: [PATCH 3/5] ARM: dts: bcm4709-asus-rt-ac87u: specify switch

In reply to Rosen Penev

pt., 20 lut 2026 o 03:14 Rosen Penev <[email protected]> napisał(a):

Quoted 2 lines

bcm-ns.dtsi specifies a default layout that is not correct for the RT-AC87U. Also allows setting the WAN MAC address properly.

How the basic ports info from bcm-ns.dtsi is not correct for RT-AC87U? I don't see you doing any overwriting or /delete-node/. It seems like a standard NS device with BCM53011 and 8 ports (0, 1, 2, 3, 4, 5, 7, 8), three of them connected to no-SoC Ethernet interfaces.

Except for this unclear commit description, your changes look good, thanks!

Signature · 1 line
Rafał
maintainer
#9 lore raw
In reply to Rosen Penev

pt., 20 lut 2026 o 03:14 Rosen Penev <[email protected]> napisał(a):

Quoted 2 lines

I believe these predate the bcm,nvram driver, which makes this possible. Downstream OpenWrt currently assigns these in userspace.

Changes look good, I just posted one comment about commit description. Thanks for submitting this!

If you check
git log --oneline arch/arm/boot/dts/broadcom/bcm470*dts git log --oneline -- arch/arm/boot/dts/bcm470*dts the prefix always used for NS patches was:
"ARM: dts: BCM5301X: "

I guess it may be preferred / required to follow that.

Signature · 1 line
Rafał
#5 lore raw

Re: [PATCH 3/5] ARM: dts: bcm4709-asus-rt-ac87u: specify switch

In reply to Rafał Miłecki
Quoted 9 lines · Rafał Miłecki

pt., 20 lut 2026 o 03:14 Rosen Penev <[email protected]> napisał(a):

Quoted 2 lines

bcm-ns.dtsi specifies a default layout that is not correct for the RT-AC87U. Also allows setting the WAN MAC address properly.

How the basic ports info from bcm-ns.dtsi is not correct for RT-AC87U? I don't see you doing any overwriting or /delete-node/. It seems like a standard NS device with BCM53011 and 8 ports (0, 1, 2, 3, 4, 5, 7, 8), three of them connected to no-SoC Ethernet interfaces.

This comes from a local OpenWrt patch. I just added the nvmem definition for WAN.

There's also the addition of labels.

Quoted 5 lines

Except for this unclear commit description, your changes look good, thanks!

--
Rafał

#10 lore raw
In reply to Rafał Miłecki
Quoted 8 lines · Rafał Miłecki

pt., 20 lut 2026 o 03:14 Rosen Penev <[email protected]> napisał(a):

Quoted 2 lines

I believe these predate the bcm,nvram driver, which makes this possible. Downstream OpenWrt currently assigns these in userspace.

Changes look good, I just posted one comment about commit description. Thanks for submitting this!

Quoted 7 lines

If you check
git log --oneline arch/arm/boot/dts/broadcom/bcm470*dts git log --oneline -- arch/arm/boot/dts/bcm470*dts the prefix always used for NS patches was:
"ARM: dts: BCM5301X: "

I guess it may be preferred / required to follow that.

I didn't want to make the subject line huge.

Actually in such a case, would it make sense to fold into one commit?

Quoted 3 lines

--
Rafał

maintainer
#6 lore raw

Re: [PATCH 3/5] ARM: dts: bcm4709-asus-rt-ac87u: specify switch

In reply to Rosen Penev

pt., 20 lut 2026 o 22:18 Rosen Penev <[email protected]> napisał(a):

Quoted 5 lines · Rafał Miłecki
Quoted 4 lines

pt., 20 lut 2026 o 03:14 Rosen Penev <[email protected]> napisał(a):

Quoted 2 lines

bcm-ns.dtsi specifies a default layout that is not correct for the RT-AC87U. Also allows setting the WAN MAC address properly.

Quoted 8 lines
Quoted 4 lines

How the basic ports info from bcm-ns.dtsi is not correct for RT-AC87U? I don't see you doing any overwriting or /delete-node/. It seems like a standard NS device with BCM53011 and 8 ports (0, 1, 2, 3, 4, 5, 7, 8), three of them connected to no-SoC Ethernet interfaces.

This comes from a local OpenWrt patch. I just added the nvmem definition for WAN.

There's also the addition of labels.

Then I guess someone else didn't try hard enough for proper description. It happens with downstream code. Sometimes it suffers from lower quality & hacks.

When submitting for upstream you can improve it though :-) You can (and rather should) reword commit description so it's accurate.

Signature · 1 line
Rafał
maintainer
#11 lore raw
In reply to Rosen Penev

pt., 20 lut 2026 o 22:20 Rosen Penev <[email protected]> napisał(a):

Quoted 15 lines · Rafał Miłecki
Quoted 14 lines

pt., 20 lut 2026 o 03:14 Rosen Penev <[email protected]> napisał(a):

Quoted 2 lines

I believe these predate the bcm,nvram driver, which makes this possible. Downstream OpenWrt currently assigns these in userspace.

Changes look good, I just posted one comment about commit description. Thanks for submitting this!

If you check
git log --oneline arch/arm/boot/dts/broadcom/bcm470*dts git log --oneline -- arch/arm/boot/dts/bcm470*dts the prefix always used for NS patches was:
"ARM: dts: BCM5301X: "

Quoted 4 lines
Quoted 1 line

I guess it may be preferred / required to follow that.

I didn't want to make the subject line huge.

Actually in such a case, would it make sense to fold into one commit?

I'll leave it to Florian to comment on. He's more in place to decide than me.

--
Rafał