kirkwood: set default state for status LEDs in device tree

This adds the default-state = "on"; statement for the power or
primary status LED in DTS on kirkwood. This will ensure that this
LED will be lit up very early in the boot process (i.e. before
diag.sh is executed) and thus will provide an additional hint to the
user when problems arise during early boot process.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
master
Adrian Schmutzler 4 years ago
parent b6db230183
commit 6bbca3a09a

@ -16,7 +16,7 @@
memory {
device_type = "memory";
@@ -81,12 +88,11 @@
@@ -81,12 +88,12 @@
&pmx_led_usb_transfer>;
pinctrl-names = "default";
@ -25,13 +25,14 @@
label = "ib62x0:green:os";
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
- default-state = "keep";
+ default-state = "on";
};
- red-os {
+ led_red_os: red-os {
label = "ib62x0:red:os";
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
};
@@ -118,13 +124,13 @@
@@ -118,13 +125,13 @@
};
partition@100000 {

@ -23,7 +23,7 @@
};
ocp@f1000000 {
@@ -89,12 +94,11 @@
@@ -89,12 +94,12 @@
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
@ -32,13 +32,14 @@
label = "power:blue";
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
- default-state = "keep";
+ default-state = "on";
};
- power-red {
+ led_power_red: power-red {
label = "power:red";
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
};
@@ -146,28 +150,23 @@
@@ -146,28 +151,23 @@
status = "okay";
partition@0 {

@ -14,7 +14,7 @@
memory {
device_type = "memory";
reg = <0x00000000 0x8000000>;
@@ -42,12 +49,11 @@
@@ -42,12 +49,12 @@
pinctrl-0 = <&pmx_led_green &pmx_led_orange>;
pinctrl-names = "default";
@ -23,13 +23,14 @@
label = "status:green:health";
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
- default-state = "keep";
+ default-state = "on";
};
- fault {
+ led_fault: fault {
label = "status:orange:fault";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
@@ -78,18 +84,22 @@
@@ -78,18 +85,22 @@
partition@0 {
label = "u-boot";

@ -14,7 +14,7 @@
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
@@ -127,16 +134,15 @@
@@ -127,16 +134,16 @@
&pmx_led_rebuild &pmx_led_health >;
pinctrl-names = "default";
@ -23,6 +23,7 @@
label = "status:white:power_led";
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
- default-state = "keep";
+ default-state = "on";
};
rebuild_led {
label = "status:white:rebuild_led";
@ -33,7 +34,7 @@
label = "status:red:health_led";
gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
};
@@ -186,18 +192,18 @@
@@ -186,18 +193,18 @@
};
partition@a0000 {
@ -55,7 +56,7 @@
reg = <0x400000 0x1C00000>;
};
};
@@ -211,7 +217,7 @@
@@ -211,7 +218,7 @@
};
&eth0 {

@ -10,7 +10,7 @@
kirkwood-lsxhl.dtb \
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-linksys-audi.dts
@@ -0,0 +1,249 @@
@@ -0,0 +1,250 @@
+/*
+ * kirkwood-linksys-audi.dts - Device Tree file for Linksys EA3500
+ *
@ -78,6 +78,7 @@
+ led_power: power {
+ label = "audi:green:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ };
+

@ -11,7 +11,7 @@
serial0 = &uart0;
};
@@ -58,7 +62,7 @@
@@ -58,9 +62,10 @@
pinctrl-0 = < &pmx_led_white_health &pmx_led_white_pulse >;
pinctrl-names = "default";
@ -19,8 +19,11 @@
+ led_white_health: white-health {
label = "viper:white:health";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
};
@@ -69,9 +73,18 @@
white-pulse {
@@ -69,9 +74,18 @@
};
};
@ -41,7 +44,7 @@
compatible = "marvell,dsa";
#address-cells = <2>;
#size-cells = <0>;
@@ -163,22 +176,22 @@
@@ -163,22 +177,22 @@
};
partition@200000 {
@ -68,7 +71,7 @@
reg = <0x1EA0000 0x1760000>;
};
@@ -209,53 +222,6 @@
@@ -209,53 +223,6 @@
&mdio {
status = "okay";
@ -122,7 +125,7 @@
};
&uart0 {
@@ -274,10 +240,14 @@
@@ -274,10 +241,14 @@
};
/* eth1 is connected to the switch at port 6. However DSA only supports a

@ -10,7 +10,7 @@
kirkwood-ib62x0.dtb \
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-goflexhome.dts
@@ -0,0 +1,123 @@
@@ -0,0 +1,124 @@
+/dts-v1/;
+
+#include "kirkwood.dtsi"
@ -72,6 +72,7 @@
+ led_health: health {
+ label = "status:green:health";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+ led_fault: fault {
+ label = "status:orange:fault";

@ -14,7 +14,7 @@
memory {
device_type = "memory";
reg = <0x00000000 0x8000000>;
@@ -85,12 +92,11 @@
@@ -85,12 +92,12 @@
>;
pinctrl-names = "default";
@ -23,13 +23,14 @@
label = "status:green:health";
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
- default-state = "keep";
+ default-state = "on";
};
- fault {
+ led_fault: fault {
label = "status:orange:fault";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
@@ -159,18 +165,8 @@
@@ -159,18 +166,8 @@
};
partition@100000 {

@ -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,131 @@
@@ -0,0 +1,132 @@
+/dts-v1/;
+
+#include "kirkwood-nsa3x0-common.dtsi"
@ -113,6 +113,7 @@ NOTE: this patch can be upstreamed as-is, LEDE-specific
+ led_green_sys: green-sys {
+ label = "nsa310:green:sys";
+ gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ led_red_sys: red-sys {
+ label = "nsa310:red:sys";

@ -14,7 +14,7 @@
memory {
device_type = "memory";
reg = <0x00000000 0x20000000>;
@@ -165,11 +172,11 @@
@@ -165,11 +172,12 @@
&pmx_led_hdd1_green &pmx_led_hdd1_red>;
pinctrl-names = "default";
@ -22,6 +22,7 @@
+ led_green_sys: green-sys {
label = "nsa325:green:sys";
gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
};
- orange-sys {
+ led_orange_sys: orange-sys {

@ -1,6 +1,6 @@
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-on100.dts
@@ -0,0 +1,164 @@
@@ -0,0 +1,165 @@
+/dts-v1/;
+
+#include "kirkwood.dtsi"
@ -50,6 +50,7 @@
+ led_health_green: health_green {
+ label = "on100:green:health";
+ gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ led_health_red: health_red {

@ -32,7 +32,7 @@
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
};
};
@@ -48,12 +56,11 @@
@@ -48,12 +56,12 @@
pinctrl-0 = <&pmx_led_green &pmx_led_red>;
pinctrl-names = "default";
@ -40,14 +40,14 @@
+ led_health: health {
label = "pogoplugv4:green:health";
gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
- default-state = "on";
default-state = "on";
};
- fault {
+ led_fault: fault {
label = "pogoplugv4:red:fault";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
};
@@ -137,29 +144,19 @@
@@ -137,29 +145,19 @@
#size-cells = <1>;
partition@0 {

@ -14,7 +14,7 @@
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
@@ -35,12 +42,11 @@
@@ -35,12 +42,12 @@
gpio-leds {
compatible = "gpio-leds";
@ -23,6 +23,7 @@
label = "pogo_e02:green:health";
gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
- default-state = "keep";
+ default-state = "on";
};
- fault {
+ led_fault: fault {

@ -16,7 +16,7 @@
memory {
device_type = "memory";
@@ -81,12 +88,11 @@
@@ -81,12 +88,12 @@
&pmx_led_usb_transfer>;
pinctrl-names = "default";
@ -25,13 +25,14 @@
label = "ib62x0:green:os";
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
- default-state = "keep";
+ default-state = "on";
};
- red-os {
+ led_red_os: red-os {
label = "ib62x0:red:os";
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
};
@@ -118,13 +124,13 @@
@@ -118,13 +125,13 @@
};
partition@100000 {

@ -23,7 +23,7 @@
};
ocp@f1000000 {
@@ -89,12 +94,11 @@
@@ -89,12 +94,12 @@
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
@ -32,13 +32,14 @@
label = "power:blue";
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
- default-state = "keep";
+ default-state = "on";
};
- power-red {
+ led_power_red: power-red {
label = "power:red";
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
};
@@ -146,28 +150,23 @@
@@ -146,28 +151,23 @@
status = "okay";
partition@0 {

@ -14,7 +14,7 @@
memory {
device_type = "memory";
reg = <0x00000000 0x8000000>;
@@ -42,12 +49,11 @@
@@ -42,12 +49,12 @@
pinctrl-0 = <&pmx_led_green &pmx_led_orange>;
pinctrl-names = "default";
@ -23,13 +23,14 @@
label = "status:green:health";
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
- default-state = "keep";
+ default-state = "on";
};
- fault {
+ led_fault: fault {
label = "status:orange:fault";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
@@ -78,18 +84,22 @@
@@ -78,18 +85,22 @@
partition@0 {
label = "u-boot";

@ -14,7 +14,7 @@
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
@@ -127,16 +134,15 @@
@@ -127,16 +134,16 @@
&pmx_led_rebuild &pmx_led_health >;
pinctrl-names = "default";
@ -23,6 +23,7 @@
label = "status:white:power_led";
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
- default-state = "keep";
+ default-state = "on";
};
rebuild_led {
label = "status:white:rebuild_led";
@ -33,7 +34,7 @@
label = "status:red:health_led";
gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
};
@@ -186,18 +192,18 @@
@@ -186,18 +193,18 @@
};
partition@a0000 {
@ -55,7 +56,7 @@
reg = <0x400000 0x1C00000>;
};
};
@@ -211,7 +217,7 @@
@@ -211,7 +218,7 @@
};
&eth0 {

@ -10,7 +10,7 @@
kirkwood-lsxhl.dtb \
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-linksys-audi.dts
@@ -0,0 +1,250 @@
@@ -0,0 +1,251 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * kirkwood-linksys-audi.dts - Device Tree file for Linksys EA3500
@ -74,6 +74,7 @@
+ led_power: power {
+ label = "audi:green:power";
+ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ };
+

@ -11,7 +11,7 @@
serial0 = &uart0;
};
@@ -56,7 +60,7 @@
@@ -56,9 +60,10 @@
pinctrl-0 = < &pmx_led_white_health &pmx_led_white_pulse >;
pinctrl-names = "default";
@ -19,8 +19,11 @@
+ led_white_health: white-health {
label = "viper:white:health";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
};
@@ -67,9 +71,23 @@
white-pulse {
@@ -67,9 +72,23 @@
};
};
@ -46,7 +49,7 @@
compatible = "marvell,dsa";
#address-cells = <2>;
#size-cells = <0>;
@@ -161,22 +179,22 @@
@@ -161,22 +180,22 @@
};
partition@200000 {
@ -73,7 +76,7 @@
reg = <0x1EA0000 0x1760000>;
};
@@ -207,53 +225,6 @@
@@ -207,53 +226,6 @@
&mdio {
status = "okay";
@ -127,7 +130,7 @@
};
&uart0 {
@@ -272,10 +243,14 @@
@@ -272,10 +244,14 @@
};
/* eth1 is connected to the switch at port 6. However DSA only supports a

@ -10,7 +10,7 @@
kirkwood-ib62x0.dtb \
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-goflexhome.dts
@@ -0,0 +1,123 @@
@@ -0,0 +1,124 @@
+/dts-v1/;
+
+#include "kirkwood.dtsi"
@ -72,6 +72,7 @@
+ led_health: health {
+ label = "status:green:health";
+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+ led_fault: fault {
+ label = "status:orange:fault";

@ -14,7 +14,7 @@
memory {
device_type = "memory";
reg = <0x00000000 0x8000000>;
@@ -85,12 +92,11 @@
@@ -85,12 +92,12 @@
>;
pinctrl-names = "default";
@ -23,13 +23,14 @@
label = "status:green:health";
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
- default-state = "keep";
+ default-state = "on";
};
- fault {
+ led_fault: fault {
label = "status:orange:fault";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
@@ -159,18 +165,8 @@
@@ -159,18 +166,8 @@
};
partition@100000 {

@ -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,131 @@
@@ -0,0 +1,132 @@
+/dts-v1/;
+
+#include "kirkwood-nsa3x0-common.dtsi"
@ -113,6 +113,7 @@ NOTE: this patch can be upstreamed as-is, LEDE-specific
+ led_green_sys: green-sys {
+ label = "nsa310:green:sys";
+ gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ led_red_sys: red-sys {
+ label = "nsa310:red:sys";

@ -14,7 +14,7 @@
memory {
device_type = "memory";
reg = <0x00000000 0x20000000>;
@@ -162,11 +169,11 @@
@@ -162,11 +169,12 @@
&pmx_led_hdd1_green &pmx_led_hdd1_red>;
pinctrl-names = "default";
@ -22,6 +22,7 @@
+ led_green_sys: green-sys {
label = "nsa325:green:sys";
gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
};
- orange-sys {
+ led_orange_sys: orange-sys {

@ -1,6 +1,6 @@
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-on100.dts
@@ -0,0 +1,162 @@
@@ -0,0 +1,163 @@
+/dts-v1/;
+
+#include "kirkwood.dtsi"
@ -48,6 +48,7 @@
+ led_health_green: health_green {
+ label = "on100:green:health";
+ gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ led_health_red: health_red {

@ -32,7 +32,7 @@
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
};
};
@@ -48,12 +56,11 @@
@@ -48,12 +56,12 @@
pinctrl-0 = <&pmx_led_green &pmx_led_red>;
pinctrl-names = "default";
@ -40,14 +40,14 @@
+ led_health: health {
label = "pogoplugv4:green:health";
gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
- default-state = "on";
default-state = "on";
};
- fault {
+ led_fault: fault {
label = "pogoplugv4:red:fault";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
};
@@ -137,29 +144,19 @@
@@ -137,29 +145,19 @@
#size-cells = <1>;
partition@0 {

@ -14,7 +14,7 @@
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
@@ -33,12 +40,11 @@
@@ -33,12 +40,12 @@
gpio-leds {
compatible = "gpio-leds";
@ -23,6 +23,7 @@
label = "pogo_e02:green:health";
gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
- default-state = "keep";
+ default-state = "on";
};
- fault {
+ led_fault: fault {

Loading…
Cancel
Save