diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2021-04-21 01:47:02 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-04-21 18:31:55 +0000 |
commit | 75cb8ba8a4c3b5f2a5bd7195ef3d61089151a6f5 (patch) | |
tree | c528789d595a3f410baaa595229094932c05d7ff /firmware/export/config/fiiom3k.h | |
parent | 088ebb5fac02932178fe0da31dd8966472225bdf (diff) | |
download | rockbox-75cb8ba8a4c3b5f2a5bd7195ef3d61089151a6f5.tar.gz rockbox-75cb8ba8a4c3b5f2a5bd7195ef3d61089151a6f5.zip |
FiiO M3K/X1000: add USB support
This only required a minor patch to the usb-designware driver due
to DMA requiring physical addresses -- on the X1000, these differ
from virtual addresses so we have to do the usual conversion.
Both the mass storage and HID drivers work, but there are a few
issues so this can't be considered 100% stable yet.
- Mass storage might not be detected properly on insertion,
and USB has to be replugged before it shows up
- HID driver may occasionally panic or hang the machine
Change-Id: Ia3ce7591d5928ec7cbca7953abfef01bdbd873ef
Diffstat (limited to 'firmware/export/config/fiiom3k.h')
-rw-r--r-- | firmware/export/config/fiiom3k.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/export/config/fiiom3k.h b/firmware/export/config/fiiom3k.h index 115532dc39..eec1de6740 100644 --- a/firmware/export/config/fiiom3k.h +++ b/firmware/export/config/fiiom3k.h | |||
@@ -101,9 +101,17 @@ | |||
101 | #define BATTERY_CAPACITY_INC 0 | 101 | #define BATTERY_CAPACITY_INC 0 |
102 | #define BATTERY_TYPES_COUNT 1 | 102 | #define BATTERY_TYPES_COUNT 1 |
103 | 103 | ||
104 | /* USB is still TODO. */ | 104 | /* USB support */ |
105 | #ifndef SIMULATOR | 105 | #ifndef SIMULATOR |
106 | #define USB_NONE | 106 | #define CONFIG_USBOTG USBOTG_DESIGNWARE |
107 | #define USB_DW_TURNAROUND 5 | ||
108 | #define HAVE_USBSTACK | ||
109 | #define USB_VENDOR_ID 0x2972 | ||
110 | #define USB_PRODUCT_ID 0x0003 | ||
111 | #define USB_DEVBSS_ATTR __attribute__((aligned(32))) | ||
112 | #define HAVE_USB_POWER | ||
113 | #define HAVE_USB_CHARGING_ENABLE | ||
114 | #define HAVE_BOOTLOADER_USB_MODE | ||
107 | #endif | 115 | #endif |
108 | 116 | ||
109 | /* Rockbox capabilities */ | 117 | /* Rockbox capabilities */ |