mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH net-next 0/2] Add Realtek XSGMII interface mode
@ 2026-11-17  8:47 Jonas Jelonek
  2026-11-17  8:47 ` [RFC PATCH net-next 1/2] dt-bindings: net: add " Jonas Jelonek
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jonas Jelonek @ 2026-11-17  8:47 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman, netdev,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, linux-doc,
	linux-kernel, devicetree, Jonas Jelonek

Hi,

This RFC adds an explicit PHY interface mode for Realtek's proprietary
XSGMII transport. It carries eight 10/100/1000 Mbps ports over one
10.3125 Gbaud SerDes lane. Each logical port remains limited to 1 Gbps;
the aggregate serial rate is not a per-port Ethernet speed.

Motivation
----------

The motivating users are downstream Realtek PCS/PHY drivers for OpenWrt,
including RTL930x/RTL931x switches connected to RTL8218D/E octal PHYs.
Their XSGMII connections currently use phy-mode = "usxgmii", with the PCS
driver inferring the actual transport from the number of described ports.

Not only is this a misuse of USXGMII mode, covering two very different
modes with a single name. It also starts to fall apart in several cases.
A specific switch being currently worked on uses an RTL8218E PHY but
only with 4 of the 8 ports actually wired and used. The device tree also
only has those 4 ports but the PHY still talks in XSGMII mode to the
switch SoC. This causes a mismatch, the switch SoC using USXGMII
(because of the assumption that 4 ports -> USXGMII, not XSGMII) but the
PHY using XSGMII.

Protocol identity and naming
----------------------------

XSGMII is the name Realtek uses for this interface. Calling it simply
"octal SGMII" would describe its capacity without identifying its
protocol. Existing modes such as QSGMII and PSGMII already distinguish
multiplexed MAC-PHY transports; the PSGMII introduction is an example of
adding the generic mode definitions separately from a driver user [1].

Cisco USGMII is a relevant comparison, but equivalent port capacity does
not establish interoperability. Cisco defines Q-USGMII for four ports
over 5.0 Gb/s and O-USGMII for eight ports over 10.0 Gb/s, using 8b/10b
coding and a packet-control header [2]. Linux already represents the
quad variant as "qusgmii", with its own control-word decoding [3].

Realtek documents XSGMII and O-USGMII as separate RTL8218E interfaces:
XSGMII runs at 10.3125 Gb/s and O-USGMII at 10.0 Gb/s, with different
hardware strap selections [4]. The SDK also distinguishes them in
phy_8218e_macIntfSerdesMode_get() and applies separate initialization
tables. Realtek's O-USGMII is therefore the candidate for comparison
with Cisco's octal USGMII; it is not evidence that XSGMII can be renamed
to USGMII. Compatibility of those O-USGMII implementations would need
separate confirmation.

This proposal retains the vendor's XSGMII name rather than assigning an
existing protocol name to a distinct hardware configuration. It does
not assume a particular XSGMII line encoding merely from the line rate.

Scope and compatibility
-----------------------

Patch 1 adds "xsgmii" to the Ethernet controller binding. Patch 2 adds
PHY_INTERFACE_MODE_XSGMII, its string mapping, the eight-port capacity,
per-port speed capabilities, phylink handling and a short interface
description. The enum value is appended before PHY_INTERFACE_MODE_MAX,
preserving existing enum values.

The phylink change classifies XSGMII with the SGMII-like PHY-status
interfaces and uses 1 Gbps as the maximum per-port speed. This generic
classification does not prescribe a Clause 22 register layout or a
control-word decoder for a particular PCS implementation.

There is no in-tree driver conversion in this RFC. The intent is to
establish the interface representation before converting the downstream
Realtek PCS/DSA drivers and the affected DT descriptions. Existing
"usxgmii" and "10g-qxgmii" meanings are unchanged. Real users of this
mode will land once PCS and PHY drivers are submitted

Feedback
-----------------------

I would appreciate feedback on:

  - Whether a distinct "xsgmii" mode is the appropriate representation,
    given the differences from USXGMII and O-USGMII.
  - Whether the proposed per-port capabilities and phylink PHY-status
    classification accurately capture the intended generic semantics.
  - Whether introduction of a user of this mode is needed alongside
    adding this new mode, or whether those can be considered separately.

References
----------

[1] 83b5f0253b1e ("net: phy: Introduce PSGMII PHY interface mode")
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=83b5f0253b1ef352f4333c4fb2d24eff23045f6b
[2] Cisco USGMII specification, Table 1 and section 2.2.3; downloads:
    https://developer.cisco.com/site/usgmii-usxgmii/
[3] 923454c0368b ("net: phylink: use a dedicated helper to parse usgmii
    control word")
    https://git.kernel.org/linus/923454c0368b8092e9d05c020f50abca577e7290
[4] RTL8218E-CG datasheet, rev. 0.1, sections 6.2, 6.3, 6.6, 7.12 and 7.14.
    https://github.com/jameywine/realtek-doc/blob/main/datasheets/RTL8218E-CG_Datasheet.pdf

Thanks,
Jonas
---
Jonas Jelonek (2):
  dt-bindings: net: add Realtek XSGMII interface mode
  net: phy: add Realtek XSGMII interface mode

 .../devicetree/bindings/net/ethernet-controller.yaml       | 1 +
 Documentation/networking/phy.rst                           | 7 +++++++
 drivers/net/phy/phy-core.c                                 | 2 ++
 drivers/net/phy/phy_caps.c                                 | 1 +
 drivers/net/phy/phylink.c                                  | 3 +++
 include/linux/phy.h                                        | 4 ++++
 6 files changed, 18 insertions(+)


base-commit: 7ccc5e05043b1bb84326b19a2b05938d8f7a2ae6
-- 
2.53.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RFC PATCH net-next 1/2] dt-bindings: net: add Realtek XSGMII interface mode
  2026-11-17  8:47 [RFC PATCH net-next 0/2] Add Realtek XSGMII interface mode Jonas Jelonek
@ 2026-11-17  8:47 ` Jonas Jelonek
  2026-11-17  8:47 ` [RFC PATCH net-next 2/2] net: phy: " Jonas Jelonek
  2026-11-22 21:24 ` [RFC PATCH net-next 0/2] Add " Andrew Lunn
  2 siblings, 0 replies; 6+ messages in thread
