linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] usb: dwc2: fill in gadget caps, configure it for stm32mp15
@ 2021-09-15  7:54 Fabrice Gasnier
  2021-09-15  7:54 ` [PATCH 1/3] usb: dwc2: add otg_rev and otg_caps information for gadget driver Fabrice Gasnier
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Fabrice Gasnier @ 2021-09-15  7:54 UTC (permalink / raw)
  To: hminas, gregkh, robh+dt, alexandre.torgue
  Cc: balbi, linux-usb, linux-kernel, linux-stm32, devicetree,
	amelie.delaunay, fabrice.gasnier

This patchset fills in 'otg_caps' of the usb_gadget structure, and configures it
on stm32mp15.

When dwc2 is configured as dual role (OTG), the USB gadget descriptors (device mode)
are configured via configfs. This lead in calling usb_otg_descriptor_init().
In usb_otg_descriptor_init() (drivers/usb/gadget/config.c):
- If otg caps structure is provided -> use it
- If otg caps structure isn't provided -> HNP and SRP are enabled by default

This could lead to a configuration mismatch beetween:
- OTG controller: HNP and SRP aren't enabled
- gadget descriptors: HNP and SRP are advertised

Fabrice Gasnier (3):
  usb: dwc2: add otg_rev and otg_caps information for gadget driver
  usb: dwc2: stm32mp15: set otg_rev
  ARM: dts: stm32: set otg-rev on stm32mp151

 arch/arm/boot/dts/stm32mp151.dtsi |  1 +
 drivers/usb/dwc2/core.h           |  7 +++++++
 drivers/usb/dwc2/gadget.c         |  1 +
 drivers/usb/dwc2/params.c         | 16 ++++++++++++++++
 4 files changed, 25 insertions(+)

-- 
2.7.4


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

end of thread, other threads:[~2021-10-06  6:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15  7:54 [PATCH 0/3] usb: dwc2: fill in gadget caps, configure it for stm32mp15 Fabrice Gasnier
2021-09-15  7:54 ` [PATCH 1/3] usb: dwc2: add otg_rev and otg_caps information for gadget driver Fabrice Gasnier
2021-10-01 11:10   ` Minas Harutyunyan
2021-10-06  6:27     ` gregkh
2021-09-15  7:54 ` [PATCH 2/3] usb: dwc2: stm32mp15: set otg_rev Fabrice Gasnier
2021-10-01 11:10   ` Minas Harutyunyan
2021-09-15  7:54 ` [PATCH 3/3] ARM: dts: stm32: set otg-rev on stm32mp151 Fabrice Gasnier

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).