[PATCH] ramips: convert the remaining mtd-mac-address to NVMEM format
Shiji Yang
yangshiji66 at outlook.com
Sun Oct 1 20:42:08 PDT 2023
From: Shiji Yang <yangshiji66 at qq.com>
`mtd-mac-address` has been abandoned. Therefore, convert them to
NVMEM format. This patch also removes some useless mtd-mac-address
properties.
Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
.../ramips/dts/mt7620a_netcore_nw5212.dts | 11 ++++++++-
.../ramips/dts/mt7620n_netgear_pr2000.dts | 15 ++++++++++--
.../ramips/dts/mt7621_tplink_mr600-v2-eu.dts | 1 -
.../ramips/dts/mt7621_zyxel_lte3301-plus.dts | 1 -
.../dts/mt7628an_comfast_cf-wr617ac.dts | 23 +++++++++++--------
5 files changed, 36 insertions(+), 15 deletions(-)
diff --git a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts
index 25287ebc0b..949f686e95 100644
--- a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts
+++ b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts
@@ -93,9 +93,16 @@
};
factory: partition at 40000 {
+ compatible = "nvmem-cells";
label = "factory";
reg = <0x40000 0x10000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
read-only;
+
+ macaddr_factory_28: macaddr at 28 {
+ reg = <0x28 0x6>;
+ };
};
partition at 50000 {
@@ -115,8 +122,10 @@
};
ðernet {
- mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
+
+ nvmem-cells = <&macaddr_factory_28>;
+ nvmem-cell-names = "mac-address";
};
&ehci {
diff --git a/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts b/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts
index 6b4dde5432..97bd5474c2 100644
--- a/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts
+++ b/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts
@@ -110,9 +110,16 @@
};
board_data: partition at f70000 {
+ compatible = "nvmem-cells";
label = "board_data";
reg = <0xf70000 0x10000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
read-only;
+
+ macaddr_board_data_b0: macaddr at b0 {
+ reg = <0xb0 0x6>;
+ };
};
partition at f80000 {
@@ -166,8 +173,10 @@
};
ðernet {
- mtd-mac-address = <&board_data 0xb0>;
mediatek,portmap = "wllll";
+
+ nvmem-cells = <&macaddr_board_data_b0>;
+ nvmem-cell-names = "mac-address";
};
&ehci {
@@ -180,7 +189,9 @@
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
- mtd-mac-address = <&board_data 0xb0>;
+
+ nvmem-cells = <&macaddr_board_data_b0>;
+ nvmem-cell-names = "mac-address";
};
&state_default {
diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
index b7475ec15b..69b89e5810 100644
--- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
@@ -141,7 +141,6 @@
nvmem-cells = <&macaddr_romfile_f100>;
nvmem-cell-names = "mac-address";
mediatek,mtd-eeprom = <&radio 0x0>;
- mtd-mac-address = <&romfile 0xf100>;
ieee80211-freq-limit = <2400000 2500000>;
};
};
diff --git a/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts b/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts
index ed8260534e..120d421b8a 100644
--- a/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts
+++ b/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts
@@ -209,7 +209,6 @@
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
- mtd-mac-address = <&factory 0xfe6e>;
macaddr_factory_fe6e: macaddr at fe6e {
reg = <0xfe6e 0x6>;
diff --git a/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts b/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts
index 81734ed4fb..bec9e95182 100644
--- a/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts
+++ b/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts
@@ -70,9 +70,20 @@
};
factory: partition at 40000 {
+ compatible = "nvmem-cells";
label = "factory";
reg = <0x40000 0x10000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
read-only;
+
+ macaddr_factory_8004: macaddr at 8004 {
+ reg = <0x8004 0x6>;
+ };
+
+ macaddr_factory_e000: macaddr at e000 {
+ reg = <0xe000 0x6>;
+ };
};
partition at 50000 {
@@ -94,7 +105,8 @@
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
- mtd-mac-address = < 0x8004>;
+ nvmem-cells = <&macaddr_factory_8004>;
+ nvmem-cell-names = "mac-address";
mac-address-increment = <2>;
};
};
@@ -112,12 +124,3 @@
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
-
-&factory {
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
- macaddr_factory_e000: macaddr at 4 {
- reg = <0xe000 0x6>;
- };
-};
--
2.39.2
More information about the openwrt-devel
mailing list