PDK API Guide for J721E
enet_cfg.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2020
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
39 #ifndef ENET_CFG_H_
40 #define ENET_CFG_H_
41 
42 /* ========================================================================== */
43 /* Include Files */
44 /* ========================================================================== */
45 
46 #include <stdint.h>
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 /* ========================================================================== */
53 /* Macros */
54 /* ========================================================================== */
55 
57 #define ENET_ON (1U)
58 
60 #define ENET_OFF (0U)
61 
63 #define ENET_CFG_IS_ON(name) ((ENET_CFG_ ## name) == ENET_ON)
64 
66 #define ENET_CFG_IS_OFF(name) ((ENET_CFG_ ## name) == ENET_OFF)
67 
68 /* --------------------------------------------------------------------------*/
69 /* Enet generic config options */
70 /* --------------------------------------------------------------------------*/
71 
73 #define ENET_CFG_PRINT_BUF_LEN (200U)
74 
76 #define ENET_CFG_HAS_DEFAULT_OSAL (ENET_ON)
77 
79 #define ENET_CFG_HAS_DEFAULT_UTILS (ENET_ON)
80 
82 #define ENET_CFG_SANITY_CHECKS (ENET_ON)
83 
85 #define ENET_CFG_ENETPHY_PHY_MAX (13U)
86 
87 /* --------------------------------------------------------------------------*/
88 /* CPSW Peripheral and CPSW Module related config options */
89 /* --------------------------------------------------------------------------*/
90 
92 #define ENET_CFG_CPSW_SGMII (ENET_ON)
93 
95 #define ENET_CFG_CPSW_INTERVLAN (ENET_ON)
96 
98 #define ENET_CFG_MDIO_CLAUSE45 (ENET_ON)
99 
101 #define ENET_CFG_CPSW_HOSTPORT_TRAFFIC_SHAPING (ENET_ON)
102 
104 #define ENET_CFG_CPSW_CPTS_EVENTS_POOL_SIZE (128U)
105 
107 #define ENET_CFG_CPSW_MACPORT_TRAFFIC_SHAPING (ENET_ON)
108 
110 #define ENET_CFG_CPSW_MACPORT_SGMII (ENET_ON)
111 
113 #define ENET_CFG_CPSW_MACPORT_INTERVLAN (ENET_ON)
114 
116 #define ENET_CFG_CPSW_CPTS_STATS (ENET_ON)
117 
119 #define ENET_CFG_CPSW_CPTS_EVENTS_POOL_SIZE (128U)
120 
121 //FIXME
122 #if !defined(SOC_AM65XX)
123 
124 #define ENET_CFG_TX_CHANNELS_NUM (8U)
125 
127 #define ENET_CFG_RX_FLOWS_NUM (8U)
128 
130 #define ENET_CFG_RING_MON_NUM (4U)
131 #endif
132 
134 #define ENET_CFG_REMOTE_CLIENT_CORES_MAX (6U)
135 
137 #define ENET_CFG_RM_MAC_ADDR_MAX (10U)
138 
140 #define ENET_CFG_RM_TX_CH_MAX (8U)
141 
143 #define ENET_CFG_RM_RX_CH_MAX (64U)
144 
146 #define ENET_CFG_RM_PRESENT (ENET_ON)
147 
148 #if defined(SOC_AM65XX)
149 
151 #define ENET_CFG_NUM_INSTANCES (7U)
152 #define ENET_CFG_TX_CHANNELS_NUM (4U * ENET_CFG_NUM_INSTANCES)
153 #define ENET_CFG_RX_FLOWS_NUM (8U * ENET_CFG_NUM_INSTANCES)
154 #define ENET_CFG_RING_MON_NUM (8U * ENET_CFG_NUM_INSTANCES)
155 #endif
156 
157 #if defined(SOC_J721E) || defined(SOC_J7200) || defined(SOC_J784S4)
158 #define ENET_CFG_LWIP_IFACE_MAX (2U)
159 #else
160 #define ENET_CFG_LWIP_IFACE_MAX (1U)
161 #endif
162 
163 /* --------------------------------------------------------------------------*/
164 /* ICSS-G Peripheral and CPSW Module related config options */
165 /* --------------------------------------------------------------------------*/
166 
167 /* --------------------------------------------------------------------------*/
168 /* GMAC Peripheral and CPSW Module related config options */
169 /* --------------------------------------------------------------------------*/
170 
171 /* ========================================================================== */
172 /* Structures and Enums */
173 /* ========================================================================== */
174 
175 /* None */
176 
177 /* ========================================================================== */
178 /* Global Variables Declarations */
179 /* ========================================================================== */
180 
181 /* None */
182 
183 /* ========================================================================== */
184 /* Function Declarations */
185 /* ========================================================================== */
186 
187 /* None */
188 
189 /* ========================================================================== */
190 /* Deprecated Function Declarations */
191 /* ========================================================================== */
192 
193 /* None */
194 
195 /* ========================================================================== */
196 /* Static Function Definitions */
197 /* ========================================================================== */
198 
199 /* None */
200 
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #endif /* ENET_CFG_H_ */