From 210dbcf6a3f03f564e69d89c080f357ee2852b98 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 19 Jul 2023 16:23:52 +0800 Subject: [PATCH] ramips: use fixed layout cell "mac-base" for jdcloud re-sp-01b Signed-off-by: Tianling Shen --- .../ramips/dts/mt7621_jdcloud_re-sp-01b.dts | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts b/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts index 72bf05efbd..e2035b0367 100644 --- a/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts +++ b/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts @@ -53,7 +53,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_config_4429>; + nvmem-cells = <&macaddr_config_4429 0>; nvmem-cell-names = "mac-address-ascii"; }; @@ -61,6 +61,9 @@ status = "okay"; label = "wan"; phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_config_4429 0>; + nvmem-cell-names = "mac-address-ascii"; }; &mdio { @@ -92,10 +95,23 @@ read-only; }; - config: partition@30000 { + partition@30000 { label = "config"; reg = <0x30000 0x10000>; read-only; + + compatible = "nvmem-cells"; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_4429: macaddr@4429 { + compatible = "mac-base"; + reg = <0x4429 0x11>; + #nvmem-cell-cells = <1>; + }; + }; }; factory: partition@40000 { @@ -146,7 +162,7 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_config_4429>; + nvmem-cells = <&macaddr_config_4429 0>; nvmem-cell-names = "mac-address-ascii"; mediatek,mtd-eeprom = <&factory 0x0>; }; @@ -155,10 +171,8 @@ &pcie1 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_config_4429>; + nvmem-cells = <&macaddr_config_4429 0x800000>; nvmem-cell-names = "mac-address-ascii"; - mac-address-increment-byte = <3>; - mac-address-increment = <0x80>; mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; }; @@ -170,13 +184,3 @@ function = "gpio"; }; }; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_4429: macaddr@4429 { - reg = <0x4429 0x11>; - }; -};