aboutsummaryrefslogtreecommitdiff
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorShiji Yang <yangshiji66@qq.com>2024-01-16 20:57:35 +0800
committerChristian Marangi <ansuelsmth@gmail.com>2024-01-17 01:14:50 +0100
commit3158a09bef69d6f63bdcbcb69f9a3fcaad1300cd (patch)
treeae6c83d71c97605bd34f609378b8510118ac38c5 /target/linux/ramips
parentcd9088c6f943b685c5060e2acf772ed479710f20 (diff)
ramips: mt7621: convert Ubiquiti devices EEPROM to NVMEM format
-+-------------------------+- | Model | NIC | -+-------------------------+- | All | MT7603 + MT7615 | -+-------------------------+- Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Diffstat (limited to 'target/linux/ramips')
2 files changed, 36 insertions, 8 deletions
diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts
index 36df3ef883..d458b91ca6 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts
+++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts
@@ -61,6 +61,20 @@
label = "factory";
reg = <0x70000 0x10000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory_0: eeprom@0 {
+ reg = <0x0 0x400>;
+ };
+
+ eeprom_factory_8000: eeprom@8000 {
+ reg = <0x8000 0x4da8>;
+ };
+ };
};
eeprom: partition@80000 {
@@ -128,22 +142,20 @@
&pcie0 {
wifi@0,0 {
reg = <0x0 0 0 0 0>;
- mediatek,mtd-eeprom = <&factory 0x0>;
// On newer devices there is a MediaTek MAC in the above
// device EEPROM, so override it with a calculated one.
- nvmem-cells = <&macaddr_eeprom_0 1>;
- nvmem-cell-names = "mac-address";
+ nvmem-cells = <&eeprom_factory_0>, <&macaddr_eeprom_0 1>;
+ nvmem-cell-names = "eeprom", "mac-address";
};
};
&pcie1 {
wifi@0,0 {
reg = <0x0 0 0 0 0>;
- mediatek,mtd-eeprom = <&factory 0x8000>;
// On newer devices there is a MediaTek MAC in the above
// device EEPROM, so override it with a calculated one.
- nvmem-cells = <&macaddr_eeprom_0 2>;
- nvmem-cell-names = "mac-address";
+ nvmem-cells = <&eeprom_factory_8000>, <&macaddr_eeprom_0 2>;
+ nvmem-cell-names = "eeprom", "mac-address";
};
};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts
index b4000464f7..d81a23852d 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts
+++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts
@@ -36,6 +36,20 @@
label = "factory";
reg = <0x70000 0x10000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory_0: eeprom@0 {
+ reg = <0x0 0x400>;
+ };
+
+ eeprom_factory_8000: eeprom@8000 {
+ reg = <0x8000 0x4da8>;
+ };
+ };
};
eeprom: partition@80000 {
@@ -86,9 +100,11 @@
};
&wlan_2g {
- mediatek,mtd-eeprom = <&factory 0x0>;
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
};
&wlan_5g {
- mediatek,mtd-eeprom = <&factory 0x8000>;
+ nvmem-cells = <&eeprom_factory_8000>;
+ nvmem-cell-names = "eeprom";
};