Skip to content

Commit 03ea867

Browse files
stavinskyinochisa
authored andcommitted
riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes
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> Reviewed-by: Inochi Amaoto <inochiama@gmail.com> Fixes: e307248 ("riscv: dts: sophgo: Add USB support for cv18xx") Link: https://lore.kernel.org/r/20251126172115.1894190-2-stavinsky@gmail.com Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Chen Wang <unicorn_wang@outlook.com> Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
1 parent 8f0b4cc commit 03ea867

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/riscv/boot/dts/sophgo/cv180x.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@
438438
clocks = <&clk CLK_AXI4_USB>, <&clk CLK_APB_USB>;
439439
clock-names = "otg", "utmi";
440440
g-np-tx-fifo-size = <32>;
441-
g-rx-fifo-size = <536>;
442-
g-tx-fifo-size = <768 512 512 384 128 128>;
441+
g-rx-fifo-size = <1536>;
442+
g-tx-fifo-size = <128 128 64 64 64 64 32 32>;
443443
interrupts = <SOC_PERIPHERAL_IRQ(14) IRQ_TYPE_LEVEL_HIGH>;
444444
phys = <&usbphy>;
445445
phy-names = "usb2-phy";

0 commit comments

Comments
 (0)