linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/12] usb: Handle different sublink speeds
@ 2020-07-23  2:12 Thinh Nguyen
  2020-07-23  2:12 ` [PATCH v2 01/12] usb: ch9: Add sublink speed struct Thinh Nguyen
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: Thinh Nguyen @ 2020-07-23  2:12 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Thinh Nguyen, linux-usb,
	devicetree, Rob Herring, Peter Chen, Alan Stern, Dejin Zheng,
	Roger Quadros, Marek Szyprowski
  Cc: John Youn

A USB super-speed-plus device may operate at different sublink speed and lane
count (e.g. gen2x2, gen1x2, or gen2x1). The usb gadget stack needs to be able
to handle a couple things:

1) Report the sublink speed attributes the device support
2) Select the sublink speed attribute

This series introduces sublink speed attribute structure to ch9.h to capture
the device capability of the gadget. It also introduces a new gadget ops
udc_set_num_lanes_and_speed to select a specific sublink speed.

DWC3 needs this support for DWC_usb32 IP. Implement the new changes for DWC3.

Changes in v2:
 - Move usb_sublink_speed attribute struct and enum to include/linux/usb/ch9.h
 - Use "num-lanes" and "lane-speed-mantissa-gbps" as common properties instead
 - Add common functions to get num-lanes and lsm properties
 - Fix missing gen1x2 sublink speed attribute check report in dwc3


Thinh Nguyen (12):
  usb: ch9: Add sublink speed struct
  usb: gadget: composite: Avoid using magic numbers
  usb: gadget: Expose sublink speed attributes
  usb: gadget: Set max speed for SSP devices
  usb: composite: Properly report sublink speed
  usb: devicetree: Introduce num-lanes and lsm
  usb: common: Add functions to get lanes and lsm
  usb: dwc3: Initialize lane count and sublink speed
  usb: dwc3: gadget: Report sublink speed capability
  usb: dwc3: gadget: Implement setting of sublink speed
  usb: dwc3: gadget: Track connected lane and sublink speed
  usb: dwc3: gadget: Set speed only up to the max supported

 Documentation/devicetree/bindings/usb/generic.txt |  11 ++
 drivers/usb/common/common.c                       |  26 ++++
 drivers/usb/dwc3/core.c                           |  62 ++++++++++
 drivers/usb/dwc3/core.h                           |  18 +++
 drivers/usb/dwc3/gadget.c                         | 143 +++++++++++++++++++++-
 drivers/usb/gadget/composite.c                    |  81 ++++++++----
 drivers/usb/gadget/udc/core.c                     |  24 +++-
 include/linux/usb/ch9.h                           |  62 ++++++++++
 include/linux/usb/gadget.h                        |  23 ++++
 9 files changed, 414 insertions(+), 36 deletions(-)


base-commit: 5db5ea26a2469d8899f995e82e8b718dc9e9d168
-- 
2.11.0


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

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

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23  2:12 [PATCH v2 00/12] usb: Handle different sublink speeds Thinh Nguyen
2020-07-23  2:12 ` [PATCH v2 01/12] usb: ch9: Add sublink speed struct Thinh Nguyen
2020-07-23  2:12 ` [PATCH v2 02/12] usb: gadget: composite: Avoid using magic numbers Thinh Nguyen
2020-07-23  2:12 ` [PATCH v2 03/12] usb: gadget: Expose sublink speed attributes Thinh Nguyen
2020-07-23  2:12 ` [PATCH v2 04/12] usb: gadget: Set max speed for SSP devices Thinh Nguyen
2020-07-23  2:12 ` [PATCH v2 05/12] usb: composite: Properly report sublink speed Thinh Nguyen
2020-07-23  2:12 ` [PATCH v2 06/12] usb: devicetree: Introduce num-lanes and lsm Thinh Nguyen
2020-07-23 20:29   ` Rob Herring
2020-07-24  2:39     ` Thinh Nguyen
2020-07-23  2:12 ` [PATCH v2 07/12] usb: common: Add functions to get lanes " Thinh Nguyen
2020-07-23  2:12 ` [PATCH v2 08/12] usb: dwc3: Initialize lane count and sublink speed Thinh Nguyen
2020-07-23  2:12 ` [PATCH v2 09/12] usb: dwc3: gadget: Report sublink speed capability Thinh Nguyen
2020-07-23  2:13 ` [PATCH v2 10/12] usb: dwc3: gadget: Implement setting of sublink speed Thinh Nguyen
2020-07-23  2:13 ` [PATCH v2 11/12] usb: dwc3: gadget: Track connected lane and " Thinh Nguyen
2020-07-23  2:13 ` [PATCH v2 12/12] usb: dwc3: gadget: Set speed only up to the max supported Thinh Nguyen

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