netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] riscv: sophgo: Add ethernet support for SG2042
@ 2025-07-08  6:40 Inochi Amaoto
  2025-07-08  6:40 ` [PATCH net-next v2 1/3] dt-bindings: net: sophgo,sg2044-dwmac: Add support for Sophgo SG2042 dwmac Inochi Amaoto
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Inochi Amaoto @ 2025-07-08  6:40 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen Wang, Inochi Amaoto, Maxime Coquelin, Alexandre Torgue,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Russell King (Oracle), Lad Prabhakar, Joe Hattori, Lothar Rubusch,
	Quentin Schulz, Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, devicetree, linux-kernel, sophgo, linux-stm32,
	linux-arm-kernel, linux-riscv, Yixun Lan, Longbin Li

The ethernet controller of SG2042 is Synopsys DesignWare IP with
tx clock. Add device id for it.

This patch can only be tested on a SG2042 evb board, as pioneer
does not expose this device.

The user dts patch link:
https://lore.kernel.org/linux-riscv/cover.1751700954.git.rabenda.cn@gmail.com

Change form v1:
1. add user link at cover
2. separate the devicetree patch as a standalone series
3. patch 1: Apply Conor's tag

Inochi Amaoto (3):
  dt-bindings: net: sophgo,sg2044-dwmac: Add support for Sophgo SG2042
    dwmac
  net: stmmac: dwmac-sophgo: Add support for Sophgo SG2042 SoC
  net: stmmac: platform: Add snps,dwmac-5.00a IP compatible string

 Documentation/devicetree/bindings/net/snps,dwmac.yaml |  4 ++++
 .../devicetree/bindings/net/sophgo,sg2044-dwmac.yaml  | 11 ++++++++---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c    |  1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |  1 +
 4 files changed, 14 insertions(+), 3 deletions(-)

--
2.50.0


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

* [PATCH net-next v2 1/3] dt-bindings: net: sophgo,sg2044-dwmac: Add support for Sophgo SG2042 dwmac
  2025-07-08  6:40 [PATCH net-next v2 0/3] riscv: sophgo: Add ethernet support for SG2042 Inochi Amaoto
@ 2025-07-08  6:40 ` Inochi Amaoto
  2025-07-08  6:40 ` [PATCH net-next v2 2/3] net: stmmac: dwmac-sophgo: Add support for Sophgo SG2042 SoC Inochi Amaoto
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Inochi Amaoto @ 2025-07-08  6:40 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen Wang, Inochi Amaoto, Maxime Coquelin, Alexandre Torgue,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Russell King (Oracle), Lad Prabhakar, Joe Hattori, Lothar Rubusch,
	Quentin Schulz, Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, devicetree, linux-kernel, sophgo, linux-stm32,
	linux-arm-kernel, linux-riscv, Yixun Lan, Longbin Li, Han Gao,
	Conor Dooley

The GMAC IP on SG2042 is a standard Synopsys DesignWare MAC
(version 5.00a) with tx clock.

Add necessary compatible string for this device.

Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Tested-by: Han Gao <rabenda.cn@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
 Documentation/devicetree/bindings/net/snps,dwmac.yaml |  4 ++++
 .../devicetree/bindings/net/sophgo,sg2044-dwmac.yaml  | 11 ++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 90b79283e228..4e3cbaa06229 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -30,6 +30,7 @@ select:
           - snps,dwmac-4.00
           - snps,dwmac-4.10a
           - snps,dwmac-4.20a
+          - snps,dwmac-5.00a
           - snps,dwmac-5.10a
           - snps,dwmac-5.20
           - snps,dwmac-5.30a
@@ -98,11 +99,13 @@ properties:
         - snps,dwmac-4.00
         - snps,dwmac-4.10a
         - snps,dwmac-4.20a
+        - snps,dwmac-5.00a
         - snps,dwmac-5.10a
         - snps,dwmac-5.20
         - snps,dwmac-5.30a
         - snps,dwxgmac
         - snps,dwxgmac-2.10
+        - sophgo,sg2042-dwmac
         - sophgo,sg2044-dwmac
         - starfive,jh7100-dwmac
         - starfive,jh7110-dwmac
@@ -641,6 +644,7 @@ allOf:
                 - snps,dwmac-4.00
                 - snps,dwmac-4.10a
                 - snps,dwmac-4.20a
+                - snps,dwmac-5.00a
                 - snps,dwmac-5.10a
                 - snps,dwmac-5.20
                 - snps,dwmac-5.30a
diff --git a/Documentation/devicetree/bindings/net/sophgo,sg2044-dwmac.yaml b/Documentation/devicetree/bindings/net/sophgo,sg2044-dwmac.yaml
index 8afbd9ebd73f..ce21979a2d9a 100644
--- a/Documentation/devicetree/bindings/net/sophgo,sg2044-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/sophgo,sg2044-dwmac.yaml
@@ -15,14 +15,19 @@ select:
       contains:
         enum:
           - sophgo,sg2044-dwmac
+          - sophgo,sg2042-dwmac
   required:
     - compatible
 
 properties:
   compatible:
-    items:
-      - const: sophgo,sg2044-dwmac
-      - const: snps,dwmac-5.30a
+    oneOf:
+      - items:
+          - const: sophgo,sg2042-dwmac
+          - const: snps,dwmac-5.00a
+      - items:
+          - const: sophgo,sg2044-dwmac
+          - const: snps,dwmac-5.30a
 
   reg:
     maxItems: 1
-- 
2.50.0


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

* [PATCH net-next v2 2/3] net: stmmac: dwmac-sophgo: Add support for Sophgo SG2042 SoC
  2025-07-08  6:40 [PATCH net-next v2 0/3] riscv: sophgo: Add ethernet support for SG2042 Inochi Amaoto
  2025-07-08  6:40 ` [PATCH net-next v2 1/3] dt-bindings: net: sophgo,sg2044-dwmac: Add support for Sophgo SG2042 dwmac Inochi Amaoto
