[PATCH 4/4] net: stmmac: Add glue layer for Sophgo SG2044 SoC
Inochi Amaoto
inochiama at gmail.com
Wed Oct 23 15:36:06 PDT 2024
On Wed, Oct 23, 2024 at 02:42:16PM +0200, Andrew Lunn wrote:
> > Yes, this is what I have done at the beginning. At first I only
> > set up the phy setting and not set the config in the syscon.
> > But I got a weird thing: the phy lookback test is timeout.
> > Although the datasheet told it just adds a internal delay for
> > the phy, I suspect sophgo does something more to set this delay.
>
> You need to understand what is going on here. Just because it works
> does not mean it is correct.
>
It seems like there is a missing info in the SG2044 doc: setting the
syscon internal delay bit is not enabling the internal mac delay, but
disable it. Now everything seems like normal: the mac adds no delay,
and the phy adds its delay.
The sophgo have already confirmed this is a firmware issue that does
not set up the mac delay correctly and will fix this in the firmware,
so the kernal can always have not mac delay. Since this will be fixed
in the firmware and this interface is not exposed to the kernel, I will
remove the code setting the syscon bit.
Thanks for your effort on this.
Regards,
Inochi
More information about the linux-riscv
mailing list