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_rexx0-v1.dtsi | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi') diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi index 0ec83fa389..6cb6c0e460 100644 --- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -148,7 +148,8 @@ compatible = "mediatek,mt76"; 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>; ieee80211-freq-limit = <2400000 2500000>; }; @@ -159,14 +160,16 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; }; }; &gmac0 { - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -177,3 +180,13 @@ }; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; +}; -- cgit v1.2.3