Skip to content

Commit 8467c10

Browse files
Smale-12048867nashif
authored andcommitted
drivers: ethernet: dwc_xgmac: Added dwc-xgmac
ethernet driver This driver is capable of supporting basic features of synposys dwc-xgmac ethernet MAC IP. Basic features includes, 1. Tx and Rx, multiple Tx and Rx DMA channels, multiple Tx and Rx queues 2. Check Sum Offloading on Tx and Rx for IPv4, IPv6, TCP, UDP and ICMP packets 3. 10M/100M/1G speeds, Autonegotiation, Link speed configuration, Promiscuous mode, Full/Half duplex configuration 4. Added source files for synopsys dwc xgmac mdio driver. synopsys dwc xgmac mdio driver fetures includes: It supports clause 22 of IEEE 802.3 for ethernet PHY devices management. 5. Extended mdio shell support for dwcxgmac mdio driver. Signed-off-by: Santosh Male <[email protected]>
1 parent c82adf5 commit 8467c10

File tree

11 files changed

+2948
-0
lines changed

11 files changed

+2948
-0
lines changed

drivers/ethernet/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,4 @@ endif()
6767
add_subdirectory(phy)
6868
add_subdirectory(eth_nxp_enet_qos)
6969
add_subdirectory(nxp_enet)
70+
add_subdirectory(dwc_xgmac)

drivers/ethernet/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ source "drivers/ethernet/Kconfig.xmc4xxx"
7676

7777
source "drivers/ethernet/eth_nxp_enet_qos/Kconfig"
7878

79+
source "drivers/ethernet/dwc_xgmac/Kconfig"
7980
source "drivers/ethernet/phy/Kconfig"
8081

8182
source "drivers/ethernet/nxp_enet/Kconfig"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2024 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
zephyr_library_sources_ifdef(CONFIG_ETH_DWC_XGMAC eth_dwc_xgmac.c)

drivers/ethernet/dwc_xgmac/Kconfig

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#
2+
# Synopsys DesignWare XGMAC configuration options
3+
#
4+
# Copyright(c) 2024, Intel Corporation
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
8+
DT_COMPAT_DWC_XGMAC := snps,dwcxgmac
9+
10+
menu "DWC XGMAC configuration"
11+
12+
config ETH_DWC_XGMAC
13+
bool "Synopsys DesignWareCore XGMAC Ethernet driver"
14+
default y
15+
depends on DT_HAS_SNPS_DWCXGMAC_ENABLED
16+
help
17+
This is a driver for the Synopsys DesignWare XGMAC, also referred to
18+
as "DesignWare Cores Ethernet XGMAC". Hardware versions
19+
3.x are supported.
20+
21+
Platform specific glue support is also required. This driver is
22+
currently available on targets using the Intel Agilex5 series.
23+
24+
if ETH_DWC_XGMAC
25+
26+
config ETH_DWC_XGMAC_BOTTOM_HALF_WORK_QUEUE
27+
bool "IRQ Bottom Half work Queue"
28+
default y
29+
30+
config ETH_DWC_XGMAC_SW_RESET_TIMEOUT
31+
int "A timeout value in us to check software reset status"
32+
default 1000
33+
help
34+
A timeout value in ms to check software reset status
35+
36+
config ETH_DWC_XGMAC_POLLING_MODE
37+
bool "Polling mode"
38+
39+
config ETH_DWC_XGMAC_INTERRUPT_POLLING_INTERVAL_US
40+
int "XGMAC interrupt polling interval in us"
41+
default 500
42+
depends on ETH_DWC_XGMAC_POLLING_MODE
43+
help
44+
XGMAC interrupt polling interval in us
45+
46+
config ETH_XGMAC_MAX_QUEUES
47+
int
48+
default 8
49+
help
50+
Number hardware queues supported by the XGMAC IP
51+
52+
config ETH_DWC_XGMAC_RX_CS_OFFLOAD
53+
bool "RX checksum offload"
54+
default y
55+
help
56+
Enable receive checksum offload for TCP/UDP/IP packets
57+
58+
config ETH_DWC_XGMAC_TX_CS_OFFLOAD
59+
bool "TX checksum offload"
60+
default y
61+
help
62+
Enable transmit checksum offload for TCP/UDP/IP packets
63+
64+
config ETH_DWC_XGMAC_PROMISCUOUS_EXCEPTION
65+
bool "Promiscuous mode"
66+
depends on NET_PROMISCUOUS_MODE
67+
help
68+
Disables the promiscuous mode support in XGMAC device.
69+
70+
config ETH_DWC_XGMAC_HW_FILTERING
71+
bool "H/W L2 Filtering"
72+
help
73+
Enable Hardware support for L2 filtering of packets.
74+
75+
config ETH_DWC_XGMAC_HW_L3_L4_FILTERING
76+
bool "H/W L3 L4 Filtering"
77+
help
78+
Enable Hardware support for L3 L4 filtering of packets.
79+
80+
config ETH_DWC_XGMAC_ARP_OFFLOAD
81+
bool "ARP Offload"
82+
help
83+
Enable ARP hardware offloading support.
84+
85+
endif # ETH_DWC_XGMAC
86+
87+
endmenu

0 commit comments

Comments
 (0)