ramips: mt7628: use nvmem-layout
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7628an_duzun_dm06.dts
index 83f93e0de5af7d2f65dd34141a1f9a695347e1d6..e37b90d38ee6846bd289b9747b626e3dea1798ce 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "mt7628an.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
                reset {
                        label = "reset";
-                       gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
 
                wps {
                        label = "wps";
-                       gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
        };
 
 &state_default {
        gpio {
-               ralink,group = "wdt", "uart1";
-               ralink,function = "gpio";
+               groups = "wdt", "uart1";
+               function = "gpio";
        };
 };
 
-&gpio1 {
-       status = "okay";
-};
-
 &i2c {
        status = "okay";
 
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
-       mediatek,portmap = <0x3>;
+       mediatek,portmap = <0x3e>;
        mediatek,portdisable = <0x3c>;
 };
 
@@ -98,7 +93,7 @@
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <60000000>;
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_factory_4: macaddr@4 {
+                                               reg = <0x4 0x6>;
+                                       };
+                               };
                        };
 
                        partition@50000 {