[RFC] sunxi phy-mode rgmii-id

André Przywara andre.przywara at arm.com
Mon Nov 30 14:33:02 CET 2020


On 29/11/2020 23:07, Heinrich Schuchardt wrote:

Hi,

> since Linux patch
> bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config")
> i.e. since v5.8.15 or v5.9 many if not all Sunxi A64, H6, H5 boards
> require phy-mode = "rgmii-id" to provide network in Linux
> 
> The U-Boot device-tree is the fallback in the UEFI sub-system if no
> other device-tree is provided. So it would make sense to adjust the
> U-Boot device-trees too.
> 
> The Linux patch has specifically changed the values corresponding to our
> U-Boot defines:
> 
> #define MIIM_RTL8211E_CONFREG_TXD               0x0002
> #define MIIM_RTL8211E_CONFREG_RXD               0x0004
> 
> At least my experience with the NanoPi Neo 2 and the Pine64 A64 LTS
> indicates that setting phy-mode = "rgmii-id" in the device-tree does not
> stop the operation of the network even if the driver is not adjusted.

That is not entirely true, it depends on a patch to not reject other
phy-modes in the Linux driver (f1239d8aa84d).
This entered with v5.5, I believe, and was backported to stable kernels
since, but is not universally available in older kernels. Especially
installers comes to mind ...

But first we need at least the equivalent patch for U-Boot, as I posted
here:
https://lists.denx.de/pipermail/u-boot/2020-November/432823.html

> To avoid breaking boards like Linux did we should change the
> device-trees before or in sync with drivers/net/phy/realtek.c.

Eventually: yes, but at the cost of breaking older kernels. This is
really an unfortunate situation, and actually should not have happened:
normally we at least guarantee operation of newer kernels with older DTs.

Cheers,
Andre



More information about the U-Boot mailing list