lantiq: add support for indicating the boot state using three leds

The BTHOMEHUBV5A has a RGB power led, where every colour is perfect to
indicate the current boot state. This patch adds support for such cases.

The existing led sequences should be the same as before.

Boards which are using a led different from power (like TDW89x0) are
changed to switch of the led after boot

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48041
This commit is contained in:
John Crispin 2016-01-01 21:18:47 +00:00
parent ebc71a4d16
commit 4cf3fd49fc
33 changed files with 189 additions and 132 deletions

View file

@ -27,39 +27,21 @@ board_config_update
board=$(lantiq_board_name) board=$(lantiq_board_name)
case "$board" in case "$board" in
BTHOMEHUBV2B)
ucidef_set_led_default "power" "power" "soc:blue:power" "1"
;;
BTHOMEHUBV3A)
ucidef_set_led_default "power" "power" "soc:blue:power" "1"
;;
BTHOMEHUBV5A) BTHOMEHUBV5A)
ucidef_set_led_default "power" "power" "soc:blue:power" "1"
ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0"
;; ;;
VGV7510KW22) VGV7510KW22)
ucidef_set_led_default "power" "power" "power" "1"
ucidef_set_led_default "power2" "power2" "power2" "0"
ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio"
;; ;;
VGV7519) VGV7519)
ucidef_set_led_default "power" "power" "power" "0"
ucidef_set_led_default "power2" "power2" "power2" "1"
ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio"
;; ;;
P2812HNUF*) P2812HNUF*)
ucidef_set_led_default "power" "power" "power" "0"
ucidef_set_led_default "power2" "power2" "power2" "1"
ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio"
;; ;;
ARV7519RW22) ARV7519RW22)
ucidef_set_led_default "power" "power" "power" "1"
ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1" ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1"
;; ;;
ARV8539PW22)
ucidef_set_led_default "power" "power" "soc:green:power" "1"
ucidef_set_led_default "power2" "power2" "soc:red:power" "0"
;;
*) *)
;; ;;
esac esac

View file

@ -1,54 +1,34 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2012-2013 OpenWrt.org # Copyright (C) 2010-2015 OpenWrt.org
. /lib/functions/leds.sh . /lib/functions/leds.sh
. /lib/functions/lantiq.sh . /lib/functions/lantiq.sh
power="$(lantiq_get_dt_led_chosen power)" boot="$(lantiq_get_dt_led_chosen boot)"
power1="$(lantiq_get_dt_led_chosen power1)" failsafe="$(lantiq_get_dt_led_chosen failsafe)"
power2="$(lantiq_get_dt_led_chosen power2)" running="$(lantiq_get_dt_led_chosen running)"
status_led="$power"
set_state() { set_state() {
status_led="$boot"
case "$1" in case "$1" in
preinit) preinit)
if [ -n "$power2" ]; then status_led_blink_preinit
status_led_on
status_led="$power2"
status_led_blink_preinit
status_led="$power"
else
status_led_blink_preinit
fi
;; ;;
failsafe) failsafe)
if [ -n "$power2" ]; then status_led_off
led_off "$power2" status_led="$failsafe"
status_led_blink_failsafe status_led_blink_failsafe
elif [ -n "$power1" ]; then
status_led_off
status_led="$power1"
status_led_blink_failsafe
status_led="$power"
else
status_led_blink_failsafe
fi
;; ;;
preinit_regular) preinit_regular)
if [ -n "$power2" ]; then status_led_blink_preinit_regular
status_led_on
status_led="$power2"
status_led_blink_preinit_regular
status_led="$power"
else
status_led_blink_preinit_regular
fi
;; ;;
done) done)
status_led_on status_led_off
led_off "$power1" [ -n "$running" ] & {
led_off "$power2" status_led="$running"
status_led_on
}
;; ;;
esac esac
} }

View file

