[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aUJ-3v-OO0YYbEtu@eichest-laptop>
Date: Wed, 17 Dec 2025 10:58:54 +0100
From: Stefan Eichenberger <eichest@...il.com>
To: Rob Herring <robh@...nel.org>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, krzk+dt@...nel.org,
conor+dt@...nel.org, hkallweit1@...il.com, linux@...linux.org.uk,
geert+renesas@...der.be, ben.dooks@...ethink.co.uk,
netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, francesco.dolcini@...adex.com,
rafael.beims@...adex.com,
Stefan Eichenberger <stefan.eichenberger@...adex.com>
Subject: Re: [PATCH net-next v1 2/3] dt-bindings: net: micrel: Add
keep-preamble-before-sfd
On Mon, Dec 15, 2025 at 08:03:30AM -0600, Rob Herring wrote:
> On Fri, Dec 12, 2025 at 09:46:17AM +0100, Stefan Eichenberger wrote:
> > From: Stefan Eichenberger <stefan.eichenberger@...adex.com>
> >
> > Add a property to activate a Micrel PHY feature that keeps the preamble
> > enabled before the SFD (Start Frame Delimiter) is transmitted.
> >
> > This allows to workaround broken Ethernet controllers as found on the
> > NXP i.MX8MP. Specifically, errata ERR050694 that states:
> > ENET_QOS: MAC incorrectly discards the received packets when Preamble
> > Byte does not precede SFD or SMD.
>
> It doesn't really work right if you have to change the DT to work-around
> a quirk in the kernel. You should have all the information needed
> already in the DT. The compatible string for the i.MX8MP ethernet
> controller is not sufficient?
Is doing something like this acceptable in a phy driver?
if (of_machine_is_compatible("fsl,imx8mp")) {
...
}
That would be a different option, rather than having to add a new DT
property. Unfortunately, the workaround affects the PHY rather than the
MAC driver. This is why we considered adding a DT property.
> >
> > The bit which disables this feature is not documented in the datasheet
> > from Micrel, but has been found by NXP and Micrel following this
> > discussion:
> > https://community.nxp.com/t5/i-MX-Processors/iMX8MP-eqos-not-working-for-10base-t/m-p/2151032
> >
> > It has been tested on Verdin iMX8MP from Toradex by forcing the PHY to
> > 10MBit. Withouth this property set, no packets are received. With this
> > property set, reception works fine.
>
> What's the impact of just unconditionally setting this bit? Seems like
> any impact would be minimal given 10MBit is probably pretty rare now.
In theory it shouldn't have any negative impact. According to the
Errata:
The IEEE 802.3 standard states that, in MII/GMII modes, the byte
preceding the SFD (0xD5), SMD-S (0xE6,0x4C, 0x7F, or 0xB3), or SMD-C
(0x61, 0x52, 0x9E, or 0x2A) byte can be a non-PREAMBLE byte or there
can be no preceding preamble byte. The MAC receiver must successfully
receive a packet without any preamble(0x55) byte preceding the SFD,
SMD-S, or SMD-C byte.
However, since Micrel didn't document this bit and because the driver is
already older, we are afraid to break something for other users if we
enable it unconditionally.
Regards,
Stefan
Powered by blists - more mailing lists