diff options
author | Pawel Dembicki <paweldembicki@gmail.com> | 2020-02-04 17:26:47 +0100 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-02-22 14:25:25 +0100 |
commit | ae67f5ffae69119eef6509a48b111164a5842346 (patch) | |
tree | edd1669fd7decb13a724f5ffdba90db937c99ee1 /target/linux/kirkwood/patches-4.14 | |
parent | a9b5473c92c01bce9b5f42659b0271bd141e3428 (diff) | |
download | upstream-ae67f5ffae69119eef6509a48b111164a5842346.tar.gz upstream-ae67f5ffae69119eef6509a48b111164a5842346.tar.bz2 upstream-ae67f5ffae69119eef6509a48b111164a5842346.zip |
kirkwood: use generic diag.sh
This commit removes the target-specific diag.sh script. This way, the
generic one is used for the target, which uses DT-aliases to specify the
LEDs used.
Generic diag.sh allow to use different LEDs to indicate different states.
Non-red status LEDs for indicating boot and a running system.
Where possible, the red or orange LEDs are used to indicate failsafe
mode and a running upgrade.
Compile-tested: all target devices.
Run-tested: CheckPoint L-50
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[remove unrelated cosmetic changes, rename some labels, add pogo_e02]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/kirkwood/patches-4.14')
12 files changed, 271 insertions, 29 deletions
diff --git a/target/linux/kirkwood/patches-4.14/100-ib62x0.patch b/target/linux/kirkwood/patches-4.14/100-ib62x0.patch index d1a5aa7d3e..494540d730 100644 --- a/target/linux/kirkwood/patches-4.14/100-ib62x0.patch +++ b/target/linux/kirkwood/patches-4.14/100-ib62x0.patch @@ -1,15 +1,37 @@ --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts -@@ -6,7 +6,7 @@ +@@ -6,7 +6,14 @@ / { model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)"; - compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + compatible = "raidsonic,ib-nas62x0", "marvell,kirkwood-88f6281", "marvell,kirkwood"; ++ ++ aliases { ++ led-boot = &led_green_os; ++ led-failsafe = &led_red_os; ++ led-running = &led_green_os; ++ led-upgrade = &led_red_os; ++ }; memory { device_type = "memory"; -@@ -118,13 +118,13 @@ +@@ -81,12 +88,11 @@ + &pmx_led_usb_transfer>; + pinctrl-names = "default"; + +- green-os { ++ led_green_os: green-os { + label = "ib62x0:green:os"; + gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; +- default-state = "keep"; + }; +- red-os { ++ led_red_os: red-os { + label = "ib62x0:red:os"; + gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; + }; +@@ -118,13 +124,13 @@ }; partition@100000 { diff --git a/target/linux/kirkwood/patches-4.14/101-iconnect.patch b/target/linux/kirkwood/patches-4.14/101-iconnect.patch index ab47b5a724..f36f50eae4 100644 --- a/target/linux/kirkwood/patches-4.14/101-iconnect.patch +++ b/target/linux/kirkwood/patches-4.14/101-iconnect.patch @@ -1,6 +1,20 @@ --- a/arch/arm/boot/dts/kirkwood-iconnect.dts +++ b/arch/arm/boot/dts/kirkwood-iconnect.dts -@@ -16,8 +16,6 @@ +@@ -8,6 +8,13 @@ + model = "Iomega Iconnect"; + compatible = "iom,iconnect-1.1", "iom,iconnect", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + ++ aliases { ++ led-boot = &led_power_blue; ++ led-failsafe = &led_power_red; ++ led-running = &led_power_blue; ++ led-upgrade = &led_power_red; ++ }; ++ + memory { + device_type = "memory"; + reg = <0x00000000 0x10000000>; +@@ -16,8 +23,6 @@ chosen { bootargs = "console=ttyS0,115200n8 earlyprintk"; stdout-path = &uart0; @@ -9,7 +23,22 @@ }; ocp@f1000000 { -@@ -146,28 +144,23 @@ +@@ -89,12 +94,11 @@ + gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; +- power-blue { ++ led_power_blue: power-blue { + label = "power:blue"; + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; +- default-state = "keep"; + }; +- power-red { ++ led_power_red: power-red { + label = "power:red"; + gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; + }; +@@ -146,28 +150,23 @@ status = "okay"; partition@0 { diff --git a/target/linux/kirkwood/patches-4.14/102-dockstar.patch b/target/linux/kirkwood/patches-4.14/102-dockstar.patch index 7462b93e0c..fb05e469bc 100644 --- a/target/linux/kirkwood/patches-4.14/102-dockstar.patch +++ b/target/linux/kirkwood/patches-4.14/102-dockstar.patch @@ -1,6 +1,35 @@ --- a/arch/arm/boot/dts/kirkwood-dockstar.dts +++ b/arch/arm/boot/dts/kirkwood-dockstar.dts -@@ -78,18 +78,22 @@ +@@ -8,6 +8,13 @@ + model = "Seagate FreeAgent Dockstar"; + compatible = "seagate,dockstar", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + ++ aliases { ++ led-boot = &led_health; ++ led-failsafe = &led_fault; ++ led-running = &led_health; ++ led-upgrade = &led_fault; ++ }; ++ + memory { + device_type = "memory"; + reg = <0x00000000 0x8000000>; +@@ -42,12 +49,11 @@ + pinctrl-0 = <&pmx_led_green &pmx_led_orange>; + pinctrl-names = "default"; + +- health { ++ led_health: health { + label = "status:green:health"; + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; +- default-state = "keep"; + }; +- fault { ++ led_fault: fault { + label = "status:orange:fault"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; +@@ -78,18 +84,22 @@ partition@0 { label = "u-boot"; diff --git a/target/linux/kirkwood/patches-4.14/103-iomega-ix2-200.patch b/target/linux/kirkwood/patches-4.14/103-iomega-ix2-200.patch index 9036ead951..73655e1293 100644 --- a/target/linux/kirkwood/patches-4.14/103-iomega-ix2-200.patch +++ b/target/linux/kirkwood/patches-4.14/103-iomega-ix2-200.patch @@ -1,6 +1,39 @@ --- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts +++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts -@@ -186,18 +186,18 @@ +@@ -8,6 +8,13 @@ + model = "Iomega StorCenter ix2-200"; + compatible = "iom,ix2-200", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + ++ aliases { ++ led-boot = &led_power; ++ led-failsafe = &led_health; ++ led-running = &led_power; ++ led-upgrade = &led_health; ++ }; ++ + memory { + device_type = "memory"; + reg = <0x00000000 0x10000000>; +@@ -127,16 +134,15 @@ + &pmx_led_rebuild &pmx_led_health >; + pinctrl-names = "default"; + +- power_led { ++ led_power: power_led { + label = "status:white:power_led"; + gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; +- default-state = "keep"; + }; + rebuild_led { + label = "status:white:rebuild_led"; + gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; + }; +- health_led { ++ led_health: health_led { + label = "status:red:health_led"; + gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; + }; +@@ -186,18 +192,18 @@ }; partition@a0000 { @@ -22,7 +55,7 @@ reg = <0x400000 0x1C00000>; }; }; -@@ -211,7 +211,7 @@ +@@ -211,7 +217,7 @@ }; ð0 { diff --git a/target/linux/kirkwood/patches-4.14/104-ea3500.patch b/target/linux/kirkwood/patches-4.14/104-ea3500.patch index 73bb252a79..2aef79035e 100644 --- a/target/linux/kirkwood/patches-4.14/104-ea3500.patch +++ b/target/linux/kirkwood/patches-4.14/104-ea3500.patch @@ -10,7 +10,7 @@ kirkwood-lsxhl.dtb \ --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-linksys-audi.dts -@@ -0,0 +1,245 @@ +@@ -0,0 +1,249 @@ +/* + * kirkwood-linksys-audi.dts - Device Tree file for Linksys EA3500 + * @@ -39,6 +39,10 @@ + }; + + aliases { ++ led-boot = &led_power; ++ led-failsafe = &led_power; ++ led-running = &led_power; ++ led-upgrade = &led_power; + serial0 = &uart0; + }; + @@ -71,7 +75,7 @@ + pinctrl-0 = < &pmx_led_green_power >; + pinctrl-names = "default"; + -+ green-power { ++ led_power: power { + label = "audi:green:power"; + gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; + }; diff --git a/target/linux/kirkwood/patches-4.14/105-ea4500.patch b/target/linux/kirkwood/patches-4.14/105-ea4500.patch index 6cc3de221b..0c2b30df0d 100644 --- a/target/linux/kirkwood/patches-4.14/105-ea4500.patch +++ b/target/linux/kirkwood/patches-4.14/105-ea4500.patch @@ -1,6 +1,26 @@ --- a/arch/arm/boot/dts/kirkwood-linksys-viper.dts +++ b/arch/arm/boot/dts/kirkwood-linksys-viper.dts -@@ -69,9 +69,18 @@ +@@ -26,6 +26,10 @@ + }; + + aliases { ++ led-boot = &led_white_health; ++ led-failsafe = &led_white_health; ++ led-running = &led_white_health; ++ led-upgrade = &led_white_health; + serial0 = &uart0; + }; + +@@ -58,7 +62,7 @@ + pinctrl-0 = < &pmx_led_white_health &pmx_led_white_pulse >; + pinctrl-names = "default"; + +- white-health { ++ led_white_health: white-health { + label = "viper:white:health"; + gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; + }; +@@ -69,9 +73,18 @@ }; }; @@ -21,7 +41,7 @@ compatible = "marvell,dsa"; #address-cells = <2>; #size-cells = <0>; -@@ -163,22 +172,22 @@ +@@ -163,22 +176,22 @@ }; partition@200000 { @@ -48,7 +68,7 @@ reg = <0x1EA0000 0x1760000>; }; -@@ -209,53 +218,6 @@ +@@ -209,53 +222,6 @@ &mdio { status = "okay"; @@ -102,7 +122,7 @@ }; &uart0 { -@@ -274,10 +236,14 @@ +@@ -274,10 +240,14 @@ }; /* eth1 is connected to the switch at port 6. However DSA only supports a diff --git a/target/linux/kirkwood/patches-4.14/105-goflexhome.patch b/target/linux/kirkwood/patches-4.14/105-goflexhome.patch index 8270613ea0..8f181ac472 100644 --- a/target/linux/kirkwood/patches-4.14/105-goflexhome.patch +++ b/target/linux/kirkwood/patches-4.14/105-goflexhome.patch @@ -10,7 +10,7 @@ kirkwood-ib62x0.dtb \ --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-goflexhome.dts -@@ -0,0 +1,117 @@ +@@ -0,0 +1,123 @@ +/dts-v1/; + +#include "kirkwood.dtsi" @@ -20,6 +20,13 @@ + model = "Seagate GoFlex Home"; + compatible = "seagate,goflexhome", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + ++ aliases { ++ led-boot = &led_health; ++ led-failsafe = &led_fault; ++ led-running = &led_health; ++ led-upgrade = &led_fault; ++ }; ++ + memory { + device_type = "memory"; + reg = <0x00000000 0x8000000>; @@ -62,12 +69,11 @@ + gpio-leds { + compatible = "gpio-leds"; + -+ health { ++ led_health: health { + label = "status:green:health"; + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; -+ linux,default-trigger = "default-on"; + }; -+ fault { ++ led_fault: fault { + label = "status:orange:fault"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; diff --git a/target/linux/kirkwood/patches-4.14/106-goflexnet.patch b/target/linux/kirkwood/patches-4.14/106-goflexnet.patch index b22176880b..340a4809de 100644 --- a/target/linux/kirkwood/patches-4.14/106-goflexnet.patch +++ b/target/linux/kirkwood/patches-4.14/106-goflexnet.patch @@ -1,6 +1,35 @@ --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts -@@ -159,18 +159,8 @@ +@@ -8,6 +8,13 @@ + model = "Seagate GoFlex Net"; + compatible = "seagate,goflexnet", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + ++ aliases { ++ led-boot = &led_health; ++ led-failsafe = &led_fault; ++ led-running = &led_health; ++ led-upgrade = &led_fault; ++ }; ++ + memory { + device_type = "memory"; + reg = <0x00000000 0x8000000>; +@@ -85,12 +92,11 @@ + >; + pinctrl-names = "default"; + +- health { ++ led_health: health { + label = "status:green:health"; + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; +- default-state = "keep"; + }; +- fault { ++ led_fault: fault { + label = "status:orange:fault"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; +@@ -159,18 +165,8 @@ }; partition@100000 { diff --git a/target/linux/kirkwood/patches-4.14/107-02-nsa310b.patch b/target/linux/kirkwood/patches-4.14/107-02-nsa310b.patch index eefd78abdb..2da8f4f0d1 100644 --- a/target/linux/kirkwood/patches-4.14/107-02-nsa310b.patch +++ b/target/linux/kirkwood/patches-4.14/107-02-nsa310b.patch @@ -20,7 +20,7 @@ NOTE: this patch can be upstreamed as-is, LEDE-specific kirkwood-openblocks_a6.dtb \ --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-nsa310b.dts -@@ -0,0 +1,124 @@ +@@ -0,0 +1,131 @@ +/dts-v1/; + +#include "kirkwood-nsa3x0-common.dtsi" @@ -34,6 +34,13 @@ NOTE: this patch can be upstreamed as-is, LEDE-specific + model = "ZyXEL NSA310b"; + compatible = "zyxel,nsa310b", "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + ++ aliases { ++ led-boot = &led_green_sys; ++ led-failsafe = &led_red_sys; ++ led-running = &led_green_sys; ++ led-upgrade = &led_red_sys; ++ }; ++ + memory { + device_type = "memory"; + reg = <0x00000000 0x10000000>; @@ -103,11 +110,11 @@ NOTE: this patch can be upstreamed as-is, LEDE-specific + gpio-leds { + compatible = "gpio-leds"; + -+ green-sys { ++ led_green_sys: green-sys { + label = "nsa310:green:sys"; + gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; + }; -+ red-sys { ++ led_red_sys: red-sys { + label = "nsa310:red:sys"; + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; + }; diff --git a/target/linux/kirkwood/patches-4.14/108-on100.patch b/target/linux/kirkwood/patches-4.14/108-on100.patch index 7856277e40..42da3e7332 100644 --- a/target/linux/kirkwood/patches-4.14/108-on100.patch +++ b/target/linux/kirkwood/patches-4.14/108-on100.patch @@ -1,6 +1,6 @@ --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-on100.dts -@@ -0,0 +1,160 @@ +@@ -0,0 +1,164 @@ +/dts-v1/; + +#include "kirkwood.dtsi" @@ -16,6 +16,10 @@ + }; + + aliases { ++ led-boot = &led_health_green; ++ led-failsafe = &led_health_red; ++ led-running = &led_health_green; ++ led-upgrade = &led_health_red; + serial0 = &uart0; + }; + @@ -43,22 +47,22 @@ + pinctrl-0 = < &pmx_led_health_r &pmx_led_health_g >; + pinctrl-names = "default"; + -+ health-g { ++ led_health_green: health_green { + label = "on100:green:health"; + gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + }; + -+ health-r { ++ led_health_red: health_red { + label = "on100:red:health"; + gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; + }; + -+ health2-g { ++ health2_green { + label = "on100:green:health2"; + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + }; + -+ health2-r { ++ health2_red { + label = "on100:red:health2"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; diff --git a/target/linux/kirkwood/patches-4.14/109-pogoplug_v4.patch b/target/linux/kirkwood/patches-4.14/109-pogoplug_v4.patch index b4e53cd659..f23cd93f33 100644 --- a/target/linux/kirkwood/patches-4.14/109-pogoplug_v4.patch +++ b/target/linux/kirkwood/patches-4.14/109-pogoplug_v4.patch @@ -1,6 +1,19 @@ --- a/arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts +++ b/arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts -@@ -24,6 +24,7 @@ +@@ -18,12 +18,20 @@ + compatible = "cloudengines,pogoplugv4", "marvell,kirkwood-88f6192", + "marvell,kirkwood"; + ++ aliases { ++ led-boot = &led_health; ++ led-failsafe = &led_fault; ++ led-running = &led_health; ++ led-upgrade = &led_fault; ++ }; ++ + memory { + device_type = "memory"; + reg = <0x00000000 0x08000000>; }; chosen { @@ -8,7 +21,7 @@ stdout-path = "uart0:115200n8"; }; -@@ -37,8 +38,8 @@ +@@ -37,8 +45,8 @@ eject { debounce_interval = <50>; wakeup-source; @@ -19,7 +32,22 @@ gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; }; }; -@@ -137,29 +138,19 @@ +@@ -48,12 +56,11 @@ + pinctrl-0 = <&pmx_led_green &pmx_led_red>; + pinctrl-names = "default"; + +- health { ++ led_health: health { + label = "pogoplugv4:green:health"; + gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; +- default-state = "on"; + }; +- fault { ++ led_fault: fault { + label = "pogoplugv4:red:fault"; + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; + }; +@@ -137,29 +144,19 @@ #size-cells = <1>; partition@0 { diff --git a/target/linux/kirkwood/patches-4.14/110-pogo_e02.patch b/target/linux/kirkwood/patches-4.14/110-pogo_e02.patch new file mode 100644 index 0000000000..8bba4b1a3c --- /dev/null +++ b/target/linux/kirkwood/patches-4.14/110-pogo_e02.patch @@ -0,0 +1,31 @@ +--- a/arch/arm/boot/dts/kirkwood-pogo_e02.dts ++++ b/arch/arm/boot/dts/kirkwood-pogo_e02.dts +@@ -22,6 +22,13 @@ + compatible = "cloudengines,pogoe02", "marvell,kirkwood-88f6281", + "marvell,kirkwood"; + ++ aliases { ++ led-boot = &led_health; ++ led-failsafe = &led_fault; ++ led-running = &led_health; ++ led-upgrade = &led_fault; ++ }; ++ + memory { + device_type = "memory"; + reg = <0x00000000 0x10000000>; +@@ -35,12 +42,11 @@ + gpio-leds { + compatible = "gpio-leds"; + +- health { ++ led_health: health { + label = "pogo_e02:green:health"; + gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; +- default-state = "keep"; + }; +- fault { ++ led_fault: fault { + label = "pogo_e02:orange:fault"; + gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; + }; |