Skip to contentSkip to conversation

ARM: dts: BCM5301X: add WAN MAC assignments

PATCH Applied Rosen Penev 3 participants 13 messages Feb 25 – Mar 16

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

v2 cover ARM: dts: BCM5301X: add WAN MAC assignments

These are used to specify the proper WAN MAC in dts instead of having to handle in userspace.

v2: remove commits with switch overrides.

Rosen Penev (4):
ARM: dts: BCM5301X: EA9200: set WAN MAC from nvram
ARM: dts: BCM5301X: panamera: set WAN MAC from nvram
ARM: dts: BCM5301X: AC3100: set WAN MAC from nvram
ARM: dts: BCM5301X: AC5300: set WAN MAC from nvram

 arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts    | 7 +++++++
 arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi  | 7 +++++++
 arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac5300.dts   | 3 +++
 arch/arm/boot/dts/broadcom/bcm47094-linksys-panamera.dts | 7 +++++++
 4 files changed, 24 insertions(+)

--
2.53.0

#1 lore raw

PATCH v2 1/4 ARM: dts: BCM5301X: EA9200: set WAN MAC from nvram

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
#3 lore raw

PATCH v2 2/4 ARM: dts: BCM5301X: panamera: set WAN MAC from nvram

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
#5 lore raw

PATCH v2 3/4 ARM: dts: BCM5301X: AC3100: set WAN MAC from nvram

In reply to Rosen Penev

The WAN MAC is offset by 1. Set it to avoid having to do so in userspace.

---
 arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi +7 -0
index 2cfaaabc7a6a..2d2e7e581291 100644
@@ -18,6 +18,10 @@ memory@0 {
 	nvram@1c080000 {
 		compatible = "brcm,nvram";
 		reg = <0x1c080000 0x00180000>;
+
+		et0macaddr: et0macaddr {
+			#nvmem-cell-cells = <1>;
+		};
 	};
 
 	gpio-keys {
@@ -143,6 +147,9 @@ port@3 {
 
 		port@4 {
 			label = "wan";
+
+			nvmem-cells = <&et0macaddr 1>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port@5 {
Signature · 1 line
2.53.0
#7 lore raw

PATCH v2 4/4 ARM: dts: BCM5301X: AC5300: set WAN MAC from nvram

In reply to Rosen Penev

The WAN MAC is offset by 1. Set in dts to avoid having to handle this in userspace.

---
 arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac5300.dts | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac5300.dts +3 -0
index 01ec8c03686a..f7da8e58b8a0 100644
@@ -127,6 +127,9 @@ &srab {
 	ports {
 		port@0 {
 			label = "wan";
+
+			nvmem-cells = <&et0macaddr 1>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port@1 {
Signature · 1 line
2.53.0
#8 lore raw

Re: [PATCHv2 4/4] ARM: dts: BCM5301X: AC5300: set WAN MAC from nvram

kernel test robot noticed the following build errors:

Hi Rosen,

kernel test robot noticed the following build errors:

[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v7.0-rc1 next-20260225] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rosen-Penev/ARM-dts-BCM5301X-EA9200-set-WAN-MAC-from-nvram/20260226-071232
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20260225230827.21715-5-rosenp%40gmail.com
patch subject: [PATCHv2 4/4] ARM: dts: BCM5301X: AC5300: set WAN MAC from nvram
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20260226/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260226/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

also defined at arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac5300.dts:128.10-133.5

>> ERROR: Input tree has errors, aborting (use -f to force output)
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#10 lore raw

Re: [PATCHv2 4/4] ARM: dts: BCM5301X: AC5300: set WAN MAC from nvram

Quoted 11 lines · Florian Fainelli

From: Florian Fainelli <[email protected]>

Quoted 5 lines · Rosen Penev

The WAN MAC is offset by 1. Set in dts to avoid having to handle this in userspace.

---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!

There was a copy/paste error here. et0macaddr should be et1macaddr. Should I resend?

Quoted 2 lines

--
Florian

maintainer
#11 lore raw

Re: [PATCHv2 4/4] ARM: dts: BCM5301X: AC5300: set WAN MAC from nvram

Quoted 9 lines · Rosen Penev
Quoted 7 lines · Florian Fainelli

From: Florian Fainelli <[email protected]>

Quoted 3 lines · Rosen Penev

The WAN MAC is offset by 1. Set in dts to avoid having to handle this in userspace.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!

There was a copy/paste error here. et0macaddr should be et1macaddr. Should I resend?

Fixed it in place for arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac5300.dts only, right?

Signature · 1 line
Florian
#12 lore raw

Re: [PATCHv2 4/4] ARM: dts: BCM5301X: AC5300: set WAN MAC from nvram

Quoted 14 lines · Florian Fainelli
Quoted 12 lines · Rosen Penev
Quoted 10 lines · Florian Fainelli

From: Florian Fainelli <[email protected]>

Quoted 5 lines · Rosen Penev

The WAN MAC is offset by 1. Set in dts to avoid having to handle this in userspace.

---

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!

There was a copy/paste error here. et0macaddr should be et1macaddr. Should I resend?

Fixed it in place for arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac5300.dts only, right?

I believe so, yes.

Quoted 2 lines

--
Florian