Skip to content

Commit a4333c3

Browse files
Manu GautamFelipe Balbi
authored andcommitted
usb: dwc3: Add Qualcomm DWC3 glue driver
DWC3 controller on Qualcomm SOCs has a Qscratch wrapper. Some of its uses are described below resulting in need to have a separate glue driver instead of using dwc3-of-simple: - It exposes register interface to override vbus-override and lane0-pwr-present signals going to hardware. These must be updated in peripheral mode for DWC3 if vbus lines are not connected to hardware block. Otherwise RX termination in SS mode or DP pull-up is not applied by device controller. - pwr_events_irq_stat support to check if USB2 PHY is in L2 state before glue driver proceeds with suspend. - Support for wakeup interrupts lines that are asserted whenever there is any wakeup event on USB3 or USB2 bus. - Support to replace pip3 clock going to DWC3 with utmi clock for hardware configuration where SSPHY is not used with DWC3. Signed-off-by: Manu Gautam <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent c18aba9 commit a4333c3

File tree

4 files changed

+633
-1
lines changed

4 files changed

+633
-1
lines changed

drivers/usb/dwc3/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,16 @@ config USB_DWC3_ST
106106
inside (i.e. STiH407).
107107
Say 'Y' or 'M' if you have one such device.
108108

109+
config USB_DWC3_QCOM
110+
tristate "Qualcomm Platform"
111+
depends on ARCH_QCOM || COMPILE_TEST
112+
depends on OF
113+
default USB_DWC3
114+
help
115+
Some Qualcomm SoCs use DesignWare Core IP for USB2/3
116+
functionality.
117+
This driver also handles Qscratch wrapper which is needed
118+
for peripheral mode support.
119+
Say 'Y' or 'M' if you have one such device.
120+
109121
endif

drivers/usb/dwc3/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ obj-$(CONFIG_USB_DWC3_PCI) += dwc3-pci.o
4848
obj-$(CONFIG_USB_DWC3_KEYSTONE) += dwc3-keystone.o
4949
obj-$(CONFIG_USB_DWC3_OF_SIMPLE) += dwc3-of-simple.o
5050
obj-$(CONFIG_USB_DWC3_ST) += dwc3-st.o
51+
obj-$(CONFIG_USB_DWC3_QCOM) += dwc3-qcom.o

drivers/usb/dwc3/dwc3-of-simple.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ static const struct dev_pm_ops dwc3_of_simple_dev_pm_ops = {
208208
};
209209

210210
static const struct of_device_id of_dwc3_simple_match[] = {
211-
{ .compatible = "qcom,dwc3" },
212211
{ .compatible = "rockchip,rk3399-dwc3" },
213212
{ .compatible = "xlnx,zynqmp-dwc3" },
214213
{ .compatible = "cavium,octeon-7130-usb-uctl" },

0 commit comments

Comments
 (0)