From: "Anton D. Stavinskii" <stavinsky@gmail.com>
To: inochiama@gmail.com
Cc: alex@ghiti.fr, alexander.sverdlin@gmail.com,
aou@eecs.berkeley.edu, conor+dt@kernel.org,
devicetree@vger.kernel.org, dlan@gentoo.org, huangze@whut.edu.cn,
krzk+dt@kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, looong.bin@gmail.com,
palmer@dabbelt.com, paul.walmsley@sifive.com, robh@kernel.org,
sophgo@lists.linux.dev, thomas.bonnefille@bootlin.com,
unicorn_wang@outlook.com, yu.yuan@sjtu.edu.cn,
"Anton D. Stavinskii" <stavinsky@gmail.com>
Subject: [PATCH] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes
Date: Wed, 26 Nov 2025 21:21:16 +0400 [thread overview]
Message-ID: <20251126172115.1894190-2-stavinsky@gmail.com> (raw)
In-Reply-To: <20250611082452.1218817-4-inochiama@gmail.com>
I've tested the current dwc2 FIFO configuration and found that USB
device mode breaks in ECM mode when transmitting frames larger than
128 bytes. For example, large ICMP packets or iperf3 traffic cause
the USB link to hang and eventually disconnect without any messages in
dmesg.
After switching to more conservative FIFO sizes, ECM becomes stable
and no longer drops the connection. iperf3 now shows ~130 Mbit/s RX
and ~100 Mbit/s TX on SG2002 (MilkV Duo 256M).
Fix the FIFO sizes accordingly.
Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
---
arch/riscv/boot/dts/sophgo/cv180x.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/boot/dts/sophgo/cv180x.dtsi b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
index 1b2b1969a648..06b0ce5a2db7 100644
--- a/arch/riscv/boot/dts/sophgo/cv180x.dtsi
+++ b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
@@ -438,8 +438,8 @@ usb: usb@4340000 {
clocks = <&clk CLK_AXI4_USB>, <&clk CLK_APB_USB>;
clock-names = "otg", "utmi";
g-np-tx-fifo-size = <32>;
- g-rx-fifo-size = <536>;
- g-tx-fifo-size = <768 512 512 384 128 128>;
+ g-rx-fifo-size = <1536>;
+ g-tx-fifo-size = <128 128 64 64 64 64 32 32>;
interrupts = <SOC_PERIPHERAL_IRQ(14) IRQ_TYPE_LEVEL_HIGH>;
phys = <&usbphy>;
phy-names = "usb2-phy";
--
2.43.0
next prev parent reply other threads:[~2025-11-26 17:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 8:24 [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Inochi Amaoto
2025-06-11 8:24 ` [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC Inochi Amaoto
2025-06-12 16:04 ` Conor Dooley
2025-06-12 22:09 ` Inochi Amaoto
2025-06-13 14:23 ` Conor Dooley
2025-06-15 1:41 ` Inochi Amaoto
2025-06-25 19:58 ` Rob Herring
2025-06-26 16:17 ` Conor Dooley
2025-06-11 8:24 ` [PATCH RFC 2/3] riscv: dts: sophgo: Add syscon node for cv18xx Inochi Amaoto
2025-06-15 15:39 ` Alexander Sverdlin
2025-06-11 8:24 ` [PATCH RFC 3/3] riscv: dts: sophgo: Add USB support " Inochi Amaoto
2025-06-15 15:38 ` Alexander Sverdlin
2025-11-26 17:21 ` Anton D. Stavinskii [this message]
2025-11-26 22:23 ` [PATCH] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes Inochi Amaoto
2025-11-27 6:52 ` Inochi Amaoto
2025-06-11 16:14 ` [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Conor Dooley
2025-06-12 0:30 ` Inochi Amaoto
2025-06-12 15:58 ` Conor Dooley
2025-06-12 22:03 ` Inochi Amaoto
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=20251126172115.1894190-2-stavinsky@gmail.com \
--to=stavinsky@gmail.com \
--cc=alex@ghiti.fr \
--cc=alexander.sverdlin@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=huangze@whut.edu.cn \
--cc=inochiama@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=looong.bin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=sophgo@lists.linux.dev \
--cc=thomas.bonnefille@bootlin.com \
--cc=unicorn_wang@outlook.com \
--cc=yu.yuan@sjtu.edu.cn \
/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 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).