Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4
@ 2026-11-30 11:02 Leonardo Costa
  2026-11-30 11:02 ` [PATCH net-next 1/5] phy: ti: gmii-sel: Add 10GBASE-R mode " Leonardo Costa
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Leonardo Costa @ 2026-11-30 11:02 UTC (permalink / raw)
  To: Vinod Koul, Roger Quadros, Neil Armstrong, Manivannan Sadhasivam,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Russell King, Chintan Vankar, Siddharth Vadapalli,
	Nora Schiffer
  Cc: Matheus Barbosa, linux-phy, linux-kernel, netdev, Leonardo Costa

This patch series adds support for the 10GBASE-R network protocol over
XFI for the TI J784S4 SoC family. The J784S4 has a CPSW9G with support
for USXGMII/XFI on ports 1 and 2.

The patches introduce the following changes:

 - Patch 1: Make phy-gmii-sel accept 10GBASE-R using the shared
   USXGMII/XFI encoding, and enable it for J784S4.

 - Patch 2: Advertise asymmetric pause support for the CPSW MAC, this
   applies to all CPSW instances, and allows phylink to bring up a link
   when the PHY is connected to a lower-speed link partner.

 - Patches 3–4: Add support for 10GBASE-R on the CPSW driver and add a
   PCS for 10GBASE-R ports, so that phylink can bring up a link when
   running in in-band mode. The USXGMII portion of the code is left
   unchanged.

 - Patch 5: Enable 10GBASE-R for the J784S4.

Patch 1 touches the TI gmii-sel PHY driver, while the rest of the series
is for netdev. Vinod, if you ack the first patch, could it go through
the net-next tree to simplify the merge process?

This series was tested on a Toradex Aquila AM69 mated with the Lotus
Carrier Board. The Lotus Carrier Board has an SFP+ cage that connects to
the J784S4 CPSW port 2, on SERDES2 lane 3. An SFP-10G-T copper module
(AQR113C PHY) was plugged into the cage, and connected to a 10Gbit/s link
partner.

The Device Tree for the Lotus Carrier Board with the Aquila AM69 will
follow in a later patch series to the TI tree.

Signed-off-by: Leonardo Costa <leonardo.costa@toradex.com>
---
Leonardo Costa (4):
      phy: ti: gmii-sel: Add 10GBASE-R mode for J784S4
      net: ethernet: ti: am65-cpsw: Add 10GBASE-R support
      net: ethernet: ti: am65-cpsw: Add PCS for 10GBASE-R ports
      net: ethernet: ti: am65-cpsw: Enable 10GBASE-R/XFI mode for J784S4 CPSW9G

Matheus Barbosa (1):
      net: ethernet: ti: am65-cpsw: advertise asymmetric pause support

 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 75 ++++++++++++++++++++++++++++++--
 drivers/net/ethernet/ti/am65-cpsw-nuss.h |  2 +
 drivers/phy/ti/phy-gmii-sel.c            |  5 ++-
 3 files changed, 77 insertions(+), 5 deletions(-)
---
base-commit: e20f88c4f08bc9dba09c48ddc9806015f79fb20b
change-id: 20261116-v1-aquila-am69-add-xfi-support-f389bc064186

Best regards,
-- 
Leonardo Costa <leonardo.costa@toradex.com>


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH net-next 1/5] phy: ti: gmii-sel: Add 10GBASE-R mode for J784S4
  2026-11-30 11:02 [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4 Leonardo Costa
@ 2026-11-30 11:02 ` Leonardo Costa
  2026-11-30 11:02 ` [PATCH net-next 2/5] net: ethernet: ti: am65-cpsw: advertise asymmetric pause support Leonardo Costa
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Leonardo Costa @ 2026-11-30 11:02 UTC (permalink / raw)
  To: Vinod Koul, Roger Quadros, Neil Armstrong, Manivannan Sadhasivam,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Russell King, Chintan Vankar, Siddharth Vadapalli,
	Nora Schiffer
  Cc: Matheus Barbosa, linux-phy, linux-kernel, netdev, Leonardo Costa

From: Leonardo Costa <leonardo.costa@toradex.com>

The CPSW9G on J784S4 supports 10GBASE-R (XFI), which the TRM encodes in
CTRLMMR_ENETn_CTRL.PORT_MODE_SEL with the same value as USXGMII (0x5,
"USXGMII/XFI"). Accept 10GBASE-R with the same encoding as USXGMII and
enable it for J784S4.

Signed-off-by: Leonardo Costa <leonardo.costa@toradex.com>
---
 drivers/phy/ti/phy-gmii-sel.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/ti/phy-gmii-sel.c b/drivers/phy/ti/phy-gmii-sel.c
index 3649dc75c2889..e3a167e45b7c1 100644
--- a/drivers/phy/ti/phy-gmii-sel.c
+++ b/drivers/phy/ti/phy-gmii-sel.c
@@ -118,7 +118,8 @@ static int phy_gmii_sel_mode(struct phy *phy, enum phy_mode mode, int submode)
 		break;
 
 	case PHY_INTERFACE_MODE_USXGMII:
-		if (!(soc_data->extra_modes & BIT(PHY_INTERFACE_MODE_USXGMII)))
+	case PHY_INTERFACE_MODE_10GBASER:
+		if (!(soc_data->extra_modes & BIT(submode)))
 			goto unsupported;
 		else
 			gmii_sel_mode = J72XX_GMII_SEL_MODE_USXGMII;
@@ -290,7 +291,7 @@ struct phy_gmii_sel_soc_data phy_gmii_sel_cpsw9g_soc_j784s4 = {
 		    BIT(PHY_GMII_SEL_FIXED_TX_DELAY),
 	.regfields = phy_gmii_sel_fields_am654,
 	.extra_modes = BIT(PHY_INTERFACE_MODE_QSGMII) | BIT(PHY_INTERFACE_MODE_SGMII) |
-		       BIT(PHY_INTERFACE_MODE_USXGMII),
+		       BIT(PHY_INTERFACE_MODE_USXGMII) | BIT(PHY_INTERFACE_MODE_10GBASER),
 	.num_ports = 8,
 	.num_qsgmii_main_ports = 2,
 };

-- 
2.43.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH net-next 2/5] net: ethernet: ti: am65-cpsw: advertise asymmetric pause support
  2026-11-30 11:02 [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4 Leonardo Costa
  2026-11-30 11:02 ` [PATCH net-next 1/5] phy: ti: gmii-sel: Add 10GBASE-R mode " Leonardo Costa
