Re: [PATCH 3/3] arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts

From: Martin Blumenstingl
Date: Sat May 01 2021 - 05:30:34 EST


Hi Neil,

On Fri, Apr 30, 2021 at 10:16 AM Neil Armstrong <narmstrong@xxxxxxxxxxxx> wrote:
[...]
> >> +&ethmac {
> >> + pinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;
> >> + pinctrl-names = "default";
> >> + status = "okay";
> >> + phy-mode = "rgmii";
> >> + phy-handle = <&external_phy>;
> >> + amlogic,tx-delay-ns = <2>;
> > I haven't checked their u-boot code but some of the newer Amlogic BSPs
> > seem to let the PHY add the TX delay (which is also what the netdev
> > maintainers recommend)
> > that can be achieved by setting:
> > phy-mode = "rgmii-txid";
> > and deleting the "amlogic,tx-delay-ns" property
>
> Done, but what about when we use mainline U-boot here ?
I think it will work just fine if
- the PRG_ETH0/PRG_ETH1 register is programmed correctly (that's what
we have in dwmac-meson8b), which according to [0] is partially (RX
delay not being supported in u-boot yet) the case
- and the RTL8211F PHY driver can set the RX/TX delay on the PHY side,
which according to [1] it can

So I have not tried it but I think it should just work


Best regards,
Martin


[0] https://source.denx.de/u-boot/u-boot/-/blob/798424e8573a6b642a1bb507d41c1f73e6736e2e/drivers/net/dwmac_meson8b.c
[1] https://source.denx.de/u-boot/u-boot/-/blob/fa6539a3dcbf269121ca64084cff4c146fcdaf19/drivers/net/phy/realtek.c#L204