From: Rosen Penev Date: Tue, 7 Nov 2023 23:55:58 +0000 (-0800) Subject: ramips: mt7621: convert to nvmem-layout X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f4c33d098fdfccc741c33cfde134a2911347d17a;p=openwrt%2Fstaging%2Fblogic.git ramips: mt7621: convert to nvmem-layout Allows replacing mac-address-increment with mac-base. Signed-off-by: Rosen Penev --- diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index fe04648f0e24..f797393f0438 100644 --- a/target/linux/ramips/dts/mt7621_adslr_g7.dts +++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts @@ -64,23 +64,26 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_e00c: macaddr@e00c { - reg = <0xe00c 0x6>; + macaddr_factory_e00c: macaddr@e00c { + reg = <0xe00c 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts index 30a03824627e..a846e5d8d5dd 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -71,23 +71,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts b/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts index 1ef1f7fb31f0..e07cddefc580 100644 --- a/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts +++ b/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts @@ -117,7 +117,6 @@ }; partition@50000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x50000 0x10000>; read-only; diff --git a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts index cc048d44879b..2bc0fad9c58d 100644 --- a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts +++ b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts @@ -245,6 +245,20 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; partition@50000 { @@ -263,17 +277,3 @@ &uartlite3 { status = "okay"; }; - -&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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi b/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi index 4f06271239b0..35274afbf3ac 100644 --- a/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi +++ b/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi @@ -107,19 +107,22 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts index 1d55453c8d53..fbf276c320e1 100644 --- a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts +++ b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts @@ -130,15 +130,18 @@ }; 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 0x4da8>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi b/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi index 8e05c3af50d7..7b3f316a8c44 100644 --- a/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi +++ b/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi @@ -79,25 +79,28 @@ }; factory: partition@200000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x200000 0x100000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - /* We keep the block below to prevent eth0 MAC - * from randomization. Unique WAN, LAN, WLAN MACs - * are stored in u-boot-env. - */ + /* We keep the block below to prevent eth0 MAC + * from randomization. Unique WAN, LAN, WLAN MACs + * are stored in u-boot-env. + */ - /* Default Ralink MAC (00:0c:43:28:80:xx) */ - macaddr_factory_fff0: macaddr@fff0 { - reg = <0xfff0 0x6>; + /* Default Ralink MAC (00:0c:43:28:80:xx) */ + macaddr_factory_fff0: macaddr@fff0 { + reg = <0xfff0 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi index bea0b79df5eb..658164fe08be 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi @@ -78,6 +78,16 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + }; }; partition@50000 { @@ -110,13 +120,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts b/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts index bc623067a8a5..d9fdb3b675f8 100644 --- a/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts +++ b/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts @@ -136,23 +136,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts b/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts index 47df1dbe57da..34e64182cf56 100644 --- a/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts +++ b/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts @@ -110,23 +110,26 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_8004: macaddr@8004 { - reg = <0x8004 0x6>; + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts index 322a96b700ae..6790b37d1aef 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts @@ -86,27 +86,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi index bb9171bbac33..7c607f962dbb 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi +++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi @@ -80,23 +80,26 @@ }; factory: partition@1e0000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x1e0000 0x100000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + 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_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts index d740d00c6dff..d18a503b85f5 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts @@ -99,12 +99,14 @@ reg = <0x1e0000 0x100000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts b/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts index 3191692e4ef3..8466cda587bf 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts @@ -91,12 +91,14 @@ reg = <0x1e0000 0x100000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts index 77e3fffcc18a..cfc8330fe5c5 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts @@ -105,27 +105,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; - macaddr_factory_8004: macaddr@8004 { - reg = <0x8004 0x6>; + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts index eb64bd0bfde0..24fb75778154 100644 --- a/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts @@ -94,24 +94,27 @@ }; factory: partition@200000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x200000 0x100000>; - #address-cells = <1>; - #size-cells = <1>; sercomm,scpart-id = <2>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_21000: macaddr@21000 { - reg = <0x21000 0x6>; + macaddr_factory_21000: macaddr@21000 { + reg = <0x21000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts index b07346bacb46..2a1f2758158c 100644 --- a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts @@ -100,24 +100,27 @@ }; factory: partition@200000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x200000 0x100000>; - #address-cells = <1>; - #size-cells = <1>; sercomm,scpart-id = <2>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_21000: macaddr@21000 { - reg = <0x21000 0x6>; + macaddr_factory_21000: macaddr@21000 { + reg = <0x21000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_belkin_rt1800.dts b/target/linux/ramips/dts/mt7621_belkin_rt1800.dts index 2e5fcc8bca7e..e7acc55e500f 100644 --- a/target/linux/ramips/dts/mt7621_belkin_rt1800.dts +++ b/target/linux/ramips/dts/mt7621_belkin_rt1800.dts @@ -86,15 +86,18 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x100000 0x80000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_bolt_arion.dts b/target/linux/ramips/dts/mt7621_bolt_arion.dts index 826d3f928aaf..354c1c531457 100644 --- a/target/linux/ramips/dts/mt7621_bolt_arion.dts +++ b/target/linux/ramips/dts/mt7621_bolt_arion.dts @@ -100,23 +100,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts index 795fe256b3c3..f176691aacc8 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts @@ -133,19 +133,22 @@ }; 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 0x400>; - }; + 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 0x200>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts index 4ceb4e54e0a2..81933ba21d81 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -131,23 +131,26 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts index b6db48a347ac..e1b82816f0cf 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -133,23 +133,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts index 80600470e77e..106b16573b39 100644 --- a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts +++ b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts @@ -90,6 +90,16 @@ label = "factory"; reg = <0x50000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + }; }; partition@90000 { @@ -101,16 +111,6 @@ }; }; -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; -}; - &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts b/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts index f26e6626f540..a915a5d79f0f 100644 --- a/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts +++ b/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts @@ -107,7 +107,6 @@ factory: partition@40000 { label = "factory"; - compatible = "nvmem-cells"; reg = <0x40000 0x10000>; read-only; diff --git a/target/linux/ramips/dts/mt7621_cudy_m1800.dts b/target/linux/ramips/dts/mt7621_cudy_m1800.dts index 314fdb206ca1..759abe7ba586 100644 --- a/target/linux/ramips/dts/mt7621_cudy_m1800.dts +++ b/target/linux/ramips/dts/mt7621_cudy_m1800.dts @@ -148,12 +148,14 @@ reg = <0x1ff0000 0x10000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_bdinfo_de00: macaddr@de00 { - reg = <0xde00 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts index fcc16c31b518..ab9f7c650719 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts @@ -85,19 +85,22 @@ }; 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 0x400>; - }; + 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 0x200>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; @@ -120,15 +123,18 @@ }; bdinfo: partition@ff0000 { - compatible = "nvmem-cells"; label = "bdinfo"; reg = <0xff0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_bdinfo_de00: macaddr@de00 { - reg = <0xde00 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts index afa13973d571..64beabea9392 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts @@ -132,19 +132,22 @@ }; 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 0x400>; - }; + 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>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; @@ -167,15 +170,18 @@ }; bdinfo: partition@ff0000 { - compatible = "nvmem-cells"; label = "bdinfo"; reg = <0xff0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_bdinfo_de00: macaddr@de00 { - reg = <0xde00 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_x6-v1.dts b/target/linux/ramips/dts/mt7621_cudy_x6-v1.dts index cfae15e5659a..3ba72d5f971f 100644 --- a/target/linux/ramips/dts/mt7621_cudy_x6-v1.dts +++ b/target/linux/ramips/dts/mt7621_cudy_x6-v1.dts @@ -31,12 +31,14 @@ reg = <0x1ff0000 0x10000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_bdinfo_de00: macaddr@de00 { - reg = <0xde00 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_x6-v2.dts b/target/linux/ramips/dts/mt7621_cudy_x6-v2.dts index 16fa15befc4d..f4d50d42e72c 100644 --- a/target/linux/ramips/dts/mt7621_cudy_x6-v2.dts +++ b/target/linux/ramips/dts/mt7621_cudy_x6-v2.dts @@ -31,12 +31,14 @@ reg = <0xff0000 0x10000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_bdinfo_de00: macaddr@de00 { - reg = <0xde00 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts index a25787b71b87..82160cff03f2 100644 --- a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts +++ b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts @@ -115,27 +115,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts index 3d27b0a942bd..29c212671ccc 100644 --- a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts +++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts @@ -129,27 +129,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts index 818d2d8c4131..73f6247b4778 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts @@ -129,12 +129,14 @@ reg = <0x100000 0x80000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; 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 5af9ea28ea49..23995079fdb5 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts @@ -111,27 +111,30 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts index 7cd4a92aa7df..8e5e35945a64 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts @@ -108,23 +108,26 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts index 36758567807a..747d1de18a06 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts @@ -105,27 +105,30 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts index 36d22046a95a..451722743d96 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts @@ -83,23 +83,26 @@ }; radio: partition@34000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0x34000 0x4000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_radio_4: macaddr@4 { - reg = <0x4 0x6>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x200>; - }; + macaddr_radio_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x200>; + }; - eeprom_radio_2000: eeprom@2000 { - reg = <0x2000 0x200>; + eeprom_radio_2000: eeprom@2000 { + reg = <0x2000 0x200>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi index fee88647775d..9d770dda2f70 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -76,27 +76,30 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi index cc979df26a67..a933b1492509 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi @@ -93,19 +93,22 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_flash-16m-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_flash-16m-a1.dtsi index a8e518cae46a..021c9e17c658 100644 --- a/target/linux/ramips/dts/mt7621_dlink_flash-16m-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_flash-16m-a1.dtsi @@ -26,27 +26,30 @@ }; factory: partition@40000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x20000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_flash-16m-r1.dtsi b/target/linux/ramips/dts/mt7621_dlink_flash-16m-r1.dtsi index dddd39ceaae4..93380e306747 100644 --- a/target/linux/ramips/dts/mt7621_dlink_flash-16m-r1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_flash-16m-r1.dtsi @@ -26,31 +26,34 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dual-q_h721.dts b/target/linux/ramips/dts/mt7621_dual-q_h721.dts index 2a18b3982d91..cafda8e1ecc6 100644 --- a/target/linux/ramips/dts/mt7621_dual-q_h721.dts +++ b/target/linux/ramips/dts/mt7621_dual-q_h721.dts @@ -122,12 +122,14 @@ reg = <0x40000 0x10000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_edimax_re23s.dts b/target/linux/ramips/dts/mt7621_edimax_re23s.dts index c96292be33f1..80a271f6e33d 100644 --- a/target/linux/ramips/dts/mt7621_edimax_re23s.dts +++ b/target/linux/ramips/dts/mt7621_edimax_re23s.dts @@ -86,23 +86,26 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_8004: macaddr@8004 { - reg = <0x8004 0x6>; + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi index 4aac3fb6d7ce..464e2a744419 100644 --- a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi +++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi @@ -81,23 +81,26 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts index 6a9531eb3320..b280790d64f0 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -136,23 +136,26 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts index 81ace64e44bc..9ed7acac9429 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts @@ -50,25 +50,28 @@ }; &wifi { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; &factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; + reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; + }; - macaddr_factory_fff4: macaddr@fff4 { - reg = <0xfff4 0x6>; - }; + macaddr_factory_fff4: macaddr@fff4 { + reg = <0xfff4 0x6>; + }; - macaddr_factory_fffa: macaddr@fffa { - reg = <0xfffa 0x6>; + macaddr_factory_fffa: macaddr@fffa { + reg = <0xfffa 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts index cb2e20279375..d7510c292b7e 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts @@ -50,21 +50,24 @@ }; &wifi { - nvmem-cells = <&macaddr_factory_e006>; + nvmem-cells = <&macaddr_factory_e006 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + compatible = "mac-base"; + reg = <0xe006 0x6>; + #nvmem-cell-cells = <1>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts index 8450af590740..c01533fafdd0 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts @@ -50,15 +50,17 @@ }; &factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts index a57a4290affa..4157fb6c1351 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts @@ -50,15 +50,17 @@ }; &factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts index f01f6fc25f03..d978ff823884 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts @@ -50,15 +50,17 @@ }; &factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts index ec433e265de3..5e3b47e2746d 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts @@ -50,15 +50,17 @@ }; &factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi index 7096b015ef87..618b07e798de 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi @@ -100,19 +100,22 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gs2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gs2.dts index 7e88f7be04f4..77fcb8c4298b 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gs2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gs2.dts @@ -50,15 +50,17 @@ }; &factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_fff4: macaddr@fff4 { - reg = <0xfff4 0x6>; - }; + macaddr_factory_fff4: macaddr@fff4 { + reg = <0xfff4 0x6>; + }; - macaddr_factory_fffa: macaddr@fffa { - reg = <0xfffa 0x6>; + macaddr_factory_fffa: macaddr@fffa { + reg = <0xfffa 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts index 1d174006bd0d..481734a51c1b 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts @@ -48,15 +48,17 @@ }; &factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts index b71a2b4390f1..e7c06ff359dc 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts @@ -50,15 +50,17 @@ }; &factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi index 2c60f3d8b6b9..30b8d4e0104c 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi @@ -145,19 +145,22 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_etisalat_s3.dts b/target/linux/ramips/dts/mt7621_etisalat_s3.dts index d63be92c7853..90309dad0a12 100644 --- a/target/linux/ramips/dts/mt7621_etisalat_s3.dts +++ b/target/linux/ramips/dts/mt7621_etisalat_s3.dts @@ -100,24 +100,27 @@ }; factory: partition@200000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x200000 0x100000>; - #address-cells = <1>; - #size-cells = <1>; sercomm,scpart-id = <2>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_21000: macaddr@21000 { - reg = <0x21000 0x6>; + macaddr_factory_21000: macaddr@21000 { + reg = <0x21000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts index acc9e9865f9c..a9d9da872e3b 100644 --- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts +++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts @@ -70,23 +70,26 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts index a87f82b6811a..778b2f07981b 100644 --- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts +++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts @@ -68,23 +68,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts index 1565666a5d82..94a9b1c092b6 100644 --- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts +++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts @@ -88,19 +88,22 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_4000: macaddr@4000 { - reg = <0x4000 0x6>; + macaddr_factory_4000: macaddr@4000 { + reg = <0x4000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index 5d28e22776c8..6bdba25b2b4c 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -75,6 +75,16 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + }; }; partition@50000 { @@ -125,13 +135,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts index d4998113456d..9a2cffeb97cf 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts @@ -95,6 +95,16 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + }; }; partition@50000 { @@ -151,13 +161,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi b/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi index afb188dff455..59b49fbefc8b 100644 --- a/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi +++ b/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi @@ -97,15 +97,18 @@ }; factory: partition@180000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x0180000 0x0080000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi index afda347ee736..6d9608d18f8e 100644 --- a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi +++ b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi @@ -103,19 +103,22 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x0100000 0x0080000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; - macaddr_factory_8004: macaddr@8004 { - reg = <0x8004 0x6>; + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts b/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts index 94b211ab7a71..7bec688f866f 100644 --- a/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts +++ b/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts @@ -75,27 +75,30 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; - macaddr_factory_8004: macaddr@8004 { - reg = <0x8004 0x6>; + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts index 99bd01c6d938..41ed5088c0ab 100644 --- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts +++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts @@ -47,15 +47,18 @@ }; factory: partition@40000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts index 63c4f5f6b24b..a21a6a455b3a 100644 --- a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts +++ b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts @@ -81,19 +81,22 @@ }; 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 0x400>; - }; + 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 0x200>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts index fc548352d54c..9b9a98310877 100644 --- a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts +++ b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts @@ -93,23 +93,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_humax_e10.dts b/target/linux/ramips/dts/mt7621_humax_e10.dts index ac13b4a9c593..be5f23ca7d6e 100644 --- a/target/linux/ramips/dts/mt7621_humax_e10.dts +++ b/target/linux/ramips/dts/mt7621_humax_e10.dts @@ -89,27 +89,30 @@ }; factory: partition@40000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x30000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_10007: macaddr@10007 { - reg = <0x10007 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_10007: macaddr@10007 { + reg = <0x10007 0x6>; + }; - macaddr_factory_1000d: macaddr@1000d { - reg = <0x1000d 0x6>; + macaddr_factory_1000d: macaddr@1000d { + reg = <0x1000d 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index b08939a451d0..b93102163fbf 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -89,36 +89,42 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; iNIC_rf: partition@50000 { - compatible = "nvmem-cells"; label = "iNIC_rf"; reg = <0x50000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_iNIC_rf_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_iNIC_rf_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_iNIC_rf_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_iNIC_rf_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts index b9357632e1ac..b9b901a6ce00 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts @@ -119,7 +119,6 @@ }; partition@100000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x100000 0x80000>; read-only; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts index 19868fa078b4..9680aadfbbf9 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts @@ -81,26 +81,29 @@ }; factory: partition@200000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x200000 0x200000>; - #address-cells = <1>; - #size-cells = <1>; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_1e000: macaddr@1e000 { - reg = <0x1e000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_1e000: macaddr@1e000 { + reg = <0x1e000 0x6>; + }; - macaddr_factory_1e006: macaddr@1e006 { - reg = <0x1e006 0x6>; + macaddr_factory_1e006: macaddr@1e006 { + reg = <0x1e006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts index f2cd28ad1c7d..5b9d0d59b214 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -89,19 +89,22 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi index 4b42fcb7de72..f25d2db9b309 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi +++ b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi @@ -80,6 +80,20 @@ factory: partition@200000 { label = "factory"; reg = <0x0200000 0x0100000>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; partition@300000 { @@ -180,17 +194,3 @@ &xhci { status = "disabled"; }; - -&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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts index 6729e94cc5a1..1c46f57e584b 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts @@ -93,23 +93,26 @@ }; factory: partition@40000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x040000 0x010000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts b/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts index fc51b9ac4f04..6b7790213672 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts @@ -73,12 +73,14 @@ reg = <0x0 0x20000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_uboot_1fc40: macaddr@1fc40 { - reg = <0x1fc40 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc40: macaddr@1fc40 { + reg = <0x1fc40 0x6>; + }; }; }; @@ -89,15 +91,18 @@ }; factory: partition@30000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x30000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts index 0faf24e7b05d..3bf0600e5fec 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts @@ -63,19 +63,22 @@ #size-cells = <1>; uboot: partition@0 { - compatible = "nvmem-cells"; label = "u-boot"; reg = <0x0 0x20000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_uboot_1fc20: macaddr@1fc20 { - reg = <0x1fc20 0x6>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; - macaddr_uboot_1fc40: macaddr@1fc40 { - reg = <0x1fc40 0x6>; + macaddr_uboot_1fc40: macaddr@1fc40 { + reg = <0x1fc40 0x6>; + }; }; }; @@ -86,19 +89,22 @@ }; factory: partition@30000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x30000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x200>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004t.dts b/target/linux/ramips/dts/mt7621_iptime_a3004t.dts index 000657c8667e..92e8eab918c5 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3004t.dts @@ -76,23 +76,26 @@ }; factory: partition@a0000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0xa0000 0x20000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; - macaddr_factory_8004: macaddr@8004 { - reg = <0x8004 0x6>; + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi index db7743f137ba..ef58382ab61c 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi +++ b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi @@ -74,19 +74,22 @@ #size-cells = <1>; uboot: partition@0 { - compatible = "nvmem-cells"; label = "u-boot"; reg = <0x0 0x20000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_uboot_1fc20: macaddr@1fc20 { - reg = <0x1fc20 0x6>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; - macaddr_uboot_1fc40: macaddr@1fc40 { - reg = <0x1fc40 0x6>; + macaddr_uboot_1fc40: macaddr@1fc40 { + reg = <0x1fc40 0x6>; + }; }; }; @@ -97,19 +100,22 @@ }; factory: partition@30000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x30000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts index dc9033c39405..7be11315c540 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -68,19 +68,22 @@ #size-cells = <1>; uboot: partition@0 { - compatible = "nvmem-cells"; label = "u-boot"; reg = <0x0 0x20000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_uboot_1fc20: macaddr@1fc20 { - reg = <0x1fc20 0x6>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; - macaddr_uboot_1fc40: macaddr@1fc40 { - reg = <0x1fc40 0x6>; + macaddr_uboot_1fc40: macaddr@1fc40 { + reg = <0x1fc40 0x6>; + }; }; }; @@ -91,19 +94,22 @@ }; factory: partition@30000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x30000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts index 554d73ce3d4c..38b1c196a100 100644 --- a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts @@ -77,12 +77,14 @@ reg = <0x100000 0x80000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts index 5714a57c4e42..fd9bd66bf8c7 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts @@ -84,27 +84,30 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts index 4f480ab2c8fd..349773e22cd9 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -88,23 +88,26 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x100000 0x80000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_3fff4: macaddr@3fff4 { - reg = <0x3fff4 0x6>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + macaddr_factory_3fff4: macaddr@3fff4 { + reg = <0x3fff4 0x6>; + }; - macaddr_factory_3fffa: macaddr@3fffa { - reg = <0x3fffa 0x6>; + macaddr_factory_3fffa: macaddr@3fffa { + reg = <0x3fffa 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_y2.dts b/target/linux/ramips/dts/mt7621_jcg_y2.dts index 9e50d9b3ed77..2cec1af23e20 100644 --- a/target/linux/ramips/dts/mt7621_jcg_y2.dts +++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts @@ -62,23 +62,26 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts b/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts index 8f617484533e..264c908c45b6 100644 --- a/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts +++ b/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts @@ -123,27 +123,30 @@ }; factory: partition@40000 { - compatible = "nvmem-cells"; label = "rf-eeprom"; reg = <0x40000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_400: eeprom@400 { - reg = <0x400 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + eeprom_factory_400: eeprom@400 { + reg = <0x400 0x4da8>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts index a6a7fc9f427c..dd8d22445429 100644 --- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts +++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts @@ -104,27 +104,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_e5600.dts b/target/linux/ramips/dts/mt7621_linksys_e5600.dts index c1b8048f0cf2..3f23aa69a432 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e5600.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e5600.dts @@ -83,19 +83,22 @@ }; factory: partition@c0000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0xc0000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + 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>; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_e7350.dts b/target/linux/ramips/dts/mt7621_linksys_e7350.dts index 4451e5e3f3ea..2bce2d759019 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e7350.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e7350.dts @@ -80,15 +80,18 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x100000 0x80000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_re6500.dts b/target/linux/ramips/dts/mt7621_linksys_re6500.dts index 5b295a06a735..3a6822452685 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts @@ -71,23 +71,26 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_2e: macaddr@2e { - reg = <0x2e 0x6>; + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_re7000.dts b/target/linux/ramips/dts/mt7621_linksys_re7000.dts index c5b6ecc233e1..9b9c84a04876 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re7000.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re7000.dts @@ -84,23 +84,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_2e: macaddr@2e { - reg = <0x2e 0x6>; + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts index 557abcc21af2..3874953e4520 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -97,6 +97,16 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_5: macaddr@5 { + reg = <0x5 0x6>; + }; + }; }; partition@50000 { @@ -160,13 +170,3 @@ &pcie { status = "okay"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_5: macaddr@5 { - reg = <0x5 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_meig_slt866.dts b/target/linux/ramips/dts/mt7621_meig_slt866.dts index 19d2f0f6fc42..d364a917942e 100644 --- a/target/linux/ramips/dts/mt7621_meig_slt866.dts +++ b/target/linux/ramips/dts/mt7621_meig_slt866.dts @@ -117,7 +117,6 @@ label = "Factory"; reg = <0x40000 0x10000>; read-only; - compatible = "nvmem-cells"; nvmem-layout { compatible = "fixed-layout"; @@ -144,7 +143,6 @@ label = "m_custom"; reg = <0xfe0000 0x20000>; read-only; - compatible = "nvmem-cells"; nvmem-layout { compatible = "fixed-layout"; diff --git a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts index ebfc370caf37..b538805851db 100644 --- a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts +++ b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts @@ -75,6 +75,16 @@ label = "config"; reg = <0xfa0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; + }; }; partition@fb0000 { @@ -153,13 +163,3 @@ function = "gpio"; }; }; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_8: macaddr@8 { - reg = <0x8 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts index dc70414da9c2..906391807810 100644 --- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts +++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts @@ -58,22 +58,25 @@ }; factory: partition@40000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x200>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts index 5872a710b886..3065970807ba 100644 --- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts +++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts @@ -78,23 +78,26 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts index 0ddcd6c35ed1..41e603c16058 100644 --- a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts +++ b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts @@ -118,23 +118,26 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_r6220.dts b/target/linux/ramips/dts/mt7621_netgear_r6220.dts index f960d8f66fee..132210cb0ce9 100644 --- a/target/linux/ramips/dts/mt7621_netgear_r6220.dts +++ b/target/linux/ramips/dts/mt7621_netgear_r6220.dts @@ -42,7 +42,6 @@ }; factory: partition@2e00000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x2e00000 0x100000>; read-only; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index 5c4512b508ef..1589d2de4b8e 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -343,6 +343,16 @@ reg = <0x4600000 0x200000>; sercomm,scpart-id = <16>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + }; }; partition@4800000 { @@ -430,13 +440,3 @@ }; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi index cd9582e54120..87fe42c7774e 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -270,6 +270,16 @@ reg = <0x4600000 0x200000>; sercomm,scpart-id = <16>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + }; }; partition@4800000 { @@ -357,13 +367,3 @@ }; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts index 53a4449b8bfe..48a3302e79c4 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wac104.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts @@ -96,23 +96,26 @@ }; factory: partition@2e00000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x2e00000 0x100000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_wax202.dts b/target/linux/ramips/dts/mt7621_netgear_wax202.dts index eb7d1bb7e5fe..c0c3500af25a 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wax202.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wax202.dts @@ -113,15 +113,18 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x100000 0x80000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts index 29f111b572d9..c58e32377e80 100644 --- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts +++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts @@ -63,27 +63,30 @@ }; 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 0x200>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts index 56711332556c..880a04710bd3 100644 --- a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts +++ b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts @@ -77,15 +77,18 @@ }; 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 0x4da8>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; }; }; @@ -100,12 +103,14 @@ reg = <0xfe0000 0x10000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_bdinfo_9: macaddr@9 { - reg = <0x9 0x6>; + macaddr_bdinfo_9: macaddr@9 { + reg = <0x9 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts index fd3b42f6edbd..85cf8ecfd3ef 100644 --- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts @@ -70,27 +70,30 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts index 1da6d2cca125..93e7280b4c06 100644 --- a/target/linux/ramips/dts/mt7621_planex_vr500.dts +++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts @@ -63,6 +63,20 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; partition@50000 { @@ -124,17 +138,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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts index 6dd4b5813997..4a9e420370a4 100644 --- a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts +++ b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts @@ -81,8 +81,6 @@ reg = <0x80000 0x80000>; read-only; - compatible = "nvmem-cells"; - nvmem-layout { compatible = "fixed-layout"; #address-cells = <1>; @@ -103,19 +101,22 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts b/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts index 3cf29d172952..b01a976c1869 100644 --- a/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts +++ b/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts @@ -68,23 +68,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts index e5946af9094f..c3c5a2ff4a82 100644 --- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts +++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts @@ -72,27 +72,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi b/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi index 479ea067a7b1..67f70a3b60c5 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi +++ b/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi @@ -98,24 +98,27 @@ }; factory: partition@200000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x200000 0x100000>; sercomm,scpart-id = <2>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_21000: macaddr@21000 { - reg = <0x21000 0x6>; + macaddr_factory_21000: macaddr@21000 { + reg = <0x21000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502.dts b/target/linux/ramips/dts/mt7621_sercomm_na502.dts index 7fe0258223b8..576273cc99a0 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502.dts @@ -125,22 +125,25 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x100000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502s.dts b/target/linux/ramips/dts/mt7621_sercomm_na502s.dts index d36440fd0abf..651466a3a466 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502s.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502s.dts @@ -229,22 +229,25 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x100000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi b/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi index 11cf7752aba5..6344f477e8e5 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi +++ b/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi @@ -177,23 +177,26 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x100000 0x100000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x200>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_1000: macaddr@1000 { - reg = <0x1000 0x6>; + macaddr_factory_1000: macaddr@1000 { + reg = <0x1000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts index 9dbcbaa3c0c0..7383ba1e2094 100644 --- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts +++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts @@ -146,27 +146,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts index 1cc9b45c403a..51425b9a1569 100644 --- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts +++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts @@ -74,27 +74,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts index 9e498b78ed7b..65f33f615bec 100644 --- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts +++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts @@ -113,23 +113,26 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts index d9f7281a77ae..39d7f0398fbb 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -67,23 +67,26 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts index 8eb406541b36..6c983dd54a0b 100644 --- a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts +++ b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts @@ -106,23 +106,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts index a7e048f9ae6c..f4b8d171767c 100644 --- a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts +++ b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts @@ -195,19 +195,22 @@ }; factory: partition@50000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x50000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts index 917a6beb5122..da1db0366f46 100644 --- a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts +++ b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts @@ -82,6 +82,16 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + }; }; partition@50000 { @@ -113,13 +123,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts index 16d8edb34111..8edae7de875d 100644 --- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts @@ -63,23 +63,26 @@ }; 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 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + 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_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts index 23d47d6ea35b..d2c242be6f43 100644 --- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts @@ -70,23 +70,26 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts b/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts index d90c0b4b59c8..2d8717e3cdd0 100644 --- a/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts +++ b/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts @@ -160,23 +160,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts index 50834c586643..74b9a9541b14 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts @@ -108,6 +108,16 @@ label = "config"; reg = <0xfa0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; + }; }; partition@fb0000 { @@ -191,13 +201,3 @@ function = "gpio"; }; }; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_8: macaddr@8 { - reg = <0x8 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts index 330f6a0f3404..a2c7d8e635c5 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -116,15 +116,18 @@ }; config: partition@fa0000 { - compatible = "nvmem-cells"; label = "config"; reg = <0xfa0000 0x010000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_config_8: macaddr@8 { - reg = <0x8 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; }; @@ -135,19 +138,22 @@ }; radio: partition@ff0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0xff0000 0x010000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; - eeprom_radio_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi index 08867064ed4d..f8fa7487ce82 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi @@ -109,32 +109,38 @@ }; config: partition@fa0000 { - compatible = "nvmem-cells"; label = "config"; reg = <0xfa0000 0x50000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_config_8: macaddr@8 { - reg = <0x8 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; }; radio: partition@ff0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0xff0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; - eeprom_radio_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts b/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts index 4603263e8ddf..087910233e28 100644 --- a/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts +++ b/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts @@ -131,12 +131,14 @@ reg = <0xfa0000 0x010000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_8: macaddr@8 { - reg = <0x8 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; }; @@ -147,19 +149,22 @@ }; radio: partition@ff0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0xff0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; - eeprom_radio_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts index f2aea644fa2b..64df8cf6b1f2 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts @@ -82,15 +82,18 @@ }; info: partition@90000 { - compatible = "nvmem-cells"; label = "product-info"; reg = <0x90000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_info_8: macaddr@8 { - reg = <0x8 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; }; @@ -121,19 +124,22 @@ }; radio: partition@ff0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0xff0000 0x010000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; - eeprom_radio_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_eap613-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap613-v1.dts index d25bf5756022..cf08452c50db 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap613-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap613-v1.dts @@ -70,16 +70,18 @@ }; partition@90000 { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - label = "product-info"; reg = <0x90000 0x10000>; read-only; - macaddr: macaddr@8 { - reg = <0x8 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr: macaddr@8 { + reg = <0x8 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts index 58e4bbf75741..f9bbd9b39286 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts @@ -93,6 +93,16 @@ label = "product-info"; reg = <0x90000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; + }; }; partition@a0000 { @@ -186,13 +196,3 @@ }; }; }; - -&info { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_info_8: macaddr@8 { - reg = <0x8 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts index 016ab03c7b7a..84b3efe8df9d 100644 --- a/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts @@ -225,7 +225,6 @@ }; factory: partition@7800000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x7800000 0x400000>; read-only; diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts index b9d5995ed5b3..f4bc79a16584 100644 --- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts +++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts @@ -109,15 +109,18 @@ }; romfile: partition@fc0000 { - compatible = "nvmem-cells"; label = "romfile"; reg = <0xfc0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_romfile_f100: romfile@f100 { - reg = <0xf100 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_romfile_f100: romfile@f100 { + reg = <0xf100 0x6>; + }; }; }; @@ -128,19 +131,22 @@ }; radio: partition@fe0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0xfe0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; - eeprom_radio_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts index 890365c199b2..be1011d1da43 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts @@ -108,32 +108,38 @@ }; config: partition@600000 { - compatible = "nvmem-cells"; label = "config"; reg = <0x600000 0x50000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_config_10008: macaddr@10008 { - reg = <0x10008 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; }; }; radio: partition@7f0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0x7f0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; - eeprom_radio_8000: eeprom@8000 { - reg = <0x8000 0x200>; + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts b/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts index 42b9c3cc3e32..692aed5bfc3e 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts @@ -117,32 +117,38 @@ }; config: partition@7c0000 { - compatible = "nvmem-cells"; label = "config"; reg = <0x7c0000 0x2d440>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_config_10008: macaddr@10008 { - reg = <0x10008 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; }; }; radio: partition@7f0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0x7f0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - eeprom_radio_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi index 4207100f3432..650f741eff7f 100644 --- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -114,15 +114,18 @@ }; config: partition@e00000 { - compatible = "nvmem-cells"; label = "config"; reg = <0xe00000 0x50000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_config_10008: macaddr@10008 { - reg = <0x10008 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; }; }; @@ -131,19 +134,22 @@ */ radio: partition@ff0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0xff0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - eeprom_radio_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts b/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts index 7d8948bb3714..3c133dd0168b 100644 --- a/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts +++ b/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts @@ -112,32 +112,38 @@ }; config: partition@730000 { - compatible = "nvmem-cells"; label = "config"; reg = <0x730000 0xc0000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_config_2008: macaddr@2008 { - reg = <0x2008 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_2008: macaddr@2008 { + reg = <0x2008 0x6>; + }; }; }; radio: partition@7f0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0x7f0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; - eeprom_radio_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi index 411bf6a85ac6..b2b78aba6322 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi @@ -83,7 +83,6 @@ }; factory: partition@e0000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0xe0000 0x60000>; diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts index 8f78a60557c9..488a40db5c3d 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts @@ -37,32 +37,38 @@ }; factory: partition@70000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x70000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; }; }; eeprom: partition@b0000 { - compatible = "nvmem-cells"; label = "eeprom"; reg = <0xb0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_eeprom_0: macaddr@0 { - reg = <0x0 0x6>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; - macaddr_eeprom_6: macaddr@6 { - reg = <0x6 0x6>; + macaddr_eeprom_6: macaddr@6 { + reg = <0x6 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts index 615bdf4e13b7..f9cdf4433c60 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts @@ -67,6 +67,16 @@ label = "eeprom"; reg = <0x80000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; + }; }; partition@90000 { @@ -95,16 +105,6 @@ }; }; -&eeprom { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_eeprom_0: macaddr@0 { - reg = <0x0 0x6>; - }; -}; - &gmac0 { nvmem-cells = <&macaddr_eeprom_0>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts index 2762a777a353..b4000464f7be 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts @@ -42,6 +42,16 @@ label = "eeprom"; reg = <0x80000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; + }; }; partition@90000 { @@ -82,13 +92,3 @@ &wlan_5g { mediatek,mtd-eeprom = <&factory 0x8000>; }; - -&eeprom { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_eeprom_0: macaddr@0 { - reg = <0x0 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts index ff328bd858b3..f09ccba58556 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts @@ -138,17 +138,18 @@ }; part_eeprom: partition@80000 { - compatible = "nvmem-cells"; - - #address-cells = <1>; - #size-cells = <1>; - label = "eeprom"; reg = <0x80000 0x10000>; read-only; - macaddr_eeprom: macaddr@0 { - reg = <0x0 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom: macaddr@0 { + reg = <0x0 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts index 42cf121f3b0c..c933e443c12e 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts @@ -33,27 +33,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts index 212c0009425f..c51b6eebee0a 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts @@ -41,6 +41,20 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; firmware: partition@50000 { @@ -61,17 +75,3 @@ nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; - -&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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-32m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-32m.dts index dc9a9773a240..4d34a787b668 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06-32m.dts +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-32m.dts @@ -42,6 +42,20 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; firmware: partition@50000 { @@ -62,17 +76,3 @@ nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; - -&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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts index f196432111b6..edc3a7723a26 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts @@ -42,6 +42,20 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; firmware: partition@50000 { @@ -62,17 +76,3 @@ nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; - -&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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi b/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi index 843e9a30c7e3..e0db05724e7b 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi @@ -95,6 +95,20 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; partition@50000 { @@ -178,17 +192,3 @@ &uartlite2 { status = "okay"; }; - -&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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts index d8a94c85b9fa..dd2150c1a6bf 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts @@ -86,9 +86,19 @@ reg = <0x30000 0x10000>; }; - factory:partition@50000 { + factory: partition@50000 { label = "factory"; reg = <0x50000 0x40000>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_3fff4: macaddr@3fff4 { + reg = <0x3fff4 0x6>; + }; + }; }; partition@90000 { @@ -119,15 +129,3 @@ }; }; }; - - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_3fff4: macaddr@3fff4 { - reg = <0x3fff4 0x6>; - }; - -}; diff --git a/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts b/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts index 76fbbb99b149..55e828a29557 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts @@ -84,27 +84,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi index 6c5a638e0f00..8b018e18ae44 100644 --- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi @@ -63,27 +63,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_2e: macaddr@2e { - reg = <0x2e 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts index f699b4c47a14..78f81314fc12 100644 --- a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts +++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts @@ -84,27 +84,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts index 62111520c011..a403cd3e14ff 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts @@ -132,27 +132,30 @@ }; factory: partition@c0000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x0c0000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts index c13c0c957099..763973a193fd 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts @@ -132,17 +132,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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts index 232a720e5492..8340ca5d287f 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts @@ -104,17 +104,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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-common.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-common.dtsi index efc32733e9bc..7ce9aea3351f 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-common.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-common.dtsi @@ -64,6 +64,20 @@ label = "factory"; reg = <0x50000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; partition@60000 { @@ -122,17 +136,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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi index f0e0ae8e7e71..d1a2c08c6dee 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi @@ -86,23 +86,26 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x100000 0x80000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_3fff4: macaddr@3fff4 { - reg = <0x3fff4 0x6>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + macaddr_factory_3fff4: macaddr@3fff4 { + reg = <0x3fff4 0x6>; + }; - macaddr_factory_3fffa: macaddr@3fffa { - reg = <0x3fffa 0x6>; + macaddr_factory_3fffa: macaddr@3fffa { + reg = <0x3fffa 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_nand_128m.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_nand_128m.dtsi index 12e6bccc2e26..1dc91d8b47ee 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_nand_128m.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_nand_128m.dtsi @@ -50,6 +50,20 @@ label = "factory"; reg = <0x100000 0x40000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; partition@140000 { diff --git a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi index 78f154b3aed1..c7d6c574aa0c 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi @@ -69,17 +69,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>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts index e4de0b82310f..a1eca2807e70 100644 --- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts +++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts @@ -70,6 +70,16 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + }; }; partition@50000 { @@ -136,13 +146,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts index 48f52eed2f7d..ac638ad92944 100644 --- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts +++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts @@ -113,23 +113,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts index 2389112c3e6b..e715237a4012 100644 --- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts +++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts @@ -86,27 +86,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts index 99da11a61479..98d2e6892254 100644 --- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts +++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts @@ -89,27 +89,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts index 1aba94a91255..b153cae918b3 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts @@ -115,6 +115,16 @@ label = "Factory"; reg = <0x50000 0x40000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + }; }; partition@90000 { @@ -178,13 +188,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts index d525dde385b4..8c662b86cd4b 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts @@ -123,6 +123,20 @@ label = "Factory"; reg = <0x50000 0x40000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_0004: macaddr@0004 { + reg = <0x0004 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; partition@90000 { @@ -201,18 +215,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_0004: macaddr@0004 { - reg = <0x0004 0x6>; - }; - - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; - }; -}; - diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts index a998b95d4c51..ce6a60215e27 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts @@ -93,6 +93,16 @@ label = "Factory"; reg = <0x50000 0x40000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_0004: macaddr@0004 { + reg = <0x0004 0x6>; + }; + }; }; partition@90000 { @@ -137,13 +147,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_0004: macaddr@0004 { - reg = <0x0004 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts index e76ce933c1cf..2c78dea114f6 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts @@ -59,27 +59,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts index 73f3ea91731d..571b50d3c770 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts @@ -56,27 +56,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi index ec9d2398cdd6..1a3387326a6b 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi @@ -111,27 +111,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi index c578018e7557..e92982a8796b 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi @@ -110,27 +110,30 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi index ff748b781c00..d1697060a84d 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi @@ -84,29 +84,31 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; - }; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; }; firmware: partition@50000 { diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts index c1d5b03964f2..6423b69ebdab 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts @@ -72,23 +72,26 @@ }; 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>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi index 296c5a205f9b..5c21352cd9e6 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi @@ -72,23 +72,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts b/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts index d449fccd284b..4333ece42e75 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts @@ -126,18 +126,21 @@ reg = <0x80000 0x80000>; /* 64 KB */ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x100000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x4da8>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x4da8>; + }; - macaddr_factory_fe6e: macaddr@fe6e { - reg = <0xfe6e 0x6>; + macaddr_factory_fe6e: macaddr@fe6e { + reg = <0xfe6e 0x6>; + }; }; }; partition@140000 { diff --git a/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts b/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts index d6f00d9edc88..307819e746e9 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts @@ -118,23 +118,26 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x4da8>; - }; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x4da8>; + }; - macaddr_factory_fe6e: macaddr@fe6e { - reg = <0xfe6e 0x6>; + macaddr_factory_fe6e: macaddr@fe6e { + reg = <0xfe6e 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts index ace7a08bd89d..2ceb6228b260 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts @@ -89,19 +89,22 @@ }; 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 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi b/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi index fa7e23dd4713..85dbe2d85795 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi +++ b/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi @@ -96,6 +96,16 @@ label = "mrd"; reg = <0x7780000 0x80000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_mrd_1fff8: macaddr@1fff8 { + reg = <0x1fff8 0x6>; + }; + }; }; }; }; @@ -129,16 +139,6 @@ }; }; -&mrd { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_mrd_1fff8: macaddr@1fff8 { - reg = <0x1fff8 0x6>; - }; -}; - &state_default { gpio { groups = "uart3"; diff --git a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts index 5df2f3c6ab69..2f6654da5c3e 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts @@ -74,19 +74,22 @@ }; factory: partition@200000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x200000 0x100000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts index 299d982dc117..0cd1f3274cce 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts @@ -106,6 +106,20 @@ reg = <0x200000 0x1c0000>; label = "Factory"; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_1fdfa: macaddr@1fdfa { + reg = <0x1fdfa 0x6>; + }; + + macaddr_factory_1fdf4: macaddr@1fdf4 { + reg = <0x1fdf4 0x6>; + }; + }; }; partition@3c0000 { @@ -217,17 +231,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_1fdfa: macaddr@1fdfa { - reg = <0x1fdfa 0x6>; - }; - - macaddr_factory_1fdf4: macaddr@1fdf4 { - reg = <0x1fdf4 0x6>; - }; -};