ramips: fix multi colour led handling
[openwrt/openwrt.git] / target / linux / ramips / dts / D240.dts
index 3da96f2a9e12059ac81a5e440a6549fdddd37099..8eddbecd7066fb9a771b58b76dd82abbdcab37e7 100644 (file)
 #include <dt-bindings/input/input.h>
 
 / {
-       compatible = "d240", "ralink,mt7620a-soc";
+       compatible = "sanlinking,d240", "ralink,mt7620a-soc";
        model = "Sanlinking Technologies D240";
 
+       aliases {
+               led-status = &led_power;
+       };
+
        chosen {
                bootargs = "console=ttyS0,115200";
        };
 
+       gpio-export {
+               compatible = "gpio-export";
+               #size-cells = <0>;
+
+               power_mpcie2 {
+                       gpio-export,name = "power_mpcie2";
+                       gpio-export,output = <1>;
+                       gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+               };
+
+               power_mpcie1 {
+                       gpio-export,name = "power_mpcie1";
+                       gpio-export,output = <1>;
+                       gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
 
-               power {
+               led_power: power {
                        label = "d240:blue:power";
                        gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
                };
@@ -67,8 +88,6 @@
 
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
                poll-interval = <20>;
 
                reset {
        status = "okay";
 };
 
+&gpio2 {
+       status = "okay";
+};
+
 &gpio3 {
        status = "okay";
 };
        status = "okay";
 
        en25q128@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
 
-               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>;
+                       };
                };
        };
 };
 
 &ethernet {
        mtd-mac-address = <&factory 0x4>;
-       ralink,port-map = "wllll";
+       mediatek,portmap = "wllll";
 };
 
 &wmac {
 &pinctrl {
        state_default: pinctrl0 {
                default {
-                       ralink,group = "i2c", "uartf", "wled", "spi refclk", "pa";
+                       ralink,group = "i2c", "uartf", "wled", "spi refclk", "pa", "nd_sd";
                        ralink,function = "gpio";
                };
        };