ramips: add support for indicating the boot state using multiple leds
[openwrt/openwrt.git] / target / linux / ramips / dts / Y1S.dts
index cfa5e2123aa1d600d2d287f1a76950f0365d1853..d2b917e80dd0a3773b6e5e38394723a80450f8e9 100644 (file)
@@ -3,27 +3,34 @@
 #include "Y1.dtsi"
 
 / {
-       compatible = "lenovo,Y1S", "ralink,mt7620a-soc";
+       compatible = "lenovo,newifi-y1s", "lenovo,newifi-y1", "ralink,mt7620a-soc";
        model = "Lenovo Y1S";
 
+       aliases {
+               led-boot = &led_power_blue;
+               led-failsafe = &led_power_blue;
+               led-running = &led_power_blue;
+               led-upgrade = &led_power_blue;
+       };
+
        gpio_export {
                compatible = "gpio-export";
                #size-cells = <0>;
-               /* GPIO 54、55、56 USB1、2、3 */
+
                usb0 {
                        gpio-export,name = "usb0";
-                       gpio-export,output = <1>; // GPIOF_OUT_INIT_HIGH
-                       gpios = <&gpio2 14 0>; // GPIO2:40+14=GPIO 54
+                       gpio-export,output = <1>;
+                       gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;
                };
                usb1 {
                        gpio-export,name = "usb1";
                        gpio-export,output = <1>;
-                       gpios = <&gpio2 15 0>;
+                       gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
                };
                usb2 {
                        gpio-export,name = "usb2";
                        gpio-export,output = <1>;
-                       gpios = <&gpio2 16 0>;
+                       gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
                };
        };
 
 
                power1 {
                        label = "y1s:yellow:power";
-                       gpios = <&gpio0 14 1>;
+                       gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
 
-               power2 {
+               led_power_blue: power2 {
                        label = "y1s:blue:power";
-                       gpios = <&gpio0 9 1>;
+                       gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                wlan1 {
                        label = "y1s:yellow:wifi";
-                       gpios = <&gpio3 0 1>;
+                       gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
                };
 
                wlan2 {
                        label = "y1s:blue:wifi";
-                       gpios = <&gpio2 10 1>;
+                       gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
                };
 
                usb1 {
                        label = "y1s:yellow:usb";
-                       gpios = <&gpio2 13 1>;
+                       gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
                };
 
                usb2 {
                        label = "y1s:blue:usb";
-                       gpios = <&gpio2 12 1>;
+                       gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+                       trigger-sources = <&ohci_port1>, <&ehci_port1>;
+                       linux,default-trigger = "usbport";
                };
 
                internet {
                        label = "y1s:blue:internet";
-                       gpios = <&gpio2 11 1>;
+                       gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
                };
        };
 };