Skip to content

Commit

Permalink
oxnas: switch to kmod-ledtrig-usb-port
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
dangowrt committed Mar 1, 2019
1 parent 9a9c6f3 commit 5fac36d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
1 change: 0 additions & 1 deletion target/linux/oxnas/base-files/etc/board.d/01_leds
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
copy {
label = "zyxel:orange:copy";
gpios = <&gpio1 8 1>;
trigger-sources = <&ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
usb {
label = "kd20:blue:usb";
gpios = <&gpio1 8 0>;
trigger-sources = <&ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
};

Expand Down
11 changes: 6 additions & 5 deletions target/linux/oxnas/image/ox820.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -49,15 +49,15 @@ 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

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

Expand All @@ -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
Expand All @@ -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
11 changes: 10 additions & 1 deletion target/linux/oxnas/patches-4.14/800-oxnas-ehci.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};

Expand All @@ -44,6 +44,15 @@
+ /* 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 {
Expand Down

0 comments on commit 5fac36d

Please sign in to comment.