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_iptime_a8004t.dts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'target/linux/ramips/dts/mt7621_iptime_a8004t.dts') diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts index df6aed664e..a00e921a49 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -95,7 +95,8 @@ }; &gmac0 { - mtd-mac-address = <&uboot 0x1fc20>; + nvmem-cells = <&macaddr_uboot_1fc20>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -103,7 +104,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&uboot 0x1fc40>; + nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -156,3 +158,17 @@ function = "gpio"; }; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; + + macaddr_uboot_1fc40: macaddr@1fc40 { + reg = <0x1fc40 0x6>; + }; +}; -- cgit v1.2.3