Skip to content

Commit

Permalink
drivers: ethernet: Add Xilinx AXI Enet driver
Browse files Browse the repository at this point in the history
The Xilinx AXI Ethernet subsystem is commonly found in FPGA designs.
This patch adds a driver and device tree bindings for the Ethernet MAC
core and its MDIO controller.
The driver was tested on a RISC-V softcore in an FPGA design, with an
RGMII phy and Ethernet subsystem version 7.2 Rev. 14. Device tree
bindings match the device tree generated by Vitis hsi. Note that Vitis
generates one of the two included compatible strings depending on
version.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
  • Loading branch information
WorldofJARcraft committed Oct 2, 2024
1 parent 715b973 commit 0d3f93e
Show file tree
Hide file tree
Showing 13 changed files with 1,049 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/ethernet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ zephyr_library_sources_ifdef(CONFIG_ETH_IVSHMEM eth_ivshmem.c eth_ivshmem_queue
zephyr_library_sources_ifdef(CONFIG_ETH_ADIN2111 eth_adin2111.c)
zephyr_library_sources_ifdef(CONFIG_ETH_LAN865X eth_lan865x.c oa_tc6.c)
zephyr_library_sources_ifdef(CONFIG_ETH_XMC4XXX eth_xmc4xxx.c)
zephyr_library_sources_ifdef(CONFIG_ETH_XILINX_AXIENET eth_xilinx_axienet.c)

if(CONFIG_ETH_NXP_S32_NETC)
zephyr_library_sources(eth_nxp_s32_netc.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/ethernet/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ source "drivers/ethernet/Kconfig.adin2111"
source "drivers/ethernet/Kconfig.numaker"
source "drivers/ethernet/Kconfig.lan865x"
source "drivers/ethernet/Kconfig.xmc4xxx"
source "drivers/ethernet/Kconfig.xilinx_axienet"

source "drivers/ethernet/eth_nxp_enet_qos/Kconfig"

Expand Down
15 changes: 15 additions & 0 deletions drivers/ethernet/Kconfig.xilinx_axienet
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
#Xilinx AXI 1G / 2.5G Ethernet Subsystem
#
#Copyright(c) 2024, CISPA Helmholtz Center for Information Security
#SPDX-License-Identifier: Apache-2.0
#

config ETH_XILINX_AXIENET
bool "Xilinx AXI Ethernet Driver"
default y
depends on DT_HAS_XLNX_AXI_ETHERNET_7_2_ENABLED || DT_HAS_XLNX_AXI_ETHERNET_1_00_A_ENABLED
depends on DT_HAS_XLNX_ETH_DMA_ENABLED && DMA_XILINX_AXI_DMA
help
Enable Xilinx 1G / 2.5G AXI Ethernet driver,
commonly found on FPGAs.
Loading

0 comments on commit 0d3f93e

Please sign in to comment.