lantiq: ARV752DPW22: set the usb led trigger via devicetree
authorMathias Kresin <dev@kresin.me>
Tue, 16 Feb 2021 18:34:48 +0000 (19:34 +0100)
committerMathias Kresin <dev@kresin.me>
Sun, 28 Feb 2021 23:19:58 +0000 (00:19 +0100)
Assign the usbdev trigger via devicetree and drop the userspace
handling of the usb leds

Add the PCI attached usb controller as trigger sources for the usb led
as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts

index ced3e3bcb44884b8ec54d4d3c07064ab2c005691..bb3e9fb188266474561af8457718882ecad8126e 100644 (file)
                };
 
                usb: usb@e101000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                        compatible = "lantiq,danube-usb";
                        reg = <0xe101000 0x1000
                                0xe120000 0x3f000>;
                        phys = <&usb_phy>;
                        phy-names = "usb2-phy";
                        status = "disabled";
+
+                       ehci_port1: port@1 {
+                               reg = <1>;
+                               #trigger-source-cells = <0>;
+                       };
                };
 
                deu@e103100 {
index 72483e47493441933bfad0475746dab8cf683b8d..00ac016a42628883a31fb6af90cbe1f98d0e1713 100644 (file)
@@ -17,7 +17,6 @@
                led-upgrade = &power_red;
 
                led-dsl = &internet_red;
-               led-usb = &umts;
                led-wifi = &wifi;
        };
 
@@ -78,6 +77,9 @@
                umts: umts {
                        label = "red:umts";
                        gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>;
+                       trigger-sources = <&ehci_port1>,
+                                         <&ehci_port2>, <&uhci_port2>;
+                       linux,default-trigger = "usbport";
                };
                wifi: wifi {
                        label = "red:wifi";
                ralink,mtd-eeprom-swap;
                mtd-mac-address = <&boardconfig 0x16>;
        };
+
+       usb@0f,0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "pci1106,3038";
+               reg = <0x7800 0 0 0 0>; /* 0000:00:0f.0: UHCI Host Controller */
+
+               uhci_port2: port@2 {
+                       reg = <2>;
+                       #trigger-source-cells = <0>;
+               };
+       };
+
+       usb@0f,2 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "pci1106,3038";
+               reg = <0x7a00 0 0 0 0>; /* 0000:00:0f.2: EHCI Host Controller*/
+
+               ehci_port2: port@2 {
+                       reg = <2>;
+                       #trigger-source-cells = <0>;
+               };
+       };
 };
 
 &usb_phy {