From 2c02a9b9e4fb700e1cfc5ffd91cd8fe59544c327 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Mon, 2 Oct 2023 10:12:02 +0800 Subject: ramips: convert MT7610 and MT7612 EEPROM to NVMEM format for MT7621 This patch converts MT7610 and MT7612 WiFi calibration data to NVMEM format. The EEPROM size is 0x200. Signed-off-by: Shiji Yang --- target/linux/ramips/dts/mt7621_firefly_firewrt.dts | 31 +++++++++++++--------- 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'target/linux/ramips/dts/mt7621_firefly_firewrt.dts') diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts index 46954b616f..acc9e9865f 100644 --- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts +++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.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 0x200>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; partition@50000 { @@ -91,7 +106,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -99,7 +115,8 @@ &pcie1 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0000>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <2400000 2500000>; }; }; @@ -151,13 +168,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; -}; -- cgit v1.2.3