From cfee7fa36682be3476b5b27e8affad99c8753934 Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Tue, 9 Jan 2024 23:15:27 +0800 Subject: [PATCH] mediatek: YunCore AX835: convert to nvmem-layout The nvmem-cells is deprecated. Also simplify mac address settings. Fixes: b4086f4 ("mediatek: add support for YunCore AX835") Signed-off-by: Chukun Pan --- .../mediatek/dts/mt7981b-yuncore-ax835.dts | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts b/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts index b3ca5bfa2cff..37b381d98423 100644 --- a/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts +++ b/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts @@ -84,6 +84,9 @@ reg = <0>; phy-mode = "2500base-x"; + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_factory_2a>; + fixed-link { speed = <2500>; full-duplex; @@ -172,24 +175,26 @@ reg = <0x50000 0x10000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - eeprom_factory: eeprom@0 { - reg = <0x0 0x1000>; - }; + eeprom_factory: eeprom@0 { + reg = <0x0 0x1000>; + }; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; - macaddr_factory_24: macaddr@24 { - reg = <0x24 0x6>; - }; + macaddr_factory_24: macaddr@24 { + reg = <0x24 0x6>; + }; - macaddr_factory_2a: macaddr@2a { - reg = <0x2a 0x6>; + macaddr_factory_2a: macaddr@2a { + reg = <0x2a 0x6>; + }; }; }; @@ -213,20 +218,14 @@ #address-cells = <1>; #size-cells = <0>; - lan: port@3 { + port@3 { reg = <3>; label = "lan"; - - nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_factory_2a 0>; }; port@4 { reg = <4>; label = "wan"; - - nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_factory_2a 0>; }; port@6 { -- 2.30.2