devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 00/11] usb: Support USB 3.2 multi-lanes
@ 2021-01-14  2:52 Thinh Nguyen
  2021-01-14  2:53 ` [PATCH v6 06/11] dt-binding: usb: Include USB SSP rates in GenXxY Thinh Nguyen
  2021-01-18 17:42 ` [PATCH v6 00/11] usb: Support USB 3.2 multi-lanes Greg Kroah-Hartman
  0 siblings, 2 replies; 4+ messages in thread
From: Thinh Nguyen @ 2021-01-14  2:52 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Rob Herring, Thinh.Nguyen,
	linux-usb, devicetree, Peter Chen, Lee Jones, Alan Stern,
	Chunfeng Yun, Andrew Morton, Rob Gill, Macpaul Lin, Dejin Zheng,
	Bin Liu, Alexander A. Klimov, Ahmed S. Darwish, Marek Szyprowski
  Cc: John Youn

A USB SuperSpeed Plus device may operate at different speed and lane count
(i.e. gen2x2, gen1x2, or gen2x1). The DWC_usb32 IP supports SuperSpeed Plus
gen2x2. To support this, this series update a few things to the USB gadget
stack and dwc3 driver:

* Accept and parse new maximum_speed devicetree property strings
* Introduce enum usb_ssp_rate to describe the speed in SuperSpeed Plus genXxY
* Capture the connected and max supported usb_ssp_rate
* Report the device sublink speeds base on the usb_ssp_rate in the BOS
  descriptor
* Introduce gadget ops to select SuperSpeed Plus various transfer rate and lane
  count
* Update dwc3 driver to support the above changes

Changes in v6:
 - Rebase on Greg's usb-testing branch
 - Update the cover letter and title
   * Previous version 5: https://lore.kernel.org/linux-usb/cover.1601001199.git.Thinh.Nguyen@synopsys.com/
 - To simplify things, use usb_ssp_rate enum to specify the signaling rate
   generation and lane count instead of separately tracking them.
 - Convert the sublink speed attributes to macros and move it to uapi
 - Remove usb_sublink_speed struct
 - Remove "usb: dwc3: gadget: Report sublink speed capability"
 - Update dwc3 to support the new changes

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 (11):
  usb: ch9: Add USB 3.2 SSP attributes
  usb: gadget: composite: Use SSP sublink speed macros
  usb: gadget: Introduce SSP rates and lanes
  usb: gadget: Introduce udc_set_ssp_rate() for SSP
  usb: gadget: composite: Report various SSP sublink speeds
  dt-binding: usb: Include USB SSP rates in GenXxY
  usb: common: Parse for USB SSP genXxY
  usb: dwc3: core: Check maximum_speed SSP genXxY
  usb: dwc3: gadget: Implement setting of SSP rate
  usb: dwc3: gadget: Track connected SSP rate and lane count
  usb: dwc3: gadget: Set speed only up to the max supported

 .../devicetree/bindings/usb/usb.yaml          |  3 +
 drivers/usb/common/common.c                   | 26 +++++-
 drivers/usb/dwc3/core.c                       | 37 +++++++++
 drivers/usb/dwc3/core.h                       |  9 ++
 drivers/usb/dwc3/gadget.c                     | 80 +++++++++++++++++-
 drivers/usb/gadget/composite.c                | 83 +++++++++++++------
 drivers/usb/gadget/udc/core.c                 | 16 ++--
 include/linux/usb/ch9.h                       | 20 +++++
 include/linux/usb/gadget.h                    | 11 +++
 include/uapi/linux/usb/ch9.h                  | 13 +++
 10 files changed, 263 insertions(+), 35 deletions(-)


base-commit: 67004e130aafad4c9e0ad3fff9cf67227b6347be
-- 
2.28.0


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

* [PATCH v6 06/11] dt-binding: usb: Include USB SSP rates in GenXxY
  2021-01-14  2:52 [PATCH v6 00/11] usb: Support USB 3.2 multi-lanes Thinh Nguyen
@ 2021-01-14  2:53 ` Thinh Nguyen
  2021-01-18 17:42 ` [PATCH v6 00/11] usb: Support USB 3.2 multi-lanes Greg Kroah-Hartman
  1 sibling, 0 replies; 4+ messages in thread
From: Thinh Nguyen @ 2021-01-14  2:53 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Thinh.Nguyen, linux-usb,
	devicetree, Rob Herring
  Cc: John Youn

According to the USB 3.2 spec, a SuperSpeed Plus device can operate at
gen2x2, gen2x1, or gen1x2. If the USB controller device supports
multiple lanes at different transfer rates, the user can specify the HW
capability via these new speed strings:

"super-speed-plus-gen2x2"
"super-speed-plus-gen2x1"
"super-speed-plus-gen1x2"

If the argument is simply "super-speed-plus", USB controllers should
default to their maximum transfer rate and number of lanes.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
---
Changes in v6:
- Update the different maximum_speed enums to the usb.yaml
- Remove Reviewed-by: Rob Herring <robh@kernel.org> because the commit is updated
- Rebase on Greg's usb-testing branch
- Update commit message
Changes in v5:
- Add Reviewed-by: Rob Herring <robh@kernel.org>
- Rebase on Felipe's testing/next branch
- Changed Signed-off-by email to match From: email header
Changes in v4:
- None
Changes in v3:
- Use "maximum-speed" to include both the num-lane and transfer rate for SSP
- Remove "num-lanes" and "lane-speed-mantissa-gbps" properties
Changes in v2:
- Make "num-lanes" and "lane-speed-mantissa-gbps" common USB properties

 Documentation/devicetree/bindings/usb/usb.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/usb.yaml b/Documentation/devicetree/bindings/usb/usb.yaml
