Re: [PATCH net-next v2 2/2] net: lan743x: add support for RMII interface

From: Nicolai Buchwitz

Date: Tue May 26 2026 - 16:01:46 EST


Hi Andrew

On 26.5.2026 18:49, Andrew Lunn wrote:
On Tue, May 26, 2026 at 09:10:54PM +0530, Thangaraj Samynathan wrote:
Enable RMII interface in the lan743x driver for PHY and MAC
configuration.

- Select RMII interface in lan743x_phy_interface_select().
- Update phylink supported_interfaces and MAC capabilities.
- Enable RMII via RMII_CTL in lan743x_hardware_init().
- Define RMII_CTL register and enable bit in lan743x_main.h.

+ case PHY_INTERFACE_MODE_RMII:
+ __set_bit(PHY_INTERFACE_MODE_RMII,
+ adapter->phylink_config.supported_interfaces);
+ adapter->phylink_config.lpi_capabilities = 0;

So EEE is not supporting with RMII? This is not mentioned in the
commit message.

Humm, is this an 802.3 limitation, or a limitation of this hardware?

I do not think this is specific to the lan743x. Linux drives EEE from
the MAC side, so mac_enable_tx_lpi() has to signal "assert LPI" to the
PHY across the xMII. On MII and GMII the MAC signals LPI using TX_ER,
and AFAICT RMII has a reduced pin set with no TX_ER, so the MAC has no
standard way to request LPI over RMII. So IMHO EEE does not really
apply to RMII in general, not only on this controller. Please correct
me if I am missing something here.

Today drivers seem to express this themselves through lpi_interfaces.
stmmac is the clearest example I found, in stmmac_phy_setup():

/* The GMAC 3.74a databook states that EEE is only supported
* in MII, GMII, and RGMII interfaces.
*/
__set_bit(PHY_INTERFACE_MODE_MII, config->lpi_interfaces);
__set_bit(PHY_INTERFACE_MODE_GMII, config->lpi_interfaces);
phy_interface_set_rgmii(config->lpi_interfaces);

It deliberately leaves RMII out, and phylink_activate_lpi() then
refuses LPI when cur_interface is not in lpi_interfaces.

If this is 802.3, then this should be in phylink, not drivers.

Since this seems generic, I agree it belongs in phylink rather than
each driver. I can send a patch excluding RMII (and probably REVRMII)
from EEE centrally, so drivers do not need to special-case it.


Andrew

Nicolai