From: Jonas Jelonek @ 2026-11-17  8:47 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman, netdev,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, linux-doc,
	linux-kernel, devicetree, Jonas Jelonek

Add xsgmii to the supported MAC-PHY connection types. Realtek's
proprietary XSGMII interface carries eight 10/100/1000 Mbps ports over a
single 10.3125 Gbaud SerDes lane and is distinct from USXGMII and
10G-QXGMII.

Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
---
 Documentation/devicetree/bindings/net/ethernet-controller.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
index 30b2a335116e..e9406ddd0fc0 100644
--- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
@@ -45,6 +45,7 @@ properties:
       - psgmii
       - qsgmii
       - qusgmii
+      - xsgmii
       - tbi
       - rev-mii
       - rmii
-- 
2.53.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RFC PATCH net-next 2/2] net: phy: add Realtek XSGMII interface mode
  2026-11-17  8:47 [RFC PATCH net-next 0/2] Add Realtek XSGMII interface mode Jonas Jelonek
  2026-11-17  8:47 ` [RFC PATCH net-next 1/2] dt-bindings: net: add " Jonas Jelonek
@ 2026-11-17  8:47 ` Jonas Jelonek
  2026-11-22 21:24 ` [RFC PATCH net-next 0/2] Add " Andrew Lunn
  2 siblings, 0 replies; 6+ messages in thread
From: Jonas Jelonek @ 2026-11-17  8:47 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman, netdev,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, linux-doc,
	linux-kernel, devicetree, Jonas Jelonek

Introduce PHY_INTERFACE_MODE_XSGMII for Realtek's proprietary eight-port
MAC-PHY interface. Append the enum value before PHY_INTERFACE_MODE_MAX
and provide the xsgmii string mapping.

Report eight carried ports and per-port 10/100/1000 Mbps capabilities.
Handle XSGMII as a PHY-status interface in phylink, accepting in-band
status and limiting the maximum per-port speed to 1 Gbps.

Document that XSGMII's transport capacity is independent of the number
of enabled ports. A dedicated mode distinguishes it from USXGMII and
10G-QXGMII without inferring the wire protocol from the active port count.

Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
---
 Documentation/networking/phy.rst | 7 +++++++
 drivers/net/phy/phy-core.c       | 2 ++
 drivers/net/phy/phy_caps.c       | 1 +
 drivers/net/phy/phylink.c        | 3 +++
 include/linux/phy.h              | 4 ++++
 5 files changed, 17 insertions(+)

diff --git a/Documentation/networking/phy.rst b/Documentation/networking/phy.rst
index d53067ab1a61..675787c4ab52 100644
--- a/Documentation/networking/phy.rst
+++ b/Documentation/networking/phy.rst
@@ -327,6 +327,13 @@ Some of the interface modes are described below:
     This is the Penta SGMII mode, it is similar to QSGMII but it combines 5
     SGMII lines into a single link compared to 4 on QSGMII.
 
+``PHY_INTERFACE_MODE_XSGMII``
+    This is Realtek's proprietary eight-port MAC-PHY interface. A single
+    SerDes lane operating at 10.3125 Gbaud carries eight ports, each supporting
+    speeds of 10Mbps, 100Mbps and 1Gbps. The interface describes the transport
+    capacity, independently of how many ports are enabled. It is distinct
+    from USXGMII and 10G-QXGMII.
+
 ``PHY_INTERFACE_MODE_10G_QXGMII``
     Represents the 10G-QXGMII PHY-MAC interface as defined by the Cisco USXGMII
     Multiport Copper Interface document. It supports 4 ports over a 10.3125 GHz
diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c
index d7a4a977fc8a..2dd36fa18e2c 100644
--- a/drivers/net/phy/phy-core.c
+++ b/drivers/net/phy/phy-core.c
@@ -201,6 +201,8 @@ int phy_interface_num_ports(phy_interface_t interface)
 		return 4;
 	case PHY_INTERFACE_MODE_PSGMII:
 		return 5;
+	case PHY_INTERFACE_MODE_XSGMII:
+		return 8;
 	case PHY_INTERFACE_MODE_MAX:
 		WARN_ONCE(1, "PHY_INTERFACE_MODE_MAX isn't a valid interface mode");
 		return 0;
diff --git a/drivers/net/phy/phy_caps.c b/drivers/net/phy/phy_caps.c
index 558e4df4d63c..0de12c42c47b 100644
--- a/drivers/net/phy/phy_caps.c
+++ b/drivers/net/phy/phy_caps.c
@@ -313,6 +313,7 @@ unsigned long phy_caps_from_interface(phy_interface_t interface)
 	case PHY_INTERFACE_MODE_QUSGMII:
 	case PHY_INTERFACE_MODE_SGMII:
 	case PHY_INTERFACE_MODE_GMII:
+	case PHY_INTERFACE_MODE_XSGMII:
 		link_caps |= BIT(LINK_CAPA_1000HD) | BIT(LINK_CAPA_1000FD);
 		fallthrough;
 
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index e885da1c2831..0028b543c788 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -263,6 +263,7 @@ static int phylink_interface_max_speed(phy_interface_t interface)
 	case PHY_INTERFACE_MODE_PSGMII:
 	case PHY_INTERFACE_MODE_QSGMII:
 	case PHY_INTERFACE_MODE_QUSGMII:
+	case PHY_INTERFACE_MODE_XSGMII:
 	case PHY_INTERFACE_MODE_SGMII:
 	case PHY_INTERFACE_MODE_GMII:
 		return SPEED_1000;
@@ -812,6 +813,7 @@ static int phylink_parse_mode(struct phylink *pl,
 		case PHY_INTERFACE_MODE_PSGMII:
 		case PHY_INTERFACE_MODE_QSGMII:
 		case PHY_INTERFACE_MODE_QUSGMII:
+		case PHY_INTERFACE_MODE_XSGMII:
 		case PHY_INTERFACE_MODE_RGMII:
 		case PHY_INTERFACE_MODE_RGMII_ID:
 		case PHY_INTERFACE_MODE_RGMII_RXID:
@@ -1046,6 +1048,7 @@ static enum inband_type phylink_get_inband_type(phy_interface_t interface)
 	case PHY_INTERFACE_MODE_PSGMII:
 	case PHY_INTERFACE_MODE_QSGMII:
 	case PHY_INTERFACE_MODE_QUSGMII:
+	case PHY_INTERFACE_MODE_XSGMII:
 	case PHY_INTERFACE_MODE_USXGMII:
 	case PHY_INTERFACE_MODE_10G_QXGMII:
 		/* These protocols are designed for use with a PHY which
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 21afc2082b17..ffff2a6313d3 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -107,6 +107,7 @@ extern const int phy_basic_ports_array[3];
  * @PHY_INTERFACE_MODE_LAUI: 50 Gigabit Attachment Unit Interface
  * @PHY_INTERFACE_MODE_100GBASEP: 100GBase-P - with Clause 134 FEC
  * @PHY_INTERFACE_MODE_MIILITE: MII-Lite - MII without RXER TXER CRS COL
+ * @PHY_INTERFACE_MODE_XSGMII: Realtek proprietary eight-port SGMII over 10G
  * @PHY_INTERFACE_MODE_MAX: Book keeping
  *
  * Describes the interface between the MAC and PHY.
@@ -152,6 +153,7 @@ typedef enum {
 	PHY_INTERFACE_MODE_LAUI,
 	PHY_INTERFACE_MODE_100GBASEP,
 	PHY_INTERFACE_MODE_MIILITE,
+	PHY_INTERFACE_MODE_XSGMII,
 	PHY_INTERFACE_MODE_MAX,
 } phy_interface_t;
 
@@ -286,6 +288,8 @@ static inline const char *phy_modes(phy_interface_t interface)
 		return "100gbase-p";
 	case PHY_INTERFACE_MODE_MIILITE:
 		return "mii-lite";
+	case PHY_INTERFACE_MODE_XSGMII:
+		return "xsgmii";
 	default:
 		return "unknown";
 	}
-- 
2.53.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH net-next 0/2] Add Realtek XSGMII interface mode
  2026-11-17  8:47 [RFC PATCH net-next 0/2] Add Realtek XSGMII interface mode Jonas Jelonek
  2026-11-17  8:47 ` [RFC PATCH net-next 1/2] dt-bindings: net: add " Jonas Jelonek
  2026-11-17  8:47 ` [RFC PATCH net-next 2/2] net: phy: " Jonas Jelonek
@ 2026-11-22 21:24 ` Andrew Lunn
  2026-11-23 12:36   ` Jonas Jelonek
  2 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2026-11-22 21:24 UTC (permalink / raw)
  To: Jonas Jelonek, Christian Marangi
  Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman, netdev,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jonathan Corbet,
	Shuah Khan, Randy Dunlap, linux-doc, linux-kernel, devicetree

On Tue, Nov 17, 2026 at 08:47:46AM +0000, Jonas Jelonek wrote:
> Hi,
> 
> This RFC adds an explicit PHY interface mode for Realtek's proprietary
> XSGMII transport. It carries eight 10/100/1000 Mbps ports over one
> 10.3125 Gbaud SerDes lane. Each logical port remains limited to 1 Gbps;
> the aggregate serial rate is not a per-port Ethernet speed.

We should be careful with naming. We have already have QSGMII and
PSGMII, for Quad and Pent. X is too vague. So we should somehow
indicate 8, Oct.

But...

> Protocol identity and naming
> ----------------------------
> 
> XSGMII is the name Realtek uses for this interface. Calling it simply
> "octal SGMII" would describe its capacity without identifying its
> protocol. Existing modes such as QSGMII and PSGMII already distinguish
> multiplexed MAC-PHY transports; the PSGMII introduction is an example of
> adding the generic mode definitions separately from a driver user [1].
> 
> Cisco USGMII is a relevant comparison, but equivalent port capacity does
> not establish interoperability. Cisco defines Q-USGMII for four ports
> over 5.0 Gb/s and O-USGMII for eight ports over 10.0 Gb/s, using 8b/10b
> coding and a packet-control header [2]. Linux already represents the
> quad variant as "qusgmii", with its own control-word decoding [3].
> 
> Realtek documents XSGMII and O-USGMII as separate RTL8218E interfaces:
> XSGMII runs at 10.3125 Gb/s and O-USGMII at 10.0 Gb/s, with different
> hardware strap selections [4]. The SDK also distinguishes them in
> phy_8218e_macIntfSerdesMode_get() and applies separate initialization
> tables. Realtek's O-USGMII is therefore the candidate for comparison
> with Cisco's octal USGMII; it is not evidence that XSGMII can be renamed
> to USGMII. Compatibility of those O-USGMII implementations would need
> separate confirmation.
> 
> This proposal retains the vendor's XSGMII name rather than assigning an
> existing protocol name to a distinct hardware configuration. It does
> not assume a particular XSGMII line encoding merely from the line rate.

https://deepwiki.com/lotusmomo/airoha_sdk/3.1-sgmiixsgmii-drivers-and-apis

Airoha also seems to have an XSGMII. Is it the same, or different?

Adding Christian.

I hope we are not going to have vendors introducing there own
variants, and we need

PHY_INTERFACE_MODE_REALTEK_OSGMII & PHY_INTERFACE_MODE_AIROHA_OSGMII,
etc.

       Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH net-next 0/2] Add Realtek XSGMII interface mode
  2026-11-22 21:24 ` [RFC PATCH net-next 0/2] Add " Andrew Lunn
