mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree
@ 2026-04-23  6:58 Michael Tretter
  2026-04-23  6:58 ` [PATCH 1/2] net: xgmac: switch to upstream compatible Michael Tretter
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Michael Tretter @ 2026-04-23  6:58 UTC (permalink / raw)
  To: Sascha Hauer, BAREBOX; +Cc: Steffen Trumtrar, Michael Tretter

The compatible used by the xgmac driver in barebox doesn't use the
existing binding for the xgmac, but uses a custom compatible string.
Therefore, the Ethernet nodes that are already defined by the imported
Linux device tree are not used.

Update the driver to use the same compatible as Linux and remove the now
obsolete downstream device tree nodes.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
Michael Tretter (2):
      net: xgmac: switch to upstream compatible
      ARM: socfpga: remove obsolete gmac device tree nodes

 arch/arm/dts/socfpga_agilex5.dtsi           | 51 -----------------------------
 arch/arm/dts/socfpga_agilex5_axe5_eagle.dts |  1 -
 drivers/net/designware_xgmac_socfpga.c      |  6 ++--
 3 files changed, 3 insertions(+), 55 deletions(-)
---
base-commit: 7b492daea9347fd55bf29560c2ec494ca1040f95
change-id: 20260423-socfpga-agilex5-dwmac-binding-756bb1aab255

Best regards,
-- 
Michael Tretter <m.tretter@pengutronix.de>




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

* [PATCH 1/2] net: xgmac: switch to upstream compatible
  2026-04-23  6:58 [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree Michael Tretter
@ 2026-04-23  6:58 ` Michael Tretter
  2026-04-23  6:58 ` [PATCH 2/2] ARM: socfpga: remove obsolete gmac device tree nodes Michael Tretter
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Michael Tretter @ 2026-04-23  6:58 UTC (permalink / raw)
  To: Sascha Hauer, BAREBOX; +Cc: Steffen Trumtrar, Michael Tretter

The "intel,socfpga-dwxgmac" binding is not defined, but the correct
binding is "altr,socfpga-stmmac-agilex5".

Switch to the correct upstream compatible for the driver.

This breaks backwards compatibility with older and downstream device
trees. Since the binding was never officially defined, implementing the
necessary compatibility isn't worth it.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 drivers/net/designware_xgmac_socfpga.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/designware_xgmac_socfpga.c b/drivers/net/designware_xgmac_socfpga.c
index 21373c50d962..7598798c5de6 100644
--- a/drivers/net/designware_xgmac_socfpga.c
+++ b/drivers/net/designware_xgmac_socfpga.c
@@ -83,9 +83,9 @@ static int xgmac_probe_resources_socfpga(struct device *dev)
 		dev_err(dev, "Invalid reset line 'stmmaceth'.\n");
 		return PTR_ERR(xgmac->rst);
 	}
-	xgmac->rst_ocp = reset_control_get(dev, "stmmaceth-ocp");
+	xgmac->rst_ocp = reset_control_get(dev, "ahb");
 	if (IS_ERR(xgmac->rst_ocp)) {
-		dev_err(dev, "Invalid reset line 'stmmaceth-ocp'.\n");
+		dev_err(dev, "Invalid reset line 'ahb'.\n");
 		return PTR_ERR(xgmac->rst_ocp);
 	}
 
@@ -139,7 +139,7 @@ struct xgmac_config __maybe_unused xgmac_socfpga_config = {
 
 static __maybe_unused struct of_device_id xgmac_socfpga_compatible[] = {
 	{
-		.compatible = "intel,socfpga-dwxgmac",
+		.compatible = "altr,socfpga-stmmac-agilex5",
 		.data = &xgmac_socfpga_config
 	}, {
 		/* sentinel */

-- 
2.47.3




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

* [PATCH 2/2] ARM: socfpga: remove obsolete gmac device tree nodes
  2026-04-23  6:58 [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree Michael Tretter
  2026-04-23  6:58 ` [PATCH 1/2] net: xgmac: switch to upstream compatible Michael Tretter
