Sun8i emac

This is the page about the driver sun8i_emac which handle the integrated Ethernet MAC of A83T/H3/A64

Specifications
The EMAC main features are
 * 10/100/1000 Mbit/s speed
 * RX/TX CSO (CheckSum Offload)

Status
The driver is not in mainline yet. Mainlining requires the ephy driver (Handling the systemControl register).

You can find the latest sun8i-emac driver version on https://github.com/montjoie/linux/tree/sun8i-emac-wip

H3
The H3 SoC is well supported and no tweaks is necessary for all MII type (Internal MII, RGMII).

A83T

 * BananaPI M3: For powering the PHY you need the wens a80-pmic uboot branch (https://github.com/wens/u-boot-sunxi/tree/a80-pmic).
 * H8 homlet: The PHY is AC200 for which there are no datasheet.

A64
For the moment, there are no way to power the PHY, so no networking at all.

tips, troubeshoot
This error is generally related to not having PHY powered
 * EMAC reset timeout

You perhaps need to tweak RX/TX delay. You could find the correct value in FEX files. For the moment the only way is to write the value via /dev/mem You could use free-electrons.com/pub/mirror/devmem2.c for this. Example: for BPIM3 devmem 0x1c00030 w 0x1806
 * Link but no transfer with Gigabit EMAC

Performance
Performance are calculated with iperf.

On OrangePiPC (100Mbit FullDuplex), the board achieves 85Mbit/s for transmission and 95Mbit/s for reception.