rockchip: fix assign mac address to nanopi r4s

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 35e62c98a3)
This commit is contained in:
Tianling Shen 2022-09-11 11:35:40 +08:00
parent 162c7e4653
commit 5a3532c584
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -1,4 +1,4 @@
From 43f3999d1836117ab2e601aec9a9e6f292ce4958 Mon Sep 17 00:00:00 2001
From af20b3384e8723077cc6484160b0cf4e9be321de Mon Sep 17 00:00:00 2001
From: Tianling Shen <cnsztl@gmail.com>
Date: Mon, 7 Jun 2021 15:45:37 +0800
Subject: [PATCH] arm64: dts: rockchip: add EEPROM node for NanoPi R4S
@ -8,30 +8,21 @@ stores the MAC address.
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
---
.../boot/dts/rockchip/rk3399-nanopi-r4s.dts | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
@@ -68,6 +68,24 @@
@@ -68,6 +68,15 @@
status = "disabled";
};
+&gmac {
+ nvmem-cells = <&mac_address>;
+ nvmem-cell-names = "mac-address";
+};
+
+&i2c2 {
+ eeprom@51 {
+ compatible = "microchip,24c02", "atmel,24c02";
+ reg = <0x51>;
+ pagesize = <16>;
+ size = <256>;
+
+ mac_address: mac-address@fa {
+ reg = <0xfa 0x06>;
+ };
+ };
+};
+