@ -9,10 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power2;
running = &power;
dsl = &adsl; dsl = &adsl;
internet = &internet; internet = &internet;
power = &power;
power2 = &power2;
usb = &usb; usb = &usb;
usb2 = &usb2; usb2 = &usb2;
wifi = &wifi; wifi = &wifi;
@ -152,6 +154,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpios 21 0>; gpios = <&gpios 21 0>;
default-state = "keep";
}; };
power2: power2 { power2: power2 {
label = "power2"; label = "power2";

View file

@ -5,9 +5,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power;
running = &power;
dsl = &dsl; dsl = &dsl;
internet = &online; internet = &online;
power = &power;
usb = &usb; usb = &usb;
wifi = &wifi; wifi = &wifi;
}; };
@ -147,6 +150,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpio 3 0>; gpios = <&gpio 3 0>;
default-state = "keep";
}; };
dsl: dsl { dsl: dsl {
label = "dsl"; label = "dsl";

View file

@ -9,10 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power2;
running = &power;
dsl = &dsl; dsl = &dsl;
internet = &online; internet = &online;
power = &power;
power2 = &power2;
usb = &usb; usb = &usb;
wifi = &wifi; wifi = &wifi;
}; };
@ -130,6 +132,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpio 2 1>; gpios = <&gpio 2 1>;
default-state = "keep";
}; };
power2: power2 { power2: power2 {
label = "power2"; label = "power2";

View file

@ -9,10 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power_blue;
failsafe = &power_red;
running = &power_blue;
dsl = &adsl; dsl = &adsl;
internet = &internet; internet = &internet;
power = &power;
power2 = &power2;
usb = &usb; usb = &usb;
wifi = &wifi; wifi = &wifi;
}; };
@ -149,9 +151,10 @@
gpio-leds { gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
power: power { power_blue: power {
label = "power"; label = "power";
gpios = <&gpio 3 1>; gpios = <&gpio 3 1>;
default-state = "keep";
}; };
adsl: adsl { adsl: adsl {
label = "adsl"; label = "adsl";
@ -161,7 +164,7 @@
label = "internet"; label = "internet";
gpios = <&gpio 5 1>; gpios = <&gpio 5 1>;
}; };
power2: power2 { power_red: power2 {
label = "power2"; label = "power2";
gpios = <&gpio 6 1>; gpios = <&gpio 6 1>;
}; };

View file

@ -7,10 +7,12 @@
chosen { chosen {
leds { leds {
/* we dont have a power led, lets use the online led */
boot = &online;
failsafe = &online;
dsl = &dsl; dsl = &dsl;
internet = &online; internet = &online;
/* we dont have a power led, lets use the online led */
power = &online;
wifi = &wifi; wifi = &wifi;
}; };
}; };
@ -155,8 +157,7 @@
gpios = <&gpio 8 1>; gpios = <&gpio 8 1>;
}; };
online: online { online: online {
/*label = "online"; - we dont have a power led, lets use this one */ label = "online";
label = "power";
gpios = <&gpio 9 1>; gpios = <&gpio 9 1>;
}; };
}; };

View file

@ -9,8 +9,11 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power0;
failsafe = &power1;
running = &power0;
internet = &dsl; internet = &dsl;
power1 = &power1;
usb = &usb; usb = &usb;
wifi = &wifi; wifi = &wifi;
}; };
@ -162,9 +165,10 @@
gpio-leds { gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
power0 { power0: power0 {
label = "power0"; label = "power0";
gpios = <&gpio 3 1>; gpios = <&gpio 3 1>;
default-state = "keep";
}; };
dsl: dsl { dsl: dsl {
label = "dsl"; label = "dsl";

View file

@ -9,8 +9,11 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power;
running = &power;
internet = &internet; internet = &internet;
power = &power;
wifi = &wlan; wifi = &wlan;
}; };
}; };
@ -164,6 +167,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpio 2 1>; gpios = <&gpio 2 1>;
default-state = "keep";
}; };
internet: internet { internet: internet {
label = "internet"; label = "internet";

View file

@ -9,10 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power2;
running = &power;
dsl = &dsl; dsl = &dsl;
internet = &online; internet = &online;
power = &power;
power2 = &power2;
usb = &usb; usb = &usb;
wifi = &wifi; wifi = &wifi;
}; };
@ -170,6 +172,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpio 2 1>; gpios = <&gpio 2 1>;
default-state = "keep";
}; };
dsl: dsl { dsl: dsl {
label = "dsl"; label = "dsl";

View file

@ -9,10 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power2;
running = &power;
dsl = &dsl; dsl = &dsl;
internet = &online; internet = &online;
power = &power;
power2 = &power2;
wifi = &wifi; wifi = &wifi;
}; };
}; };
@ -147,7 +149,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpio 2 1>; gpios = <&gpio 2 1>;
default-state = "off"; default-state = "keep";
}; };
power2: power2 { power2: power2 {
label = "power2"; label = "power2";

View file

@ -3,14 +3,17 @@
/include/ "vr9.dtsi" /include/ "vr9.dtsi"
/ { / {
model = "ARV7519RW22 - Astoria Networks ARV7519RW22-A-LT"; model = "ARV7519RW22 - Orange Livebox 2.1";
chosen { chosen {
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power_green;
failsafe = &power_green;
running = &power_green;
internet = &internet_green; internet = &internet_green;
power = &power_green;
}; };
}; };
@ -213,7 +216,7 @@
power_green: power_green { power_green: power_green {
label = "power"; label = "power";
gpios = <&gpio 14 1>; gpios = <&gpio 14 1>;
default-state = "on"; default-state = "keep";
}; };
alarm_blue { alarm_blue {
label = "alarm"; label = "alarm";

View file

@ -9,10 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power1;
running = &power;
dsl = &power; dsl = &power;
internet = &online; internet = &online;
power = &power;
power1 = &power1;
wifi = &wifi; wifi = &wifi;
}; };
}; };
@ -125,6 +127,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpio 3 1>; gpios = <&gpio 3 1>;
default-state = "keep";
}; };
power1: power1 { power1: power1 {
label = "power1"; label = "power1";

View file

@ -9,9 +9,11 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power1;
running = &power;
internet = &internet; internet = &internet;
power = &power;
power1 = &power1;
wifi = &wifi; wifi = &wifi;
}; };
}; };

