From 0e6179e50e4d644950e2fbec9b7ab5ab942d019e Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Tue, 16 Jan 2024 19:56:05 +0800 Subject: ramips: mt7621: convert MT7915 EEPROM to NVMEM format Some MT7915 calibration data consists of two parts. The first part "eeprom" size is 0xe00. The second part "precal" size is 0x19c10. Though some devices may not have precal data, it's better to assume that precal data exists as no users/developers confirm it. On the other hand, some devices definitely do not contain precal data because the EEPROM partition size is smaller than the precal NVMEM cell size. Signed-off-by: Shiji Yang --- target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts') diff --git a/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts b/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts index c809cb0c0b..ffefd07d85 100644 --- a/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts @@ -161,6 +161,20 @@ label = "radio"; reg = <0x90000 0x20000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + precal_radio_e10: precal@e10 { + reg = <0xe10 0x19c10>; + }; + }; }; partition@b0000 { @@ -186,9 +200,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&radio 0x0>; - nvmem-cells = <&macaddr_rom_file_f100 0>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_0>, <&precal_radio_e10>, <&macaddr_rom_file_f100 0>; + nvmem-cell-names = "eeprom", "precal", "mac-address"; mediatek,disable-radar-background; }; }; -- cgit v1.2.3