From: Mathias Kresin Date: Wed, 15 Aug 2018 18:18:26 +0000 (+0200) Subject: lantiq: add support for upgrade led X-Git-Tag: state~1238 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c9e9a787343fb9190b5491188025bcfdebc94beb;p=openwrt%2Fstaging%2Fchunkeey.git lantiq: add support for upgrade led Indicate a (sys)upgrade via leds as well. It brings the lantiq diag.sh script en par with the other implementations using devicetree aliases to define multiple leds for boot status indication. By default, use the boot finished led to indicate an upgrade for now. Signed-off-by: Mathias Kresin --- diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh index 4fb47bd273..06cf7e2714 100644 --- a/target/linux/lantiq/base-files/etc/diag.sh +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -6,6 +6,7 @@ boot="$(get_dt_led boot)" failsafe="$(get_dt_led failsafe)" running="$(get_dt_led running)" +upgrade="$(get_dt_led upgrade)" set_state() { status_led="$boot" @@ -26,6 +27,14 @@ set_state() { preinit_regular) status_led_blink_preinit_regular ;; + upgrade) + [ -n "$running" ] && { + status_led="$running" + status_led_off + } + status_led="$upgrade" + status_led_blink_preinit_regular + ;; done) status_led_off [ -n "$running" ] && { diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ALL0333CJ.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ALL0333CJ.dts index 0d128e0385..a157104dbf 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ALL0333CJ.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ALL0333CJ.dts @@ -13,6 +13,7 @@ led-boot = &power; led-failsafe = &power; led-running = &power; + led-upgrade = &power; led-dsl = &dsl; led-internet = &online_green; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4510PW.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4510PW.dts index 0d0b70c68a..6598a60f58 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4510PW.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4510PW.dts @@ -16,6 +16,7 @@ led-boot = &power; led-failsafe = &power2; led-running = &power; + led-upgrade = &power; led-dsl = &adsl; led-internet = &internet; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4518PWR01.dtsi b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4518PWR01.dtsi index e95c403682..f29c416c06 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4518PWR01.dtsi +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4518PWR01.dtsi @@ -11,6 +11,7 @@ led-boot = &power; led-failsafe = &power; led-running = &power; + led-upgrade = &power; led-dsl = &dsl; led-internet = &online; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4519PW.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4519PW.dts index 690c12f422..05e9da2297 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4519PW.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4519PW.dts @@ -16,6 +16,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl; led-internet = &internet_green; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4520PW.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4520PW.dts index 68d6dc3e7e..cd76bf5799 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4520PW.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV4520PW.dts @@ -16,6 +16,7 @@ led-boot = &power_blue; led-failsafe = &power_red; led-running = &power_blue; + led-upgrade = &power_blue; led-dsl = &dsl; led-internet = &internet_blue; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV452CQW.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV452CQW.dts index 3854ac2dbe..203a30df5c 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV452CQW.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV452CQW.dts @@ -16,6 +16,7 @@ led-boot = &power_blue; led-failsafe = &power_red; led-running = &power_blue; + led-upgrade = &power_blue; led-dsl = &dsl_blue; led-usb = &led_usb; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7506PW11.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7506PW11.dts index 0c251c61ff..8fe22e9a44 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7506PW11.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7506PW11.dts @@ -16,6 +16,7 @@ led-boot = &power; led-failsafe = &power_red; led-running = &power; + led-upgrade = &power; led-dsl = &dsl; led-internet = &internet; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7510PW22.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7510PW22.dts index 2c52ec62b7..92d01b4dcc 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7510PW22.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7510PW22.dts @@ -16,6 +16,7 @@ led-boot = &power; led-failsafe = &power; led-running = &power; + led-upgrade = &power; led-dsl = &internet; led-usb = &umts; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7518PW.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7518PW.dts index a033b0de7d..72f3a686b5 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7518PW.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7518PW.dts @@ -16,6 +16,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl; led-internet = &online_green; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7519PW.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7519PW.dts index 39dcf45619..bcb3b502af 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7519PW.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7519PW.dts @@ -16,6 +16,7 @@ led-boot = &power; led-failsafe = &power2; led-running = &power; + led-upgrade = &power; led-dsl = &dsl; led-internet = &online; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7519RW22.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7519RW22.dts index 2d557f4734..baa9adcc9c 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7519RW22.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7519RW22.dts @@ -17,6 +17,7 @@ led-boot = &power_green; led-failsafe = &power_green; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &internet_green; }; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7525PW.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7525PW.dts index 4252226331..a395d4ff45 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7525PW.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7525PW.dts @@ -16,6 +16,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &power_green; led-internet = &online; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV752DPW.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV752DPW.dts index 911e71a2cd..5f877723f6 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV752DPW.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV752DPW.dts @@ -16,6 +16,7 @@ led-boot = &power_red; led-failsafe = &power_blue; led-running = &power_red; + led-upgrade = &power_red; led-dsl = &internet_red; led-usb = &umts; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV752DPW22.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV752DPW22.dts index 88d9d7fdc3..1d4d662ab3 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV752DPW22.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV752DPW22.dts @@ -16,6 +16,7 @@ led-boot = &power_red; led-failsafe = &power_blue; led-running = &power_red; + led-upgrade = &power_red; led-dsl = &internet_red; led-usb = &umts; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV8539PW22.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV8539PW22.dts index 7b201ff8d3..1e55d81590 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV8539PW22.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV8539PW22.dts @@ -16,6 +16,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl_green; led-internet = &online_green; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ASL56026.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ASL56026.dts index 9a78822be3..aea3de41c6 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ASL56026.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ASL56026.dts @@ -17,6 +17,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl; }; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV2B.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV2B.dts index 105dae408d..e126065ea6 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV2B.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV2B.dts @@ -16,6 +16,7 @@ led-boot = &power_orange; led-failsafe = &power_red; led-running = &power_blue; + led-upgrade = &power_blue; led-dsl = &broadband_blue; led-wifi = &wireless_blue; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV3A.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV3A.dts index d3e2bf761c..b854ac0a99 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV3A.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV3A.dts @@ -16,6 +16,7 @@ led-boot = &power_orange; led-failsafe = &power_red; led-running = &power_blue; + led-upgrade = &power_blue; led-dsl = &broadband_blue; led-wifi = &wireless_blue; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV5A.dts index 90228667fd..c251fc3fc7 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV5A.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV5A.dts @@ -17,6 +17,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_blue; + led-upgrade = &power_blue; led-dsl = &broadband_blue; led-wifi = &wireless_blue; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DGN1000B.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DGN1000B.dts index 8982c27bef..8c61e1b743 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DGN1000B.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DGN1000B.dts @@ -16,6 +16,7 @@ led-boot = &power; led-failsafe = &power; led-running = &power; + led-upgrade = &power; led-dsl = &dsl; led-internet = &online_green; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DGN3500.dtsi b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DGN3500.dtsi index 614845f09d..b0facb4107 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DGN3500.dtsi +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DGN3500.dtsi @@ -11,6 +11,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl; led-internet = &internet; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DM200.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DM200.dts index 8302336bd4..8cf3456ee2 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DM200.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/DM200.dts @@ -17,6 +17,7 @@ led-boot = &power_green; led-failsafe = &power_amber; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl_green; }; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/EASY80920.dtsi b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/EASY80920.dtsi index b7cfc03a1e..781cdfdb5b 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/EASY80920.dtsi +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/EASY80920.dtsi @@ -14,6 +14,7 @@ led-boot = &power; led-failsafe = &power; led-running = &power; + led-upgrade = &power; led-usb = &led_usb1; led-usb2 = &led_usb2; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2.dtsi b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2.dtsi index 815c01f89c..a7e0c71915 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2.dtsi +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2.dtsi @@ -15,6 +15,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl; led-internet = &info_green; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7312.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7312.dts index eca127ab4c..c14695413e 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7312.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7312.dts @@ -16,6 +16,7 @@ led-boot = &power; led-failsafe = &power; led-running = &power; + led-upgrade = &power; led-internet = &info_green; led-dsl = &power; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7320.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7320.dts index eed4ae316a..45a59c012d 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7320.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7320.dts @@ -16,6 +16,7 @@ led-boot = &power; led-failsafe = &power; led-running = &power; + led-upgrade = &power; led-internet = &info_green; led-dsl = &power; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7360SL.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7360SL.dts index a0f5d8ee05..91520c8137 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7360SL.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7360SL.dts @@ -17,6 +17,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &info_green; led-wifi = &wifi; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/H201L.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/H201L.dts index 90f74bb384..46cae21a58 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/H201L.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/H201L.dts @@ -16,6 +16,7 @@ led-boot = &power_green; led-failsafe = &power_green; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl; led-internet = &online; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2601HNFX.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2601HNFX.dts index 444dc563b3..6e01068ed8 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2601HNFX.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2601HNFX.dts @@ -16,6 +16,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl; led-internet = &online; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUFX.dtsi b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUFX.dtsi index 579e562c38..65424e3eff 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUFX.dtsi +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUFX.dtsi @@ -14,6 +14,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl_green; led-internet = &internet_green; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VG3503J.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VG3503J.dts index bb001cb219..9735b2e011 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VG3503J.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VG3503J.dts @@ -17,6 +17,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl; }; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VGV7510KW22.dtsi b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VGV7510KW22.dtsi index ab558372ee..811f39d08b 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VGV7510KW22.dtsi +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VGV7510KW22.dtsi @@ -14,6 +14,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl; led-internet = &internet_green; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VGV7519.dtsi b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VGV7519.dtsi index b9276025bd..8ffa9146d9 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VGV7519.dtsi +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/VGV7519.dtsi @@ -14,6 +14,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &broadband_green; led-internet = &internet_green; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/WBMR.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/WBMR.dts index 02c1182305..9759b311b7 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/WBMR.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/WBMR.dts @@ -16,6 +16,7 @@ led-boot = &power_green; led-failsafe = &power_red; led-running = &power_green; + led-upgrade = &power_green; led-dsl = &dsl; led-internet = &online_green; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/WBMR300.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/WBMR300.dts index df7bc9fce1..5dcf13912e 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/WBMR300.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/WBMR300.dts @@ -17,6 +17,7 @@ led-boot = &power_g; led-failsafe = &diag_r; led-running = &power_g; + led-upgrade = &power_g; led-dsl = &dsl; led-internet = &router_g;