1# SPDX-License-Identifier: GPL-2.0-only
2config STMMAC_ETH
3	tristate "STMicroelectronics Multi-Gigabit Ethernet driver"
4	depends on HAS_IOMEM && HAS_DMA
5	depends on PTP_1588_CLOCK_OPTIONAL
6	select MII
7	select PCS_XPCS
8	select PAGE_POOL
9	select PHYLINK
10	select CRC32
11	select RESET_CONTROLLER
12	help
13	  This is the driver for the Ethernet IPs built around a
14	  Synopsys IP Core.
15
16if STMMAC_ETH
17
18config STMMAC_SELFTESTS
19	bool "Support for STMMAC Selftests"
20	depends on INET
21	depends on STMMAC_ETH
22	default n
23	help
24	  This adds support for STMMAC Selftests using ethtool. Enable this
25	  feature if you are facing problems with your HW and submit the test
26	  results to the netdev Mailing List.
27
28config STMMAC_PLATFORM
29	tristate "STMMAC Platform bus support"
30	depends on STMMAC_ETH
31	select MFD_SYSCON
32	default y
33	help
34	  This selects the platform specific bus support for the stmmac driver.
35	  This is the driver used on several SoCs:
36	  STi, Allwinner, Amlogic Meson, Altera SOCFPGA.
37
38	  If you have a controller with this interface, say Y or M here.
39
40	  If unsure, say N.
41
42if STMMAC_PLATFORM
43
44config DWMAC_DWC_QOS_ETH
45	tristate "Support for snps,dwc-qos-ethernet.txt DT binding."
46	select CRC32
47	select MII
48	depends on OF && HAS_DMA
49	help
50	  Support for chips using the snps,dwc-qos-ethernet.txt DT binding.
51
52config DWMAC_GENERIC
53	tristate "Generic driver for DWMAC"
54	default STMMAC_PLATFORM
55	help
56	  Generic DWMAC driver for platforms that don't require any
57	  platform specific code to function or is using platform
58	  data for setup.
59
60config DWMAC_ANARION
61	tristate "Adaptrum Anarion GMAC support"
62	default ARC
63	depends on OF && (ARC || COMPILE_TEST)
64	help
65	  Support for Adaptrum Anarion GMAC Ethernet controller.
66
67	  This selects the Anarion SoC glue layer support for the stmmac driver.
68
69config DWMAC_INGENIC
70	tristate "Ingenic MAC support"
71	default MACH_INGENIC
72	depends on OF && HAS_IOMEM && (MACH_INGENIC || COMPILE_TEST)
73	select MFD_SYSCON
74	help
75	  Support for ethernet controller on Ingenic SoCs.
76
77	  This selects Ingenic SoCs glue layer support for the stmmac
78	  device driver. This driver is used on for the Ingenic SoCs
79	  MAC ethernet controller.
80
81config DWMAC_IPQ806X
82	tristate "QCA IPQ806x DWMAC support"
83	default ARCH_QCOM
84	depends on OF && (ARCH_QCOM || COMPILE_TEST)
85	select MFD_SYSCON
86	help
87	  Support for QCA IPQ806X DWMAC Ethernet.
88
89	  This selects the IPQ806x SoC glue layer support for the stmmac
90	  device driver. This driver does not use any of the hardware
91	  acceleration features available on this SoC. Network devices
92	  will behave like standard non-accelerated ethernet interfaces.
93
94config DWMAC_LPC18XX
95	tristate "NXP LPC18xx/43xx DWMAC support"
96	default ARCH_LPC18XX
97	depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
98	select MFD_SYSCON
99	help
100	  Support for NXP LPC18xx/43xx DWMAC Ethernet.
101
102config DWMAC_MEDIATEK
103	tristate "MediaTek MT27xx GMAC support"
104	depends on OF && (ARCH_MEDIATEK || COMPILE_TEST)
105	help
106	  Support for MediaTek GMAC Ethernet controller.
107
108	  This selects the MT2712 SoC support for the stmmac driver.
109
110config DWMAC_MESON
111	tristate "Amlogic Meson dwmac support"
112	default ARCH_MESON
113	depends on OF && COMMON_CLK && (ARCH_MESON || COMPILE_TEST)
114	help
115	  Support for Ethernet controller on Amlogic Meson SoCs.
116
117	  This selects the Amlogic Meson SoC glue layer support for
118	  the stmmac device driver. This driver is used for Meson6,
119	  Meson8, Meson8b and GXBB SoCs.
120
121config DWMAC_OXNAS
122	tristate "Oxford Semiconductor OXNAS dwmac support"
123	default ARCH_OXNAS
124	depends on OF && COMMON_CLK && (ARCH_OXNAS || COMPILE_TEST)
125	select MFD_SYSCON
126	help
127	  Support for Ethernet controller on Oxford Semiconductor OXNAS SoCs.
128
129	  This selects the Oxford Semiconductor OXNASSoC glue layer support for
130	  the stmmac device driver. This driver is used for OX820.
131
132config DWMAC_QCOM_ETHQOS
133	tristate "Qualcomm ETHQOS support"
134	default ARCH_QCOM
135	depends on OF && (ARCH_QCOM || COMPILE_TEST)
136	help
137	  Support for the Qualcomm ETHQOS core.
138
139	  This selects the Qualcomm ETHQOS glue layer support for the
140	  stmmac device driver.
141
142config DWMAC_ROCKCHIP
143	tristate "Rockchip dwmac support"
144	default ARCH_ROCKCHIP
145	depends on OF && (ARCH_ROCKCHIP || COMPILE_TEST)
146	select MFD_SYSCON
147	help
148	  Support for Ethernet controller on Rockchip RK3288 SoC.
149
150	  This selects the Rockchip RK3288 SoC glue layer support for
151	  the stmmac device driver.
152
153config DWMAC_SOCFPGA
154	tristate "SOCFPGA dwmac support"
155	default ARCH_INTEL_SOCFPGA
156	depends on OF && (ARCH_INTEL_SOCFPGA || COMPILE_TEST)
157	select MFD_SYSCON
158	help
159	  Support for ethernet controller on Altera SOCFPGA
160
161	  This selects the Altera SOCFPGA SoC glue layer support
162	  for the stmmac device driver. This driver is used for
163	  arria5 and cyclone5 FPGA SoCs.
164
165config DWMAC_STI
166	tristate "STi GMAC support"
167	default ARCH_STI
168	depends on OF && (ARCH_STI || COMPILE_TEST)
169	select MFD_SYSCON
170	help
171	  Support for ethernet controller on STi SOCs.
172
173	  This selects STi SoC glue layer support for the stmmac
174	  device driver. This driver is used on for the STi series
175	  SOCs GMAC ethernet controller.
176
177config DWMAC_STM32
178	tristate "STM32 DWMAC support"
179	default ARCH_STM32
180	depends on OF && HAS_IOMEM && (ARCH_STM32 || COMPILE_TEST)
181	select MFD_SYSCON
182	help
183	  Support for ethernet controller on STM32 SOCs.
184
185	  This selects STM32 SoC glue layer support for the stmmac
186	  device driver. This driver is used on for the STM32 series
187	  SOCs GMAC ethernet controller.
188
189config DWMAC_SUNXI
190	tristate "Allwinner GMAC support"
191	default ARCH_SUNXI
192	depends on OF && (ARCH_SUNXI || COMPILE_TEST)
193	help
194	  Support for Allwinner A20/A31 GMAC ethernet controllers.
195
196	  This selects Allwinner SoC glue layer support for the
197	  stmmac device driver. This driver is used for A20/A31
198	  GMAC ethernet controller.
199
200config DWMAC_SUN8I
201	tristate "Allwinner sun8i GMAC support"
202	default ARCH_SUNXI
203	depends on OF && (ARCH_SUNXI || COMPILE_TEST)
204	select MDIO_BUS_MUX
205	help
206	  Support for Allwinner H3 A83T A64 EMAC ethernet controllers.
207
208	  This selects Allwinner SoC glue layer support for the
209	  stmmac device driver. This driver is used for H3/A83T/A64
210	  EMAC ethernet controller.
211
212config DWMAC_IMX8
213	tristate "NXP IMX8 DWMAC support"
214	default ARCH_MXC
215	depends on OF && (ARCH_MXC || COMPILE_TEST)
216	select MFD_SYSCON
217	help
218	  Support for ethernet controller on NXP i.MX8 SOCs.
219
220	  This selects NXP SoC glue layer support for the stmmac
221	  device driver. This driver is used for i.MX8 series like
222	  iMX8MP/iMX8DXL GMAC ethernet controller.
223
224config DWMAC_INTEL_PLAT
225	tristate "Intel dwmac support"
226	depends on OF && COMMON_CLK
227	depends on STMMAC_ETH
228	help
229	  Support for ethernet controllers on Intel SoCs
230
231	  This selects the Intel platform specific glue layer support for
232	  the stmmac device driver. This driver is used for the Intel Keem Bay
233	  SoC.
234
235config DWMAC_VISCONTI
236	tristate "Toshiba Visconti DWMAC support"
237	default ARCH_VISCONTI
238	depends on OF && COMMON_CLK && (ARCH_VISCONTI || COMPILE_TEST)
239	help
240	  Support for ethernet controller on Visconti SoCs.
241
242endif
243
244config DWMAC_INTEL
245	tristate "Intel GMAC support"
246	default X86
247	depends on X86 && STMMAC_ETH && PCI
248	depends on COMMON_CLK
249	help
250	  This selects the Intel platform specific bus support for the
251	  stmmac driver. This driver is used for Intel Quark/EHL/TGL.
252
253config DWMAC_LOONGSON
254	tristate "Loongson PCI DWMAC support"
255	default MACH_LOONGSON64
256	depends on STMMAC_ETH && PCI
257	depends on COMMON_CLK
258	help
259	  This selects the LOONGSON PCI bus support for the stmmac driver,
260	  Support for ethernet controller on Loongson-2K1000 SoC and LS7A1000 bridge.
261
262config STMMAC_PCI
263	tristate "STMMAC PCI bus support"
264	depends on STMMAC_ETH && PCI
265	depends on COMMON_CLK
266	help
267	  This selects the platform specific bus support for the stmmac driver.
268	  This driver was tested on XLINX XC2V3000 FF1152AMT0221
269	  D1215994A VIRTEX FPGA board and SNPS QoS IPK Prototyping Kit.
270
271	  If you have a controller with this interface, say Y or M here.
272
273	  If unsure, say N.
274endif
275