Netdev List
 help / color / mirror / Atom feed
From: Hee-Suk Kim <hskim@dilluti0n.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	netdev@vger.kernel.org
Cc: "Andrew Lunn" <andrew@lunn.ch>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@kernel.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Willem de Bruijn" <willemb@google.com>,
	"Simon Horman" <horms@kernel.org>,
	"Daniel Golle" <daniel@makrotopia.org>,
	nic_swsd@realtek.com, "Andrew Lunn" <andrew+netdev@lunn.ch>,
	linux-kernel@vger.kernel.org, javen <javen_xu@realsil.com.cn>,
	"Björn Töpel" <bjorn@kernel.org>
Subject: Re: [PATCH net-next v2 1/4] net: ethtool: add 500baseT2 link mode
Date: Sun, 06 Dec 2026 01:23:42 +0900	[thread overview]
Message-ID: <87qzfvzofl.fsf@dilluti0n.com> (raw)
In-Reply-To: <31418f01-3ec4-413e-8842-2717e04fefe7@bootlin.com>

Maxime Chevallier <maxime.chevallier@bootlin.com> writes:

> Hi,
>
> On 12/5/26 05:00, Hee-Suk Kim wrote:
>> Add ETHTOOL_LINK_MODE_500baseT2_Full_BIT and SPEED_500 for 500 Mbps
>> over two pairs, together with the matching phylib link capability.
>>
>> Signed-off-by: Hee-Suk Kim <hskim@dilluti0n.com>
>
> [...]
>
>> @@ -295,6 +298,10 @@ unsigned long phy_caps_from_interface(phy_interface_t interface)
>>  {
>>  	unsigned long link_caps = 0;
>>
>> +	/* The only PHYs known to support 500baseT2 are attached over GMII */
>> +	if (interface == PHY_INTERFACE_MODE_GMII)
>> +		link_caps |= BIT(LINK_CAPA_500FD);
>> +
>
> This whole patch seems good to me, with all the phy_caps and all, the only question
> I have is about the xMII mode used. Is it really GMII, or some tweaked version of it ?
>
> I guess the MAC to PHY mode on these setups isn't pure GMII, but likely a modified
> of it, with a different clock rate ? at 1G the GMII is clocked at 125MHz, do you know
> what's going on at 500M ?
>

I don't think it's really GMII. On these Realtek chips the PHY and MAC
are integrated on a single chip, and r8169 just labels older chips as
GMII/MII in rtl_init_phylink():

	if (tp->mac_version < RTL_GIGA_MAC_VER_61)
		phy_mode = tp->supports_gmii ? PHY_INTERFACE_MODE_GMII :
			   PHY_INTERFACE_MODE_MII;
	else
		phy_mode = PHY_INTERFACE_MODE_INTERNAL;

That comment meant that the Realtek chips needing 500baseT2 are labeled
GMII (all below VER_61 in this series), not that the xMII is really
GMII.

Giga Lite is the only known (and Realtek proprietary) way to do 500 Mbps
over two pairs, so they are the only users of 500baseT2.

> Does a PHY that supports 500BaseT2 also support other 2-pair modes, like 100BaseTX ?
> IOW, can the xMII used here adapt for multiple speeds like GMII ?
>
> We may need a dedicated phy_interface_t value for the xMII here is what I mean :)

Yes, it's a regular 10/100/1000 PHY with Giga Lite added on top.

Since the MAC and PHY are integrated, I can't tell how the chip carries
500 Mbps between them. It seems to handle that internally. In the v1
tests [1], the link ran at ~94 or ~470 Mbps depending only on the Giga
Lite enable bit (page 0xa42, reg 0x14, bit 9), regardless of the speed
the kernel reported.

A dedicated value would make sense if we knew what the bus is, but I
have no information beyond the above, not even whether a standalone
Realtek PHY with Giga Lite (if any) would use the same protocol as the
integrated chips.

The current patch works fine, since Realtek is the only user as
mentioned above. So, unless you'd prefer a dedicated value, I'm thinking
of rewording the comment to something like:

	/* Realtek's Giga Lite is the only supported 500baseT2 hardware. Its
	 * PHY is integrated with the MAC and labeled as GMII by r8169.
	 */
	if (interface == PHY_INTERFACE_MODE_GMII)
		link_caps |= BIT(LINK_CAPA_500FD);

A third option would be to switch the Giga Lite capable chips in r8169
to PHY_INTERFACE_MODE_INTERNAL, but I couldn't find what the GMII/MII
labeling there is for, so I'm hesitant to drop it. Heiner or Javen may
know more.

[1] https://lore.kernel.org/r/20261010135356.85454-1-hskim@dilluti0n.com

Thanks,
hsk

>
> Maxime

  reply	other threads:[~2026-12-05 16:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05  4:00 [PATCH net-next v2 0/4] net: add Giga Lite (500baseT2) support for RTL8168H/EP/FP Hee-Suk Kim
2026-12-05  4:00 ` [PATCH net-next v2 1/4] net: ethtool: add 500baseT2 link mode Hee-Suk Kim
2026-12-05  8:18   ` Maxime Chevallier
2026-12-05 16:23     ` Hee-Suk Kim [this message]
2026-12-05  4:00 ` [PATCH net-next v2 2/4] net: phylink: add MAC_500FD Hee-Suk Kim
2026-12-05  8:19   ` Maxime Chevallier
2026-12-05  4:00 ` [PATCH net-next v2 3/4] net: phy: realtek: add Giga Lite support Hee-Suk Kim
2026-12-05  4:00 ` [PATCH net-next v2 4/4] r8169: enable Giga Lite on RTL8168H/EP/FP Hee-Suk Kim

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=87qzfvzofl.fsf@dilluti0n.com \
    --to=hskim@dilluti0n.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=bjorn@kernel.org \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=javen_xu@realsil.com.cn \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.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