@ 2025-07-08  6:40 ` Inochi Amaoto
  2025-07-08  6:40 ` [PATCH net-next v2 3/3] net: stmmac: platform: Add snps,dwmac-5.00a IP compatible string Inochi Amaoto
  2025-07-11  0:31 ` [PATCH net-next v2 0/3] riscv: sophgo: Add ethernet support for SG2042 patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Inochi Amaoto @ 2025-07-08  6:40 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen Wang, Inochi Amaoto, Maxime Coquelin, Alexandre Torgue,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Russell King (Oracle), Lad Prabhakar, Joe Hattori, Lothar Rubusch,
	Quentin Schulz, Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, devicetree, linux-kernel, sophgo, linux-stm32,
	linux-arm-kernel, linux-riscv, Yixun Lan, Longbin Li, Han Gao

Adds device id of the ethernet controller on the Sophgo SG2042 SoC.

Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Tested-by: Han Gao <rabenda.cn@gmail.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c
index 3303784cbbf8..3b7947a7a7ba 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c
@@ -54,6 +54,7 @@ static int sophgo_dwmac_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id sophgo_dwmac_match[] = {
+	{ .compatible = "sophgo,sg2042-dwmac" },
 	{ .compatible = "sophgo,sg2044-dwmac" },
 	{ /* sentinel */ }
 };
-- 
2.50.0


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

* [PATCH net-next v2 3/3] net: stmmac: platform: Add snps,dwmac-5.00a IP compatible string
  2025-07-08  6:40 [PATCH net-next v2 0/3] riscv: sophgo: Add ethernet support for SG2042 Inochi Amaoto
  2025-07-08  6:40 ` [PATCH net-next v2 1/3] dt-bindings: net: sophgo,sg2044-dwmac: Add support for Sophgo SG2042 dwmac Inochi Amaoto
  2025-07-08  6:40 ` [PATCH net-next v2 2/3] net: stmmac: dwmac-sophgo: Add support for Sophgo SG2042 SoC Inochi Amaoto
@ 2025-07-08  6:40 ` Inochi Amaoto
  2025-07-11  0:31 ` [PATCH net-next v2 0/3] riscv: sophgo: Add ethernet support for SG2042 patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Inochi Amaoto @ 2025-07-08  6:40 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen Wang, Inochi Amaoto, Maxime Coquelin, Alexandre Torgue,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Russell King (Oracle), Lad Prabhakar, Joe Hattori, Lothar Rubusch,
	Quentin Schulz, Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, devicetree, linux-kernel, sophgo, linux-stm32,
	linux-arm-kernel, linux-riscv, Yixun Lan, Longbin Li, Han Gao

Add "snps,dwmac-5.30a" compatible string for 5.00a version that
can avoid to define some platform data in the glue layer.

Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Tested-by: Han Gao <rabenda.cn@gmail.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index b80c1efdb323..399d328b3b11 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -410,6 +410,7 @@ static const char * const stmmac_gmac4_compats[] = {
 	"snps,dwmac-4.00",
 	"snps,dwmac-4.10a",
 	"snps,dwmac-4.20a",
+	"snps,dwmac-5.00a",
 	"snps,dwmac-5.10a",
 	"snps,dwmac-5.20",
 	"snps,dwmac-5.30a",
-- 
2.50.0


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

* Re: [PATCH net-next v2 0/3] riscv: sophgo: Add ethernet support for SG2042
  2025-07-08  6:40 [PATCH net-next v2 0/3] riscv: sophgo: Add ethernet support for SG2042 Inochi Amaoto
                   ` (2 preceding siblings ...)
  2025-07-08  6:40 ` [PATCH net-next v2 3/3] net: stmmac: platform: Add snps,dwmac-5.00a IP compatible string Inochi Amaoto
@ 2025-07-11  0:31 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-11  0:31 UTC (permalink / raw)
  To: Inochi Amaoto
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, robh, krzk+dt,
	conor+dt, unicorn_wang, mcoquelin.stm32, alexandre.torgue,
	paul.walmsley, palmer, aou, alex, rmk+kernel,
	prabhakar.mahadev-lad.rj, joe, l.rubusch, quentin.schulz,
	peppe.cavallaro, joabreu, netdev, devicetree, linux-kernel,
	sophgo, linux-stm32, linux-arm-kernel, linux-riscv, dlan,
	looong.bin

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  8 Jul 2025 14:40:48 +0800 you wrote:
> The ethernet controller of SG2042 is Synopsys DesignWare IP with
> tx clock. Add device id for it.
> 
> This patch can only be tested on a SG2042 evb board, as pioneer
> does not expose this device.
> 
> The user dts patch link:
> https://lore.kernel.org/linux-riscv/cover.1751700954.git.rabenda.cn@gmail.com
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/3] dt-bindings: net: sophgo,sg2044-dwmac: Add support for Sophgo SG2042 dwmac
    https://git.kernel.org/netdev/net-next/c/e281c48a7336
  - [net-next,v2,2/3] net: stmmac: dwmac-sophgo: Add support for Sophgo SG2042 SoC
    https://git.kernel.org/netdev/net-next/c/543009e2d4cd
  - [net-next,v2,3/3] net: stmmac: platform: Add snps,dwmac-5.00a IP compatible string
    https://git.kernel.org/netdev/net-next/c/d40c1ddd9b4d

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-07-11  0:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08  6:40 [PATCH net-next v2 0/3] riscv: sophgo: Add ethernet support for SG2042 Inochi Amaoto
2025-07-08  6:40 ` [PATCH net-next v2 1/3] dt-bindings: net: sophgo,sg2044-dwmac: Add support for Sophgo SG2042 dwmac Inochi Amaoto
2025-07-08  6:40 ` [PATCH net-next v2 2/3] net: stmmac: dwmac-sophgo: Add support for Sophgo SG2042 SoC Inochi Amaoto
2025-07-08  6:40 ` [PATCH net-next v2 3/3] net: stmmac: platform: Add snps,dwmac-5.00a IP compatible string Inochi Amaoto
2025-07-11  0:31 ` [PATCH net-next v2 0/3] riscv: sophgo: Add ethernet support for SG2042 patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).