View file

@ -9,9 +9,11 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power1;
running = &power;
internet = &internet; internet = &internet;
power = &power;
power1 = &power1;
wifi = &wifi; wifi = &wifi;
}; };
}; };

View file

@ -7,9 +7,12 @@
chosen { chosen {
leds { leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl_green; dsl = &dsl_green;
internet = &online_green; internet = &online_green;
power = &power_green;
wifi = &wireless_green; wifi = &wireless_green;
}; };
}; };
@ -146,8 +149,9 @@
power_green: power-green { power_green: power-green {
label = "power"; label = "power";
gpios = <&gpio 24 1>; gpios = <&gpio 24 1>;
default-state = "keep";
}; };
power-red { power_red: power-red {
label = "soc:red:power"; label = "soc:red:power";
gpios = <&gpio 4 1>; gpios = <&gpio 4 1>;
}; };

View file

@ -9,6 +9,10 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power_orange;
failsafe = &power_red;
running = &power_blue;
internet = &broadband_blue; internet = &broadband_blue;
wifi = &wireless_blue; wifi = &wireless_blue;
}; };
@ -267,19 +271,19 @@
gpios = <&stp0 12 0>; gpios = <&stp0 12 0>;
}; };
power-red { power_red: power-red {
label = "soc:red:power"; label = "soc:red:power";
gpios = <&stp0 13 0>; gpios = <&stp0 13 0>;
}; };
power-orange { power_orange: power-orange {
label = "soc:orange:power"; label = "soc:orange:power";
gpios = <&stp0 14 0>; gpios = <&stp0 14 0>;
default-state = "keep";
}; };
power-blue { power_blue: power-blue {
label = "soc:blue:power"; label = "soc:blue:power";
gpios = <&stp0 15 0>; gpios = <&stp0 15 0>;
}; };
}; };
}; };

View file

@ -9,6 +9,10 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power_orange;
failsafe = &power_red;
running = &power_blue;
internet = &broadband_blue; internet = &broadband_blue;
wifi = &wireless_blue; wifi = &wireless_blue;
}; };
@ -197,19 +201,19 @@
gpios = <&gpio 12 1>; gpios = <&gpio 12 1>;
}; };
power-red { power_red: power-red {
label = "soc:red:power"; label = "soc:red:power";
gpios = <&gpio 14 1>; gpios = <&gpio 14 1>;
}; };
power-orange { power_orange: power-orange {
label = "soc:orange:power"; label = "soc:orange:power";
gpios = <&gpio 5 1>; gpios = <&gpio 5 1>;
default-state = "keep";
}; };
ppower-blue { power_blue: power-blue {
label = "soc:blue:power"; label = "soc:blue:power";
gpios = <&gpio 1 1>; gpios = <&gpio 1 1>;
}; };
}; };
}; };

View file

