diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-03-27 20:54:25 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2015-03-29 12:58:59 +0200 |
commit | 246e3b87870aaa774769267012f624757f28d873 (patch) | |
tree | 20b6e4eafb96d603199172e952a94cf3f2b8ffcc /arch/arm/cpu | |
parent | 5db752353b6a19c50db4a30692efb7e845fb8a6e (diff) | |
download | u-boot-imx-246e3b87870aaa774769267012f624757f28d873.zip u-boot-imx-246e3b87870aaa774769267012f624757f28d873.tar.gz u-boot-imx-246e3b87870aaa774769267012f624757f28d873.tar.bz2 |
sunxi: musb: Fix some lo speed devices not working with musb host
The usb0 / otg phy on sunxi boards has a bug where it wrongly detects a
high speed squelch on usb reset deassert when a lo speed device is plugged in.
The android kernel has a work around for this in the form of temporary
disabling the phy's squelch detection on reset deassert, this commit adds
the same workaround to the u-boot sunxi musb code, thereby fixing various usb
lo speed devices not working.
Tested with a (before non working) usb keyboard and a usb 2.4 GHz wireless
keyboard/mouse combo receiver.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/armv7/sunxi/usbc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/usbc.c b/arch/arm/cpu/armv7/sunxi/usbc.c index 14de9f9..524f25c 100644 --- a/arch/arm/cpu/armv7/sunxi/usbc.c +++ b/arch/arm/cpu/armv7/sunxi/usbc.c @@ -182,6 +182,13 @@ static void sunxi_usb_passby(struct sunxi_usbc_hcd *sunxi_usbc, int enable) return; } +void sunxi_usbc_enable_squelch_detect(int index, int enable) +{ + struct sunxi_usbc_hcd *sunxi_usbc = &sunxi_usbc_hcd[index]; + + usb_phy_write(sunxi_usbc, 0x3c, enable ? 0 : 2, 2); +} + int sunxi_usbc_request_resources(int index) { struct sunxi_usbc_hcd *sunxi_usbc = &sunxi_usbc_hcd[index]; |