@ 2026-11-23 12:36   ` Jonas Jelonek
  2026-11-23 12:44     ` Christian Marangi (Ansuel)
  0 siblings, 1 reply; 6+ messages in thread
From: Jonas Jelonek @ 2026-11-23 12:36 UTC (permalink / raw)
  To: Andrew Lunn, Christian Marangi
  Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman, netdev,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jonathan Corbet,
	Shuah Khan, Randy Dunlap, linux-doc, linux-kernel, devicetree

Hi Andrew,

On 22.11.26 22:24, Andrew Lunn wrote:
> On Tue, Nov 17, 2026 at 08:47:46AM +0000, Jonas Jelonek wrote:
>> Hi,
>>
>> This RFC adds an explicit PHY interface mode for Realtek's proprietary
>> XSGMII transport. It carries eight 10/100/1000 Mbps ports over one
>> 10.3125 Gbaud SerDes lane. Each logical port remains limited to 1 Gbps;
>> the aggregate serial rate is not a per-port Ethernet speed.
> We should be careful with naming. We have already have QSGMII and
> PSGMII, for Quad and Pent. X is too vague. So we should somehow
> indicate 8, Oct.

In principal I agree, the naming doesn't really fit the others. I just used
Realtek's naming for now, they use XSGMII everywhere for this.