@ -9,6 +9,10 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power_green;
failsafe = &power_red;
running = &power_blue;
internet = &broadband_blue; internet = &broadband_blue;
wifi = &wireless_blue; wifi = &wireless_blue;
}; };
@ -245,6 +249,7 @@
gpio-leds { gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
/* broadband-* is a single RGB led */
broadband-red { broadband-red {
label = "soc:red:broadband"; label = "soc:red:broadband";
gpios = <&gpio 0 1>; gpios = <&gpio 0 1>;
@ -258,6 +263,7 @@
gpios = <&gpio 8 1>; gpios = <&gpio 8 1>;
}; };
/* wireless-* is a single RGB led */
wireless-red { wireless-red {
label = "soc:red:wireless"; label = "soc:red:wireless";
gpios = <&gpio 9 1>; gpios = <&gpio 9 1>;
@ -271,15 +277,17 @@
gpios = <&gpio 11 1>; gpios = <&gpio 11 1>;
}; };
power-red { /* power-* is a single RGB led */
power_red: power-red {
label = "soc:red:power"; label = "soc:red:power";
gpios = <&gpio 12 1>; gpios = <&gpio 12 1>;
}; };
power-green { power_green: power-green {
label = "soc:green:power"; label = "soc:green:power";
gpios = <&gpio 14 1>; gpios = <&gpio 14 1>;
default-state = "keep";
}; };
power-blue { power_blue: power-blue {
label = "soc:blue:power"; label = "soc:blue:power";
gpios = <&gpio 15 1>; gpios = <&gpio 15 1>;
}; };

View file

@ -9,9 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power;
running = &power;
dsl = &dsl; dsl = &dsl;
internet = &online; internet = &online;
power = &power;
}; };
}; };
@ -137,7 +140,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpio 13 1>; gpios = <&gpio 13 1>;
default-state = "on"; default-state = "keep";
}; };
}; };
}; };

View file

@ -5,10 +5,12 @@
bootargs-append = "root= console=ttyLTQ0,115200"; bootargs-append = "root= console=ttyLTQ0,115200";
leds { leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl; dsl = &dsl;
internet = &internet; internet = &internet;
power = &power;
power2 = &power2;
usb = &usb; usb = &usb;
wifi = &wifi; wifi = &wifi;
}; };
@ -171,11 +173,12 @@
label = "usb"; label = "usb";
gpios = <&gpio 22 1>; gpios = <&gpio 22 1>;
}; };
power: power { power_green: power {
label = "power"; label = "power";
gpios = <&gpio 34 1>; gpios = <&gpio 34 1>;
default-state = "keep";
}; };
power2: power2 { power_red: power2 {
label = "power2"; label = "power2";
gpios = <&gpio 39 1>; gpios = <&gpio 39 1>;
}; };

View file

