ramips: fix Newifi D1 mtd partition
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / Newifi-D1.dts
index 2d91c58c1e5600005f323ba27e5ec8ab1c10935e..5368b19ea1593068b7365b4c8e56724f159c6442 100644 (file)
@@ -2,8 +2,11 @@
 
 #include "mt7621.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
 / {
-       compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+       compatible = "lenovo,newifi-d1", "mediatek,mt7621-soc";
        model = "Newifi-D1";
 
        memory@0 {
 
                status-red {
                        label = "newifi-d1:red:status";
-                       gpios = <&gpio0 14 1>;
+                       gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
 
                status-green {
                        label = "newifi-d1:green:status";
-                       gpios = <&gpio0 13 1>;
+                       gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                };
 
                statys-blue {
                        label = "newifi-d1:blue:status";
-                       gpios = <&gpio0 16 1>;
+                       gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
                };
        };
 
@@ -42,8 +45,8 @@
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 15 1>;
-                       linux,code = <0x198>;
+                       gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
                };
        };
 
                usb2power {
                        gpio-export,name = "usb2power";
                        gpio-export,output = <1>;
-                       gpios = <&gpio0 9 0>;
+                       gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
                };
 
                usb3power {
                        gpio-export,name = "usb3power";
                        gpio-export,output = <1>;
-                       gpios = <&gpio0 11 0>;
+                       gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
                };
        };
 };
 
 &sdhci {
        status = "okay";
+
        pinctrl-names = "default";
        pinctrl-0 = <&sdhci_pins>;
 };
 
-&xhci {
-       status = "okay";
-};
-
 &spi0 {
        status = "okay";
 
@@ -83,8 +83,8 @@
                #size-cells = <1>;
                compatible = "jedec,spi-nor";
                reg = <0>;
-               linux,modalias = "m25p80";
                spi-max-frequency = <10000000>;
+               m25p,chunked-io = <32>;
 
                partition@0 {
                        label = "u-boot";
 
                partition@50000 {
                        label = "firmware";
-                       reg = <0x50000 0x2000000>;
+                       reg = <0x50000 0x1fb0000>;
                };
        };
 };
                        reg = <0x0000 0 0 0 0>;
                        device_type = "pci";
                        mediatek,mtd-eeprom = <&factory 0x8000>;
-                       mediatek,2ghz = <0>;
+                       ieee80211-freq-limit = <5000000 6000000>;
                };
        };
 
                        reg = <0x0000 0 0 0 0>;
                        device_type = "pci";
                        mediatek,mtd-eeprom = <&factory 0x0000>;
-                       mediatek,5ghz = <0>;
                };
        };
 };
        mtd-mac-address = <&factory 0xe000>;
 };
 
-
-
 &pinctrl {
        state_default: pinctrl0 {
                gpio {