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/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c | |
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/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c b/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c index a3760d145a..c346d16890 100644 --- a/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c +++ b/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c | |||
@@ -23,6 +23,9 @@ | |||
23 | #include "adc.h" | 23 | #include "adc.h" |
24 | #include "system.h" | 24 | #include "system.h" |
25 | #include "kernel.h" | 25 | #include "kernel.h" |
26 | #ifdef HAVE_USB_CHARGING_ENABLE | ||
27 | # include "usb_core.h" | ||
28 | #endif | ||
26 | #include "axp173.h" | 29 | #include "axp173.h" |
27 | #include "i2c-x1000.h" | 30 | #include "i2c-x1000.h" |
28 | #include "gpio-x1000.h" | 31 | #include "gpio-x1000.h" |
@@ -81,6 +84,13 @@ void power_init(void) | |||
81 | mdelay(5); | 84 | mdelay(5); |
82 | } | 85 | } |
83 | 86 | ||
87 | #ifdef HAVE_USB_CHARGING_ENABLE | ||
88 | void usb_charging_maxcurrent_change(int maxcurrent) | ||
89 | { | ||
90 | axp173_set_charge_current(maxcurrent); | ||
91 | } | ||
92 | #endif | ||
93 | |||
84 | void adc_init(void) | 94 | void adc_init(void) |
85 | { | 95 | { |
86 | } | 96 | } |