ramips: improve LED support for D-Link DIR-615 D series
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 8 Jul 2020 11:36:54 +0000 (13:36 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 21 Jul 2020 09:59:17 +0000 (11:59 +0200)
This patch adds a trigger for the WAN LED and enhances support for
the WiFi LED by enabling activity indication.

This is based on bug report feedback (see reference below).

While at it, update the LED node names in DTS file.

Fixes: FS#732
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts
target/linux/ramips/rt305x/base-files/etc/board.d/01_leds

index fa415eb948d8617e6cc64d202bc54ca314aaad66..94372b266536de8b4c9c0f4049738446c8f394c8 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               status {
+               status_amber {
                        label = "dir-615-d:amber:status";
                        gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
                };
 
-               led_status_green: status2 {
+               led_status_green: status_green {
                        label = "dir-615-d:green:status";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                        default-state = "on";
                };
 
-               wan {
+               wan_amber {
                        label = "dir-615-d:amber:wan";
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
 
-               wan2 {
+               wan_green {
                        label = "dir-615-d:green:wan";
                        gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
                };
index ae813e85d6644d184645887bddcc770604940611..8260b09821b3aff0450d9660f5597544f3a24b65 100755 (executable)
@@ -33,7 +33,6 @@ dlink,dir-300-b7|\
 dlink,dir-320-b1|\
 dlink,dir-600-b1|\
 dlink,dir-610-a1|\
-dlink,dir-615-d|\
 dlink,dir-615-h1|\
 dlink,dir-620-a1|\
 engenius,esr-9753|\
@@ -66,6 +65,10 @@ asiarf,awapn2403)
 dlink,dcs-930l-b1)
        ucidef_set_led_netdev "wifi" "WiFi" "$boardname:blue:wps"
        ;;
+dlink,dir-615-d)
+       ucidef_set_led_netdev "wan" "WAN (green)" "$boardname:green:wan" "eth0.2"
+       set_wifi_led "rt2800soc-phy0::radio"
+       ;;
 dlink,dir-620-d1|\
 trendnet,tew-714tru)
        set_wifi_led "$boardname:green:wifi"