devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] overlays: dwc2: Increase RX FIFO size
@ 2020-02-07 16:30 Pavel Hofman
  2020-02-07 17:25 ` Nicolas Saenz Julienne
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Hofman @ 2020-02-07 16:30 UTC (permalink / raw)
  To: Minas Harutyunyan, Rob Herring, Nicolas Saenz Julienne,
	linux-usb, devicetree, linux-rpi-kernel

The previous version of the dwc2 overlay set the RX FIFO size to
256 4-byte words. This sounds large enough for a 1024 byte packet (the
largest isochronous high speed packet allowed), but it doesn't take
into account some extra space needed by the hardware.

Minas Harutyunyan at Synopsys (the source of the DWC OTG design)
came up with a more correct value, 301, but since there is spare packet
RAM this can be increased to 558 to allow two packets per frame.

See: https://github.com/raspberrypi/linux/issues/3447

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
---
 arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi        | 2 +-
 arch/arm/boot/dts/bcm283x-rpi-usb-peripheral.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
b/arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
index e2fd961..20322de 100644
--- a/arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
+++ b/arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 &usb {
 	dr_mode = "otg";
-	g-rx-fifo-size = <256>;
+	g-rx-fifo-size = <558>;
 	g-np-tx-fifo-size = <32>;
 	/*
 	 * According to dwc2 the sum of all device EP
diff --git a/arch/arm/boot/dts/bcm283x-rpi-usb-peripheral.dtsi
b/arch/arm/boot/dts/bcm283x-rpi-usb-peripheral.dtsi
index 0ff0e9e..1409d1b 100644
--- a/arch/arm/boot/dts/bcm283x-rpi-usb-peripheral.dtsi
+++ b/arch/arm/boot/dts/bcm283x-rpi-usb-peripheral.dtsi
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 &usb {
 	dr_mode = "peripheral";
-	g-rx-fifo-size = <256>;
+	g-rx-fifo-size = <558>;
 	g-np-tx-fifo-size = <32>;
 	g-tx-fifo-size = <256 256 512 512 512 768 768>;
 };
-- 
1.9.1


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

* Re: [PATCH] overlays: dwc2: Increase RX FIFO size
  2020-02-07 16:30 [PATCH] overlays: dwc2: Increase RX FIFO size Pavel Hofman
@ 2020-02-07 17:25 ` Nicolas Saenz Julienne
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Saenz Julienne @ 2020-02-07 17:25 UTC (permalink / raw)
  To: Pavel Hofman, Minas Harutyunyan, Rob Herring, linux-usb,
	devicetree, linux-rpi-kernel

[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]

Hi Pavel,
Could you change the patch title to something like this (see other patches
changing the device-trees, you'll see it's the common pattern):

	ARM: dts: bcm283x: increase dwc2's RX FIFO size

On Fri, 2020-02-07 at 17:30 +0100, Pavel Hofman wrote:
> The previous version of the dwc2 overlay set the RX FIFO size to
> 256 4-byte words. This sounds large enough for a 1024 byte packet (the
> largest isochronous high speed packet allowed), but it doesn't take
> into account some extra space needed by the hardware.
> 
> Minas Harutyunyan at Synopsys (the source of the DWC OTG design)
> came up with a more correct value, 301, but since there is spare packet
> RAM this can be increased to 558 to allow two packets per frame.

I suggest making a short summary of your github explanation[1] instead of just
citing Minas. On one hand Minas' memory might get fuzzy after some time (or not
be able to access the documentation) and...

> See: https://github.com/raspberrypi/linux/issues/3447

...you're assuming this link will be always available. Which is unlikely. After
properly explaining the issue, you won't need the link anyway. Ultimately a
patch description should be as self-contained/self-explanatory as possible.

Other than that the patch looks good.
Thanks!
Nicolas

[1] https://github.com/raspberrypi/linux/issues/3447#issuecomment-581815066


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2020-02-07 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 16:30 [PATCH] overlays: dwc2: Increase RX FIFO size Pavel Hofman
2020-02-07 17:25 ` Nicolas Saenz Julienne

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).