> But...
>
>> Protocol identity and naming
>> ----------------------------
>>
>> XSGMII is the name Realtek uses for this interface. Calling it simply
>> "octal SGMII" would describe its capacity without identifying its
>> protocol. Existing modes such as QSGMII and PSGMII already distinguish
>> multiplexed MAC-PHY transports; the PSGMII introduction is an example of
>> adding the generic mode definitions separately from a driver user [1].
>>
>> Cisco USGMII is a relevant comparison, but equivalent port capacity does
>> not establish interoperability. Cisco defines Q-USGMII for four ports
>> over 5.0 Gb/s and O-USGMII for eight ports over 10.0 Gb/s, using 8b/10b
>> coding and a packet-control header [2]. Linux already represents the
>> quad variant as "qusgmii", with its own control-word decoding [3].
>>
>> Realtek documents XSGMII and O-USGMII as separate RTL8218E interfaces:
>> XSGMII runs at 10.3125 Gb/s and O-USGMII at 10.0 Gb/s, with different
>> hardware strap selections [4]. The SDK also distinguishes them in
>> phy_8218e_macIntfSerdesMode_get() and applies separate initialization
>> tables. Realtek's O-USGMII is therefore the candidate for comparison
>> with Cisco's octal USGMII; it is not evidence that XSGMII can be renamed
>> to USGMII. Compatibility of those O-USGMII implementations would need
>> separate confirmation.
>>
>> This proposal retains the vendor's XSGMII name rather than assigning an
>> existing protocol name to a distinct hardware configuration. It does
>> not assume a particular XSGMII line encoding merely from the line rate.
> https://deepwiki.com/lotusmomo/airoha_sdk/3.1-sgmiixsgmii-drivers-and-apis
>
> Airoha also seems to have an XSGMII. Is it the same, or different?

