Skip to content

usb: Handle different sublink speeds

Thinh Nguyen linux-devicetree linux-usb 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest12 patches 2 repliesIn review
  2. v412 patches 3 repliesSuperseded
  3. v312 patches 10 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v212 patches2 repliesSuperseded
v111 patches17 repliesSuperseded

Changes in v5 from the cover letter

- Rebase on Felipe's testing/next branch
- Changed Signed-off-by email to match From: email header
- Add Rob's Reviewed-by

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12usb: ch9: Add sublink speed structinclude/linux/usb/ch9.h+43 -01 reply
2/12usb: gadget: composite: Avoid using magic numbersdrivers/usb/gadget/composite.c+20 -210 replies
3/12usb: gadget: Expose sublink speed attributesinclude/linux/usb/gadget.h+20 -00 replies
4/12usb: gadget: Set max speed for SSP devicesdrivers/usb/gadget/udc/core.c include/linux/usb/gadget.h+22 -50 replies
5/12usb: composite: Properly report sublink speeddrivers/usb/gadget/composite.c+52 -240 replies
6/12usb: devicetree: Include USB SSP Gen X x YDocumentation/devicetree/bindings/usb/generic.txt+7 -40 replies
7/12usb: common: Add and update common functions for SSP speedsdrivers/usb/common/common.c include/linux/usb/ch9.h+75 -10 replies
8/12usb: dwc3: Initialize lane count and sublink speeddrivers/usb/dwc3/core.c drivers/usb/dwc3/core.h+35 -00 replies
9/12usb: dwc3: gadget: Report sublink speed capabilitydrivers/usb/dwc3/core.h drivers/usb/dwc3/gadget.c+53 -00 replies
10/12usb: dwc3: gadget: Implement setting of sublink speeddrivers/usb/dwc3/core.h drivers/usb/dwc3/gadget.c+65 -10 replies
11/12usb: dwc3: gadget: Track connected lane and sublink speeddrivers/usb/dwc3/core.h drivers/usb/dwc3/gadget.c+22 -10 replies
12/12usb: dwc3: gadget: Set speed only up to the max supporteddrivers/usb/dwc3/gadget.c+8 -30 replies

Reviews trailers per patch

1 of 12 patches has a Reviewed-by or Acked-by.

PatchRob Herring
1/12
2/12
3/12
4/12
5/12
6/12R-b
7/12
8/12
9/12
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 00/12] usb: Handle different sublink speeds

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 v5:
- Rebase on Felipe's testing/next branch
- Changed Signed-off-by email to match From: email header
- Add Rob's Reviewed-by

Changes in v4:
- Instead of using a single function to parse "maximum-speed" property for speed, gen X, and number of lanes, split those tasks to separate common functions
- Revise DWC3 driver to use those new common functions
- Fix checkpatch warnings for using "unsigned" rather than "unsigned int" and missing identifier name in udc_set_num_lanes_and_speed gadget ops

Changes in v3:
- Remove "num-lanes" and "lane-speed-mantissa-gbps" common properties
- Remove "num-lanes" and "lane-speed-mantissa-gbps" properties validation in dwc3
- Update "maximum-speed" to support variations of SSP Gen X x Y
- Update common function to parse new strings for "maximum-speed"
- Update commit messages for the new changes

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: Include USB SSP Gen X x Y
usb: common: Add and update common functions for SSP speeds
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

 .../devicetree/bindings/usb/generic.txt       |  11 +-
 drivers/usb/common/common.c                   |  46 +++++-
 drivers/usb/dwc3/core.c                       |  29 ++++
 drivers/usb/dwc3/core.h                       |  14 ++
 drivers/usb/dwc3/gadget.c                     | 143 +++++++++++++++++-
 drivers/usb/gadget/composite.c                |  81 ++++++----
 drivers/usb/gadget/udc/core.c                 |  24 ++-
 include/linux/usb/ch9.h                       |  73 +++++++++
 include/linux/usb/gadget.h                    |  23 +++
 9 files changed, 403 insertions(+), 41 deletions(-)

base-commit: 1b28687a9c679499ddaa46dac6ca3660e46801c5

Signature · 1 line
2.28.0