diff mbox series

[RFC,06/14] usb: devicetree: dwc3: Add max lane and lsm

Message ID aa9816c1efcdd492d698b421a94f0771961f414e.1576118671.git.thinhn@synopsys.com
State Changes Requested, archived
Headers show
Series usb: dwc3: Introduce DWC_usb32 | expand

Checks

Context Check Description
robh/checkpatch warning "total: 0 errors, 1 warnings, 10 lines checked"

Commit Message

Thinh Nguyen Dec. 12, 2019, 2:49 a.m. UTC
Add a new property to set maximum number of lanes and transfer rated
supported for DWC_usb32. By default, the driver will configure the
controller to use dual-lane at 10Gbps.

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
---
 Documentation/devicetree/bindings/usb/dwc3.txt | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Felipe Balbi Dec. 12, 2019, 8:06 a.m. UTC | #1
Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes:

> Add a new property to set maximum number of lanes and transfer rated
                                                                 ^^^^^
                                                                 rate?
Rob Herring (Arm) Dec. 19, 2019, 10:09 p.m. UTC | #2
On Wed, Dec 11, 2019 at 06:49:37PM -0800, Thinh Nguyen wrote:
> Add a new property to set maximum number of lanes and transfer rated
> supported for DWC_usb32. By default, the driver will configure the
> controller to use dual-lane at 10Gbps.
> 
> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
> ---
>  Documentation/devicetree/bindings/usb/dwc3.txt | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
> index 66780a47ad85..7da1c4e7d380 100644
> --- a/Documentation/devicetree/bindings/usb/dwc3.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc3.txt
> @@ -85,6 +85,10 @@ Optional properties:
>   - snps,quirk-frame-length-adjustment: Value for GFLADJ_30MHZ field of GFLADJ
>  	register for post-silicon frame length adjustment when the
>  	fladj_30mhz_sdbnd signal is invalid or incorrect.
> + - snps,maximum-lane-count: set to specify the number of lanes to use for
> +			DWC_usb32 and later. Default is dual-lanes.

Why do you need this? When is it not the number of lanes the phy has?

Reuse 'num-lanes' from PCI binding?

> + - snps,maximum-lsm: set to specify the lane speed mantissa to use in Gbps.
> + 			Default is 10Gbps for SuperSpeed Plus.

So the value is '10' or '10Gbps'. Other valid values?

>   - snps,rx-thr-num-pkt-prd: periodic ESS RX packet threshold count - host mode
>  			only. Set this and rx-max-burst-prd to a valid,
>  			non-zero value 1-16 (DWC_usb31 programming guide
> -- 
> 2.11.0
>
Thinh Nguyen Dec. 19, 2019, 10:49 p.m. UTC | #3
Hi,

Rob Herring wrote:
> On Wed, Dec 11, 2019 at 06:49:37PM -0800, Thinh Nguyen wrote:
>> Add a new property to set maximum number of lanes and transfer rated
>> supported for DWC_usb32. By default, the driver will configure the
>> controller to use dual-lane at 10Gbps.
>>
>> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
>> ---
>>   Documentation/devicetree/bindings/usb/dwc3.txt | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
>> index 66780a47ad85..7da1c4e7d380 100644
>> --- a/Documentation/devicetree/bindings/usb/dwc3.txt
>> +++ b/Documentation/devicetree/bindings/usb/dwc3.txt
>> @@ -85,6 +85,10 @@ Optional properties:
>>    - snps,quirk-frame-length-adjustment: Value for GFLADJ_30MHZ field of GFLADJ
>>   	register for post-silicon frame length adjustment when the
>>   	fladj_30mhz_sdbnd signal is invalid or incorrect.
>> + - snps,maximum-lane-count: set to specify the number of lanes to use for
>> +			DWC_usb32 and later. Default is dual-lanes.
> Why do you need this? When is it not the number of lanes the phy has?

The issue is the controller doesn't know the number of lanes the phy 
supports. There's no HW parameter for this. The user needs to inform 
this to the controller.

>
> Reuse 'num-lanes' from PCI binding?

Ok.

>
>> + - snps,maximum-lsm: set to specify the lane speed mantissa to use in Gbps.
>> + 			Default is 10Gbps for SuperSpeed Plus.
> So the value is '10' or '10Gbps'. Other valid values?

I'm missing this in the description. It can be either 10 or 5. If not 
set, then default to 10Gbps for SSP. I'll update this.

>
>>    - snps,rx-thr-num-pkt-prd: periodic ESS RX packet threshold count - host mode
>>   			only. Set this and rx-max-burst-prd to a valid,
>>   			non-zero value 1-16 (DWC_usb31 programming guide
>> -- 
>> 2.11.0
>>

Thanks,
Thinh
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
index 66780a47ad85..7da1c4e7d380 100644
--- a/Documentation/devicetree/bindings/usb/dwc3.txt
+++ b/Documentation/devicetree/bindings/usb/dwc3.txt
@@ -85,6 +85,10 @@  Optional properties:
  - snps,quirk-frame-length-adjustment: Value for GFLADJ_30MHZ field of GFLADJ
 	register for post-silicon frame length adjustment when the
 	fladj_30mhz_sdbnd signal is invalid or incorrect.
+ - snps,maximum-lane-count: set to specify the number of lanes to use for
+			DWC_usb32 and later. Default is dual-lanes.
+ - snps,maximum-lsm: set to specify the lane speed mantissa to use in Gbps.
+ 			Default is 10Gbps for SuperSpeed Plus.
  - snps,rx-thr-num-pkt-prd: periodic ESS RX packet threshold count - host mode
 			only. Set this and rx-max-burst-prd to a valid,
 			non-zero value 1-16 (DWC_usb31 programming guide