index ebe7f4275c59..78491e66ed24 100644
--- a/Documentation/devicetree/bindings/usb/usb.yaml
+++ b/Documentation/devicetree/bindings/usb/usb.yaml
@@ -54,6 +54,9 @@ properties:
       - high-speed
       - super-speed
       - super-speed-plus
+      - super-speed-plus-gen2x1
+      - super-speed-plus-gen1x2
+      - super-speed-plus-gen2x2
 
 additionalProperties: true
 
-- 
2.28.0


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

* Re: [PATCH v6 00/11] usb: Support USB 3.2 multi-lanes
  2021-01-14  2:52 [PATCH v6 00/11] usb: Support USB 3.2 multi-lanes Thinh Nguyen
  2021-01-14  2:53 ` [PATCH v6 06/11] dt-binding: usb: Include USB SSP rates in GenXxY Thinh Nguyen
@ 2021-01-18 17:42 ` Greg Kroah-Hartman
  2021-01-20  1:38   ` Thinh Nguyen
  1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-01-18 17:42 UTC (permalink / raw)
  To: Thinh Nguyen
  Cc: Felipe Balbi, Rob Herring, linux-usb, devicetree, Peter Chen,
	Lee Jones, Alan Stern, Chunfeng Yun, Andrew Morton, Rob Gill,
	Macpaul Lin, Dejin Zheng, Bin Liu, Alexander A. Klimov,
	Ahmed S. Darwish, Marek Szyprowski, John Youn

On Wed, Jan 13, 2021 at 06:52:37PM -0800, Thinh Nguyen wrote:
> A USB SuperSpeed Plus device may operate at different speed and lane count
> (i.e. gen2x2, gen1x2, or gen2x1). The DWC_usb32 IP supports SuperSpeed Plus
> gen2x2. To support this, this series update a few things to the USB gadget
> stack and dwc3 driver:
> 
> * Accept and parse new maximum_speed devicetree property strings
> * Introduce enum usb_ssp_rate to describe the speed in SuperSpeed Plus genXxY
> * Capture the connected and max supported usb_ssp_rate
> * Report the device sublink speeds base on the usb_ssp_rate in the BOS
>   descriptor
> * Introduce gadget ops to select SuperSpeed Plus various transfer rate and lane
>   count
> * Update dwc3 driver to support the above changes

I've taken the first 5 patches now, I'll wait for the DT maintainers and
dwc3 maintainers to review the rest before I can take them.  Feel free
to rebase and resend the smaller set of patches if that makes it easier
for them to review.

thanks,

greg k-h

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

* Re: [PATCH v6 00/11] usb: Support USB 3.2 multi-lanes
  2021-01-18 17:42 ` [PATCH v6 00/11] usb: Support USB 3.2 multi-lanes Greg Kroah-Hartman
@ 2021-01-20  1:38   ` Thinh Nguyen
  0 siblings, 0 replies; 4+ messages in thread
From: Thinh Nguyen @ 2021-01-20  1:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Thinh Nguyen
  Cc: Felipe Balbi, Rob Herring, linux-usb, devicetree, Peter Chen,
	Lee Jones, Alan Stern, Chunfeng Yun, Andrew Morton, Rob Gill,
	Macpaul Lin, Dejin Zheng, Bin Liu, Alexander A. Klimov,
	Ahmed S. Darwish, Marek Szyprowski, John Youn

Greg Kroah-Hartman wrote:
> On Wed, Jan 13, 2021 at 06:52:37PM -0800, Thinh Nguyen wrote:
>> A USB SuperSpeed Plus device may operate at different speed and lane count
>> (i.e. gen2x2, gen1x2, or gen2x1). The DWC_usb32 IP supports SuperSpeed Plus
>> gen2x2. To support this, this series update a few things to the USB gadget
>> stack and dwc3 driver:
>>
>> * Accept and parse new maximum_speed devicetree property strings
>> * Introduce enum usb_ssp_rate to describe the speed in SuperSpeed Plus genXxY
>> * Capture the connected and max supported usb_ssp_rate
>> * Report the device sublink speeds base on the usb_ssp_rate in the BOS
>>   descriptor
>> * Introduce gadget ops to select SuperSpeed Plus various transfer rate and lane
>>   count
>> * Update dwc3 driver to support the above changes
> I've taken the first 5 patches now, I'll wait for the DT maintainers and
> dwc3 maintainers to review the rest before I can take them.  Feel free
> to rebase and resend the smaller set of patches if that makes it easier
> for them to review.
>
> thanks,
>
> greg k-h

Just rebased and resent.

Thanks!
Thinh

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

end of thread, other threads:[~2021-01-20  1:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14  2:52 [PATCH v6 00/11] usb: Support USB 3.2 multi-lanes Thinh Nguyen
2021-01-14  2:53 ` [PATCH v6 06/11] dt-binding: usb: Include USB SSP rates in GenXxY Thinh Nguyen
2021-01-18 17:42 ` [PATCH v6 00/11] usb: Support USB 3.2 multi-lanes Greg Kroah-Hartman
2021-01-20  1:38   ` 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).