Skip to content

Commit

Permalink
net: phytium: Add support for phytium GMAC
Browse files Browse the repository at this point in the history
This patch provides support for Phytium GMAC controller driver.

Signed-off-by: Song Wenting <[email protected]>
Signed-off-by: Li Wencheng <[email protected]>
Signed-off-by: Wang Yinfeng <[email protected]>
Signed-off-by: Wang Zhimin <[email protected]>
Signed-off-by: wangzhimin1179 <[email protected]>
  • Loading branch information
wangzhimin1179 committed May 27, 2024
1 parent b3aa191 commit d8d3540
Show file tree
Hide file tree
Showing 15 changed files with 7,859 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,6 @@ source "drivers/net/ethernet/wangxun/Kconfig"
source "drivers/net/ethernet/wiznet/Kconfig"
source "drivers/net/ethernet/xilinx/Kconfig"
source "drivers/net/ethernet/xircom/Kconfig"
source "drivers/net/ethernet/phytium/Kconfig"

endif # ETHERNET
1 change: 1 addition & 0 deletions drivers/net/ethernet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,4 @@ obj-$(CONFIG_NET_VENDOR_XILINX) += xilinx/
obj-$(CONFIG_NET_VENDOR_XIRCOM) += xircom/
obj-$(CONFIG_NET_VENDOR_SYNOPSYS) += synopsys/
obj-$(CONFIG_NET_VENDOR_PENSANDO) += pensando/
obj-$(CONFIG_NET_VENDOR_PHYTIUM) += phytium/
58 changes: 58 additions & 0 deletions drivers/net/ethernet/phytium/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Phytium device configuration
#

config NET_VENDOR_PHYTIUM
bool "Phytium devices"
depends on HAS_IOMEM
default y
help
If you have a network (Ethernet) card belonging to this class, say Y.

Note that the answer to this question doesn't directly affect the
kernel: saying N will just cause the configurator to skip all the
remaining Cadence network card questions. If you say Y, you will be
asked for your specific card in the following questions.

if NET_VENDOR_PHYTIUM

config PHYTMAC
tristate "Phytium GMAC support"
depends on HAS_DMA
select PHYLINK
select CRC32
help
If you have a network (Ethernet) controller of this type, say Y
or M here.

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

config PHYTMAC_ENABLE_PTP
bool "Enable IEEE 1588 hwstamp"
depends on PHYTMAC
depends on PTP_1588_CLOCK
default y
help
Enable IEEE 1588 PTP support for PHYTMAC.

config PHYTMAC_PLATFORM
tristate "Phytmac Platform support"
depends on PHYTMAC
help
This is Platform driver.

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

config PHYTMAC_PCI
tristate "Phytmac PCI support"
depends on PHYTMAC && PCI
help
This is PCI driver.

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

endif # NET_VENDOR_PHYTIUM
17 changes: 17 additions & 0 deletions drivers/net/ethernet/phytium/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the Phytium network device drivers.
#
#

obj-$(CONFIG_PHYTMAC) += phytmac.o

phytmac-objs := phytmac_main.o phytmac_ethtool.o phytmac_v1.o phytmac_v2.o
phytmac-$(CONFIG_PHYTMAC_ENABLE_PTP) += phytmac_ptp.o

obj-$(CONFIG_PHYTMAC_PLATFORM) += phytmac-platform.o
phytmac-platform-objs := phytmac_platform.o

obj-$(CONFIG_PHYTMAC_PCI) += phytmac-pci.o
phytmac-pci-objs := phytmac_pci.o
Loading

0 comments on commit d8d3540

Please sign in to comment.