Skip to contentSkip to conversation

ARM: dts: BCM5301X: AC56U: add nvram node

PATCH New Rosen Penev 2 participants 2 messages Sep 7

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

PATCH 1/1 ARM: dts: BCM5301X: AC56U: add nvram node

Add it and set for gmac0, which is the only GMAC used on this board.

nvram size found from a random bootlog online.

---
 .../boot/dts/broadcom/bcm4708-asus-rt-ac56u.dts    | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dts +14 -0
index c80ac16ad949..550cc67f5ba6 100644
@@ -25,6 +25,15 @@ memory@0 {
 		      <0x88000000 0x08000000>;
 	};
 
+	nvram@1c080000 {
+		compatible = "brcm,nvram";
+		reg = <0x1c080000 0x180000>;
+
+		et0macaddr: et0macaddr {
+			#nvmem-cell-cells = <1>;
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -92,3 +101,8 @@ button-wps {
 &usb3_phy {
 	status = "okay";
 };
+
+gmac0 {
+	nvmem-cells = <&et0macaddr 0>;
+	nvmem-cell-names = "mac-address";
+};
Signature · 1 line
2.55.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The `gmac0` node override at the top level of the DTS file is missing the `&` ampersand prefix…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The gmac0 node override at the top level of the DTS file is missing the & ampersand prefix, causing a syntax error and build failure. --

commit b3e9863f98ae6b1a8bec5d68e2e1b2a375393644
Author: Rosen Penev <[email protected]>

ARM: dts: BCM5301X: AC56U: add nvram node

This patch adds an nvram node to the AC56U device tree based on bootlog sizes. It also sets up the nvmem cells for the gmac0 node to supply its mac address.

Quoted 4 lines
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dts +0 -0
index c80ac16ad9496..550cc67f5ba6c 100644

[ ... ]

arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dts button-wps { · line 105

Quoted 6 lines
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dts +2 -0
@@ -92,3 +101,8 @@ button-wps {
 &usb3_phy {
 	status = "okay";
 };
+
+gmac0 {

[Severity: Low]
Is this missing an ampersand prefix? Overriding an existing node from the top level of the device tree requires an ampersand like &gmac0, otherwise this will cause a syntax error in the Device Tree Compiler and break the build.

Quoted 3 lines
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dts +3 -0
+	nvmem-cells = <&et0macaddr 0>;
+	nvmem-cell-names = "mac-address";
+};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1