summaryrefslogtreecommitdiffstats
path: root/firmware/export
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-09-26 14:58:39 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-10-16 21:14:42 +0100
commit4fc37eb47f0dd92fadd42aec31a5c8f5d5363eaf (patch)
treea0c0f350356b69d4acbab70b04103161dfdfb06c /firmware/export
parent24294bda15fc1c8c5e838e21f0bac5b5419e5cd2 (diff)
downloadrockbox-4fc37eb47f0dd92fadd42aec31a5c8f5d5363eaf.tar.gz
rockbox-4fc37eb47f0dd92fadd42aec31a5c8f5d5363eaf.zip
usb-designware: port to new USB API
List of all platforms using this driver: - Sansa Clip+ (tested, works) - Sansa Clip v2 (untested) - Sansa Clip Zip (tested, works) - Sansa Fuze v2 (untested) - iPod 6G (untested) - iPod Nano 2G (untested) - FiiO M3K (tested, works) - Shanling Q1 (tested, works) - Eros Q (tested, works) Change-Id: I403ec64b030ea38f22cb52b31865639a78cd11e4
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config.h5
-rw-r--r--firmware/export/usb-designware.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 870ae43785..e887796acc 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -1173,7 +1173,10 @@ Lyre prototype 1 */
#if CONFIG_USBOTG == USBOTG_ISP1583
#define USB_HAS_BULK
#define USB_LEGACY_CONTROL_API
-#elif (CONFIG_USBOTG == USBOTG_ARC) || \
+#elif (CONFIG_USBOTG == USBOTG_DESIGNWARE)
+#define USB_HAS_BULK
+#define USB_HAS_INTERRUPT
+#elif (CONFIG_USBOTG == USBOTG_ARC) || \
(CONFIG_USBOTG == USBOTG_JZ4740) || \
(CONFIG_USBOTG == USBOTG_JZ4760) || \
(CONFIG_USBOTG == USBOTG_M66591) || \
diff --git a/firmware/export/usb-designware.h b/firmware/export/usb-designware.h
index 428733b4f5..9e5496f0db 100644
--- a/firmware/export/usb-designware.h
+++ b/firmware/export/usb-designware.h
@@ -216,8 +216,11 @@
#define DWC_DIEPINT(x) (*((REG32_PTR_T)(OTGBASE + 0x908 + 0x20*(x))))
#define DWC_DOEPINT(x) (*((REG32_PTR_T)(OTGBASE + 0xb08 + 0x20*(x))))
+ #define SETUPRECVD (1<<15) /* control OUT */
#define TXFE (1<<7) /* IN */
+ #define BACK2BACKSETUP (1<<6) /* control OUT */
#define INEPNE (1<<6) /* IN */
+ #define STATUSRECVD (1<<5) /* control OUT */
#define ITEPMIS (1<<5) /* IN */
#define ITTXFE (1<<4) /* IN */
#define OTEPDIS (1<<4) /* OUT */