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_wevo_w2914ns-v2.dtsi | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi') diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi index ffa86a4810..06b301ba0b 100644 --- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi @@ -98,7 +98,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -125,7 +126,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -136,3 +138,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; -- cgit v1.2.3