ramips: mt7628: move mtd-eeprom out of root DTSI
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7628an_tplink_8m.dtsi
index 5269fd668b998586147b1602d6bc1434e8355def..ecb6ce1e4eaf692433e3b08f53b8606eb42b94f8 100644 (file)
@@ -1,5 +1,8 @@
 #include "mt7628an.dtsi"
 
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        chosen {
                bootargs = "console=ttyS0,115200";
@@ -13,7 +16,7 @@
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
        };
 };
 
-&ehci {
-       status = "disabled";
-};
-
-&ohci {
-       status = "disabled";
-};
-
 &wmac {
        status = "okay";
-       mtd-mac-address = <&factory 0xf100>;
+
        mediatek,mtd-eeprom = <&factory 0x20000>;
+
+       nvmem-cells = <&macaddr_factory_f100>;
+       nvmem-cell-names = "mac-address";
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0xf100>;
+       nvmem-cells = <&macaddr_factory_f100>;
+       nvmem-cell-names = "mac-address";
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_f100: macaddr@f100 {
+               reg = <0xf100 0x6>;
+       };
 };