linux/drivers/usb
Amelie Delaunay 17f934024e usb: dwc2: override PHY input signals with usb role switch support
This patch adds support for usb role switch to dwc2, by using overriding
control of the PHY voltage valid and ID input signals.

iddig signal (ID) can be overridden:
- when setting GUSBCFG_FORCEHOSTMODE, iddig input pin is overridden with 1;
- when setting GUSBCFG_FORCEDEVMODE, iddig input pin is overridden with 0.

avalid/bvalid/vbusvalid signals can be overridden respectively with:
- GOTGCTL_AVALOEN + GOTGCTL_AVALOVAL
- GOTGCTL_BVALOEN + GOTGCTL_BVALOVAL
- GOTGCTL_VBVALEN + GOTGCTL_VBVALOVAL

It is possible to determine valid sessions thanks to usb role switch:
- if USB_ROLE_NONE then !avalid && !bvalid && !vbusvalid
- if USB_ROLE_DEVICE then !avalid && bvalid && vbusvalid
- if USB_ROLE_HOST then avalid && !bvalid && vbusvalid

Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-10-02 13:29:13 +03:00
..
atm usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
c67x00 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cdns3 usb: cdns3: gadget: enlarge the TRB ring length 2020-10-02 09:57:46 +03:00
chipidea ENDIAN issue fix and one query controller role API is introduced. 2020-07-29 13:57:09 +02:00
class usblp: fix race between disconnect() and read() 2020-09-17 18:45:30 +02:00
common usb: common: usb-conn-gpio: Register charger 2020-07-30 08:45:24 +02:00
core USB: quirks: Add USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk for BYD zhaoxin notebook 2020-09-16 13:08:18 +02:00
dwc2 usb: dwc2: override PHY input signals with usb role switch support 2020-10-02 13:29:13 +03:00
dwc3 usb: dwc3: of-simple: Add compatible string for Intel Keem Bay platform 2020-10-02 13:29:13 +03:00
early usb: early: xhci-dbc: File headers are not good candidates for kerneldoc 2020-07-09 17:19:59 +02:00
gadget usb: bdc: remove duplicated error message 2020-10-02 09:57:46 +03:00
host ehci-hcd: Move include to keep CRC stable 2020-09-17 08:39:50 +02:00
image usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
isp1760 usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
misc USB: lvtest: return proper error code in probe 2020-08-18 11:55:23 +02:00
mon USB: mon: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 09:49:28 +01:00
mtu3 usb: mtu3: Remove unsused inline function is_first_entry 2020-10-02 09:43:36 +03:00
musb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
phy usb: phy: phy-ab8500-usb: fix spello of "function" 2020-10-02 09:57:41 +03:00
renesas_usbhs usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
roles usb: roles: Switch on role-switch uevent reporting 2020-05-13 14:20:49 +02:00
serial USB: serial: option: support dynamic Quectel USB compositions 2020-08-31 08:37:17 +02:00
storage USB: UAS: fix disconnect by unplugging a hub 2020-09-16 12:35:14 +02:00
typec usb: typec: intel_pmc_mux: Handle SCU IPC error conditions 2020-09-16 13:09:31 +02:00
usbip usbip: Implement a match function to fix usbip 2020-08-18 11:55:23 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00