@ -5,7 +5,10 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
power = &power; boot = &power;
failsafe = &power;
running = &power;
usb = &usb1; usb = &usb1;
usb2 = &usb2; usb2 = &usb2;
}; };
@ -302,7 +305,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&stp 9 0>; gpios = <&stp 9 0>;
default-state = "on"; default-state = "keep";
}; };
warning { warning {
label = "warning"; label = "warning";

View file

@ -9,10 +9,12 @@
bootargs = "console=ttyLTQ0,115200 ubi.mtd=1,512 root=/dev/mtdblock9"; bootargs = "console=ttyLTQ0,115200 ubi.mtd=1,512 root=/dev/mtdblock9";
leds { leds {
boot = &power_green;
failsafe = &power_red;
running = &power_green;
dsl = &dsl; dsl = &dsl;
internet = &info_green; internet = &info_green;
power = &power;
power2 = &power2;
wifi = &wifi; wifi = &wifi;
}; };
}; };
@ -243,11 +245,12 @@
gpio-leds { gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
power: power { power_green: power {
label = "power"; label = "power";
gpios = <&gpio 32 1>; gpios = <&gpio 32 1>;
default-state = "keep";
}; };
power2: power2 { power_red: power2 {
label = "power2"; label = "power2";
gpios = <&gpio 33 1>; gpios = <&gpio 33 1>;
}; };

View file

@ -9,9 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power;
running = &power;
dsl = &power; dsl = &power;
internet = &online; internet = &online;
power = &power;
wifi = &wlan; wifi = &wlan;
}; };
}; };
@ -120,6 +123,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpio 44 1>; gpios = <&gpio 44 1>;
default-state = "keep";
}; };
voice { voice {
label = "voice"; label = "voice";

View file

@ -9,8 +9,10 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power_red;
failsafe = &power_red;
internet = &internet; internet = &internet;
power2 = &power2;
usb = &usb; usb = &usb;
wifi = &wifi; wifi = &wifi;
}; };
@ -117,14 +119,13 @@
gpio-leds { gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
power2: power2 { power_red: power2 {
label = "power2"; label = "power2";
gpios = <&stp 4 0>; gpios = <&stp 4 0>;
}; };
internet: internet { internet: internet {
label = "internet"; label = "internet";
gpios = <&stp 2 1>; gpios = <&stp 2 1>;
default-state = "off";
}; };
internet2 { internet2 {
label = "internet2"; label = "internet2";

View file

@ -9,9 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power_green;
failsafe = &power_green;
running = &power_green;
dsl = &dsl; dsl = &dsl;
internet = &online; internet = &online;
power = &power;
usb = &usb; usb = &usb;
wifi = &wifi; wifi = &wifi;
}; };
@ -93,10 +96,10 @@
gpio-leds { gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
power: power { power_green: power {
label = "power"; label = "power";
gpios = <&gpio 19 1>; gpios = <&gpio 19 1>;
default-state = "on"; default-state = "keep";
}; };
online: online { online: online {
label = "online"; label = "online";

View file

@ -9,10 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power2;
running = &power;
dsl = &dsl; dsl = &dsl;
internet = &online; internet = &online;
power = &power;
power2 = &power2;
wifi = &wifi; wifi = &wifi;
}; };
}; };
@ -146,7 +148,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&stp 11 1>; gpios = <&stp 11 1>;
default-state = "on"; default-state = "keep";
}; };
power2: power2 { power2: power2 {
label = "power2"; label = "power2";

View file

@ -5,10 +5,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power2;
failsafe = &power;
running = &power2;
dsl = &dsl; dsl = &dsl;
internet = &internet_green; internet = &internet_green;
power = &power;
power2 = &power2;
usb = &usb1; usb = &usb1;
usb2 = &usb2; usb2 = &usb2;
wifi = &wireless_green; wifi = &wireless_green;
@ -304,6 +306,7 @@
power2: power2 { /* green */ power2: power2 { /* green */
label = "power2"; label = "power2";
gpios = <&stp 23 1>; gpios = <&stp 23 1>;
default-state = "keep";
}; };
usb1: usb1 { /* green */ usb1: usb1 { /* green */
label = "usb1"; label = "usb1";

View file

@ -5,10 +5,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
/* the power led can't be controlled, use the wps led instead */
boot = &wps;
failsafe = &wps;
dsl = &dsl; dsl = &dsl;
internet = &internet; internet = &internet;
/* the power led can't be controlled, use the wps led instead */
power = &wps;
usb = &usb0; usb = &usb0;
usb2 = &usb2; usb2 = &usb2;
}; };

View file

@ -7,9 +7,11 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power2;
running = &power;
internet = &dsl; internet = &dsl;
power = &power;
power2 = &power2;
}; };
}; };
@ -165,6 +167,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpio 28 1>; gpios = <&gpio 28 1>;
default-state = "keep";
}; };
}; };
}; };

View file

@ -7,10 +7,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power2;
running = &power;
dsl = &dsl; dsl = &dsl;
internet = &internet_green; internet = &internet_green;
power = &power;
power2 = &power2;
wifi = &wifi; wifi = &wifi;
}; };
}; };
@ -234,6 +236,7 @@
power: power { power: power {
label = "power"; /* green */ label = "power"; /* green */
gpios = <&gpio 14 1>; gpios = <&gpio 14 1>;
default-state = "keep";
}; };
info_green { info_green {

View file

@ -8,10 +8,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power2;
failsafe = &power;
running = &power2;
dsl = &broadband_yellow; dsl = &broadband_yellow;
internet = &internet_yellow; internet = &internet_yellow;
power = &power;
power2 = &power2;
wifi = &wireless_yellow; wifi = &wireless_yellow;
}; };
}; };
@ -318,11 +320,11 @@
power2: power2 { /* yellow */ power2: power2 { /* yellow */
label = "power2"; label = "power2";
gpios = <&stp 14 1>; gpios = <&stp 14 1>;
default-state = "keep";
}; };
power: power { /* red */ power: power { /* red */
label = "power"; label = "power";
gpios = <&stp 15 1>; gpios = <&stp 15 1>;
default-state = "on";
}; };
}; };
}; };

View file

@ -9,10 +9,12 @@
bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
leds { leds {
boot = &power;
failsafe = &power2;
running = &power;
dsl = &dsl; dsl = &dsl;
internet = &online; internet = &online;
power = &power;
power2 = &power2;
usb = &usb; usb = &usb;
wifi = &wifi; wifi = &wifi;
}; };
@ -139,6 +141,7 @@
power: power { power: power {
label = "power"; label = "power";
gpios = <&gpio 1 1>; gpios = <&gpio 1 1>;
default-state = "keep";
}; };
power2: power2 { power2: power2 {
label = "power2"; label = "power2";