linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add USB role switch support to DWC2
@ 2020-06-16 14:07 Amelie Delaunay
  2020-06-16 14:07 ` [PATCH 1/3] usb: dwc2: override PHY input signals with usb role switch support Amelie Delaunay
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Amelie Delaunay @ 2020-06-16 14:07 UTC (permalink / raw)
  To: Minas Harutyunyan, Felipe Balbi, Greg Kroah-Hartman, Rob Herring,
	Maxime Coquelin, Alexandre Torgue
  Cc: linux-usb, devicetree, linux-kernel, linux-arm-kernel,
	linux-stm32, Fabrice Gasnier, Amelie Delaunay

When using usb-c connector (but it can also be the case with a micro-b
connector), iddig, avalid, bvalid, vbusvalid input signals may not be
connected to the DWC2 OTG controller.
DWC2 OTG controller features an overriding control of the PHY voltage valid
and ID input signals.
So, missing signals can be forced using usb role from usb role switch and
this override feature.

This series adds support for usb role switch to dwc2, by using overriding
control of the PHY voltage valid and ID input signals.

It has been tested on stm32mp157c-dk2 [1], which has a Type-C connector
managed by a Type-C port controller, and connected to USB OTG controller.

[1] https://www.st.com/en/evaluation-tools/stm32mp157c-dk2.html

Amelie Delaunay (3):
  usb: dwc2: override PHY input signals with usb role switch support
  usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15
    SoCs
  ARM: dts: stm32: enable usb-role-switch on USB OTG on stm32mp15xx-dkx

 arch/arm/boot/dts/stm32mp15xx-dkx.dtsi |   2 +-
 drivers/usb/dwc2/Kconfig               |   1 +
 drivers/usb/dwc2/Makefile              |   2 +-
 drivers/usb/dwc2/core.h                |   8 ++
 drivers/usb/dwc2/drd.c                 | 190 +++++++++++++++++++++++++
 drivers/usb/dwc2/gadget.c              |   2 +-
 drivers/usb/dwc2/params.c              |   4 +-
 drivers/usb/dwc2/platform.c            |  13 ++
 8 files changed, 218 insertions(+), 4 deletions(-)
 create mode 100644 drivers/usb/dwc2/drd.c

-- 
2.17.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-07-24 13:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16 14:07 [PATCH 0/3] Add USB role switch support to DWC2 Amelie Delaunay
2020-06-16 14:07 ` [PATCH 1/3] usb: dwc2: override PHY input signals with usb role switch support Amelie Delaunay
2020-07-04 17:42   ` Martin Blumenstingl
2020-07-07 16:13     ` Amelie DELAUNAY
2020-07-07 18:55       ` Martin Blumenstingl
2020-07-08 16:00         ` Amelie DELAUNAY
2020-07-19 19:56           ` Martin Blumenstingl
2020-07-23  7:15             ` Amelie DELAUNAY
2020-06-16 14:07 ` [PATCH 2/3] usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15 SoCs Amelie Delaunay
2020-06-16 14:07 ` [PATCH 3/3] ARM: dts: stm32: enable usb-role-switch on USB OTG on stm32mp15xx-dkx Amelie Delaunay
2020-06-25 11:34 ` [PATCH 0/3] Add USB role switch support to DWC2 Minas Harutyunyan
2020-07-21  8:54 ` Alexandre Torgue
2020-07-24 12:57   ` Amelie DELAUNAY
2020-07-24 13:45     ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).