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/mt7628an_tplink_re200.dtsi | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'target/linux/ramips/dts/mt7628an_tplink_re200.dtsi') diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi index 633950f287..d221a5c7c8 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi @@ -130,14 +130,16 @@ }; ðernet { - mtd-mac-address = <&config 0x2008>; + nvmem-cells = <&macaddr_config_2008>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x2008>; + nvmem-cells = <&macaddr_config_2008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -150,7 +152,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&config 0x2008>; + nvmem-cells = <&macaddr_config_2008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_2008: macaddr@2008 { + reg = <0x2008 0x6>; + }; +}; -- cgit v1.2.3