ramips: mt7628: use nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_glinet_gl-mt300n-v2.dts
index 979f5d2bc9d84e162df93cc6ef1c50e1e1076e8b..d84290d4c12354d40032634ff540b4e9ca8f4681 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "mt7628an.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "gl-mt300n-v2:green:power";
+                       label = "green:power";
                        default-state = "on";
-                       gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
                };
 
                wan {
-                       label = "gl-mt300n-v2:green:wan";
-                       gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+                       label = "green:wan";
+                       gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
                };
 
                wlan {
-                       label = "gl-mt300n-v2:red:wlan";
-                       gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+                       label = "red:wlan";
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
                };
        };
 
 
                reset {
                        label = "reset";
-                       gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
 
                BTN_0 {
                        label = "BTN_0";
-                       gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                        linux,code = <BTN_0>;
                };
 
                BTN_1 {
                        label = "BTN_1";
-                       gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
                        linux,code = <BTN_1>;
                };
        };
                usb {
                        gpio-export,name = "usb";
                        gpio-export,output = <1>;
-                       gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+                       gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
                };
        };
 };
 
-&pinctrl {
-       state_default: pinctrl0 {
-               gpio {
-                       ralink,group = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s";
-                       ralink,function = "gpio";
-               };
+&state_default {
+       gpio {
+               groups = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s", "i2c";
+               function = "gpio";
        };
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
 &wmac {
        status = "okay";
+
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom_factory_0: eeprom@0 {
+                                               reg = <0x0 0x400>;
+                                       };
+
+                                       macaddr_factory_4: macaddr@4 {
+                                               reg = <0x4 0x6>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
 &uart1 {
        status = "okay";
 };
-
-&ehci {
-       status = "okay";
-};
-
-&ohci {
-       status = "okay";
-};