kirkwood: use generic diag.sh
authorPawel Dembicki <paweldembicki@gmail.com>
Tue, 4 Feb 2020 16:26:47 +0000 (17:26 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 22 Feb 2020 13:25:25 +0000 (14:25 +0100)
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>
25 files changed:
target/linux/kirkwood/base-files/etc/diag.sh [deleted file]
target/linux/kirkwood/patches-4.14/100-ib62x0.patch
target/linux/kirkwood/patches-4.14/101-iconnect.patch
target/linux/kirkwood/patches-4.14/102-dockstar.patch
target/linux/kirkwood/patches-4.14/103-iomega-ix2-200.patch
target/linux/kirkwood/patches-4.14/104-ea3500.patch
target/linux/kirkwood/patches-4.14/105-ea4500.patch
target/linux/kirkwood/patches-4.14/105-goflexhome.patch
target/linux/kirkwood/patches-4.14/106-goflexnet.patch
target/linux/kirkwood/patches-4.14/107-02-nsa310b.patch
target/linux/kirkwood/patches-4.14/108-on100.patch
target/linux/kirkwood/patches-4.14/109-pogoplug_v4.patch
target/linux/kirkwood/patches-4.14/110-pogo_e02.patch [new file with mode: 0644]
target/linux/kirkwood/patches-4.19/100-ib62x0.patch
target/linux/kirkwood/patches-4.19/101-iconnect.patch
target/linux/kirkwood/patches-4.19/102-dockstar.patch
target/linux/kirkwood/patches-4.19/103-iomega-ix2-200.patch
target/linux/kirkwood/patches-4.19/104-ea3500.patch
target/linux/kirkwood/patches-4.19/105-ea4500.patch
target/linux/kirkwood/patches-4.19/105-goflexhome.patch
target/linux/kirkwood/patches-4.19/106-goflexnet.patch
target/linux/kirkwood/patches-4.19/107-02-nsa310b.patch
target/linux/kirkwood/patches-4.19/108-on100.patch
target/linux/kirkwood/patches-4.19/109-pogoplug_v4.patch
target/linux/kirkwood/patches-4.19/110-pogo_e02.patch [new file with mode: 0644]

diff --git a/target/linux/kirkwood/base-files/etc/diag.sh b/target/linux/kirkwood/base-files/etc/diag.sh
deleted file mode 100755 (executable)
index fc61846..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2014 OpenWrt.org
-
-. /lib/functions.sh
-. /lib/functions/leds.sh
-
-get_status_led() {
-       case $(board_name) in
-       cisco,on100)
-               status_led="on100:green:health"
-               ;;
-       cloudengines,pogoe02)
-               status_led="pogo_e02:orange:fault"
-               ;;
-       cloudengines,pogoplugv4)
-               status_led="pogoplugv4:green:health"
-               ;;
-       iom,ix2-200)
-               status_led="status:white:power_led"
-               ;;
-       linksys,audi)
-               status_led="audi:green:power"
-               ;;
-       linksys,viper)
-               status_led="viper:white:health"
-               ;;
-       seagate,dockstar|\
-       seagate,goflexhome|\
-       seagate,goflexnet)
-               status_led="status:orange:fault"
-               ;;
-       zyxel,nsa310b)
-               status_led="nsa310:green:sys"
-               ;;
-       esac
-}
-
-set_state() {
-       get_status_led
-
-       case "$1" in
-       preinit)
-               status_led_blink_preinit
-               ;;
-       failsafe)
-               status_led_blink_failsafe
-               ;;
-       preinit_regular)
-               status_led_blink_preinit_regular
-               ;;
-       done)
-               status_led_on
-               ;;
-       esac
-}
index d1a5aa7d3ed168ca2da653caa82040f68f90ab58..494540d730fe8b200c6bea2494c4f5cd57d92565 100644 (file)
@@ -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 {
index ab47b5a72459a47faee1ecac86fe9f7af3c9fef9..f36f50eae408057a365d2017dbd9a90f2060476b 100644 (file)
@@ -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 {
index 7462b93e0ca965484413b1fadff485131c83500d..fb05e469bcfd10756a196ccb7c88824d01a8e10c 100644 (file)
@@ -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";
index 9036ead951b3b53e995577d71e3954ef23a607e3..73655e129307d32362f4e3b1a82cff520c594497 100644 (file)
@@ -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 @@
  };
  
  &eth0 {
index 73bb252a79b9053cbb82b4113938cfe8e0179df1..2aef79035e5e81260cd62d2d670a3c0289f2966c 100644 (file)
@@ -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
 + *
 +      };
 +
 +      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>;
 +              };
index 6cc3de221bdc08d0880bc06a694f6f84d92e1e65..0c2b30df0dc22219fd3a849b7e55c906656675ea 100644 (file)
@@ -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";
  };
  
  &uart0 {
-@@ -274,10 +236,14 @@
+@@ -274,10 +240,14 @@
  };
  
  /* eth1 is connected to the switch at port 6. However DSA only supports a
index 8270613ea002e3f8c03dd692ef1ede5aea668f12..8f181ac4722d0874426d14e64ba4ee9dfeab1d54 100644 (file)
@@ -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"
 +      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>;
 +      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>;
 +              };
index b22176880bd15b5e56cf16caaa3d2c668f04fbfd..340a4809de595fe78006fbaa933d1b8c12883b6a 100644 (file)
@@ -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 {
index eefd78abdbc239d91759cb20a6f4fa90d01c8309..2da8f4f0d1b1eabc2c56f925fe4dc35918afff1f 100644 (file)
@@ -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>;
 +              };
index 7856277e40263072a2ab5b064b380cbcf7e1350e..42da3e733225c472bd969e8de9bd8f3084c02c58 100644 (file)
@@ -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"
 +      };
 +
 +      aliases {
++              led-boot = &led_health_green;
++              led-failsafe = &led_health_red;
++              led-running = &led_health_green;
++              led-upgrade = &led_health_red;
 +              serial0 = &uart0;
 +      };
 +
 +              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>;
 +              };
index b4e53cd65904ec24e6170c107e703630eaebb44d..f23cd93f3366503f797e2c4667c0c8372338ceed 100644 (file)
@@ -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;
                        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 (file)
index 0000000..8bba4b1
--- /dev/null
@@ -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>;
+               };
index d1a5aa7d3ed168ca2da653caa82040f68f90ab58..494540d730fe8b200c6bea2494c4f5cd57d92565 100644 (file)
@@ -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 {
index ab47b5a72459a47faee1ecac86fe9f7af3c9fef9..f36f50eae408057a365d2017dbd9a90f2060476b 100644 (file)
@@ -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 {
index 7462b93e0ca965484413b1fadff485131c83500d..fb05e469bcfd10756a196ccb7c88824d01a8e10c 100644 (file)
@@ -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";
index 9036ead951b3b53e995577d71e3954ef23a607e3..73655e129307d32362f4e3b1a82cff520c594497 100644 (file)
@@ -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 @@
  };
  
  &eth0 {
index 45dc670ebcbded44bf1e81224e675f6f06554dcb..466bf714c42d2d9261e83fe1a7ea41f892602b93 100644 (file)
@@ -10,7 +10,7 @@
        kirkwood-lsxhl.dtb \
 --- /dev/null
 +++ b/arch/arm/boot/dts/kirkwood-linksys-audi.dts
-@@ -0,0 +1,246 @@
+@@ -0,0 +1,250 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * kirkwood-linksys-audi.dts - Device Tree file for Linksys EA3500
 +      };
 +
 +      aliases {
++              led-boot = &led_power;
++              led-failsafe = &led_power;
++              led-running = &led_power;
++              led-upgrade = &led_power;
 +              serial0 = &uart0;
 +      };
 +
@@ -67,7 +71,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>;
 +              };
index c7c8b38f95e40b984836d6fdfc556ce0b649d3ff..601c1cad6d8e3344c19baa6ada44074ff595c761 100644 (file)
@@ -1,6 +1,26 @@
 --- a/arch/arm/boot/dts/kirkwood-linksys-viper.dts
 +++ b/arch/arm/boot/dts/kirkwood-linksys-viper.dts
-@@ -67,9 +67,23 @@
+@@ -24,6 +24,10 @@
+       };
+       aliases {
++              led-boot = &led_white_health;
++              led-failsafe = &led_white_health;
++              led-running = &led_white_health;
++              led-upgrade = &led_white_health;
+               serial0 = &uart0;
+       };
+@@ -56,7 +60,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>;
+               };
+@@ -67,9 +71,23 @@
                };
        };
  
@@ -26,7 +46,7 @@
                compatible = "marvell,dsa";
                #address-cells = <2>;
                #size-cells = <0>;
-@@ -161,22 +175,22 @@
+@@ -161,22 +179,22 @@
                };
  
                partition@200000 {
@@ -53,7 +73,7 @@
                        reg = <0x1EA0000 0x1760000>;
                };
  
-@@ -207,53 +221,6 @@
+@@ -207,53 +225,6 @@
  
  &mdio {
        status = "okay";
  };
  
  &uart0 {
-@@ -272,10 +239,14 @@
+@@ -272,10 +243,14 @@
  };
  
  /* eth1 is connected to the switch at port 6. However DSA only supports a
index 9ac30b6d307ab0873d434c745e24d5ca4af00c94..db43a2721981dfe5965c4d8cd691cbe41ba3873f 100644 (file)
@@ -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"
 +      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@0 {
 +              device_type = "memory";
 +              reg = <0x00000000 0x8000000>;
 +      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>;
 +              };
index b22176880bd15b5e56cf16caaa3d2c668f04fbfd..340a4809de595fe78006fbaa933d1b8c12883b6a 100644 (file)
@@ -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 {
index f8b963e03f248ce36f0cfac15b11940af3e77bac..5e2b1d8d9c3bc238a361c1caeac13e00d4b817ba 100644 (file)
@@ -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@0 {
 +              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>;
 +              };
index 2f535955dd6721dd7e992f14f9b6ade848554fef..fa92509e2e055f22a679afb6ca42084287b32411 100644 (file)
@@ -1,6 +1,6 @@
 --- /dev/null
 +++ b/arch/arm/boot/dts/kirkwood-on100.dts
-@@ -0,0 +1,158 @@
+@@ -0,0 +1,162 @@
 +/dts-v1/;
 +
 +#include "kirkwood.dtsi"
 +      };
 +
 +      aliases {
++              led-boot = &led_health_green;
++              led-failsafe = &led_health_red;
++              led-running = &led_health_green;
++              led-upgrade = &led_health_red;
 +              serial0 = &uart0;
 +      };
 +
 +              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>;
 +              };
index b54768290eb16922901f860286a2dfd4ed776a8b..6967a0c815ec145f43359ec65446da0642755636 100644 (file)
@@ -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;
                        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.19/110-pogo_e02.patch b/target/linux/kirkwood/patches-4.19/110-pogo_e02.patch
new file mode 100644 (file)
index 0000000..82a13cc
--- /dev/null
@@ -0,0 +1,31 @@
+--- a/arch/arm/boot/dts/kirkwood-pogo_e02.dts
++++ b/arch/arm/boot/dts/kirkwood-pogo_e02.dts
+@@ -20,6 +20,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>;
+@@ -33,12 +40,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>;
+               };