ramips: convert MT7603 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_tplink_8m-split-uboot.dtsi
index 22290603478b7d02b1763bcc73ac4aad9bc1aa4b..d7c65d4703e28f4c0f116174de125e6657ca1469 100644 (file)
@@ -1,6 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
 #include "mt7628an.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
 / {
        chosen {
                bootargs = "console=ttyS0,115200";
        };
 };
 
-&ehci {
-       status = "disabled";
-};
-
-&ohci {
-       status = "disabled";
-};
-
 &wmac {
        status = "okay";
-       mtd-mac-address = <&rom 0xf100>;
+
        mediatek,mtd-eeprom = <&radio 0x0>;
+
+       nvmem-cells = <&macaddr_rom_f100>;
+       nvmem-cell-names = "mac-address";
 };
 
 &ethernet {
-       mtd-mac-address = <&rom 0xf100>;
+       nvmem-cells = <&macaddr_rom_f100>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
        mediatek,portmap = <0x3e>;
 };
+
+&rom {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_rom_f100: macaddr@f100 {
+               reg = <0xf100 0x6>;
+       };
+};