From fd610a2083b3c778fd8f07156a468e59d66273bd Mon Sep 17 00:00:00 2001
From: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Date: Sun, 16 Jun 2024 09:16:35 +0200
Subject: [PATCH] ramips: elecom_wrc-gs-1pci: cleaning up nvmem-cells
 definitions

Move nvmem-cells definitions to dts files to prevent overwriting

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
---
 target/linux/ramips/dts/mt7621_elecom_wmc-m1267gst2.dts | 4 ++--
 target/linux/ramips/dts/mt7621_elecom_wmc-s1267gs2.dts  | 4 ++--
 target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts | 4 ++--
 target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts  | 4 ++--
 target/linux/ramips/dts/mt7621_elecom_wrc-gs-1pci.dtsi  | 2 --
 5 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_elecom_wmc-m1267gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wmc-m1267gst2.dts
index 42517529af..b75c6fcde1 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wmc-m1267gst2.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wmc-m1267gst2.dts
@@ -50,8 +50,8 @@
 };
 
 &wifi {
-	nvmem-cells = <&macaddr_factory_4 (-1)>;
-	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 (-1)>;
+	nvmem-cell-names = "eeprom", "mac-address";
 };
 
 &factory {
diff --git a/target/linux/ramips/dts/mt7621_elecom_wmc-s1267gs2.dts b/target/linux/ramips/dts/mt7621_elecom_wmc-s1267gs2.dts
index 942fa1cb46..e4ad8bf975 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wmc-s1267gs2.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wmc-s1267gs2.dts
@@ -59,8 +59,8 @@
 };
 
 &wifi {
-	nvmem-cells = <&macaddr_factory_4 (-1)>;
-	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 (-1)>;
+	nvmem-cell-names = "eeprom", "mac-address";
 };
 
 &factory {
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
index 9ed7acac94..6af993832a 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
@@ -50,8 +50,8 @@
 };
 
 &wifi {
-	nvmem-cells = <&macaddr_factory_4 (-1)>;
-	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 (-1)>;
+	nvmem-cell-names = "eeprom", "mac-address";
 };
 
 &factory {
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
index d94d36e9a6..9ed2de2ed9 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
@@ -50,8 +50,8 @@
 };
 
 &wifi {
-	nvmem-cells = <&macaddr_factory_e006 1>;
-	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e006 1>;
+	nvmem-cell-names = "eeprom", "mac-address";
 };
 
 &factory {
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-1pci.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-1pci.dtsi
index 8901680bf5..42c85e7921 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-1pci.dtsi
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-1pci.dtsi
@@ -25,7 +25,5 @@
 	wifi: wifi@0,0 {
 		compatible = "mediatek,mt76";
 		reg = <0x0000 0 0 0 0>;
-		nvmem-cells = <&eeprom_factory_0>;
-		nvmem-cell-names = "eeprom";
 	};
 };
-- 
2.30.2