@@ -35,6 +35,139 @@ config ZYNQ_MPSOC_UART1
3535 ---help---
3636 Select to enable support for UART1.
3737
38+ config ZYNQ_ENET
39+ bool "Ethernet"
40+ default n
41+ select ARCH_HAVE_PHY
42+ select ARCH_HAVE_NETDEV_STATISTICS
43+
3844endmenu # XILINX ZYNQ_MPSOC Peripheral Selection
3945
46+ menu "Ethernet Configuration"
47+ depends on ZYNQ_ENET
48+
49+ choice
50+ prompt "ZYNQ Ethernet Interface"
51+ default ZYNQ_ENET4
52+ depends on ZYNQ_ENET
53+
54+ config ZYNQ_ENET1
55+ bool "ENET 1"
56+
57+ config ZYNQ_ENET2
58+ bool "ENET 2"
59+
60+ config ZYNQ_ENET3
61+ bool "ENET 3"
62+
63+ config ZYNQ_ENET4
64+ bool "ENET 4"
65+
66+ endchoice # ZYNQ Ethernet Interface
67+
68+ config ZYNQ_GMAC_NRXBUFFERS
69+ int "Number of RX buffers"
70+ default 16
71+ range 16 256
72+ ---help---
73+ GMAC buffer memory is segmented into 128 byte units (not
74+ configurable). This setting provides the number of such 128 byte
75+ units used for reception. This is also equal to the number of RX
76+ descriptors that will be allocated. The selected value must be an
77+ even power of 2.
78+
79+ config ZYNQ_GMAC_NTXBUFFERS
80+ int "Number of TX buffers"
81+ default 8
82+ range 8 256
83+ ---help---
84+ GMAC buffer memory is segmented into full Ethernet packets (size
85+ NET_BUFSIZE bytes). This setting provides the number of such packets
86+ that can be in flight. This is also equal to the number of TX
87+ descriptors that will be allocated.
88+
89+ config ZYNQ_GMAC_PREALLOCATE
90+ bool "Preallocate buffers"
91+ default n
92+ ---help---
93+ Buffer and descriptor may either be allocated from the memory
94+ pool or pre-allocated to lie in .bss. This option selects pre-
95+ allocated buffer memory.
96+
97+ config ZYNQ_GMAC_NBC
98+ bool "No Broadcast"
99+ default n
100+ ---help---
101+ when set to logic one, frames addressed to the broadcast address of
102+ all ones will not be accepted.
103+
104+ config ZYNQ_GMAC_PHYADDR
105+ int "PHY address"
106+ default 1
107+ ---help---
108+ The 5-bit address of the PHY on the board. Default: 1
109+
110+ config ZYNQ_ENET_PHYINIT
111+ bool "Board-specific PHY Initialization for ENET"
112+ default y
113+ ---help---
114+ Some boards require specialized initialization of the PHY before it
115+ can be used. This may include such things as configuring GPIOs,
116+ resetting the PHY, etc. If CONFIG_ZYNQ_ENET_PHYINIT is defined in
117+ the configuration then the board specific logic must provide
118+ zynq_phy_boardinitialize(); The ZYNQ ENET driver will call this
119+ function one time before it first uses the PHY.
120+
121+ config ZYNQ_GMAC_AUTONEG
122+ bool "Use autonegotiation"
123+ default y
124+ ---help---
125+ Use PHY autonegotiation to determine speed and mode
126+
127+ if !ZYNQ_GMAC_AUTONEG
128+
129+ config ZYNQ_GMAC_ETHFD
130+ bool "Full duplex"
131+ default n
132+ ---help---
133+ If ZYNQ_GMAC_AUTONEG is not defined, then this may be defined to
134+ select full duplex mode. Default: half-duplex
135+
136+ choice
137+ prompt "GMAC Speed"
138+ default ZYNQ_GMAC_ETH100MBPS
139+ ---help---
140+ If autonegotiation is not used, then you must select the fixed speed
141+ of the PHY
142+
143+ config ZYNQ_GMAC_ETH10MBPS
144+ bool "10 Mbps"
145+ ---help---
146+ If ZYNQ_GMAC_AUTONEG is not defined, then this may be defined to select 10 MBps
147+ speed. Default: 100 Mbps
148+
149+ config ZYNQ_GMAC_ETH100MBPS
150+ bool "100 Mbps"
151+ ---help---
152+ If ZYNQ_GMAC_AUTONEG is not defined, then this may be defined to select 100 MBps
153+ speed. Default: 100 Mbps
154+
155+ config ZYNQ_GMAC_ETH1000MBPS
156+ bool "1000 Mbps"
157+ ---help---
158+ If ZYNQ_GMAC_AUTONEG is not defined, then this may be defined to select 1000 MBps
159+ speed. Default: 100 Mbps
160+
161+ endchoice # GMAC speed
162+ endif # !ZYNQ_GMAC_AUTONEG
163+
164+ config ZYNQ_GMAC_REGDEBUG
165+ bool "Register-Level Debug"
166+ default n
167+ depends on DEBUG_NET_INFO
168+ ---help---
169+ Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO.
170+
171+ endmenu # ZYNQ_ENET
172+
40173endif # ARCH_CHIP_ZYNQ_MPSOC
0 commit comments