4 4
siffland

Ethernet not working on SOPINE module

Recommended Posts

Armbianmonitor:

I just upgraded (using a fresh image with the 5.69 image) one of my SOPINE A64 modules from Armbian Xenial - legacy kernel 3.10.y to Armbian Bionic - mainline kernel 4.19.y.  The onboard ethernet will no longer work.  The sopine module is connected to a clusterboard instead of a sopine baseboard, but the NIC is on the module so it should not make a difference. 

 

On Xenial 3.10.y kernel the driver loaded for the NIC is the sunxi_geth driver, on bionic 4.19.y kernel it is the st_mac100 driver. 

 

Here is the output of the lshw for 4.19.y

  *-network:0
       description: Ethernet interface
       physical id: 6
       logical name: eth0
       serial: 02:ba:9b:53:82:7a
       size: 1Gbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=st_mac100 driverversion=Jan_2016 duplex=full link=yes multicast=yes port=MII speed=1Gbit/s

 

I have a USB dongle plugged in and that works to get the machine online for testing.  In the same clusterboard i have more modules still on the old image and they have no issues with networking.  Let me know what other information i can supply.

 

Thanks,

Sean

Share this post


Link to post
Share on other sites
12 hours ago, siffland said:

debian strech


Debian based images have the same kernel as Bionic. It's our kernel.
 

12 hours ago, siffland said:

Is there anything else i can try?

 

- build images on your own. U-boot has been changed. Could have effect

- build DEV branch instead of NEXT (contain kernel 4.20.y)

Share this post


Link to post
Share on other sites

This appears to be the same issue that was fixed for the Legacy kernel, but not carried forward.

 

Two fixed are possible - add a "tx-delay" in the DTB or a fix some constants in the Realtek driver.  I've confirmed that the DTB fix corrects the issue.

 

Add

    allwinner,tx-delay-ps = <500>;

 

to the ethernet device and it works.  Continues to work when soPine is plugged into the baseboard instead of the clusterboard.

 

Detail on the more complex fix here: https://patchwork.ozlabs.org/patch/873752/

 

                ethernet@1c30000 {
                        compatible = "allwinner,sun50i-a64-emac";
                        syscon = <0x2d>;
                        reg = <0x1c30000 0x10000>;
                        interrupts = <0x0 0x52 0x4>;
                        interrupt-names = "macirq";
                        resets = <0x2 0xd>;
                        reset-names = "stmmaceth";
                        clocks = <0x2 0x24>;
                        clock-names = "stmmaceth";
                        status = "okay";
                        pinctrl-names = "default";
                        pinctrl-0 = <0x2e>;
                        phy-mode = "rgmii";
                        phy-handle = <0x2f>;
                        phy-supply = <0x30>;
                        phandle = <0x6f>;
                        allwinner,tx-delay-ps = <500>;

                        mdio {
                                compatible = "snps,dwmac-mdio";
                                #address-cells = <0x1>;
                                #size-cells = <0x0>;
                                phandle = <0x70>;

                                ethernet-phy@1 {
                                        compatible = "ethernet-phy-ieee802.3-c22";
                                        reg = <0x1>;
                                        phandle = <0x2f>;
                                };
                        };
                };

 

Share this post


Link to post
Share on other sites

Following this post on the pine pages with the same issue:

https://forum.pine64.org/archive/index.php?thread-5581-3.html

 

and using this u-boot (referenced from the above link) fixed the issue for me.

https://github.com/janwillies/u-boot/releases/tag/v2019.01-cb-1

 

So which method is the best fix for this.  I would think your driver method is, but this u-boot modification also worked.

 

Thanks,

Sean

Share this post


Link to post
Share on other sites

Before i tried the u-boot in the fix above (form the pine64 forums) i did compile mainline u-boot and that did not work, i also compile mainline kernel 5.0-rc3 and that didnt fix the issue (although it runs fine) .  Just wanted to add that.

Share this post


Link to post
Share on other sites

@langerma

I just tried the latest release on the clusterboard, and it appears there are no fixes applied yet.

 

I was able to get the baseboard to boot with Ethernet using the latest release. I'm not really up on re-compiling kernels yet, but I'm more than happy to provide any information requested to get this resolved.

Share this post


Link to post
Share on other sites

@BryanS thx for the info. i tried recompiling the whole thing a few times. booting worked but still without ethernet. i  used an older version of armbian, which was mentioned in the clusterboard forum.

 

seems like, that not that many persons are using the clusterboards :-(

Share this post


Link to post
Share on other sites
5 hours ago, langerma said:

seems like, that not that many persons are using the clusterboards :-(

 

That does seem to be the case. Hopefully this will change in the future - I really want to use this thing as a hardware docker-like device. If there's any information I can provide, please let me know.

Share this post


Link to post
Share on other sites

I use my cluserboard as a docker swarm, works pretty nice.  See my post above about the solution i found with the custom u-boot version.  I just burn armbian to a micro sdcard and then dd the custom u-boot to the card and everything works fine.  

 

The second link from the jan willies github explains how to do this and doing a diff from his github shows the changes he has to make to u-boot.  I dont know if this can be submitted upstream to u-boot, i wish i knew a lot more about u-boot.

 

So this is a u-boot problem.

 

on a totally off topic note, the clusterboard and sopine modules are better performing than the raspberry pi modules and any backplane board i have found for them and way cheaper (the modules are about the same price but $99 for the backplane with Gb ethernet is a great deal and it is matx form factor so you can actually mount it in a case).

 

Thanks,

Sean

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
4 4