From 9ac891f8c44124e931c15f1257347cd8ba311a19 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Mon, 2 Oct 2023 10:12:02 +0800 Subject: ramips: convert MT7915 EEPROM to NVMEM format This patch converts MT7915 WiFi calibration data to NVMEM format. The EEPROM size is 0xe00. Signed-off-by: Shiji Yang --- target/linux/ramips/dts/mt7621_totolink_x5000r.dts | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'target/linux/ramips/dts/mt7621_totolink_x5000r.dts') diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts index 79667caf73..23d47d6ea3 100644 --- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts @@ -70,9 +70,24 @@ }; factory: partition@40000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; partition@50000 { @@ -92,7 +107,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0000>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; mediatek,disable-radar-background; }; }; @@ -147,17 +163,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