Skip to contentSkip to conversation

ARM: dts: BCM5301X: R8000 add NVRAM with MAC address for WAN port

PATCH Applied Rosen Penev 2 participants 2 messages Jul 25 – Jul 27

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

PATCH 1/1 ARM: dts: BCM5301X: R8000 add NVRAM with MAC address for WAN port

The R8000 stores the WAN MAC address at a fixed offset in NVRAM. Define the NVRAM region and attach nvmem-cells to the WAN port so the MAC is assigned automatically by the DSA framework.

Assisted-by opencode:big-pickle
---
 arch/arm/boot/dts/broadcom/bcm4709-netgear-r8000.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/broadcom/bcm4709-netgear-r8000.dts +12 -0
index e85693fba16a..a4b135d37659 100644
@@ -36,6 +36,15 @@ memory@0 {
 		      <0x88000000 0x08000000>;
 	};
 
+	nvram@1c080000 {
+		compatible = "brcm,nvram";
+		reg = <0x1c080000 0x180000>;
+
+		et2macaddr: et2macaddr {
+			#nvmem-cell-cells = <1>;
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -211,6 +220,9 @@ port@3 {
 
 		port@4 {
 			label = "wan";
+
+			nvmem-cells = <&et2macaddr 1>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port@5 {
Signature · 1 line
2.55.0
maintainer Applied
#1 lore raw

From: Florian Fainelli <[email protected]>

Quoted 7 lines · Rosen Penev

The R8000 stores the WAN MAC address at a fixed offset in NVRAM. Define the NVRAM region and attach nvmem-cells to the WAN port so the MAC is assigned automatically by the DSA framework.

Assisted-by opencode:big-pickle

---

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