@ 2026-11-30 11:02 ` Leonardo Costa
  2026-11-30 11:02 ` [PATCH net-next 3/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R support Leonardo Costa
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Leonardo Costa @ 2026-11-30 11:02 UTC (permalink / raw)
  To: Vinod Koul, Roger Quadros, Neil Armstrong, Manivannan Sadhasivam,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Russell King, Chintan Vankar, Siddharth Vadapalli,
	Nora Schiffer
  Cc: Matheus Barbosa, linux-phy, linux-kernel, netdev, Leonardo Costa

From: Matheus Barbosa <matheus.barbosa@toradex.com>

The CPSW MAC enables RX and TX flow control independently, but only
MAC_SYM_PAUSE is declared. phylink allows pause-based rate matching only
when the MAC supports both symmetric and asymmetric pause, so a 10G
copper SFP+ module on a 10GBASE-R port does not link with a lower-speed
partner. Add MAC_ASYM_PAUSE for all CPSW ports.

Signed-off-by: Matheus Barbosa <matheus.barbosa@toradex.com>
Signed-off-by: Leonardo Costa <leonardo.costa@toradex.com>
---

This was tested with a 10G copper SFP+ module (SFP-10G-T) plugged into
the SFP+ cage on the Lotus Carrier Board (which connects to the J784S4
CPSW9G port 2, on SERDES2 lane 3). The module was connected to a 1G link
partner. With this patch left out of the series, no link comes up. With
the patch, a link comes up and communication works successfully.

I also tested the Ethernet port of a Verdin AM62 (CPSW3G port 1) after
the patch to check for regressions. Connecting it to a PC and testing
asymmetric flow control (RX off and TX on), the link comes up, and
throughput is the same as in symmetric mode. However, I could not
produce a situation where pause frames are sent or received (either in
the symmetric or asymmetric case).
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 0ad6145822445..30e054dc57985 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -2809,7 +2809,8 @@ am65_cpsw_nuss_init_port_ndev(struct am65_cpsw_common *common, u32 port_idx)
 	/* Configuring Phylink */
 	port->slave.phylink_config.dev = &port->ndev->dev;
 	port->slave.phylink_config.type = PHYLINK_NETDEV;
-	port->slave.phylink_config.mac_capabilities = MAC_SYM_PAUSE | MAC_10 | MAC_100 |
+	port->slave.phylink_config.mac_capabilities = MAC_SYM_PAUSE | MAC_ASYM_PAUSE |
+						      MAC_10 | MAC_100 |
 						      MAC_1000FD | MAC_5000FD;
 	port->slave.phylink_config.mac_managed_pm = true; /* MAC does PM */
 

-- 
2.43.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH net-next 3/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R support
  2026-11-30 11:02 [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4 Leonardo Costa
  2026-11-30 11:02 ` [PATCH net-next 1/5] phy: ti: gmii-sel: Add 10GBASE-R mode " Leonardo Costa
  2026-11-30 11:02 ` [PATCH net-next 2/5] net: ethernet: ti: am65-cpsw: advertise asymmetric pause support Leonardo Costa
@ 2026-11-30 11:02 ` Leonardo Costa
  2026-11-30 11:02 ` [PATCH net-next 4/5] net: ethernet: ti: am65-cpsw: Add PCS for 10GBASE-R ports Leonardo Costa
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Leonardo Costa @ 2026-11-30 11:02 UTC (permalink / raw)
  To: Vinod Koul, Roger Quadros, Neil Armstrong, Manivannan Sadhasivam,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Russell King, Chintan Vankar, Siddharth Vadapalli,
	Nora Schiffer
  Cc: Matheus Barbosa, linux-phy, linux-kernel, netdev, Leonardo Costa

From: Leonardo Costa <leonardo.costa@toradex.com>

Accept 10GBASE-R as phy-mode on SoCs that list it in their extra modes
and add the 10G MAC capability to ports configured as 10GBASE-R.

Signed-off-by: Leonardo Costa <leonardo.costa@toradex.com>
---

Running sashiko locally, it pointed out that the MR_AN_ENABLE write at
the end of am65_cpsw_nuss_mac_config(), which runs for every extra mode,
now also runs for 10GBASE-R. This enables SGMII in-band autonegotiation
in the port's CPSGMII block.

        writel(AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE,
                port->sgmii_base + AM65_CPSW_SGMII_CONTROL_REG);

We don't think this is an issue. The ports on the CPSW9G that support
10GBASE-R use the PCSR, which doesn't have in-band autonegotiation,
while this line configures the CPSGMII, used by other interfaces, so
the write is harmless.

Ports configured for USXGMII also use the PCSR instead of the CPSGMII,
so this behavior already happens in the driver, and in this patch,
10GBASE-R follows the same logical path.
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 30e054dc57985..f04ed95ba2ca8 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -2072,7 +2072,8 @@ static void am65_cpsw_nuss_mac_config(struct phylink_config *config, unsigned in
 			cpsw_sl_ctl_clr(port->slave.mac_sl, CPSW_SL_CTL_EXT_EN);
 		}
 
-		if (state->interface == PHY_INTERFACE_MODE_USXGMII) {
+		if (state->interface == PHY_INTERFACE_MODE_USXGMII ||
+		    state->interface == PHY_INTERFACE_MODE_10GBASER) {
 			cpsw_sl_ctl_set(port->slave.mac_sl,
 					CPSW_SL_CTL_XGIG | CPSW_SL_CTL_XGMII_EN);
 		} else {
@@ -2827,6 +2828,9 @@ am65_cpsw_nuss_init_port_ndev(struct am65_cpsw_common *common, u32 port_idx)
 			  port->slave.phylink_config.supported_interfaces);
 		break;
 
+	case PHY_INTERFACE_MODE_10GBASER:
+		port->slave.phylink_config.mac_capabilities |= MAC_10000FD;
+		fallthrough;
 	case PHY_INTERFACE_MODE_QSGMII:
 	case PHY_INTERFACE_MODE_SGMII:
 	case PHY_INTERFACE_MODE_USXGMII:

-- 
2.43.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH net-next 4/5] net: ethernet: ti: am65-cpsw: Add PCS for 10GBASE-R ports
  2026-11-30 11:02 [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4 Leonardo Costa
                   ` (2 preceding siblings ...)
  2026-11-30 11:02 ` [PATCH net-next 3/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R support Leonardo Costa
@ 2026-11-30 11:02 ` Leonardo Costa
  2026-11-30 11:02 ` [PATCH net-next 5/5] net: ethernet: ti: am65-cpsw: Enable 10GBASE-R/XFI mode for J784S4 CPSW9G Leonardo Costa
  2026-12-01 11:09 ` [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4 Francesco Dolcini
  5 siblings, 0 replies; 7+ messages in thread
From: Leonardo Costa @ 2026-11-30 11:02 UTC (permalink / raw)
  To: Vinod Koul, Roger Quadros, Neil Armstrong, Manivannan Sadhasivam,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Russell King, Chintan Vankar, Siddharth Vadapalli,
	Nora Schiffer
  Cc: Matheus Barbosa, linux-phy, linux-kernel, netdev, Leonardo Costa

From: Leonardo Costa <leonardo.costa@toradex.com>

phylink manages SFP ports in in-band mode and takes the MAC side link
state from the PCS, so without one a 10GBASE-R port connected to an
SFP+ cage never comes up.

Add a phylink PCS for the 10GBASE-R PCS (PCSR) of the port, reporting
link up when the PCSR receive status has block lock and no high BER.
The PCSR has no interrupt, so the link state is polled.

Signed-off-by: Leonardo Costa <leonardo.costa@toradex.com>
---

Running sashiko locally, it pointed out that the
AM65_CPSW_XGMII_PCSR_RX_STATUS_REG register read in
am65_cpsw_pcsr_get_state() may need to be done twice if the
RX_BLOCK_LOCK and RX_HI_BER bits are latched.

Checking the CPSW PCSR registers on the J784S4 TRM register map, these
bits are not latched. They are marked with "R" in the "Access" column,
while a latched bit would be marked with "R/WC", such as TX_FAULT for
example, which requires a write to clear. A single readl is enough for
this case.
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 64 ++++++++++++++++++++++++++++++++
 drivers/net/ethernet/ti/am65-cpsw-nuss.h |  2 +
 2 files changed, 66 insertions(+)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index f04ed95ba2ca8..c49e3db7f5852 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -45,6 +45,7 @@
 #define AM65_CPSW_SS_BASE	0x0
 #define AM65_CPSW_SGMII_BASE	0x100
 #define AM65_CPSW_XGMII_BASE	0x2100
+#define AM65_CPSW_XGMII_PORT_OFFSET	0x100
 #define AM65_CPSW_CPSW_NU_BASE	0x20000
 #define AM65_CPSW_NU_PORTS_BASE	0x1000
 #define AM65_CPSW_NU_FRAM_BASE	0x12000
@@ -85,6 +86,10 @@
 #define AM65_CPSW_SGMII_MR_ADV_ABILITY_REG	0x018
 #define AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE	BIT(0)
 
+#define AM65_CPSW_XGMII_PCSR_RX_STATUS_REG	0x00c
+#define AM65_CPSW_XGMII_PCSR_RX_HI_BER		BIT(31)
+#define AM65_CPSW_XGMII_PCSR_RX_BLOCK_LOCK	BIT(30)
+
 #define AM65_CPSW_CTL_VLAN_AWARE		BIT(1)
 #define AM65_CPSW_CTL_P0_ENABLE			BIT(2)
 #define AM65_CPSW_CTL_P0_TX_CRC_REMOVE		BIT(13)
@@ -2160,7 +2165,57 @@ static void am65_cpsw_nuss_mac_link_up(struct phylink_config *config, struct phy
 	netif_tx_wake_all_queues(ndev);
 }
 
+static unsigned int am65_cpsw_pcsr_inband_caps(struct phylink_pcs *pcs,
+					       phy_interface_t interface)
+{
+	return LINK_INBAND_DISABLE;
+}
+
+static void am65_cpsw_pcsr_get_state(struct phylink_pcs *pcs, unsigned int neg_mode,
+				     struct phylink_link_state *state)
+{
+	struct am65_cpsw_port *port = container_of(pcs, struct am65_cpsw_port, slave.pcsr);
+	u32 val;
+
+	val = readl(port->xgmii_base + AM65_CPSW_XGMII_PCSR_RX_STATUS_REG);
+
+	state->link = (val & AM65_CPSW_XGMII_PCSR_RX_BLOCK_LOCK) &&
+		      !(val & AM65_CPSW_XGMII_PCSR_RX_HI_BER);
+	if (!state->link)
+		return;
+
+	state->speed = SPEED_10000;
+	state->duplex = DUPLEX_FULL;
+}
+
+static int am65_cpsw_pcsr_config(struct phylink_pcs *pcs, unsigned int neg_mode,
+				 phy_interface_t interface,
+				 const unsigned long *advertising,
+				 bool permit_pause_to_mac)
+{
+	return 0;
+}
+
+static const struct phylink_pcs_ops am65_cpsw_pcsr_ops = {
+	.pcs_inband_caps = am65_cpsw_pcsr_inband_caps,
+	.pcs_get_state = am65_cpsw_pcsr_get_state,
+	.pcs_config = am65_cpsw_pcsr_config,
+};
+
+static struct phylink_pcs *am65_cpsw_nuss_mac_select_pcs(struct phylink_config *config,
+							 phy_interface_t interface)
+{
+	struct am65_cpsw_slave_data *slave = container_of(config, struct am65_cpsw_slave_data,
+							  phylink_config);
+
+	if (interface == PHY_INTERFACE_MODE_10GBASER)
+		return &slave->pcsr;
+
+	return NULL;
+}
+
 static const struct phylink_mac_ops am65_cpsw_phylink_mac_ops = {
+	.mac_select_pcs = am65_cpsw_nuss_mac_select_pcs,
 	.mac_config = am65_cpsw_nuss_mac_config,
 	.mac_link_down = am65_cpsw_nuss_mac_link_down,
 	.mac_link_up = am65_cpsw_nuss_mac_link_up,
@@ -2633,6 +2688,9 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
 				  AM65_CPSW_NU_PORTS_OFFSET * (port_id);
 		if (common->pdata.extra_modes)
 			port->sgmii_base = common->ss_base + AM65_CPSW_SGMII_BASE * (port_id);
+		if (common->pdata.extra_modes & BIT(PHY_INTERFACE_MODE_10GBASER))
+			port->xgmii_base = common->ss_base + AM65_CPSW_XGMII_BASE +
+					   AM65_CPSW_XGMII_PORT_OFFSET * (port_id - 1);
 		port->stat_base = common->cpsw_base + AM65_CPSW_NU_STATS_BASE +
 				  (AM65_CPSW_NU_STATS_PORT_OFFSET * port_id);
 		port->name = of_get_property(port_np, "label", NULL);
@@ -2848,6 +2906,12 @@ am65_cpsw_nuss_init_port_ndev(struct am65_cpsw_common *common, u32 port_idx)
 		return -EOPNOTSUPP;
 	}
 
+	if (port->xgmii_base) {
+		port->slave.pcsr.ops = &am65_cpsw_pcsr_ops;
+		port->slave.pcsr.poll = true;
+		__set_bit(PHY_INTERFACE_MODE_10GBASER, port->slave.pcsr.supported_interfaces);
+	}
+
 	phylink = phylink_create(&port->slave.phylink_config,
 				 of_fwnode_handle(port->slave.port_np),
 				 port->slave.phy_if,
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.h b/drivers/net/ethernet/ti/am65-cpsw-nuss.h
index 7750448e47468..df2a6ef866ee4 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.h
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.h
@@ -38,6 +38,7 @@ struct am65_cpsw_slave_data {
 	int				port_vlan;
 	struct phylink			*phylink;
 	struct phylink_config		phylink_config;
+	struct phylink_pcs		pcsr;
 };
 
 struct am65_cpsw_port {
@@ -47,6 +48,7 @@ struct am65_cpsw_port {
 	u32				port_id;
 	void __iomem			*port_base;
 	void __iomem			*sgmii_base;
+	void __iomem			*xgmii_base;
 	void __iomem			*stat_base;
 	void __iomem			*fetch_ram_base;
 	bool				disabled;

-- 
2.43.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH net-next 5/5] net: ethernet: ti: am65-cpsw: Enable 10GBASE-R/XFI mode for J784S4 CPSW9G
  2026-11-30 11:02 [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4 Leonardo Costa
                   ` (3 preceding siblings ...)
  2026-11-30 11:02 ` [PATCH net-next 4/5] net: ethernet: ti: am65-cpsw: Add PCS for 10GBASE-R ports Leonardo Costa
@ 2026-11-30 11:02 ` Leonardo Costa
  2026-12-01 11:09 ` [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4 Francesco Dolcini
  5 siblings, 0 replies; 7+ messages in thread
From: Leonardo Costa @ 2026-11-30 11:02 UTC (permalink / raw)
  To: Vinod Koul, Roger Quadros, Neil Armstrong, Manivannan Sadhasivam,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Russell King, Chintan Vankar, Siddharth Vadapalli,
	Nora Schiffer
  Cc: Matheus Barbosa, linux-phy, linux-kernel, netdev, Leonardo Costa

From: Leonardo Costa <leonardo.costa@toradex.com>

The J784S4 9-port Gigabit Ethernet Switch (CPSW9G) supports 10GBASE-R
(XFI). Add 10GBASE-R to the extra modes of J784S4.

Signed-off-by: Leonardo Costa <leonardo.costa@toradex.com>
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index c49e3db7f5852..6adf4c6a8ab72 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -3566,7 +3566,7 @@ static const struct am65_cpsw_pdata j784s4_cpswxg_pdata = {
 	.ale_dev_id = "am64-cpswxg",
 	.fdqring_mode = K3_RINGACC_RING_MODE_MESSAGE,
 	.extra_modes = BIT(PHY_INTERFACE_MODE_QSGMII) | BIT(PHY_INTERFACE_MODE_SGMII) |
-		       BIT(PHY_INTERFACE_MODE_USXGMII),
+		       BIT(PHY_INTERFACE_MODE_USXGMII) | BIT(PHY_INTERFACE_MODE_10GBASER),
 };
 
 static const struct of_device_id am65_cpsw_nuss_of_mtable[] = {

-- 
2.43.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4
  2026-11-30 11:02 [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4 Leonardo Costa
                   ` (4 preceding siblings ...)
  2026-11-30 11:02 ` [PATCH net-next 5/5] net: ethernet: ti: am65-cpsw: Enable 10GBASE-R/XFI mode for J784S4 CPSW9G Leonardo Costa
@ 2026-12-01 11:09 ` Francesco Dolcini
  5 siblings, 0 replies; 7+ messages in thread
From: Francesco Dolcini @ 2026-12-01 11:09 UTC (permalink / raw)
  To: Leonardo Costa
  Cc: Vinod Koul, Roger Quadros, Neil Armstrong, Manivannan Sadhasivam,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Russell King, Chintan Vankar, Siddharth Vadapalli,
	Nora Schiffer, Matheus Barbosa, linux-phy, linux-kernel, netdev,
	Leonardo Costa

On Mon, Nov 30, 2026 at 08:02:42AM -0300, Leonardo Costa wrote:
> This patch series adds support for the 10GBASE-R network protocol over
> XFI for the TI J784S4 SoC family. The J784S4 has a CPSW9G with support
> for USXGMII/XFI on ports 1 and 2.
> 
> The patches introduce the following changes:
> 
>  - Patch 1: Make phy-gmii-sel accept 10GBASE-R using the shared
>    USXGMII/XFI encoding, and enable it for J784S4.
> 
>  - Patch 2: Advertise asymmetric pause support for the CPSW MAC, this
>    applies to all CPSW instances, and allows phylink to bring up a link
>    when the PHY is connected to a lower-speed link partner.
> 
>  - Patches 3–4: Add support for 10GBASE-R on the CPSW driver and add a
>    PCS for 10GBASE-R ports, so that phylink can bring up a link when
>    running in in-band mode. The USXGMII portion of the code is left
>    unchanged.
> 
>  - Patch 5: Enable 10GBASE-R for the J784S4.
> 
> Patch 1 touches the TI gmii-sel PHY driver, while the rest of the series
> is for netdev. Vinod, if you ack the first patch, could it go through
> the net-next tree to simplify the merge process?
> 
> This series was tested on a Toradex Aquila AM69 mated with the Lotus
> Carrier Board. The Lotus Carrier Board has an SFP+ cage that connects to
> the J784S4 CPSW port 2, on SERDES2 lane 3. An SFP-10G-T copper module
> (AQR113C PHY) was plugged into the cage, and connected to a 10Gbit/s link
> partner.
> 
> The Device Tree for the Lotus Carrier Board with the Aquila AM69 will
> follow in a later patch series to the TI tree.
> 
> Signed-off-by: Leonardo Costa <leonardo.costa@toradex.com>

For the whole series

Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 11:02 [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4 Leonardo Costa
2026-11-30 11:02 ` [PATCH net-next 1/5] phy: ti: gmii-sel: Add 10GBASE-R mode " Leonardo Costa
2026-11-30 11:02 ` [PATCH net-next 2/5] net: ethernet: ti: am65-cpsw: advertise asymmetric pause support Leonardo Costa
2026-11-30 11:02 ` [PATCH net-next 3/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R support Leonardo Costa
2026-11-30 11:02 ` [PATCH net-next 4/5] net: ethernet: ti: am65-cpsw: Add PCS for 10GBASE-R ports Leonardo Costa
2026-11-30 11:02 ` [PATCH net-next 5/5] net: ethernet: ti: am65-cpsw: Enable 10GBASE-R/XFI mode for J784S4 CPSW9G Leonardo Costa
2026-12-01 11:09 ` [PATCH net-next 0/5] net: ethernet: ti: am65-cpsw: Add 10GBASE-R/XFI support for J784S4 Francesco Dolcini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox