public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/3] riscv: spacemit: Add ethernet support for K3
@ 2026-01-28  7:29 Inochi Amaoto
  2026-01-28  7:29 ` [PATCH net-next v3 1/3] dt-bindings: net: Add support for Spacemit K3 dwmac Inochi Amaoto
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Inochi Amaoto @ 2026-01-28  7:29 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Yixun Lan, Maxime Coquelin, Alexandre Torgue, Richard Cochran,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Russell King (Oracle), Yao Zi, Yanteng Si, Lad Prabhakar,
	Inochi Amaoto, Maxime Chevallier, Choong Yong Liang, Chen-Yu Tsai,
	Shangjuan Wei, Boon Khai Ng, Quentin Schulz, Giuseppe Cavallaro,
	Jose Abreu
  Cc: netdev, devicetree, linux-kernel, linux-riscv, spacemit,
	linux-stm32, linux-arm-kernel, Longbin Li

Add initial support for ethernet controller of the Spacemit K3 SoC.
This ethernet controller is almost a standard Synopsys DesignWare
MAC (version 5.40a). This controller require a syscon device to
configure some basic features, like interface type and internal delay.

Change from v2:
- https://lore.kernel.org/netdev/20260121071315.940130-1-inochiama@gmail.com
patch 1:
1. remove not needed compatible for select
2. drop empty line in "spacemit,apmu" properties
3. add spacemit,apmu properties to required.
patch 3:
1. remove misused phy_fix_phy_mode_for_mac_delays.
2. use local tx clock instead of the clk_tx_i in the dwmac.

Change from v1:
- https://lore.kernel.org/netdev/20260120043609.910302-1-inochiama@gmail.com
patch 1:
1. remove phy clock
patch 3:
1. improve comment and include something special about Spacmit K3 dwmac
2. reorder the included file
3. fix wrong delay macro used in spacemit_dwmac_set_delay.
4. add check for maximum supported delay.
5. use DIV_ROUND_CLOSEST to calculate best delay configuration.
6. use assign for the ctrl register initial value.
7. fix input when calling of_property_read_u32().

Inochi Amaoto (3):
  dt-bindings: net: Add support for Spacemit K3 dwmac
  net: stmmac: platform: Add snps,dwmac-5.40a IP compatible string
  net: stmmac: Add glue layer for Spacemit K3 SoC

 .../devicetree/bindings/net/snps,dwmac.yaml   |   2 +
 .../bindings/net/spacemit,k3-dwmac.yaml       | 103 +++++++++
 drivers/net/ethernet/stmicro/stmmac/Kconfig   |  12 +
 drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
 .../ethernet/stmicro/stmmac/dwmac-spacemit.c  | 218 ++++++++++++++++++
 .../ethernet/stmicro/stmmac/stmmac_platform.c |   1 +
 6 files changed, 337 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/spacemit,k3-dwmac.yaml
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c

--
2.52.0


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH net-next 0/2] net: stmmac: report active phy interface
@ 2026-01-28 10:47 Russell King (Oracle)
  2026-01-28 10:48 ` [PATCH net-next 1/2] net: stmmac: thead: avoid conflicts with PHY_INTF_* definitions Russell King (Oracle)
  0 siblings, 1 reply; 14+ messages in thread
From: Russell King (Oracle) @ 2026-01-28 10:47 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Drew Fustini,
	Eric Dumazet, Fu Wei, Guo Ren, Jakub Kicinski, linux-arm-kernel,
	linux-riscv, linux-stm32, netdev, Paolo Abeni

The original patch needs dwmac-thead fixed so the PHY_INTF* definitions
do not clash.

 drivers/net/ethernet/stmicro/stmmac/common.h       |  6 +++
 drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c  | 10 ++---
 .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c    |  2 +
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c   |  2 +
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h     |  1 +
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c |  1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 52 ++++++++++++++++++++++
 7 files changed, 69 insertions(+), 5 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

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

end of thread, other threads:[~2026-01-30  2:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-28  7:29 [PATCH net-next v3 0/3] riscv: spacemit: Add ethernet support for K3 Inochi Amaoto
2026-01-28  7:29 ` [PATCH net-next v3 1/3] dt-bindings: net: Add support for Spacemit K3 dwmac Inochi Amaoto
2026-01-28 10:52   ` Rob Herring (Arm)
2026-01-28  7:29 ` [PATCH net-next v3 2/3] net: stmmac: platform: Add snps,dwmac-5.40a IP compatible string Inochi Amaoto
2026-01-28  7:29 ` [PATCH net-next v3 3/3] net: stmmac: Add glue layer for Spacemit K3 SoC Inochi Amaoto
2026-01-28  9:16   ` Vivian Wang
2026-01-28 11:22     ` Inochi Amaoto
2026-01-28 10:43   ` Russell King (Oracle)
2026-01-28 10:47     ` [PATCH net-next 1/2] net: stmmac: thead: avoid conflicts with PHY_INTF_* definitions Russell King (Oracle)
2026-01-30  2:50       ` patchwork-bot+netdevbpf
2026-01-28 10:48     ` [PATCH net-next 2/2] net: stmmac: report active PHY interface Russell King (Oracle)
2026-01-28 11:19     ` [PATCH net-next v3 3/3] net: stmmac: Add glue layer for Spacemit K3 SoC Inochi Amaoto
  -- strict thread matches above, loose matches on Subject: below --
2026-01-28 10:47 [PATCH net-next 0/2] net: stmmac: report active phy interface Russell King (Oracle)
2026-01-28 10:48 ` [PATCH net-next 1/2] net: stmmac: thead: avoid conflicts with PHY_INTF_* definitions Russell King (Oracle)
2026-01-28 14:15   ` Maxime Chevallier

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