From 06bb4a5018cd84dc4553e71c273e2daae2c996ab Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Fri, 2 Apr 2021 23:50:02 +0200 Subject: ramips: convert mtd-mac-address to nvmem implementation Define nvmem-cells and convert mtd-mac-address to nvmem implementation. The conversion is done with an automated script. Signed-off-by: Ansuel Smith --- target/linux/ramips/dts/mt7621_tplink_re350-v1.dts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'target/linux/ramips/dts/mt7621_tplink_re350-v1.dts') diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts index 0a810b0195..3df4bc5d64 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts @@ -130,7 +130,8 @@ mt76@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -140,13 +141,15 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; &gmac0 { - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -164,3 +167,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; +}; -- cgit v1.2.3