ramips: add support for indicating the boot state using multiple leds
[openwrt/openwrt.git] / target / linux / ramips / dts / Y1S.dts
index 07719c25e5bf4d9dcb4678d780fc87e58be3510c..d2b917e80dd0a3773b6e5e38394723a80450f8e9 100644 (file)
@@ -3,17 +3,24 @@
 #include "Y1.dtsi"
 
 / {
-       compatible = "lenovo,y1s", "lenovo,y1", "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 GPIO_ACTIVE_HIGH>; // GPIO2:40+14=GPIO 54
+                       gpio-export,output = <1>;
+                       gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;
                };
                usb1 {
                        gpio-export,name = "usb1";
@@ -35,7 +42,7 @@
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
 
-               power2 {
+               led_power_blue: power2 {
                        label = "y1s:blue:power";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
@@ -58,6 +65,8 @@
                usb2 {
                        label = "y1s:blue:usb";
                        gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+                       trigger-sources = <&ohci_port1>, <&ehci_port1>;
+                       linux,default-trigger = "usbport";
                };
 
                internet {