Re: [PATCH v5 2/3] USB3/DWC3: Add property "snps, incr-burst-type-adjustment" for INCR burst type

2018-03-08 Thread Shawn Guo
On Tue, Mar 06, 2018 at 04:59:10PM +0800, Ran Wang wrote:
> Property "snps,incr-burst-type-adjustment = , ..." for USB3.0 DWC3.
> When only one value means INCRx mode with fix burst type.
> When more than one value, means undefined length burst mode, USB controller
> can use the length less than or equal to the largest enabled burst length.
> 
> While enabling undefined length INCR burst type and INCR16 burst type,
> get better write performance on NXP Layerscape platforms:
> around 3% improvement (from 364MB/s to 375MB/s).
> 
> Signed-off-by: Changming Huang 
> Signed-off-by: Ran Wang 
> ---
> Changes in v5:
>   - add support for ls1021a, ls1012a, ls1046a, ls1088a, ls1021a
>   - update ls208xa support according to code base change
> Changes in v4:
>   - change definition for this property.
> Changes in v3:
>   - add new property for INCR burst in usb node.
> 
>  Documentation/devicetree/bindings/usb/dwc3.txt |6 ++

Please do not mix bindings doc with DTS change in one patch, and only
send DTS patch after bindings and driver changes are accepted.

Shawn

>  arch/arm/boot/dts/ls1021a.dtsi |1 +
>  arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi |1 +
>  arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi |3 +++
>  arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi |3 +++
>  arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi |2 ++
>  arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi |2 ++
>  7 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt 
> b/Documentation/devicetree/bindings/usb/dwc3.txt
> index 44e8bab..d1779b2 100644
> --- a/Documentation/devicetree/bindings/usb/dwc3.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc3.txt
> @@ -59,6 +59,11 @@ Optional properties:
>   fladj_30mhz_sdbnd signal is invalid or incorrect.
>  
>   -  tx-fifo-resize: determines if the FIFO *has* to be 
> reallocated.
> + - snps,incr-burst-type-adjustment: Value for INCR burst type of GSBUSCFG0
> + register, undefined length INCR burst type enable and INCRx type.
> + When just one value, which means INCRX burst mode. When more than one
> + value, which means undefined length INCR burst type enabled.
> + The values can be 1, 4, 8, 16, 32, 64, 128 and 256.
>  
>   - in addition all properties from usb-xhci.txt from the current directory 
> are
> supported as well
> @@ -71,4 +76,5 @@ dwc3@4a03 {
>   reg = <0x4a03 0xcfff>;
>   interrupts = <0 92 4>
>   usb-phy = <&usb2_phy>, <&usb3,phy>;
> + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
>  };
> diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
> index c31dad9..b0c3f4f 100644
> --- a/arch/arm/boot/dts/ls1021a.dtsi
> +++ b/arch/arm/boot/dts/ls1021a.dtsi
> @@ -705,6 +705,7 @@
>   dr_mode = "host";
>   snps,quirk-frame-length-adjustment = <0x20>;
>   snps,dis_rxdet_inp3_quirk;
> + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
>   };
>  
>   pcie@340 {
> diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi 
> b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
> index 82b272f..4275a8f 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
> @@ -464,6 +464,7 @@
>   dr_mode = "host";
>   snps,quirk-frame-length-adjustment = <0x20>;
>   snps,dis_rxdet_inp3_quirk;
> + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
>   };
>  
>   sata: sata@320 {
> diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi 
> b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
> index 380e7c7..0067567 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
> @@ -622,6 +622,7 @@
>   dr_mode = "host";
>   snps,quirk-frame-length-adjustment = <0x20>;
>   snps,dis_rxdet_inp3_quirk;
> + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
>   };
>  
>   usb1: usb3@300 {
> @@ -631,6 +632,7 @@
>   dr_mode = "host";
>   snps,quirk-frame-length-adjustment = <0x20>;
>   snps,dis_rxdet_inp3_quirk;
> + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
>   };
>  
>   usb2: usb3@310 {
> @@ -640,6 +642,7 @@
>   dr_mode = "host";
>   snps,quirk-frame-length-adjustment = <0x20>;
>   snps,dis_rxdet_inp3_quirk;
> + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
>   };
>  
>   sata: sata@320 {
> diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi 
> b/arch/ar

Re: [PATCH v5 2/3] USB3/DWC3: Add property "snps, incr-burst-type-adjustment" for INCR burst type

2018-03-07 Thread Rob Herring
On Tue, Mar 06, 2018 at 04:59:10PM +0800, Ran Wang wrote:
> Property "snps,incr-burst-type-adjustment = , ..." for USB3.0 DWC3.
> When only one value means INCRx mode with fix burst type.
> When more than one value, means undefined length burst mode, USB controller
> can use the length less than or equal to the largest enabled burst length.
> 
> While enabling undefined length INCR burst type and INCR16 burst type,
> get better write performance on NXP Layerscape platforms:
> around 3% improvement (from 364MB/s to 375MB/s).
> 
> Signed-off-by: Changming Huang 
> Signed-off-by: Ran Wang 
> ---
> Changes in v5:
>   - add support for ls1021a, ls1012a, ls1046a, ls1088a, ls1021a
>   - update ls208xa support according to code base change
> Changes in v4:
>   - change definition for this property.
> Changes in v3:
>   - add new property for INCR burst in usb node.
> 
>  Documentation/devicetree/bindings/usb/dwc3.txt |6 ++
>  arch/arm/boot/dts/ls1021a.dtsi |1 +
>  arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi |1 +
>  arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi |3 +++
>  arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi |3 +++
>  arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi |2 ++
>  arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi |2 ++
>  7 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt 
> b/Documentation/devicetree/bindings/usb/dwc3.txt
> index 44e8bab..d1779b2 100644
> --- a/Documentation/devicetree/bindings/usb/dwc3.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc3.txt
> @@ -59,6 +59,11 @@ Optional properties:
>   fladj_30mhz_sdbnd signal is invalid or incorrect.
>  
>   -  tx-fifo-resize: determines if the FIFO *has* to be 
> reallocated.
> + - snps,incr-burst-type-adjustment: Value for INCR burst type of GSBUSCFG0
> + register, undefined length INCR burst type enable and INCRx type.
> + When just one value, which means INCRX burst mode. When more than one
> + value, which means undefined length INCR burst type enabled.
> + The values can be 1, 4, 8, 16, 32, 64, 128 and 256.

I don't understand the multiple values for undefined length burst. Why 
do you need burst length if length is undefined? Looking at the driver, 
it looks like you only care about the largest value.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html