From 65cd6a6fec891b0502350c6782f12ee914dfa6a8 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Mon, 2 Oct 2023 10:12:02 +0800 Subject: ramips: convert MT7613 and MT7615 EEPROM to NVMEM format for MT7621 This patch converts MT7613 and MT7615 WiFi calibration data to NVMEM format. The EEPROM size is 0x4da8. Signed-off-by: Shiji Yang --- .../linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts | 43 ++++++++++++---------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts') diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts index 943143ad63..5af9ea28ea 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts @@ -111,9 +111,28 @@ }; factory: partition@100000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x100000 0x40000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; partition@140000 { @@ -163,10 +182,9 @@ wifi0: wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0>; ieee80211-freq-limit = <2400000 6000000>; - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <1>; }; }; @@ -175,10 +193,9 @@ wifi1: wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <3>; }; }; @@ -225,17 +242,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; - - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; - }; -}; -- cgit v1.2.3