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 (256U)
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_CPSW_EST (ENET_ON)
99 #define ENET_CFG_CPSW_MACPORT_EST (ENET_ON)
100 
102 #define ENET_CFG_MDIO_CLAUSE45 (ENET_ON)
103 
105 #define ENET_CFG_CPSW_HOSTPORT_TRAFFIC_SHAPING (ENET_ON)
106 
108 #define ENET_CFG_CPSW_CPTS_EVENTS_POOL_SIZE (128U)
109 
111 #define ENET_CFG_CPSW_MACPORT_TRAFFIC_SHAPING (ENET_ON)
112 
114 #define ENET_CFG_CPSW_MACPORT_SGMII (ENET_ON)
115 
117 #define ENET_CFG_CPSW_MACPORT_INTERVLAN (ENET_ON)
118 
120 #define ENET_CFG_CPSW_CPTS_STATS (ENET_ON)
121 
123 #define ENET_CFG_CPSW_CPTS_EVENTS_POOL_SIZE (128U)
124 
125 //FIXME
126 #if !defined(SOC_AM65XX)
127 
128 #define ENET_CFG_TX_CHANNELS_NUM (8U)
129 
131 #define ENET_CFG_RX_FLOWS_NUM (8U)
132 
134 #define ENET_CFG_RING_MON_NUM (4U)
135 #endif
136 
138 #define ENET_CFG_REMOTE_CLIENT_CORES_MAX (6U)
139 
141 #define ENET_CFG_RM_MAC_ADDR_MAX (10U)
142 
144 #define ENET_CFG_RM_TX_CH_MAX (8U)
145 
147 #define ENET_CFG_RM_RX_CH_MAX (64U)
148 
150 #define ENET_CFG_RM_PRESENT (ENET_ON)
151 
152 #if defined(SOC_AM65XX)
153 
155 #define ENET_CFG_NUM_INSTANCES (7U)
156 #define ENET_CFG_TX_CHANNELS_NUM (4U * ENET_CFG_NUM_INSTANCES)
157 #define ENET_CFG_RX_FLOWS_NUM (8U * ENET_CFG_NUM_INSTANCES)
158 #define ENET_CFG_RING_MON_NUM (8U * ENET_CFG_NUM_INSTANCES)
159 #endif
160 
161 #if defined(SOC_J721E) || defined(SOC_J7200) || defined(SOC_J784S4)
162 #define ENET_CFG_LWIP_IFACE_MAX (2U)
163 #else
164 #define ENET_CFG_LWIP_IFACE_MAX (1U)
165 #endif
166 
167 #if defined(SOC_J784S4)
168 
169 #define ENET_CFG_CPSW_ALE_MULTIHOST (ENET_ON)
170 #endif
171 
172 /* --------------------------------------------------------------------------*/
173 /* ICSS-G Peripheral and CPSW Module related config options */
174 /* --------------------------------------------------------------------------*/
175 
176 /* --------------------------------------------------------------------------*/
177 /* GMAC Peripheral and CPSW Module related config options */
178 /* --------------------------------------------------------------------------*/
179 
180 /* ========================================================================== */
181 /* Structures and Enums */
182 /* ========================================================================== */
183 
184 /* None */
185 
186 /* ========================================================================== */
187 /* Global Variables Declarations */
188 /* ========================================================================== */
189 
190 /* None */
191 
192 /* ========================================================================== */
193 /* Function Declarations */
194 /* ========================================================================== */
195 
196 /* None */
197 
198 /* ========================================================================== */
199 /* Deprecated Function Declarations */
200 /* ========================================================================== */
201 
202 /* None */
203 
204 /* ========================================================================== */
205 /* Static Function Definitions */
206 /* ========================================================================== */
207 
208 /* None */
209 
210 #ifdef __cplusplus
211 }
212 #endif
213 
214 #endif /* ENET_CFG_H_ */