PINE64
Networking Issues (Actually really Solved x2!) - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64-LTS / SOPINE Compute Module (https://forum.pine64.org/forumdisplay.php?fid=66)
+--- Forum: Clusterboard (https://forum.pine64.org/forumdisplay.php?fid=91)
+--- Thread: Networking Issues (Actually really Solved x2!) (/showthread.php?tid=5712)

Pages: 1 2


RE: Networking Issues (Actually really Solved x2!) - aww - 04-09-2018

(04-05-2018, 09:23 AM)hexalyn Wrote: Hi,

Could we simply make a pull-request with the modification presented above here : https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi#L508 ?

If yes then, does setting the "allwinner,tx-delay-ps = <500>;" break the network on the sopine module when in the baseboard instead of the clusterboard (I only own the clusterboard) ?

If not then would making such a pull request not correct the armbian nightly build issue ? I have no idea where the original sun50i-a64-sopine-baseboard.dts file comes from if not the one linked above.

EDIT: I have dug a bit into the automated nightly build and it seems the kernel sources comes from : https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/

So making a pull-request in github should be mirrored here https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi?h=linux-4.16.y#n508
But would not we need to do the pull request in every kernel version branch that needs to be patched ? (4.13.* and 4.14.* ?)

So there is actually a simpler patch but it's only works due to a coincidence that was fixed in Armbian. 

This patch makes it so that all you need to set is rgmii-txid in the sopine dtb file(that's what I ended up changing after playing with a bunch of values for the manual delays) 

So all of these are actually related to a packet loss issue on pine64(not sopine's) and some magic numbers they got from realtek. It coincidentally seems to solve issues with clusterboard, based on experimentation. 

https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/sunxi64-pine64-plus-ethernet-fix.patch

Other discussion about it here: 

https://patchwork.ozlabs.org/patch/873752/
https://lkml.org/lkml/2017/8/22/9

I


RE: Networking Issues (Actually really Solved x2!) - aww - 04-09-2018

Code:
diff --git a/patch/kernel/sunxi-next/00-readd-dwmac-sun8i-DT-bindings-arm64.patch b/patch/kernel/sunxi-next/00-readd-dwmac-sun8i-DT-bindings-arm64.patch
index b557c6f..6dcc957 100644
--- a/patch/kernel/sunxi-next/00-readd-dwmac-sun8i-DT-bindings-arm64.patch
+++ b/patch/kernel/sunxi-next/00-readd-dwmac-sun8i-DT-bindings-arm64.patch
@@ -142,7 +142,7 @@ index d891a1a27f6c5..216e3a5dafaef 100644
+&emac {
+      pinctrl-names = "default";
+      pinctrl-0 = <&rgmii_pins>;
-+      phy-mode = "rgmii";
++      phy-mode = "rgmii-txid";
+      phy-handle = <&ext_rgmii_phy>;
+      status = "okay";
+};

That's the change I made to get networking out of the box working when building armbian. The patch is in the armbian/build. I'll open an PR there, to get it upstream.