ramips: fix leds on GL.iNet GL-MT300N-V2
[openwrt/openwrt.git] / target / linux / ramips / dts / GL-MT300N-V2.dts
index e7df340eecaa948b1184b32ea16c3b2dc25b5eee..ba5a595b10cbc16bdcf5942872b24cbfe7e1c0c4 100644 (file)
@@ -6,9 +6,16 @@
 #include <dt-bindings/input/input.h>
 
 /{
-       compatible = "glinet,gl-mt300n-v2", "ralink,mt7620an-soc";
+       compatible = "glinet,gl-mt300n-v2", "mediatek,mt7628an-soc";
        model = "GL-MT300N-V2";
 
+       aliases {
+               led-boot = &led_power;
+               led-failsafe = &led_power;
+               led-running = &led_power;
+               led-upgrade = &led_power;
+       };
+
        chosen {
                bootargs = "console=ttyS0,115200";
        };
        gpio-leds {
                compatible = "gpio-leds";
 
+               led_power: power {
+                       label = "gl-mt300n-v2:green:power";
+                       default-state = "on";
+                       gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+               };
+
                wan {
-                       label = "gl-mt300n-v2:blue:wan";
+                       label = "gl-mt300n-v2:green:wan";
                        gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
                };
 
@@ -34,8 +47,6 @@
 
        gpio-keys {
                compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
                poll-interval = <20>;
 
                reset {
                usb {
                        gpio-export,name = "usb";
                        gpio-export,output = <1>;
-                       gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
                };
        };
-
 };
 
 &pinctrl {
        state_default: pinctrl0 {
                gpio {
-                       ralink,group = "wdt", "gpio", "wled_an", "p0led_an", "i2s";
+                       ralink,group = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s";
                        ralink,function = "gpio";
                };
        };
        status = "okay";
 
        m25p80@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
                m25p,chunked-io = <32>;
 
-               partition@0 {
-                       label = "u-boot";
-                       reg = <0x0 0x30000>;
-                       read-only;
-               };
-
-               partition@30000 {
-                       label = "u-boot-env";
-                       reg = <0x30000 0x10000>;
-                       read-only;
-               };
-
-               factory: partition@40000 {
-                        label = "factory";
-                        reg = <0x40000 0x10000>;
-                        read-only;
-               };
-
-               partition@50000 {
-                        label = "firmware";
-                        reg = <0x50000 0xfb0000>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x30000>;
+                               read-only;
+                       };
+
+                       partition@30000 {
+                               label = "u-boot-env";
+                               reg = <0x30000 0x10000>;
+                               read-only;
+                       };
+
+                       factory: partition@40000 {
+                               label = "factory";
+                               reg = <0x40000 0x10000>;
+                               read-only;
+                       };
+
+                       partition@50000 {
+                               label = "firmware";
+                               reg = <0x50000 0xfb0000>;
+                       };
                };
        };
 };
 
+&uart1 {
+       status = "okay";
+};
+
 &ehci {
        status = "okay";
 };