oxnas: switch to kmod-ledtrig-usb-port
authorDaniel Golle <daniel@makrotopia.org>
Fri, 1 Mar 2019 01:43:48 +0000 (02:43 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 1 Mar 2019 03:09:00 +0000 (04:09 +0100)
Add port handles for both USB 2.0 ports so they can be used as
trigger-source for USB LEDs.
Suggestions for pogoplug and akitio,mycloud devices are welcome.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/oxnas/base-files/etc/board.d/01_leds
target/linux/oxnas/files/arch/arm/boot/dts/ox820-mitrastar-stg212.dts
target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts
target/linux/oxnas/image/ox820.mk
target/linux/oxnas/patches-4.14/800-oxnas-ehci.patch

index 66a24e1..0d92b16 100755 (executable)
@@ -11,7 +11,6 @@ case $board in
                ;;
        "mitrastar,stg-212")
                ucidef_set_led_default "power" "power" "zyxel:blue:status" "1"
-               ucidef_set_led_usbdev "usb" "USB" "zyxel:orange:copy" "1-1"
                ;;
        "shuttle,kd20")
                ucidef_set_led_default "power" "power" "kd20:blue:status" "1"
index feb95eb..b3282ac 100644 (file)
@@ -56,6 +56,8 @@
                copy {
                        label = "zyxel:orange:copy";
                        gpios = <&gpio1 8 1>;
+                       trigger-sources = <&ehci_port1>, <&ehci_port2>;
+                       linux,default-trigger = "usbport";
                };
        };
 
index 1f88e76..2c7bd16 100644 (file)
@@ -96,6 +96,8 @@
                usb {
                        label = "kd20:blue:usb";
                        gpios = <&gpio1 8 0>;
+                       trigger-sources = <&ehci_port1>, <&ehci_port2>;
+                       linux,default-trigger = "usbport";
                };
        };
 
index 60f85d1..7f81fd2 100644 (file)
@@ -40,7 +40,7 @@ define Device/akitio-mycloud
   DEVICE_DTS := ox820-akitio-mycloud
   DEVICE_TITLE := Akition myCloud (mini) / SilverStone DC01
   SUPPORTED_DEVICES := akitio,mycloud akitio
-  DEVICE_PACKAGES := kmod-usb2-oxnas kmod-ata-oxnas-sata kmod-ledtrig-usbdev \
+  DEVICE_PACKAGES := kmod-usb2-oxnas kmod-ata-oxnas-sata kmod-usb-ledtrig-usbport \
                      kmod-i2c-gpio kmod-rtc-ds1307
 endef
 TARGET_DEVICES += akitio-mycloud
@@ -49,7 +49,7 @@ define Device/cloudengines-pogoplug-pro
   DEVICE_DTS := ox820-cloudengines-pogoplug-pro
   DEVICE_TITLE := Cloud Engines PogoPlug Pro (with mPCIe)
   SUPPORTED_DEVICES := cloudengines,pogoplugpro pogoplug-pro
-  DEVICE_PACKAGES := kmod-usb2-oxnas kmod-ledtrig-usbdev
+  DEVICE_PACKAGES := kmod-usb2-oxnas kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += cloudengines-pogoplug-pro
 
@@ -57,7 +57,7 @@ define Device/cloudengines-pogoplug-series-3
   DEVICE_DTS := ox820-cloudengines-pogoplug-series-3
   DEVICE_TITLE := Cloud Engines PogoPlug Series V3 (without mPCIe)
   SUPPORTED_DEVICES := cloudengines,pogoplugv3 pogoplug-v3
-  DEVICE_PACKAGES := kmod-usb2-oxnas kmod-ledtrig-usbdev
+  DEVICE_PACKAGES := kmod-usb2-oxnas kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += cloudengines-pogoplug-series-3
 
@@ -69,7 +69,7 @@ define Device/shuttle-kd20
   KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-factory
   KERNEL_INITRAMFS_SUFFIX := .tar.gz
   KERNEL_INITRAMFS = kernel-bin | append-dtb | uImage none | omninas-factory | encrypt-3des sohmuntitnlaes
-  DEVICE_PACKAGES := kmod-usb2-oxnas kmod-ata-oxnas-sata kmod-ledtrig-usbdev \
+  DEVICE_PACKAGES := kmod-usb2-oxnas kmod-ata-oxnas-sata kmod-usb-ledtrig-usbport \
                      kmod-usb3 kmod-i2c-gpio kmod-rtc-pcf8563 kmod-gpio-beeper \
                      kmod-hwmon-core kmod-hwmon-gpiofan \
                      kmod-md-mod kmod-md-raid0 kmod-md-raid1 kmod-fs-ext4 kmod-fs-xfs
@@ -81,6 +81,7 @@ define Device/mitrastar-stg212
   DEVICE_TITLE := MitraStar STG-212
   SUPPORTED_DEVICES := mitrastar,stg-212 stg212
   KERNEL := kernel-bin | append-dtb | uImage none
-  DEVICE_PACKAGES := kmod-usb2-oxnas kmod-ata-oxnas-sata kmod-ledtrig-usbdev
+  DEVICE_PACKAGES := kmod-usb2-oxnas kmod-ata-oxnas-sata kmod-fs-ext4 kmod-fs-xfs \
+                     kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += mitrastar-stg212
index b4e34e5..cb197aa 100644 (file)
@@ -26,7 +26,7 @@
  obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
 --- a/arch/arm/boot/dts/ox820.dtsi
 +++ b/arch/arm/boot/dts/ox820.dtsi
-@@ -105,6 +105,22 @@
+@@ -105,6 +105,31 @@
                        status = "disabled";
                };
  
 +                      /* FIXME: how to make this dependency explicit ? */
 +                      oxsemi,ehci_use_pllb;
 +                      status = "disabled";
++
++                      ehci_port1: port@1 {
++                              reg = <1>;
++                              #trigger-source-cells = <0>;
++                      };
++                      ehci_port2: port@2 {
++                              reg = <2>;
++                              #trigger-source-cells = <0>;
++                      };
 +              };
 +
                apb-bridge@44000000 {