Commit bfec6d7f authored by Vivian Wang's avatar Vivian Wang Committed by Paolo Abeni
Browse files

net: spacemit: Add K1 Ethernet MAC



The Ethernet MACs found on SpacemiT K1 appears to be a custom design
that only superficially resembles some other embedded MACs. SpacemiT
refers to them as "EMAC", so let's just call the driver "k1_emac".

Supports RGMII and RMII interfaces. Includes support for MAC hardware
statistics counters. PTP support is not implemented.

Signed-off-by: default avatarVivian Wang <wangruikang@iscas.ac.cn>
Reviewed-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: default avatarVadim Fedorenko <vadim.fedorenko@linux.dev>
Reviewed-by: default avatarTroy Mitchell <troy.mitchell@linux.spacemit.com>
Tested-by: default avatarJunhui Liu <junhui.liu@pigmoral.tech>
Tested-by: default avatarTroy Mitchell <troy.mitchell@linux.spacemit.com>
Link: https://patch.msgid.link/20250914-net-k1-emac-v12-2-65b31b398f44@iscas.ac.cn


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 62a12a22
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -188,6 +188,7 @@ source "drivers/net/ethernet/sis/Kconfig"
source "drivers/net/ethernet/sfc/Kconfig"
source "drivers/net/ethernet/smsc/Kconfig"
source "drivers/net/ethernet/socionext/Kconfig"
source "drivers/net/ethernet/spacemit/Kconfig"
source "drivers/net/ethernet/stmicro/Kconfig"
source "drivers/net/ethernet/sun/Kconfig"
source "drivers/net/ethernet/sunplus/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ obj-$(CONFIG_NET_VENDOR_SOLARFLARE) += sfc/
obj-$(CONFIG_NET_VENDOR_SGI) += sgi/
obj-$(CONFIG_NET_VENDOR_SMSC) += smsc/
obj-$(CONFIG_NET_VENDOR_SOCIONEXT) += socionext/
obj-$(CONFIG_NET_VENDOR_SPACEMIT) += spacemit/
obj-$(CONFIG_NET_VENDOR_STMICRO) += stmicro/
obj-$(CONFIG_NET_VENDOR_SUN) += sun/
obj-$(CONFIG_NET_VENDOR_SUNPLUS) += sunplus/
+29 −0
Original line number Diff line number Diff line
config NET_VENDOR_SPACEMIT
	bool "SpacemiT devices"
	default y
	depends on ARCH_SPACEMIT || COMPILE_TEST
	help
	  If you have a network (Ethernet) device belonging to this class,
	  say Y.

	  Note that the answer to this question does not directly affect
	  the kernel: saying N will just cause the configurator to skip all
	  the questions regarding SpacemiT devices. If you say Y, you will
	  be asked for your specific chipset/driver in the following questions.

if NET_VENDOR_SPACEMIT

config SPACEMIT_K1_EMAC
	tristate "SpacemiT K1 Ethernet MAC driver"
	depends on ARCH_SPACEMIT || COMPILE_TEST
	depends on MFD_SYSCON
	depends on OF
	default m if ARCH_SPACEMIT
	select PHYLIB
	help
	  This driver supports the Ethernet MAC in the SpacemiT K1 SoC.

	  To compile this driver as a module, choose M here: the module
	  will be called k1_emac.

endif # NET_VENDOR_SPACEMIT
+6 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the SpacemiT network device drivers.
#

obj-$(CONFIG_SPACEMIT_K1_EMAC) += k1_emac.o
+2159 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading