Skip to content

Commit

Permalink
mpc85xx: use generic diag.sh
Browse files Browse the repository at this point in the history
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.

This way, we are also able to use different LEDs to indicate different
states. We use green status LEDs for indicating boot and a running
system. Where possible, the red status LED is used to indicate failsafe
mode and a running upgrade.

Signed-off-by: David Bauer <mail@david-bauer.net>
  • Loading branch information
blocktrron authored and chunkeey committed Jan 26, 2019
1 parent b2e1333 commit 90bfbed
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 46 deletions.
41 changes: 0 additions & 41 deletions target/linux/mpc85xx/base-files/etc/diag.sh

This file was deleted.

11 changes: 9 additions & 2 deletions target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts
Expand Up @@ -14,6 +14,13 @@
model = "Aerohive HiveAP-330";
compatible = "aerohive,hiveap-330";

aliases {
led-boot = &tricolor_green;
led-failsafe = &tricolor_red;
led-running = &tricolor_green;
led-upgrade = &tricolor_red;
};

chosen {
bootargs-override = "console=ttyS0,9600";
};
Expand Down Expand Up @@ -109,12 +116,12 @@
compatible = "national,lp5521";
reg = <0x32>;
clock-mode = /bits/ 8 <2>;
chan0 {
tricolor_red: chan0 {
chan-name = "hiveap-330:red:tricolor0";
led-cur = /bits/ 8 <0x2f>;
max-cur = /bits/ 8 <0x5f>;
};
chan1 {
tricolor_green:chan1 {
chan-name = "hiveap-330:green:tricolor0";
led-cur = /bits/ 8 <0x2f>;
max-cur = /bits/ 8 <0x5f>;
Expand Down
Expand Up @@ -6,19 +6,26 @@
model = "Sophos RED 15w Rev.1";
compatible = "sophos,red-15w-rev1";

aliases {
led-boot = &system_green;
led-failsafe = &system_red;
led-running = &system_green;
led-upgrade = &system_red;
};

memory {
device_type = "memory";
};

leds {
compatible = "gpio-leds";

system_green {
system_green: system_green {
gpios = <&gpio0 7 0>;
label = "red-15w-rev1:green:system";
};

system_red {
system_red: system_red {
gpios = <&gpio0 3 0>;
label = "red-15w-rev1:red:system";
};
Expand Down
Expand Up @@ -24,6 +24,10 @@

aliases {
spi0 = &spi0;
led-boot = &system_green;
led-failsafe = &system_green;
led-running = &system_green;
led-upgrade = &system_green;
};

memory {
Expand Down Expand Up @@ -192,7 +196,7 @@
leds {
compatible = "gpio-leds";

system {
system_green: system {
gpios = <&gpio0 2 1>; /* active low */
label = "tp-link:blue:system";
};
Expand Down

0 comments on commit 90bfbed

Please sign in to comment.