Re: [PATCH net-next v4 1/2] net: stmmac: provide flag to disable EEE
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2026-03-26 18:10:27
Also in:
imx, linux-arm-kernel
On Thu, Mar 26, 2026 at 05:31:29PM +0000, Kieran Bingham wrote:
This one has been a roller coaster, but I'm glad we got to the bottom of it. I hope someone from synopsis takes note and and documents this for future silicon integrations.
I would say that it _is_ clearly documented in the databook. v3.74a 4.3.4. LPI Interrupt already states that this signal is generated in the receive clock domain, and is not cleared immediately after the LPI control and status register is read. It goes on to state that this is because the signal to clear it has to cross from the CSR clock domain to the receive clock domain to clear the signal - and states that it is at least _four_ receive clock cycles. So, if the dwmac core is operating at 10Mbps, that means its receive clock is running at 2.5MHz which has a period of 400ns. In this case, the four receive clock cycles to clear this interrupt is 1.6us, assuming that the receive clock is running. However, if EEE is enabled, the receive clock comes from the PHY, which may gate off when the link re-enters LPI - and this event is under the control of the remote end, not the local end. So, what this means is that even though it states four receive clocks to clear the lpi_intr_o signal, that doesn't necessarily mean it will clear in 1.6us as the receive clock may be stopped. So, I think it is clearly stated in the databook already, but as it's just two paragraphs buried in around 1500 pages, that may explain why it has been missed on iMX. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!