Looking at the referenced code it seems to me that this is rather used
like 'xSGMII' - an umbrella term for SGMII, HSGMII and USXGMII in the
SDK code. Probably the deepwiki side summarized that incorrectly.

Overall I found no other usage or naming of a real XSGMII mode apart
from Realtek switch SoCs and PHYs. Those PHYs (mostly RTL8218D
and RTL8218E) apparently are exclusively used with Realtek switches.
The RTL8218E might be used elsewhere too but in contrast, it explicitly
also support O-USGMII as a separate interface next to XSGMII.

> Adding Christian.
>
> I hope we are not going to have vendors introducing there own
> variants, and we need
>
> PHY_INTERFACE_MODE_REALTEK_OSGMII & PHY_INTERFACE_MODE_AIROHA_OSGMII,
> etc.

Doing some more research on this, as already mentioned in the patch,
there is O-USGMII: described by Cisco, being compatible to SGMII and
QSGMII, using 8b/10b coding, 10Gbaud rate. Though, this should be
totally separate from the proposed mode because it uses 10Gbaud
instead of 10.3125Gbaud like XSGMII does.

Apart from that I occasionally saw some vague information about an
extension to USXGMII, allowing 8 ports and reusing the USXGMII spec
control word and format.

There is no detailed documentation about XSGMII, so assuming it uses
any standardized frame format would be risky and very likely doesn't
apply. The naming of the mode - given it'll be accepted somehow - 
should reflect that and not conflict with variants like 10G-QXGMII.

