Jump to content
  • 0

Ethernet not working on SOPINE module


siffland
 Share

Question

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

Link to comment
Share on other sites

Recommended Posts

  • 0
On 1/21/2019 at 7:44 AM, siffland said:

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. 

 

Actually it probably makes a difference if the MAC address is not defined on the SOPINE module in the Cluster(F*ck)Board...

 

If you have collisions on the MAC address - you'll be hard to find an issue here, not just at layer 3, but also at layer 2.

Link to comment
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

  • 0

I think it has something to do with the embedded switch and a timing problem. The boards boot fine in the baseboard, bit don't get DHCP service in the clusterboard.

When you use a microSD with a modified device tree, it works on both, but apt update; apt upgrade can overwrite the device tree and on the next boot, no network.

If I were good with sed I could probably engineer an automatic fix to run aftewr upgrade that would decompile, patch and recompile the device tree.

Link to comment
Share on other sites

  • 0

I posted just such a script on the clusterboard Pine64 forum, but here you are anyway

#!/bin/bash

DTB_NAME=sun50i-a64-sopine-baseboard.dtb
DTB_PATH=/boot/dtb/allwinner
TMPFILE=/tmp/tmp.dts
NEWFILE=/tmp/new.dts

clean_up() {
        rm $TMPFILE $NEWFILE > /dev/null 2>&1
}

if [ ! -f $DTB_PATH/$DTB_NAME ]
then
        echo dtb file not found
        exit 999
fi


dtc -I dtb -O dts -o $TMPFILE $DTB_PATH/$DTB_NAME > /dev/null 2>&1
if [ $? != 0 ]
then
        echo Cannot extract dts from $DTB_PATH/$DTB_NAME
        exit 998
fi

retcode=0
grep 'allwinner,tx-delay-ps' $TMPFILE > /dev/null 2>&1
if [ $? != 0 ]
then
        sed -e '/ethernet@1c30000 {$/,/phandle = <0x88>;/!b;/phandle = <0x88>;/a\\t\t\tallwinner,tx-delay-ps = <500>;' $TMPFILE > $NEWFILE
        if [ $? != 0 ]
        then
                echo Could not update temporary DTS file
                retcode=997
        else
                dtc -O dtb -o $DTB_PATH/$DTB_NAME -b 0 $NEWFILE > /dev/null 2>&1
                if [ $? != 0 ]
                then
                        echo Could not create new dts file
                        retcode=996
                fi
        fi

else
        echo Fix already in place
fi

clean_up

exit $retcode

 

I hope you find it useful

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...