ipq40xx: convert to device-tree based USB LED trigger

Thanks to the ledtrig-usb.c the USB LED trigger can be
setup in the device-tree definition for the Asus RT-AC58U
and ZyXEL NBG6617.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
openwrt-19.07
Christian Lamparter 2018-12-20 22:43:30 +01:00
parent ee5d3a6d7c
commit ef5ff08662
5 changed files with 108 additions and 2 deletions

View File

@ -14,7 +14,6 @@ case "$board" in
asus,rt-ac58u) asus,rt-ac58u)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2G" "phy0tpt" ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2G" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5G" "phy1tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5G" "phy1tpt"
ucidef_set_led_usbport "usb" "USB" "${boardname}:blue:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1" ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1"
ucidef_set_led_switch "lan" "LAN" "${boardname}:blue:lan" "switch0" "0x1e" ucidef_set_led_switch "lan" "LAN" "${boardname}:blue:lan" "switch0" "0x1e"
;; ;;
@ -43,7 +42,6 @@ meraki,mr33)
zyxel,nbg6617) zyxel,nbg6617)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt" ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt"
ucidef_set_led_usbport "usb" "USB" "${boardname}:green:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
;; ;;
zyxel,wre6606) zyxel,wre6606)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt" ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt"

View File

@ -61,10 +61,35 @@
usb2@60f8800 { usb2@60f8800 {
status = "okay"; status = "okay";
dwc3@6000000 {
#address-cells = <1>;
#size-cells = <0>;
usb2_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
}; };
usb3@8af8800 { usb3@8af8800 {
status = "okay"; status = "okay";
dwc3@8a00000 {
#address-cells = <1>;
#size-cells = <0>;
usb3_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
usb3_port2: port@2 {
reg = <2>;
#trigger-source-cells = <0>;
};
};
}; };
crypto@8e3a000 { crypto@8e3a000 {
@ -120,6 +145,8 @@
usb { usb {
label = "nbg6617:green:usb"; label = "nbg6617:green:usb";
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
trigger-sources = <&usb2_port1>, <&usb3_port1>, <&usb3_port2>;
linux,default-trigger = "usbport";
}; };
wlan2G { wlan2G {

View File

@ -60,10 +60,35 @@
usb2@60f8800 { usb2@60f8800 {
status = "okay"; status = "okay";
dwc3@6000000 {
#address-cells = <1>;
#size-cells = <0>;
usb2_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
}; };
usb3@8af8800 { usb3@8af8800 {
status = "okay"; status = "okay";
dwc3@8a00000 {
#address-cells = <1>;
#size-cells = <0>;
usb3_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
usb3_port2: port@2 {
reg = <2>;
#trigger-source-cells = <0>;
};
};
}; };
crypto@8e3a000 { crypto@8e3a000 {
@ -135,6 +160,8 @@
usb { usb {
label = "rt-ac58u:blue:usb"; label = "rt-ac58u:blue:usb";
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
trigger-sources = <&usb3_port1>, <&usb3_port2>, <&usb2_port1>;
linux,default-trigger = "usbport";
}; };
lan { lan {

View File

@ -65,10 +65,35 @@
usb2@60f8800 { usb2@60f8800 {
status = "okay"; status = "okay";
dwc3@6000000 {
#address-cells = <1>;
#size-cells = <0>;
usb2_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
}; };
usb3@8af8800 { usb3@8af8800 {
status = "okay"; status = "okay";
dwc3@8a00000 {
#address-cells = <1>;
#size-cells = <0>;
usb3_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
usb3_port2: port@2 {
reg = <2>;
#trigger-source-cells = <0>;
};
};
}; };
crypto@8e3a000 { crypto@8e3a000 {
@ -124,6 +149,8 @@
usb { usb {
label = "nbg6617:green:usb"; label = "nbg6617:green:usb";
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
trigger-sources = <&usb2_port1>, <&usb3_port1>, <&usb3_port2>;
linux,default-trigger = "usbport";
}; };
wlan2G { wlan2G {

View File

@ -64,10 +64,35 @@
usb2@60f8800 { usb2@60f8800 {
status = "okay"; status = "okay";
dwc3@6000000 {
#address-cells = <1>;
#size-cells = <0>;
usb2_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
}; };
usb3@8af8800 { usb3@8af8800 {
status = "okay"; status = "okay";
dwc3@8a00000 {
#address-cells = <1>;
#size-cells = <0>;
usb3_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
usb3_port2: port@2 {
reg = <2>;
#trigger-source-cells = <0>;
};
};
}; };
crypto@8e3a000 { crypto@8e3a000 {
@ -129,6 +154,8 @@
usb { usb {
label = "rt-ac58u:blue:usb"; label = "rt-ac58u:blue:usb";
gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
trigger-sources = <&usb3_port1>, <&usb3_port2>, <&usb2_port1>;
linux,default-trigger = "usbport";
}; };
lan { lan {