* [PATCH net-next 0/2] net: stmmac: dwmac-socfpga: Add Agilex5 TSN GMAC support
@ 2026-09-23 2:18 muhammad.nazim.amirul.nazle.asmade
2026-09-23 2:18 ` [PATCH net-next 1/2] dt-bindings: net: altr,socfpga-stmmac: Add altr,socfpga-stmmac-agilex5-tsn compatible muhammad.nazim.amirul.nazle.asmade
2026-09-23 2:18 ` [PATCH net-next 2/2] net: stmmac: dwmac-socfpga: Add support for Agilex5 TSN GMAC with FPGA converter muhammad.nazim.amirul.nazle.asmade
0 siblings, 2 replies; 4+ messages in thread
From: muhammad.nazim.amirul.nazle.asmade @ 2026-09-23 2:18 UTC (permalink / raw)
To: netdev
Cc: Maxime Chevallier, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Dinh Nguyen, Maxime Coquelin, Alexandre Torgue,
devicetree, linux-stm32, linux-arm-kernel, linux-kernel
From: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
This series adds support for the gmac1 TSN port on the Intel SoCFPGA
Agilex5 SoCDK TSN Config2 board.
The TSN port (gmac1) connects to its PHY through a GMII-to-RGMII converter
implemented as FPGA soft IP. This converter provides the RGMII TX/RX clock
delays, requiring the MAC interface selector to be configured for GMII while
the PHY-facing interface is configured as RGMII without delay duplication.
Patch 1 documents the altr,socfpga-stmmac-agilex5-tsn compatible. Patch 2
adds dedicated match .data ops for the required interface setup.
These two patches were previously posted as patches 3 and 4 of the
"Add Agilex5 SoCDK TSN Config2 board support" series (up to v6). Per
Jakub Kicinski's request, they are reposted here as a separate series
for net-next. The board-level binding and DTS patches will be sent
separately to the SoCFPGA tree.
Changes since the v6 board series:
- Split out the networking patches, rebased onto latest net-next.
- Add Reviewed-by from Maxime Chevallier on patch 2.
History from the board series:
v6:
- Put altr,socfpga-stmmac-agilex5-tsn in the same compatible enum as
altr,socfpga-stmmac-agilex5 in the net binding, per Krzysztof Kozlowski.
v5:
- Replace of_device_is_compatible() probe check with dedicated
socfpga_agilex5_tsn_gmac_ops via match .data, per Krzysztof Kozlowski
and Dinh Nguyen.
- Drop altr,socfpga-stmmac-agilex5 fallback from the TSN compatible list
and rewrite the net binding commit message to explain the hardware
difference, per Krzysztof Kozlowski.
v4:
- Add Reviewed-by from Andrew Lunn on the driver patch.
v2:
- Replace mac-mode DT property with compatible string-based detection per
Andrew Lunn's feedback.
- Use phy-mode = "rgmii-id" to correctly reflect MAC-side delay handling.
- Rename compatible string to altr,socfpga-stmmac-agilex5-tsn for
consistency with existing altr,socfpga-stmmac-* compatibles.
- Add DT binding documentation for new net compatible string (new patch).
Nazim Amirul (2):
dt-bindings: net: altr,socfpga-stmmac: Add
altr,socfpga-stmmac-agilex5-tsn compatible
net: stmmac: dwmac-socfpga: Add support for Agilex5 TSN GMAC with FPGA
converter
.../bindings/net/altr,socfpga-stmmac.yaml | 5 +++-
.../ethernet/stmicro/stmmac/dwmac-socfpga.c | 23 ++++++++++++++++++-
2 files changed, 26 insertions(+), 2 deletions(-)
--
2.43.7
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH net-next 1/2] dt-bindings: net: altr,socfpga-stmmac: Add altr,socfpga-stmmac-agilex5-tsn compatible
2026-09-23 2:18 [PATCH net-next 0/2] net: stmmac: dwmac-socfpga: Add Agilex5 TSN GMAC support muhammad.nazim.amirul.nazle.asmade
@ 2026-09-23 2:18 ` muhammad.nazim.amirul.nazle.asmade
2026-09-23 8:27 ` Krzysztof Kozlowski
2026-09-23 2:18 ` [PATCH net-next 2/2] net: stmmac: dwmac-socfpga: Add support for Agilex5 TSN GMAC with FPGA converter muhammad.nazim.amirul.nazle.asmade
1 sibling, 1 reply; 4+ messages in thread
From: muhammad.nazim.amirul.nazle.asmade @ 2026-09-23 2:18 UTC (permalink / raw)
To: netdev
Cc: Maxime Chevallier, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Dinh Nguyen, Maxime Coquelin, Alexandre Torgue,
devicetree, linux-stm32, linux-arm-kernel, linux-kernel
From: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
The Agilex5 SoCDK TSN Config2 gmac1 path includes an FPGA soft-IP
GMII-to-RGMII converter between the DWXGMAC and the PHY. The converter
provides the RGMII TX/RX delays and presents GMII toward the MAC, unlike
a plain altr,socfpga-stmmac-agilex5 port with no such converter.
Add altr,socfpga-stmmac-agilex5-tsn for that integration in the same
compatible items entry as altr,socfpga-stmmac-agilex5 (shared
snps,dwxgmac-2.10). Do not use altr,socfpga-stmmac-agilex5 as a DT
fallback for the TSN port; the converter presents GMII to the MAC and
supplies the RGMII delays, unlike a plain Agilex5 GMAC port.
Signed-off-by: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
---
Previously patch 3 of the v6 board series; split out for net-next.
Rebase only.
v6: Put altr,socfpga-stmmac-agilex5-tsn in the same enum as
altr,socfpga-stmmac-agilex5, per Krzysztof Kozlowski.
v5: Drop altr,socfpga-stmmac-agilex5 fallback and rewrite commit message
to explain hardware incompatibility, per Krzysztof Kozlowski.
.../devicetree/bindings/net/altr,socfpga-stmmac.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml b/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml
index d8f90d36d246..ca768937d890 100644
--- a/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml
+++ b/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml
@@ -22,6 +22,7 @@ select:
- altr,socfpga-stmmac
- altr,socfpga-stmmac-a10-s10
- altr,socfpga-stmmac-agilex5
+ - altr,socfpga-stmmac-agilex5-tsn
required:
- compatible
@@ -42,7 +43,9 @@ properties:
- const: snps,dwmac-3.74a
- const: snps,dwmac
- items:
- - const: altr,socfpga-stmmac-agilex5
+ - enum:
+ - altr,socfpga-stmmac-agilex5
+ - altr,socfpga-stmmac-agilex5-tsn
- const: snps,dwxgmac-2.10
clocks:
--
2.43.7
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next 1/2] dt-bindings: net: altr,socfpga-stmmac: Add altr,socfpga-stmmac-agilex5-tsn compatible
2026-09-23 2:18 ` [PATCH net-next 1/2] dt-bindings: net: altr,socfpga-stmmac: Add altr,socfpga-stmmac-agilex5-tsn compatible muhammad.nazim.amirul.nazle.asmade
@ 2026-09-23 8:27 ` Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-23 8:27 UTC (permalink / raw)
To: muhammad.nazim.amirul.nazle.asmade, netdev
Cc: Maxime Chevallier, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Dinh Nguyen, Maxime Coquelin, Alexandre Torgue,
devicetree, linux-stm32, linux-arm-kernel, linux-kernel
On 23/09/2026 04:18, muhammad.nazim.amirul.nazle.asmade@altera.com wrote:
> From: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
>
> The Agilex5 SoCDK TSN Config2 gmac1 path includes an FPGA soft-IP
> GMII-to-RGMII converter between the DWXGMAC and the PHY. The converter
> provides the RGMII TX/RX delays and presents GMII toward the MAC, unlike
> a plain altr,socfpga-stmmac-agilex5 port with no such converter.
>
> Add altr,socfpga-stmmac-agilex5-tsn for that integration in the same
> compatible items entry as altr,socfpga-stmmac-agilex5 (shared
> snps,dwxgmac-2.10). Do not use altr,socfpga-stmmac-agilex5 as a DT
> fallback for the TSN port; the converter presents GMII to the MAC and
> supplies the RGMII delays, unlike a plain Agilex5 GMAC port.
>
> Signed-off-by: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
> ---
> Previously patch 3 of the v6 board series; split out for net-next.
> Rebase only.
>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] net: stmmac: dwmac-socfpga: Add support for Agilex5 TSN GMAC with FPGA converter
2026-09-23 2:18 [PATCH net-next 0/2] net: stmmac: dwmac-socfpga: Add Agilex5 TSN GMAC support muhammad.nazim.amirul.nazle.asmade
2026-09-23 2:18 ` [PATCH net-next 1/2] dt-bindings: net: altr,socfpga-stmmac: Add altr,socfpga-stmmac-agilex5-tsn compatible muhammad.nazim.amirul.nazle.asmade
@ 2026-09-23 2:18 ` muhammad.nazim.amirul.nazle.asmade
1 sibling, 0 replies; 4+ messages in thread
From: muhammad.nazim.amirul.nazle.asmade @ 2026-09-23 2:18 UTC (permalink / raw)
To: netdev
Cc: Maxime Chevallier, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Dinh Nguyen, Maxime Coquelin, Alexandre Torgue,
devicetree, linux-stm32, linux-arm-kernel, linux-kernel
From: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
The Agilex5 SoCDK TSN Config2 board uses a GMII-to-RGMII converter
implemented as FPGA soft IP between gmac1 and its PHY. This converter
provides the RGMII TX/RX clock delays, so the MAC interface selector
must be configured for GMII while the PHY is configured without delays.
Add the "altr,socfpga-stmmac-agilex5-tsn" compatible with dedicated
match .data ops that extend the standard Agilex5 setup: force GMII for
the MAC interface selector and strip delay bits from phy_interface so
the PHY is not configured to add delays already provided by the FPGA
converter.
Signed-off-by: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
Previously patch 4 of the v6 board series; split out for net-next.
Add Reviewed-by from Maxime Chevallier.
v6: No changes from v5.
v5: Replace of_device_is_compatible() probe check with dedicated
socfpga_agilex5_tsn_gmac_ops via match .data, per Krzysztof
Kozlowski and Dinh Nguyen.
v4: Add Reviewed-by from Andrew Lunn.
.../ethernet/stmicro/stmmac/dwmac-socfpga.c | 23 ++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 1d7f0a57d288..0632105b420f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -69,12 +69,13 @@ struct socfpga_dwmac {
void __iomem *tse_pcs_base;
void __iomem *sgmii_adapter_base;
bool f2h_ptp_ref_clk;
+ phy_interface_t mac_interface;
const struct socfpga_dwmac_ops *ops;
};
static phy_interface_t socfpga_get_plat_phymode(struct socfpga_dwmac *dwmac)
{
- return dwmac->plat_dat->phy_interface;
+ return dwmac->mac_interface;
}
static void socfpga_sgmii_config(struct socfpga_dwmac *dwmac, bool enable)
@@ -650,6 +651,8 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
plat_dat->pcs_exit = socfpga_dwmac_pcs_exit;
plat_dat->select_pcs = socfpga_dwmac_select_pcs;
+ dwmac->mac_interface = plat_dat->phy_interface;
+
ops->setup_plat_dat(dwmac);
return devm_stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res);
@@ -670,10 +673,28 @@ static const struct socfpga_dwmac_ops socfpga_agilex5_ops = {
.setup_plat_dat = socfpga_agilex5_setup_plat_dat,
};
+static void socfpga_agilex5_tsn_gmac_setup_plat_dat(struct socfpga_dwmac *dwmac)
+{
+ struct plat_stmmacenet_data *plat_dat = dwmac->plat_dat;
+
+ socfpga_agilex5_setup_plat_dat(dwmac);
+
+ /* FPGA converter supplies RGMII delays; MAC uses GMII, PHY gets plain RGMII */
+ dwmac->mac_interface = PHY_INTERFACE_MODE_GMII;
+ if (phy_interface_mode_is_rgmii(plat_dat->phy_interface))
+ plat_dat->phy_interface = PHY_INTERFACE_MODE_RGMII;
+}
+
+static const struct socfpga_dwmac_ops socfpga_agilex5_tsn_gmac_ops = {
+ .set_phy_mode = socfpga_gen10_set_phy_mode,
+ .setup_plat_dat = socfpga_agilex5_tsn_gmac_setup_plat_dat,
+};
+
static const struct of_device_id socfpga_dwmac_match[] = {
{ .compatible = "altr,socfpga-stmmac", .data = &socfpga_gen5_ops },
{ .compatible = "altr,socfpga-stmmac-a10-s10", .data = &socfpga_gen10_ops },
{ .compatible = "altr,socfpga-stmmac-agilex5", .data = &socfpga_agilex5_ops },
+ { .compatible = "altr,socfpga-stmmac-agilex5-tsn", .data = &socfpga_agilex5_tsn_gmac_ops },
{ }
};
MODULE_DEVICE_TABLE(of, socfpga_dwmac_match);
--
2.43.7
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-23 8:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 2:18 [PATCH net-next 0/2] net: stmmac: dwmac-socfpga: Add Agilex5 TSN GMAC support muhammad.nazim.amirul.nazle.asmade
2026-09-23 2:18 ` [PATCH net-next 1/2] dt-bindings: net: altr,socfpga-stmmac: Add altr,socfpga-stmmac-agilex5-tsn compatible muhammad.nazim.amirul.nazle.asmade
2026-09-23 8:27 ` Krzysztof Kozlowski
2026-09-23 2:18 ` [PATCH net-next 2/2] net: stmmac: dwmac-socfpga: Add support for Agilex5 TSN GMAC with FPGA converter muhammad.nazim.amirul.nazle.asmade
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®