From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Thinh.Nguyen@synopsys.com, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Peter Chen <peter.chen@nxp.com>, Lee Jones <lee.jones@linaro.org>,
Alan Stern <stern@rowland.harvard.edu>,
Dejin Zheng <zhengdejin5@gmail.com>, Jun Li <jun.li@nxp.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Cc: John Youn <John.Youn@synopsys.com>
Subject: [PATCH v5 00/12] usb: Handle different sublink speeds
Date: Thu, 24 Sep 2020 19:41:42 -0700 [thread overview]
Message-ID: <cover.1601001199.git.Thinh.Nguyen@synopsys.com> (raw)
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
--
2.28.0
next reply other threads:[~2020-09-25 2:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 2:41 Thinh Nguyen [this message]
2020-09-25 2:41 ` [PATCH v5 01/12] usb: ch9: Add sublink speed struct Thinh Nguyen
2020-09-25 15:08 ` Greg Kroah-Hartman
2020-09-25 2:41 ` [PATCH v5 02/12] usb: gadget: composite: Avoid using magic numbers Thinh Nguyen
2020-09-25 2:42 ` [PATCH v5 03/12] usb: gadget: Expose sublink speed attributes Thinh Nguyen
2020-09-25 2:42 ` [PATCH v5 04/12] usb: gadget: Set max speed for SSP devices Thinh Nguyen
2020-09-25 2:42 ` [PATCH v5 05/12] usb: composite: Properly report sublink speed Thinh Nguyen
2020-09-25 2:42 ` [PATCH v5 06/12] usb: devicetree: Include USB SSP Gen X x Y Thinh Nguyen
2020-09-25 2:42 ` [PATCH v5 07/12] usb: common: Add and update common functions for SSP speeds Thinh Nguyen
2020-09-25 2:42 ` [PATCH v5 08/12] usb: dwc3: Initialize lane count and sublink speed Thinh Nguyen
2020-09-25 2:42 ` [PATCH v5 09/12] usb: dwc3: gadget: Report sublink speed capability Thinh Nguyen
2020-09-25 2:42 ` [PATCH v5 10/12] usb: dwc3: gadget: Implement setting of sublink speed Thinh Nguyen
2020-09-25 2:42 ` [PATCH v5 11/12] usb: dwc3: gadget: Track connected lane and " Thinh Nguyen
2020-09-25 2:44 ` [PATCH v5 12/12] usb: dwc3: gadget: Set speed only up to the max supported Thinh Nguyen
2020-09-29 18:13 ` [PATCH v5 00/12] usb: Handle different sublink speeds Thinh Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1601001199.git.Thinh.Nguyen@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=John.Youn@synopsys.com \
--cc=balbi@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jun.li@nxp.com \
--cc=lee.jones@linaro.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=peter.chen@nxp.com \
--cc=robh+dt@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=zhengdejin5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.