mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 22:44:27 -05:00 
			
		
		
		
	It compiles but *doesn't* boot so it isn't enabled yet. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
		
			
				
	
	
		
			83 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			83 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
From 9f01f5cdb548352418b34ce77db02a560fe2913b Mon Sep 17 00:00:00 2001
 | 
						|
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
 | 
						|
Date: Mon, 29 Mar 2021 17:45:14 +0200
 | 
						|
Subject: [PATCH] arm64: dts: broadcom: bcm4908: add Ethernet MAC addr
 | 
						|
MIME-Version: 1.0
 | 
						|
Content-Type: text/plain; charset=UTF-8
 | 
						|
Content-Transfer-Encoding: 8bit
 | 
						|
 | 
						|
On most BCM4908 devices MAC address can be read from the bootloader
 | 
						|
binary section containing device settings. Use NVMEM to describe that.
 | 
						|
 | 
						|
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
 | 
						|
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
 | 
						|
---
 | 
						|
 .../broadcom/bcm4908/bcm4906-netgear-r8000p.dts    | 14 ++++++++++++++
 | 
						|
 .../broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts    | 14 ++++++++++++++
 | 
						|
 2 files changed, 28 insertions(+)
 | 
						|
 | 
						|
--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
 | 
						|
+++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
 | 
						|
@@ -74,6 +74,11 @@
 | 
						|
 	};
 | 
						|
 };
 | 
						|
 
 | 
						|
+&enet {
 | 
						|
+	nvmem-cells = <&base_mac_addr>;
 | 
						|
+	nvmem-cell-names = "mac-address";
 | 
						|
+};
 | 
						|
+
 | 
						|
 &usb_phy {
 | 
						|
 	brcm,ioc = <1>;
 | 
						|
 	status = "okay";
 | 
						|
@@ -130,8 +135,17 @@
 | 
						|
 		#size-cells = <1>;
 | 
						|
 
 | 
						|
 		partition@0 {
 | 
						|
+			compatible = "nvmem-cells";
 | 
						|
 			label = "cferom";
 | 
						|
 			reg = <0x0 0x100000>;
 | 
						|
+
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <1>;
 | 
						|
+			ranges = <0 0x0 0x100000>;
 | 
						|
+
 | 
						|
+			base_mac_addr: mac@106a0 {
 | 
						|
+				reg = <0x106a0 0x6>;
 | 
						|
+			};
 | 
						|
 		};
 | 
						|
 
 | 
						|
 		partition@100000 {
 | 
						|
--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
 | 
						|
+++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
 | 
						|
@@ -44,6 +44,11 @@
 | 
						|
 	};
 | 
						|
 };
 | 
						|
 
 | 
						|
+&enet {
 | 
						|
+	nvmem-cells = <&base_mac_addr>;
 | 
						|
+	nvmem-cell-names = "mac-address";
 | 
						|
+};
 | 
						|
+
 | 
						|
 &usb_phy {
 | 
						|
 	brcm,ioc = <1>;
 | 
						|
 	status = "okay";
 | 
						|
@@ -128,8 +133,17 @@
 | 
						|
 		#size-cells = <1>;
 | 
						|
 
 | 
						|
 		partition@0 {
 | 
						|
+			compatible = "nvmem-cells";
 | 
						|
 			label = "cferom";
 | 
						|
 			reg = <0x0 0x100000>;
 | 
						|
+
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <1>;
 | 
						|
+			ranges = <0 0x0 0x100000>;
 | 
						|
+
 | 
						|
+			base_mac_addr: mac@106a0 {
 | 
						|
+				reg = <0x106a0 0x6>;
 | 
						|
+			};
 | 
						|
 		};
 | 
						|
 
 | 
						|
 		partition@100000 {
 |