ramips: set F5D8235 v1 usb led trigger via devicetree

Assign the usbdev trigger via devicetree and drop the userspace
handling of the usb leds.

Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
Mathias Kresin 2018-08-17 16:41:17 +02:00
parent 04eab0a1c9
commit 772b27c207
2 changed files with 26 additions and 5 deletions

View File

@ -2,10 +2,6 @@
. /lib/functions/uci-defaults.sh . /lib/functions/uci-defaults.sh
set_usb_led() {
ucidef_set_led_usbdev "usb" "USB" "${1}" "${2:-1-1}"
}
set_wifi_led() { set_wifi_led() {
ucidef_set_led_netdev "wifi_led" "wifi" "${1}" "${2:-wlan0}" ucidef_set_led_netdev "wifi_led" "wifi" "${1}" "${2:-wlan0}"
} }
@ -144,7 +140,6 @@ ex3700)
;; ;;
f5d8235-v1) f5d8235-v1)
ucidef_set_led_default "lan" "lan" "$boardname:blue:wired" "0" ucidef_set_led_default "lan" "lan" "$boardname:blue:wired" "0"
set_usb_led "$boardname:blue:storage"
set_wifi_led "$boardname:blue:wireless" set_wifi_led "$boardname:blue:wireless"
;; ;;
fonera20n) fonera20n)

View File

@ -146,6 +146,8 @@
storage { storage {
label = "f5d8235-v1:blue:storage"; label = "f5d8235-v1:blue:storage";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
}; };
storage2 { storage2 {
@ -209,6 +211,30 @@
&pci { &pci {
status = "okay"; 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 { &wmac {