@ 2026-04-23  6:58 ` Michael Tretter
  2026-04-27  7:23 ` [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree Sascha Hauer
  2026-04-27 12:30 ` Sascha Hauer
  3 siblings, 0 replies; 6+ messages in thread
From: Michael Tretter @ 2026-04-23  6:58 UTC (permalink / raw)
  To: Sascha Hauer, BAREBOX; +Cc: Steffen Trumtrar, Michael Tretter

The nodes for the gmacs are already defined in the imported Linux device
tree of the Agilex 5. The device tree nodes defined by barebox are no
longer in use.

Remove them.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 arch/arm/dts/socfpga_agilex5.dtsi           | 51 -----------------------------
 arch/arm/dts/socfpga_agilex5_axe5_eagle.dts |  1 -
 2 files changed, 52 deletions(-)

diff --git a/arch/arm/dts/socfpga_agilex5.dtsi b/arch/arm/dts/socfpga_agilex5.dtsi
deleted file mode 100644
index 96039a1f36c5..000000000000
--- a/arch/arm/dts/socfpga_agilex5.dtsi
+++ /dev/null
@@ -1,51 +0,0 @@
-// SPDX-License-Identifier:     GPL-2.0
-/*
- * Copyright (C) 2019-2023 Intel Corporation <www.intel.com>
- */
-
-&soc {
-	gmac0: ethernet@10810000 {
-		compatible = "intel,socfpga-dwxgmac", "snps,dwxgmac-2.10", "snps,dwxgmac";
-		reg = <0x10810000 0x3500>;
-		interrupts = <0 190 4>;
-		interrupt-names = "macirq";
-		resets = <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>;
-		reset-names = "stmmaceth", "stmmaceth-ocp";
-		tx-fifo-depth = <32768>;
-		rx-fifo-depth = <16384>;
-		altr,sysmgr-syscon = <&sysmgr 0x44 0>;
-		clocks = <&clkmgr AGILEX5_EMAC0_CLK>;
-		clock-names = "stmmaceth";
-		status = "disabled";
-	};
-
-	gmac1: ethernet@10820000 {
-		compatible = "intel,socfpga-dwxgmac", "snps,dwxgmac-2.10", "snps,dwxgmac";
-		reg = <0x10820000 0x3500>;
-		interrupts = <0 207 4>;
-		interrupt-names = "macirq";
-		resets = <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>;
-		reset-names = "stmmaceth", "stmmaceth-ocp";
-		tx-fifo-depth = <32768>;
-		rx-fifo-depth = <16384>;
-		altr,sysmgr-syscon = <&sysmgr 0x48 0>;
-		clocks = <&clkmgr AGILEX5_EMAC1_CLK>;
-		clock-names = "stmmaceth";
-		status = "disabled";
-	};
-
-	gmac2: ethernet@10830000 {
-		compatible = "intel,socfpga-dwxgmac", "snps,dwxgmac-2.10", "snps,dwxgmac";
-		reg = <0x10830000 0x3500>;
-		interrupts = <0 224 4>;
-		interrupt-names = "macirq";
-		resets = <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>;
-		reset-names = "stmmaceth", "stmmaceth-ocp";
-		tx-fifo-depth = <32768>;
-		rx-fifo-depth = <16384>;
-		altr,sysmgr-syscon = <&sysmgr 0x4c 0>;
-		clocks = <&clkmgr AGILEX5_EMAC2_CLK>;
-		clock-names = "stmmaceth";
-		status = "disabled";
-	};
-};
diff --git a/arch/arm/dts/socfpga_agilex5_axe5_eagle.dts b/arch/arm/dts/socfpga_agilex5_axe5_eagle.dts
index f67b974f2adc..16491323da6c 100644
--- a/arch/arm/dts/socfpga_agilex5_axe5_eagle.dts
+++ b/arch/arm/dts/socfpga_agilex5_axe5_eagle.dts
@@ -4,7 +4,6 @@
  */
 
 #include <arm64/intel/socfpga_agilex5.dtsi>
-#include "socfpga_agilex5.dtsi"
 
 / {
 	model = "SoCFPGA Agilex5 AXE5-Eagle";

-- 
2.47.3




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

* Re: [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree
  2026-04-23  6:58 [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree Michael Tretter
  2026-04-23  6:58 ` [PATCH 1/2] net: xgmac: switch to upstream compatible Michael Tretter
  2026-04-23  6:58 ` [PATCH 2/2] ARM: socfpga: remove obsolete gmac device tree nodes Michael Tretter
@ 2026-04-27  7:23 ` Sascha Hauer
  2026-04-27 10:59   ` Michael Tretter
  2026-04-27 12:30 ` Sascha Hauer
  3 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2026-04-27  7:23 UTC (permalink / raw)
  To: Michael Tretter; +Cc: BAREBOX, Steffen Trumtrar

On Thu, Apr 23, 2026 at 08:58:10AM +0200, Michael Tretter wrote:
> The compatible used by the xgmac driver in barebox doesn't use the
> existing binding for the xgmac, but uses a custom compatible string.
> Therefore, the Ethernet nodes that are already defined by the imported
> Linux device tree are not used.
> 
> Update the driver to use the same compatible as Linux and remove the now
> obsolete downstream device tree nodes.
> 
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> ---
> Michael Tretter (2):
>       net: xgmac: switch to upstream compatible
>       ARM: socfpga: remove obsolete gmac device tree nodes

Should we merge these patches to avoid intermediate breakage?

Sascha

> 
>  arch/arm/dts/socfpga_agilex5.dtsi           | 51 -----------------------------
>  arch/arm/dts/socfpga_agilex5_axe5_eagle.dts |  1 -
>  drivers/net/designware_xgmac_socfpga.c      |  6 ++--
>  3 files changed, 3 insertions(+), 55 deletions(-)
> ---
> base-commit: 7b492daea9347fd55bf29560c2ec494ca1040f95
> change-id: 20260423-socfpga-agilex5-dwmac-binding-756bb1aab255
> 
> Best regards,
> -- 
> Michael Tretter <m.tretter@pengutronix.de>
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

* Re: [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree
  2026-04-27  7:23 ` [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree Sascha Hauer
@ 2026-04-27 10:59   ` Michael Tretter
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Tretter @ 2026-04-27 10:59 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: BAREBOX, Steffen Trumtrar

On Mon, 27 Apr 2026 09:23:47 +0200, Sascha Hauer wrote:
> On Thu, Apr 23, 2026 at 08:58:10AM +0200, Michael Tretter wrote:
> > The compatible used by the xgmac driver in barebox doesn't use the
> > existing binding for the xgmac, but uses a custom compatible string.
> > Therefore, the Ethernet nodes that are already defined by the imported
> > Linux device tree are not used.
> > 
> > Update the driver to use the same compatible as Linux and remove the now
> > obsolete downstream device tree nodes.
> > 
> > Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> > ---
> > Michael Tretter (2):
> >       net: xgmac: switch to upstream compatible
> >       ARM: socfpga: remove obsolete gmac device tree nodes
> 
> Should we merge these patches to avoid intermediate breakage?

Please merge these patches. I was confused.

Michael

> 
> Sascha
> 
> > 
> >  arch/arm/dts/socfpga_agilex5.dtsi           | 51 -----------------------------
> >  arch/arm/dts/socfpga_agilex5_axe5_eagle.dts |  1 -
> >  drivers/net/designware_xgmac_socfpga.c      |  6 ++--
> >  3 files changed, 3 insertions(+), 55 deletions(-)
> > ---
> > base-commit: 7b492daea9347fd55bf29560c2ec494ca1040f95
> > change-id: 20260423-socfpga-agilex5-dwmac-binding-756bb1aab255
> > 
> > Best regards,
> > -- 
> > Michael Tretter <m.tretter@pengutronix.de>
> > 
> > 



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

* Re: [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree
  2026-04-23  6:58 [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree Michael Tretter
                   ` (2 preceding siblings ...)
  2026-04-27  7:23 ` [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree Sascha Hauer
@ 2026-04-27 12:30 ` Sascha Hauer
  3 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2026-04-27 12:30 UTC (permalink / raw)
  To: BAREBOX, Michael Tretter; +Cc: Steffen Trumtrar


On Thu, 23 Apr 2026 08:58:10 +0200, Michael Tretter wrote:
> The compatible used by the xgmac driver in barebox doesn't use the
> existing binding for the xgmac, but uses a custom compatible string.
> Therefore, the Ethernet nodes that are already defined by the imported
> Linux device tree are not used.
> 
> Update the driver to use the same compatible as Linux and remove the now
> obsolete downstream device tree nodes.
> 
> [...]

Applied, thanks!

[1/2] net: xgmac: switch to upstream compatible
      https://git.pengutronix.de/cgit/barebox/commit/?id=4f7d956b1377 (link may not be stable)
[2/2] ARM: socfpga: remove obsolete gmac device tree nodes
      https://git.pengutronix.de/cgit/barebox/commit/?id=a2a8d03fc86c (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

end of thread, other threads:[~2026-04-27 12:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-23  6:58 [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree Michael Tretter
2026-04-23  6:58 ` [PATCH 1/2] net: xgmac: switch to upstream compatible Michael Tretter
2026-04-23  6:58 ` [PATCH 2/2] ARM: socfpga: remove obsolete gmac device tree nodes Michael Tretter
2026-04-27  7:23 ` [PATCH 0/2] ARM: socfpga: xgmac: switch to upstream device tree Sascha Hauer
2026-04-27 10:59   ` Michael Tretter
2026-04-27 12:30 ` Sascha Hauer

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