1# Copyright 2024-2025 NXP
2# SPDX-License-Identifier: Apache-2.0
3
4menuconfig ETH_NXP_IMX_NETC
5	bool "NXP IMX Ethernet and Network Controller (NETC) driver"
6	default y
7	depends on DT_HAS_NXP_IMX_NETC_PSI_ENABLED
8	select MDIO
9	select NOCACHE_MEMORY if ARCH_HAS_NOCACHE_MEMORY_SUPPORT
10	select ETH_DSA_SUPPORT
11	help
12	  Enable Ethernet and Network Controller (NETC) driver for NXP IMX SoCs.
13
14if ETH_NXP_IMX_NETC
15
16config ETH_NXP_IMX_MSGINTR
17	int "Message Interrupt module select"
18	default 1
19	help
20	  Message Interrupt module select.
21
22config ETH_NXP_IMX_RX_THREAD_PRIO
23	int "RX thread priority"
24	default 2
25	help
26	  RX thread priority. RX thread is a cooperative thread.
27
28config ETH_NXP_IMX_RX_THREAD_STACK_SIZE
29	int "RX thread stack size"
30	default 1500
31	help
32	  RX thread stack size.
33
34config ETH_NXP_IMX_RX_BUDGET
35	int "RX thread budget"
36	default 128
37	range 1 1024
38	help
39	  The budget parameter places a limit on the amount of work the driver may
40	  do in the RX thread before yielding the processor, in case there is more
41	  work to do. This is to prevent the RX thread to starve other threads. Each
42	  received frame counts as one unit of work.
43
44config ETH_NXP_IMX_TX_RING_NUM
45	int "TX ring number"
46	default 1
47	range 1 1023
48	help
49	  TX ring number used. The actual maximum value may varies from platforms.
50
51config ETH_NXP_IMX_TX_RING_LEN
52	int "TX ring length"
53	default 8
54	range 8 256
55	help
56	  Length of the TX ring. The value must be a multiple of 8.
57
58config ETH_NXP_IMX_TX_RING_BUF_SIZE
59	int "TX ring data buffer size"
60	default 1000
61	range 64 1536
62	help
63	  Size, in bytes, of the TX data buffer. The size must be big enough to
64	  store one complete Ethernet frame, and be a multiple of 8.
65
66config ETH_NXP_IMX_RX_RING_NUM
67	int "RX ring number"
68	default 1
69	range 1 1023
70	help
71	  RX ring number used. The actual maximum value may varies from platforms.
72
73config ETH_NXP_IMX_RX_RING_LEN
74	int "RX ring length"
75	default 8
76	range 8 256
77	help
78	  Length of the RX ring. The value must be a multiple of 8.
79
80config ETH_NXP_IMX_RX_RING_BUF_SIZE
81	int "RX ring data buffer size"
82	default 1518
83	range 64 1536
84	help
85	  Size, in bytes, of the RX data buffer. The size must be big enough to
86	  store one complete Ethernet frame, and be a multiple of 8.
87
88endif # ETH_NXP_IMX_NETC
89
90if NET_DSA
91
92config DSA_NXP_IMX_NETC
93	bool "Support for NXP i.MX NETC"
94	default y
95	depends on DT_HAS_NXP_NETC_SWITCH_ENABLED
96	help
97	  Add support for NXP i.MX NETC DSA device driver.
98
99endif
100