>
>        Andrew

Best,
Jonas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH net-next 0/2] Add Realtek XSGMII interface mode
  2026-11-23 12:36   ` Jonas Jelonek
@ 2026-11-23 12:44     ` Christian Marangi (Ansuel)
  0 siblings, 0 replies; 6+ messages in thread
From: Christian Marangi (Ansuel) @ 2026-11-23 12:44 UTC (permalink / raw)
  To: Jonas Jelonek
  Cc: Andrew Lunn, Andrew Lunn, Heiner Kallweit, Russell King,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, netdev, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	linux-doc, linux-kernel, devicetree

Il giorno lun 23 nov 2026 alle ore 13:36 Jonas Jelonek
<jonas@jonasjelonek.de> ha scritto:
>
> Hi Andrew,
>
> On 22.11.26 22:24, Andrew Lunn wrote:
> > On Tue, Nov 17, 2026 at 08:47:46AM +0000, Jonas Jelonek wrote:
> >> Hi,
> >>
> >> This RFC adds an explicit PHY interface mode for Realtek's proprietary
> >> XSGMII transport. It carries eight 10/100/1000 Mbps ports over one
> >> 10.3125 Gbaud SerDes lane. Each logical port remains limited to 1 Gbps;
> >> the aggregate serial rate is not a per-port Ethernet speed.
> > We should be careful with naming. We have already have QSGMII and
> > PSGMII, for Quad and Pent. X is too vague. So we should somehow
> > indicate 8, Oct.
>
> In principal I agree, the naming doesn't really fit the others. I just used
> Realtek's naming for now, they use XSGMII everywhere for this.
>
> > But...
> >
> >> Protocol identity and naming
> >> ----------------------------
> >>
> >> XSGMII is the name Realtek uses for this interface. Calling it simply
> >> "octal SGMII" would describe its capacity without identifying its
> >> protocol. Existing modes such as QSGMII and PSGMII already distinguish
> >> multiplexed MAC-PHY transports; the PSGMII introduction is an example of
> >> adding the generic mode definitions separately from a driver user [1].
> >>
> >> Cisco USGMII is a relevant comparison, but equivalent port capacity does
> >> not establish interoperability. Cisco defines Q-USGMII for four ports
> >> over 5.0 Gb/s and O-USGMII for eight ports over 10.0 Gb/s, using 8b/10b
> >> coding and a packet-control header [2]. Linux already represents the
> >> quad variant as "qusgmii", with its own control-word decoding [3].
> >>
> >> Realtek documents XSGMII and O-USGMII as separate RTL8218E interfaces:
> >> XSGMII runs at 10.3125 Gb/s and O-USGMII at 10.0 Gb/s, with different
> >> hardware strap selections [4]. The SDK also distinguishes them in
> >> phy_8218e_macIntfSerdesMode_get() and applies separate initialization
> >> tables. Realtek's O-USGMII is therefore the candidate for comparison
> >> with Cisco's octal USGMII; it is not evidence that XSGMII can be renamed
> >> to USGMII. Compatibility of those O-USGMII implementations would need
> >> separate confirmation.
> >>
> >> This proposal retains the vendor's XSGMII name rather than assigning an
> >> existing protocol name to a distinct hardware configuration. It does
> >> not assume a particular XSGMII line encoding merely from the line rate.
> > https://deepwiki.com/lotusmomo/airoha_sdk/3.1-sgmiixsgmii-drivers-and-apis
> >
> > Airoha also seems to have an XSGMII. Is it the same, or different?
>
> Looking at the referenced code it seems to me that this is rather used
> like 'xSGMII' - an umbrella term for SGMII, HSGMII and USXGMII in the
> SDK code. Probably the deepwiki side summarized that incorrectly.
>
> Overall I found no other usage or naming of a real XSGMII mode apart
> from Realtek switch SoCs and PHYs. Those PHYs (mostly RTL8218D
> and RTL8218E) apparently are exclusively used with Realtek switches.
> The RTL8218E might be used elsewhere too but in contrast, it explicitly
> also support O-USGMII as a separate interface next to XSGMII.
>
> > Adding Christian.
> >
> > I hope we are not going to have vendors introducing there own
> > variants, and we need
> >
> > PHY_INTERFACE_MODE_REALTEK_OSGMII & PHY_INTERFACE_MODE_AIROHA_OSGMII,
> > etc.
>
> Doing some more research on this, as already mentioned in the patch,
> there is O-USGMII: described by Cisco, being compatible to SGMII and
> QSGMII, using 8b/10b coding, 10Gbaud rate. Though, this should be
> totally separate from the proposed mode because it uses 10Gbaud
> instead of 10.3125Gbaud like XSGMII does.
>
> Apart from that I occasionally saw some vague information about an
> extension to USXGMII, allowing 8 ports and reusing the USXGMII spec
> control word and format.
>
> There is no detailed documentation about XSGMII, so assuming it uses
> any standardized frame format would be risky and very likely doesn't
> apply. The naming of the mode - given it'll be accepted somehow -
> should reflect that and not conflict with variants like 10G-QXGMII.
>

Hi Jonas and Andrew,

yes I agree with Jonas here... It seems to me any vendor after the 2.5g
""apocalypse"" (2500base-x vs HSGMII) just decided to use random
naming as xSGMII with anything that transports 10g traffic.

Also from what I can see in the datasheet, they don't really declare
a specific standard they follow aside from saying that the xSGMII port
can be paired with USXGMII and 10g base-t (following the fiber spec)

Honestly speaking from what I notice, xSGMII is more the 10.3125 fiber
spec than the ethernet one...

When configuring the the PCS with all the register, clocks and rate
they all gets set to 10.3125.

Maybe someone from marvell can also join the discussion searching
for pattern?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-23 12:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17  8:47 [RFC PATCH net-next 0/2] Add Realtek XSGMII interface mode Jonas Jelonek
2026-11-17  8:47 ` [RFC PATCH net-next 1/2] dt-bindings: net: add " Jonas Jelonek
2026-11-17  8:47 ` [RFC PATCH net-next 2/2] net: phy: " Jonas Jelonek
2026-11-22 21:24 ` [RFC PATCH net-next 0/2] Add " Andrew Lunn
2026-11-23 12:36   ` Jonas Jelonek
2026-11-23 12:44     ` Christian Marangi (Ansuel)

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®