Problem with Ethernet interface on A20-OLinuXino-LIME

Started by zapparello, May 19, 2025, 05:23:03 PM

Previous topic - Next topic

zapparello

Hello!
We're trying to get Ethernet working on a A20-OLinuXino-LIME-n8G board.
We're using the firmware from A20-OLinuXino-bullseye-base-20241121-172551.img.7z on a SD card.
If we're powering the board from regular USB, the boot does not finish, yelding block read errors from the SD card.
If we're powering it using the 2.1mm power connector from a lab source, it boots into X11. But I can't get Ethernet to work. `ip link` shows:

2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether 02:0f:02:82:a1:a4 brd ff:ff:ff:ff:ff:ff

The cable is connected and is okay (reconnecting same end to laptop and works perfectly).

During bootup I see this from uboot:
Net: eth0: ethernet@1c50000, eth1: usb_ether
At this time I see a short (~1sec) flash of the lights on the Ethernet connector. Then they are off, and never light up again till next reboot.

In dmesg I see:
[ 1.302676] sun7i-dwmac 1c50000.ethernet: IRQ eth_wake_irq not found
[ 1.302689] sun7i-dwmac 1c50000.ethernet: IRQ eth_lpi not found
[ 1.302901] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
[ 1.302917] sun7i-dwmac 1c50000.ethernet: no reset control found
[ 1.302958] sun7i-dwmac 1c50000.ethernet: no regulator found
[ 1.303483] sun7i-dwmac 1c50000.ethernet: Version ID not available
[ 1.303512] sun7i-dwmac 1c50000.ethernet:  DWMAC1000
[ 1.303523] sun7i-dwmac 1c50000.ethernet: No HW DMA feature register supported
[ 1.303532] sun7i-dwmac 1c50000.ethernet: TX Checksum insertion supported
[ 1.303542] sun7i-dwmac 1c50000.ethernet: Normal descriptors
[ 1.303550] sun7i-dwmac 1c50000.ethernet: Ring mode enabled

If I try to use Ethernet from u-boot:

=> ping 1.1.1.1
ethernet@1c50000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@1c50000
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.ping failed; host 1.1.1.1 is not alive

What else I can try? Maybe it's a bug in newer images, are there older images available somewhere for download?

LubOlimex

This is not related to the Linux image. Also each board is empirically tested with Ethernet network after manufacturing here, it is part of the standard test for the LIME boards. Double check your network settings, by default the Ethernet is supposed to work with DHCP, make sure it is enabled. If you want to use static IP you need additional configuration. Also some network equipment might deny the network to the board due to firewall or QoS settings. If these are ok:

1. Try to identify which network interface is the Ethernet. Type:

ifconfig -a

It is usually eth0. Then enable the Ethernet with "ifup eth0" but replace "eth0" with what you found in the ifconfig. Also post in the reply the results of "ifconfig -a".

2. Then post here the very beginning of the boot log, where the board type and revision gets printed and also tell me which hardware revision board you got (it should be printed with white print on the board, and also printed on the box).

Few comments about some of your points:

QuoteIf we're powering the board from regular USB, the boot does not finish, yelding block read errors from the SD card.

The board can't be powered from USB. You should not power A20-OLinuXino-LIME from the USB ports, even if you have very good external power supply the USB won't provide more than 900mA to the board no matter what. The USB current is limited typically to 500mA (and 900mA is the absolute maximum), no matter how powerful your power supply is, the AXP209 power management unit inside the board would limit the current available on that USB input wire. There are separate inputs (power lines) for the power supply from the USB and the external power supply. The 5V USB power supply goes to VBUS pin of the power management chip AXP209, while 5V external power supply goes to ACIN pin of the same AXP209. There are different power input lines for a couple of reasons but the important thing is to compare VBUS and ACIN inputs of AXP209.

If you look at the table in "5. Electrical Characteristics" on page 6 of the datasheet of AXP209 (http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf) - you would notice that the absolute maximum current available from AXP209 when power supply is supplied on VBUS is 900mA (no matter how much current you have available, AXP209 would output no more than 900mA). Of course, probably more than half of this current is required for the board itself (without anything extra attached)! In the same table you also see when the power is instead provided on the ACIN pin of AXP209 (e.g. when powered via the power jack) - the typical current available is 2500mA, around 3 times more!

QuoteDuring bootup I see this from uboot: CodeSelect Net: eth0: ethernet@1c50000, eth1: usb_ether

This is not related to the Ethernet connector. It is USB-ethernet gadget that gets enabled here, that is if you wish to debug the board via the on-board USB. It is explained in the Olimage guide: https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf
Technical support and documentation manager at Olimex