ramips: set F5D8235 v1 usb led trigger via devicetree
authorMathias Kresin <dev@kresin.me>
Fri, 17 Aug 2018 14:41:17 +0000 (16:41 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:48:04 +0000 (17:48 +0100)
Assign the usbdev trigger via devicetree and drop the userspace
handling of the usb leds.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 772b27c207364f31f8b34b80a94647810fdb581c)

target/linux/ramips/base-files/etc/board.d/01_leds
target/linux/ramips/dts/F5D8235_V1.dts

index 8a0c6049a843222b76f21a28fdf3ff7560e8084b..ab2088d9e4b1fe1c2656f0eda56eb8aef10ffe46 100755 (executable)
@@ -2,10 +2,6 @@
 
 . /lib/functions/uci-defaults.sh
 
-set_usb_led() {
-       ucidef_set_led_usbdev "usb" "USB" "${1}" "${2:-1-1}"
-}
-
 set_wifi_led() {
        ucidef_set_led_netdev "wifi_led" "wifi" "${1}" "${2:-wlan0}"
 }
@@ -144,7 +140,6 @@ ex3700)
        ;;
 f5d8235-v1)
        ucidef_set_led_default "lan" "lan" "$boardname:blue:wired" "0"
-       set_usb_led "$boardname:blue:storage"
        set_wifi_led "$boardname:blue:wireless"
        ;;
 fonera20n)
index f588c9fb21b87abf89d34d8428e1b206be335398..0cb4084be75c1b3e8de1d312a7cbe1e41ec60440 100644 (file)
                storage {
                        label = "f5d8235-v1:blue:storage";
                        gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+                       trigger-sources = <&ohci_port1>, <&ehci_port1>;
+                       linux,default-trigger = "usbport";
                };
 
                storage2 {
 
 &pci {
        status = "okay";
+
+       usb@11,0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "pci1033,0035";
+               reg = <0x8800 0 0 0 0>;
+
+               ohci_port1: port@1 {
+                       reg = <1>;
+                       #trigger-source-cells = <0>;
+               };
+       };
+
+       usb@11,1 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "pci1033,00e0";
+               reg = <0x8900 0 0 0 0>;
+
+               ehci_port1: port@1 {
+                       reg = <1>;
+                       #trigger-source-cells = <0>;
+               };
+       };
 };
 
 &wmac {