[openwrt/openwrt] ramips: move MAC configs to device dts from wrc-gs-2pci.dtsi

LEDE Commits lede-commits at lists.infradead.org
Fri Feb 11 05:31:49 PST 2022


mans0n pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/34a373c0df0233150b5c87e9c925ca2b2b754a6e

commit 34a373c0df0233150b5c87e9c925ca2b2b754a6e
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sat Feb 5 18:57:14 2022 +0900

    ramips: move MAC configs to device dts from wrc-gs-2pci.dtsi
    
    The locations of MAC addresses in mtd for LAN/WAN on ELECOM WRC-2533GS2
    are changed from the other WRC-GS/GST devices with 2x PCIe. So move the
    related configurations in mt7621_elecom_wrc-gs-2pci.dtsi to dts of each
    model.
    
    - WRC-1750GS
    - WRC-1750GSV
    - WRC-1750GST2
    - WRC-1900GST
    - WRC-2533GST
    - WRC-2533GST2
    
      -> LAN: 0xE000, WAN: 0xE006
    
    - WRC-2533GS2
    
      -> LAN: 0xFFF4, WAN: 0xFFFA
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts  | 24 ++++++++++++++++++++++
 .../ramips/dts/mt7621_elecom_wrc-1750gst2.dts      | 24 ++++++++++++++++++++++
 .../linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts | 24 ++++++++++++++++++++++
 .../linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts | 24 ++++++++++++++++++++++
 .../linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts | 24 ++++++++++++++++++++++
 .../ramips/dts/mt7621_elecom_wrc-2533gst2.dts      | 24 ++++++++++++++++++++++
 .../ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi      | 24 ----------------------
 7 files changed, 144 insertions(+), 24 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts
index 71e4c16ddd..2f82eaf12b 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts
@@ -38,3 +38,27 @@
 		read-only;
 	};
 };
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wan {
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts
index 4b8888cd91..2eda4ba23a 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts
@@ -38,3 +38,27 @@
 		read-only;
 	};
 };
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wan {
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts
index 6719c347f1..7f2f04d9ea 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts
@@ -38,3 +38,27 @@
 		read-only;
 	};
 };
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wan {
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts
index 675e086a82..df66c2772d 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts
@@ -38,3 +38,27 @@
 		read-only;
 	};
 };
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wan {
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts
index dacd540b28..acf6ddab94 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts
@@ -36,3 +36,27 @@
 		read-only;
 	};
 };
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wan {
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts
index a998b61b73..dbf0f4d202 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts
@@ -38,3 +38,27 @@
 		read-only;
 	};
 };
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wan {
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi
index 547d1b1641..98ce0b1994 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi
@@ -2,16 +2,6 @@
 
 #include "mt7621_elecom_wrc-gs.dtsi"
 
-&gmac0 {
-	nvmem-cells = <&macaddr_factory_e000>;
-	nvmem-cell-names = "mac-address";
-};
-
-&wan {
-	nvmem-cells = <&macaddr_factory_e006>;
-	nvmem-cell-names = "mac-address";
-};
-
 &state_default {
 	gpio {
 		groups = "uart3", "jtag", "wdt", "sdhci";
@@ -46,17 +36,3 @@
 		};
 	};
 };
-
-&factory {
-	compatible = "nvmem-cells";
-	#address-cells = <1>;
-	#size-cells = <1>;
-
-	macaddr_factory_e000: macaddr at e000 {
-		reg = <0xe000 0x6>;
-	};
-
-	macaddr_factory_e006: macaddr at e006 {
-		reg = <0xe006 0x6>;
-	};
-};



More information about the lede-commits mailing list