Problematic understanding of phy-mode in Rockchip DWMAC driver
Andrew Lunn
andrew at lunn.ch
Mon Feb 16 07:48:29 PST 2026
On Mon, Feb 16, 2026 at 04:44:27AM +0000, Yao Zi wrote:
> On Fri, Feb 13, 2026 at 06:47:14PM +0000, Russell King (Oracle) wrote:
> > On Fri, Feb 13, 2026 at 06:26:44PM +0000, Yao Zi wrote:
> > > Hi folks,
> > >
> > > I was looking through the RGMII delay setup logic found in
> > > rk_gmac_powerup() of dwmac-rk.c, and found its behavior is strange,
> >
> > dwmac-rk is very broken and is unfixable thanks to Rockchip not
> > understanding the RGMII interface modes used by the kernel.
> >
> > It is what it is, we can't change it without causing regressions.
> > Please do not try to fix it.
>
> Thanks for confirming. I understand concerns about regressions and
> agree keeping the driver/dts as-is is better.
>
> However, should we mention the difference between "phy-mode" defined
> ethernet-controller.yaml and "phy-mode" understood by dwmac-rk
> driver in rockchip-dwmac.yaml to avoid confusion in the future?
I've been telling DT developers to set the correct phy-mode,
'rgmii-id', and the vendor properties for MAC delays to 0. That works,
and it consistent with the documentation.
As far as i know, dwmac-rk only gets things wrong when you try to get
the MAC to add the 2ns delays. And that is not a recommended
configuration. So i don't think it is too important to document a not
recommended configuration is broken.
Andrew
More information about the Linux-rockchip
mailing list