ramips: add DTS triggers to USB LEDs for F9K1109v1
authorKip Porterfield <kip.porterfield@gmail.com>
Fri, 3 Apr 2020 21:59:23 +0000 (21:59 +0000)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 6 Apr 2020 07:57:28 +0000 (09:57 +0200)
Alter DTS for Belkin F9K1109v1 to trigger USB leds from the echi/ochi
ports.

Signed-off-by: Kip Porterfield <kip.porterfield@gmail.com>
target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts
target/linux/ramips/image/rt3883.mk
target/linux/ramips/rt3883/base-files/etc/board.d/01_leds

index 0b4cf699b56016be4507dcd65c67e006d05253a9..05afd8af3a506c3d7a1745cb67eb1d01006f0549 100644 (file)
                usb1 {
                        label = "f9k1109v1:green:usb1";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+                       trigger-sources = <&ohci_port1>, <&ehci_port1>;
+                       linux,default-trigger = "usbport";
                };
 
                usb2 {
                        label = "f9k1109v1:green:usb2";
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+                       trigger-sources = <&ohci_port2>, <&ehci_port2>;
+                       linux,default-trigger = "usbport";
                };
 
                wps_amber {
                };
        };
 };
+
+&ehci {
+       ehci_port2: port@2 {
+               reg = <2>;
+               #trigger-source-cells = <0>;
+       };
+};
+
+&ohci {
+       ohci_port2: port@2 {
+               reg = <2>;
+               #trigger-source-cells = <0>;
+       };
+};
index c8757bb386fe1d4acac42969b7d56fe9287bf361..b86967b7c3c896297e36590e66717847bac81b2d 100644 (file)
@@ -23,7 +23,7 @@ define Device/belkin_f9k1109v1
   DEVICE_VENDOR := Belkin
   DEVICE_MODEL := F9K1109
   DEVICE_VARIANT := Version 1.0
-  DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 swconfig
+  DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport swconfig
   IMAGE_SIZE := 7808k
   KERNEL := kernel-bin | append-dtb | lzma -d16 | uImage lzma
   # Stock firmware checks for this uImage image name during upload.
index e7c2cad3d213fe4ea7b0b41577b1b7c9f93f160c..1a72112c6f00c5dfb3b2e76a3b37bac653b5c12b 100755 (executable)
@@ -18,7 +18,6 @@ led_wlan="$(get_dt_led wlan)"
 
 case $board in
 belkin,f9k1109v1)
-       ucidef_set_led_usbport "usb" "USB" "$boardname:green:usb1" "usb1-port1"
        ucidef_set_led_netdev "lan" "lan" "$boardname:blue:wps" "eth0"
        ;;
 edimax,br-6475nd)