mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolai Buchwitz <nb@tipi-net.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Thangaraj Samynathan <thangaraj.s@microchip.com>,
	netdev@vger.kernel.org, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, bryan.whitehead@microchip.com,
	UNGLinuxDriver@microchip.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/2] net: lan743x: add support for RMII interface
Date: Tue, 26 May 2026 21:59:06 +0200	[thread overview]
Message-ID: <b24c34f91726681ef5797af10b3d1e9a@tipi-net.de> (raw)
In-Reply-To: <48510d22-bc14-427a-b12e-17655ca95ad5@lunn.ch>

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

  reply	other threads:[~2026-05-26 20:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 15:40 [PATCH net-next v2 0/2] net: lan743x: add RMII support for PCI11x1x Thangaraj Samynathan
2026-05-26 15:40 ` [PATCH net-next v2 1/2] net: lan743x: add RMII strap status detection " Thangaraj Samynathan
2026-05-26 16:40   ` Andrew Lunn
2026-05-27  3:21     ` Thangaraj.S
2026-05-27 12:12       ` Andrew Lunn
2026-05-26 15:40 ` [PATCH net-next v2 2/2] net: lan743x: add support for RMII interface Thangaraj Samynathan
2026-05-26 16:49   ` Andrew Lunn
2026-05-26 19:59     ` Nicolai Buchwitz [this message]
2026-05-27 10:11       ` Nicolai Buchwitz
2026-05-27 12:20         ` Andrew Lunn
2026-05-27 12:38           ` Nicolai Buchwitz
2026-05-27  3:23     ` Thangaraj.S

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b24c34f91726681ef5797af10b3d1e9a@tipi-net.de \
    --to=nb@tipi-net.de \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=bryan.whitehead@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=thangaraj.s@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®