devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rock64: dts: fix gmac2io stability issues
@ 2018-01-22 17:46 Kamil Trzciński
       [not found] ` <20180122174628.15613-1-ayufan-1nXcilf+G7OHXe+LvDLADg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Kamil Trzciński @ 2018-01-22 17:46 UTC (permalink / raw)
  Cc: Kamil Trzciński, Rob Herring, Mark Rutland, Catalin Marinas,
	Will Deacon, Heiko Stuebner, David Wu, David S. Miller,
	Joseph Chen, Liang Chen, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel

This commit enables thresh dma mode as this forces to disable checksuming,
and chooses delay values which make the interface stable.

These changes are needed, because ROCK64 is faced with two problems:
1. tx checksuming does not work with packets larger than 1498,
2. the default delays for tx/rx are not stable when using 1Gbps connection.

Delays were found out with:
https://github.com/ayufan-rock64/linux-build/tree/master/recipes/gmac-delays-test

Change-Id: Ie894df4b52122988da683c02e3a05d635a5c7b84
Signed-off-by: Kamil Trzciński <ayufan@ayufan.eu>
---
 arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index 5602ec01fed9..bcc0bb35d840 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -132,8 +132,6 @@
 	assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
 	assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
 	clock_in_out = "input";
-	/* shows instability at 1GBit right now */
-	max-speed = <100>;
 	phy-supply = <&vcc_io>;
 	phy-mode = "rgmii";
 	pinctrl-names = "default";
@@ -141,8 +139,9 @@
 	snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
 	snps,reset-active-low;
 	snps,reset-delays-us = <0 10000 50000>;
-	tx_delay = <0x26>;
-	rx_delay = <0x11>;
+	snps,force_thresh_dma_mode;
+	tx_delay = <0x24>;
+	rx_delay = <0x18>;
 	status = "okay";
 };
 
-- 
2.14.1

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

end of thread, other threads:[~2018-01-24 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 17:46 [PATCH] rock64: dts: fix gmac2io stability issues Kamil Trzciński
     [not found] ` <20180122174628.15613-1-ayufan-1nXcilf+G7OHXe+LvDLADg@public.gmane.org>
2018-01-23 12:52   ` Heiko Stübner
2018-01-24 15:34     ` Kamil Trzciński

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