usb: dwc3: add rockchip specific glue layer
authorWu Liang feng <wulf@rock-chips.com>
Mon, 15 Aug 2016 03:18:37 +0000 (11:18 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 17 Aug 2016 10:36:12 +0000 (18:36 +0800)
commit077b494a0eacdbaf5e07c00f1c8f50baa0c5e82f
treedae54918d80f301f61efa17ab1a845dcdfa49423
parentd92316c1a817e99c9a6554339102eb54b4d38145
usb: dwc3: add rockchip specific glue layer

Add rockchip specific glue layer to support USB3 Peripheral mode
and Host mode on rockchip platforms (e.g. rk3399).

The DesignWare USB3 integrated in rockchip SoCs is a configurable
IP Core which can be instantiated as Dual-Role Device (DRD), Host
Only (XHCI) and Peripheral Only configurations.

We use extcon notifier to manage usb cable detection and mode switch.
Enable DWC3 PM runtime auto suspend to allow core enter runtime_suspend
if USB cable is dettached. For host mode, it requires to keep whole
DWC3 controller in reset state to hold pipe power state in P2 before
initializing PHY. And it need to reconfigure USB PHY interface of DWC3
core after deassert DWC3 controller reset.

The current driver supports Host only and Peripheral Only well, for
now, we will add support for OTG after we have it all stabilized.

Change-Id: I821dd19eedec73e6517f0cca184f939a9f313904
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
drivers/usb/dwc3/Kconfig
drivers/usb/dwc3/Makefile
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/dwc3/dwc3-rockchip.c [new file with mode: 0644]