1# Copyright 2022 NXP
2# SPDX-License-Identifier: Apache-2.0
3
4menuconfig ETH_NXP_S32_NETC
5	bool "NXP S32 Ethernet Switch and Controller (NETC) driver"
6	default y
7	depends on (DT_HAS_NXP_S32_NETC_PSI_ENABLED || DT_HAS_NXP_S32_NETC_VSI_ENABLED)
8	depends on !NET_TEST
9	select MBOX
10	select MDIO if DT_HAS_NXP_S32_NETC_PSI_ENABLED
11	select NOCACHE_MEMORY if ARCH_HAS_NOCACHE_MEMORY_SUPPORT
12	help
13	  Enable Ethernet Switch and Controller (NETC) driver for NXP S32 SoCs.
14
15if ETH_NXP_S32_NETC
16
17config ETH_NXP_S32_RX_THREAD_PRIO
18	int "RX thread priority"
19	default 2
20	help
21	  RX thread priority. RX thread is a cooperative thread.
22
23config ETH_NXP_S32_RX_THREAD_STACK_SIZE
24	int "RX thread stack size"
25	default 1500
26	help
27	  RX thread stack size.
28
29config ETH_NXP_S32_RX_BUDGET
30	int "RX thread budget"
31	default 128
32	range 1 1024
33	help
34	  The budget parameter places a limit on the amount of work the driver may
35	  do in the RX thread before yielding the processor, in case there is more
36	  work to do. This is to prevent the RX thread to starve other threads. Each
37	  received frame counts as one unit of work.
38
39config ETH_NXP_S32_TX_RING_LEN
40	int "TX ring length"
41	default 64
42	range 8 256
43	help
44	  Length of the TX ring. The value must be a multiple of 8.
45
46config ETH_NXP_S32_TX_RING_BUF_SIZE
47	int "TX ring data buffer size"
48	default 1536
49	range 64 1536
50	help
51	  Size, in bytes, of the TX data buffer. The size must be big enough to
52	  store one complete Ethernet frame, and be a multiple of 8.
53
54config ETH_NXP_S32_RX_RING_LEN
55	int "RX ring length"
56	default 64
57	range 8 256
58	help
59	  Length of the RX ring. The value must be a multiple of 8.
60
61config ETH_NXP_S32_RX_RING_BUF_SIZE
62	int "RX ring data buffer size"
63	default 1536
64	range 64 1536
65	help
66	  Size, in bytes, of the RX data buffer. The size must be big enough to
67	  store one complete Ethernet frame, and be a multiple of 8.
68
69config ETH_NXP_S32_RX_IRQ_PACKET_THRESHOLD
70	int "RX interrupt coalescing packet threshold"
71	default 32
72	range 1 511
73	help
74	  RX interrupt coalescing packet threshold. This values determines the
75	  minimum number of packets received before raising an interrupt.
76
77config ETH_NXP_S32_RX_IRQ_TIMER_THRESHOLD
78	int "RX interrupt coalescing timer threshold"
79	default 60000
80	range 1 4294967295
81	help
82	  RX interrupt coalescing timer threshold, in units of NETC clock cycles.
83	  This value determines the maximum amount of time allowed between a first
84	  received packet until RX interrupt coalescing packet threshold is reached.
85	  If the timer expires before the threshold is reached, an interrupt is
86	  raised.
87
88config ETH_NXP_S32_MAC_FILTER_TABLE_SIZE
89	int "MAC filter hash table size"
90	default 8
91	range 8 128
92	help
93	  Maximum number of entries supported in the MAC filter hash table.
94
95config ETH_NXP_S32_VSI_INIT_PRIORITY
96	int
97	default 81
98	help
99	  VSI initialization priority. It must be bigger than PSI init priority
100	  (CONFIG_ETH_INIT_PRIORITY) and lower than CONFIG_NET_INIT_PRIO, so
101	  that it can start after the PSI but before the networking sub-system.
102
103endif # ETH_NXP_S32_NETC
104