From d5b4471b85e2c9637a955c3c8c111c7e61a11754 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 10 Oct 2023 09:54:43 +0800 Subject: [PATCH] ramips: convert EEPROM to NVMEM format for JDC RE-SP-01b Signed-off-by: Tianling Shen (cherry picked from commit 3b652ead1e408e34c6778fbd53a3386eeff2b727) --- .../ramips/dts/mt7621_jdcloud_re-sp-01b.dts | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts b/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts index f811e96db7..50ebf5ebc9 100644 --- a/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts +++ b/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts @@ -114,10 +114,25 @@ }; }; - factory: partition@40000 { + partition@40000 { label = "factory"; reg = <0x40000 0x10000>; read-only; + + compatible = "nvmem-cells"; + 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>; + }; + }; }; partition@50000 { @@ -162,16 +177,16 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; }; &pcie1 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_config_4429 0x800000>; - nvmem-cell-names = "mac-address"; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_config_4429 0x800000>; + nvmem-cell-names = "eeprom", "mac-address"; ieee80211-freq-limit = <5000000 6000000>; }; };