linux/drivers/usb
Fabrice Gasnier f5c8a6cb23 usb: dwc2: add otg_rev and otg_caps information for gadget driver
Currently the dwc2 doesn't fill in the 'otg_caps' of usb_gadget structure.
When registering a gadget device (e.g. via configfs), the
usb_otg_descriptor_init() checks the 'otg_caps' and 'otg_rev'. It defaults
to HNP and SRP bmAttributes if unspecified. There may be a mismatch with
what's being set in dwc2 params structure. This result in the descriptors
to be miss-configured in this case.

So replace 'otg_cap' bit field by 'otg_caps' structure, so hnp, srp and
otg_rev' can be configured directly in the params.
It's then provided to the gadget struct. These parameters can be tuned
for each platform. In case it's not set, it will default to current
behavior.

Also add option to setup these from the device tree by calling
of_usb_update_otg_caps(). This provides support for standard properties
such as "otg-rev", "hnp-disable" and "srp-disable" (see usb-drd.yaml).

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/1634133425-25670-4-git-send-email-fabrice.gasnier@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-25 09:20:26 +02:00
..
atm usb: atm: Use struct_size() helper 2021-10-05 12:50:22 +02:00
c67x00
cdns3 usb: cdns3: fix race condition before setting doorbell 2021-09-14 10:32:41 +02:00
chipidea USB: chipidea: fix interrupt deadlock 2021-10-22 11:14:12 +02:00
class Merge 5.15-rc5 into usb-next 2021-10-11 07:39:38 +02:00
common Partially revert "usb: Kconfig: using select for USB_COMMON dependency" 2021-10-05 13:45:16 +02:00
core usb: core: config: Change sizeof(struct ...) to sizeof(*...) 2021-10-06 08:25:47 +02:00
dwc2 usb: dwc2: add otg_rev and otg_caps information for gadget driver 2021-10-25 09:20:26 +02:00
dwc3 usb: dwc3: Align DWC3_EP_* flag macros 2021-10-22 11:14:26 +02:00
early
gadget usb: gadget: uvc: implement dwPresentationTime and scrSourceClock 2021-10-25 09:20:08 +02:00
host usb: max-3421: Use driver data instead of maintaining a list of bound devices 2021-10-21 12:52:28 +02:00
image
isp1760 usb: isp1760: otg control register access 2021-08-27 16:11:39 +02:00
misc Revert "usb: misc: ehset: Workaround for "special" hubs" 2021-10-07 12:48:54 +02:00
mon
mtu3 usb: mtu3: fix random remote wakeup 2021-08-26 13:41:52 +02:00
musb usb: musb: Balance list entry in musb_gadget_queue 2021-10-22 11:12:45 +02:00
phy USB: phy: tahvo:remove unnecessary debug log 2021-10-05 12:51:07 +02:00
renesas_usbhs usb: renesas_usbhs: Fix spelling mistake "faile" -> "failed" 2021-08-27 10:29:32 +02:00
roles usb: roles: add helper usb_role_string() 2021-05-27 09:17:18 +02:00
serial USB: serial: qcserial: add EM9191 QDL support 2021-10-07 15:39:06 +02:00
storage usb-storage: Add compatibility quirk flags for iODD 2531/2541 2021-10-18 17:05:34 +02:00
typec usb: typec: tipd: Enable event interrupts by default 2021-10-20 19:31:13 +02:00
usbip usbip:vhci_hcd USB port can get stuck in the disabled state 2021-08-26 13:29:27 +02:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c usb: usb-skeleton: Update min() to min_t() 2021-10-05 12:56:48 +02:00