tscmod_enum_defines.h (35696B)
1 /*---------------------------------------------------------------------- 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * Broadcom Corporation 8 * Proprietary and Confidential information 9 * All rights reserved 10 * This source file is the property of Broadcom Corporation, and 11 * may not be copied or distributed in any isomorphic form without the 12 * prior written consent of Broadcom Corporation. 13 *--------------------------------------------------------------------- 14 * Description: This file is automatically generated. It contains enums, 15 * elems, and doxygen comments needed for SerDes Configuration programs. 16 *--------------------------------------------------------------------- 17 * CVS INFORMATION: 18 * Please see inc/enum_desc.txt for CVS information. 19 *---------------------------------------------------------------------- 20 */ 21 22 /* This file is automatically generated. Do not modify it. Modify the 23 * inc/enum_desc.txt to change enums, elems, or comments. For issues about 24 * the process that creates this file contact the tscmod development team. 25 */ 26 27 #ifndef _TSCMOD_ENUM_DEFINES_H 28 #define _TSCMOD_ENUM_DEFINES_H 29 30 /*! \enum tscmod_lane_select 31 32 A '1' in the latter part of the enum name signifies that the lane is selected. 33 Other parameters in the TSC context will decide what to do with the 34 selected lane(s). In most cases we either enable or disable a feature on the 35 selected lanes. 36 37 In the future, multiple lanes can be supported with a single call (for example, 38 disable autoneg on lanes 1, and 3. only.) 39 But currently Tier1s only support operations on a single lane. If multiple 40 lanes need to be programmed, multiple calls to Tier1s should be made. 41 42 Lane selection is enumerated to avoid wrong selection of lanes. 43 44 In the future release, we can select all lanes, but not be in broadcast mode. 45 Currently lane_select is set to TSCMOD_LANE_BCST to broadcast to all lanes. 46 47 Note that when you write, data is broadcast to registers of all lanes. But when 48 you read in broadcast mode, the value of the register in lane 0 is returned. 49 50 */ 51 52 typedef enum { 53 TSCMOD_LANE_0_0_0_1 = 0 , /*!< lane number 0 selected */ 54 TSCMOD_LANE_0_0_1_0 , /*!< lane number 1 selected */ 55 TSCMOD_LANE_0_0_1_1 , /*!< lane numbers 0,1 selected */ 56 TSCMOD_LANE_0_1_0_0 , /*!< lane number 2 selected */ 57 TSCMOD_LANE_0_1_0_1 , /*!< lane numbers 2,0 selected */ 58 TSCMOD_LANE_0_1_1_0 , /*!< lane numbers 2,1 selected */ 59 TSCMOD_LANE_0_1_1_1 , /*!< lane numbers 2,1,0 selected */ 60 TSCMOD_LANE_1_0_0_0 , /*!< lane number 3 selected */ 61 TSCMOD_LANE_1_0_0_1 , /*!< lane numbers 3,0 selected */ 62 TSCMOD_LANE_1_0_1_0 , /*!< lane numbers 3,1 selected */ 63 TSCMOD_LANE_1_0_1_1 , /*!< lane numbers 3,1,0 selected */ 64 TSCMOD_LANE_1_1_0_0 , /*!< lane numbers 3,2 selected */ 65 TSCMOD_LANE_1_1_0_1 , /*!< lane numbers 3,2,0 selected */ 66 TSCMOD_LANE_1_1_1_0 , /*!< lane numbers 3,2,1 selected */ 67 TSCMOD_LANE_1_1_1_1 , /*!< lane numbers 3,2,1,0 selected */ 68 TSCMOD_LANE_BCST , /*!< lane numbers 3,2,1,0 BCST */ 69 TSCMOD_LANE_ILLEGAL /*!< Illegal (programmatic boundary) */ 70 } tscmod_lane_select; 71 72 /*! \def CNT_tscmod_lane_select Types of enum tscmod_lane_select */ 73 #define CNT_tscmod_lane_select 17 74 75 /*! 76 \brief 77 This array returns the string version of the enum #tscmod_lane_select when indexed by the 78 enum var. 79 80 */ 81 extern char* e2s_tscmod_lane_select [CNT_tscmod_lane_select]; 82 /*! 83 \brief 84 This array associates the enum #tscmod_lane_select enum with a bit mask. 85 The index is the #tscmod_lane_select enum value. The value for each entry is 86 interpreted as follows. If bit [n] is 1, then lane [n] is enabled; if bit [n] 87 is 0, then lane [n] is disabled. By enabled, we mean that such-and-such 88 function is to be called for a lane; by disabled, we mean that such-and-such 89 function is not to be called for a lane. So a value of 0xF indicates that all 90 lanes or enabled, while 0x5 indicates that only lanes 0 and 2 are enabled. 91 92 */ 93 extern int e2n_tscmod_lane_select [CNT_tscmod_lane_select]; 94 /*! \enum tscmod_spd_intfc_type 95 96 All legal speed-interface combination are encapsulated in this enum 97 98 There are 42 speed and interface combinations allowed for a logical TSC 99 port. Names and speeds are self explanatory. 100 101 Speed and interface selection is combined because we don't want the speeds 102 to be incompatible with interface. 103 104 */ 105 106 typedef enum { 107 TSCMOD_SPD_ZERO = 0 , /*!< Illegal value (programmatic boundary) */ 108 TSCMOD_SPD_10_SGMII , /*!< 10Mb SGMII (serial) */ 109 TSCMOD_SPD_100_SGMII , /*!< 100Mb SGMII (serial) */ 110 TSCMOD_SPD_1000_SGMII , /*!< 1Gb SGMII (serial) */ 111 TSCMOD_SPD_2500 , /*!< 2.5Gb (BRCM prop.) based on 1000BASE-X */ 112 TSCMOD_SPD_5000 , /*!< 5Gb XFI type */ 113 TSCMOD_SPD_10000_XFI , /*!< 10Gb serial XFI */ 114 TSCMOD_SPD_10600_XFI_HG , /*!< 10.5Gb serial XFI (HgSOLO) */ 115 TSCMOD_SPD_10000_HI , /*!< 10Gb XAUI HiG (BRCM prop.) */ 116 TSCMOD_SPD_10000 , /*!< 10Gb XAUI */ 117 TSCMOD_SPD_12000_HI , /*!< 10Gb XAUI HiG (BRCM prop.) */ 118 TSCMOD_SPD_13000 , /*!< 13Gb XAUI (BRCM prop.) */ 119 TSCMOD_SPD_15000 , /*!< 15Gb XAUI (BRCM prop.) */ 120 TSCMOD_SPD_16000 , /*!< 16Gb XAUI (BRCM prop.) */ 121 TSCMOD_SPD_20000 , /*!< 20Gb XAUI (BRCM prop.) */ 122 TSCMOD_SPD_20000_SCR , /*!< 20Gb XAUI scrambled output */ 123 TSCMOD_SPD_21000 , /*!< 21Gb XAUI (BRCM prop.) */ 124 TSCMOD_SPD_25455 , /*!< 25Gb XAUI (BRCM prop.) 64/66 codec */ 125 TSCMOD_SPD_31500 , /*!< 31.5Gb quad lane XAUI (BRCM prop.) */ 126 TSCMOD_SPD_40G_X4 , /*!< 40Gb quad lane XAUI (BRCM prop.) */ 127 TSCMOD_SPD_42G_X4 , /*!< 40Gb quad lane XAUI (BRCM prop.) HiG */ 128 TSCMOD_SPD_40G_MLD , /*!< 40Gb quad lane MLD */ 129 TSCMOD_SPD_42G_MLD , /*!< 42Gb quad lane MLD */ 130 TSCMOD_SPD_10000_X2 , /*!< 10Gb dual lane CSCO */ 131 TSCMOD_SPD_10000_HI_DXGXS , /*!< 10Gb dual lane XGXS HiG (BRCM prop.) */ 132 TSCMOD_SPD_10000_DXGXS , /*!< 10Gb dual lane XGXS (BRCM prop.) */ 133 TSCMOD_SPD_10000_HI_DXGXS_SCR , /*!< 10Gb dual lane scrambled output HiG */ 134 TSCMOD_SPD_10000_DXGXS_SCR , /*!< 10Gb dual lane scrambled output */ 135 TSCMOD_SPD_10500_HI_DXGXS , /*!< 10.5Gb dual lane XGXS HiG (BRCM prop.) */ 136 TSCMOD_SPD_12773_HI_DXGXS , /*!< 12.73Gb dual lane XGXS HiG (BRCM prop.) */ 137 TSCMOD_SPD_12773_DXGXS , /*!< 12.73Gb dual lane XGXS (BRCM prop.) */ 138 TSCMOD_SPD_15750_HI_DXGXS , /*!< 15.75Gb scrambled dual lane HiG(BRCM prop) */ 139 TSCMOD_SPD_20G_MLD_DXGXS , /*!< 20Gb dual lane MLD */ 140 TSCMOD_SPD_21G_HI_MLD_DXGXS , /*!< 20Gb dual lane HiG MLD */ 141 TSCMOD_SPD_20G_DXGXS , /*!< 20Gb dual lane BRCM */ 142 TSCMOD_SPD_21G_HI_DXGXS , /*!< 21.2Gb dual HiG(BRCM prop.)(20+plldiv=70) */ 143 TSCMOD_SPD_100G_CR10 , /*!< 100G */ 144 TSCMOD_SPD_120G_CR12 , /*!< 120G */ 145 TSCMOD_SPD_ILLEGAL /*!< Illegal value (programmatic boundary) */ 146 } tscmod_spd_intfc_type; 147 148 /*! \def CNT_tscmod_spd_intfc_type Types of enum tscmod_spd_intfc_type */ 149 #define CNT_tscmod_spd_intfc_type 39 150 151 /*! 152 \brief 153 This array returns the string version of the enum #tscmod_lane_select when indexed by the 154 enum var. 155 156 */ 157 extern char* e2s_tscmod_spd_intfc_type [CNT_tscmod_spd_intfc_type]; 158 /*! 159 \brief 160 This array associates the enum #tscmod_lane_select enum with a bit mask. 161 The index is the #tscmod_lane_select enum value. The value for each entry is 162 interpreted as follows. If bit [n] is 1, then lane [n] is enabled; if bit [n] 163 is 0, then lane [n] is disabled. By enabled, we mean that such-and-such 164 function is to be called for a lane; by disabled, we mean that such-and-such 165 function is not to be called for a lane. So a value of 0xF indicates that all 166 lanes or enabled, while 0x5 indicates that only lanes 0 and 2 are enabled. 167 168 */ 169 extern int e2n_tscmod_spd_intfc_type [CNT_tscmod_spd_intfc_type]; 170 /*! \enum tscmod_regacc_type 171 172 Types of MDIO to access TSC registers. 22 (32 registers) and 45 are 173 supported. Picking 22 automatically selects BRCM prop.) clause 22 mode 174 with extensions for 64K registers. Actual clause 22 is not yet supported. 175 176 */ 177 178 typedef enum { 179 TSCMOD_MDIO_CL22 = 0 , /*!< IEEE clause 22 (BRCM prop.) based MDIO */ 180 TSCMOD_MDIO_CL45 , /*!< IEEE clause 45 based MDIO */ 181 TSCMOD_MDIO_CL22_IEEE , /*!< IEEE clause 22 (not BRCM prop.) based MDIO */ 182 TSCMOD_MDIO_PCB , /*!< For verilog only (drive parallel bus) */ 183 TSCMOD_MDIO_TOTSC , /*!< TO_TSC bus */ 184 TSCMOD_MDIO_ILLEGAL /*!< */ 185 } tscmod_regacc_type; 186 187 /*! \def CNT_tscmod_regacc_type Types of enum tscmod_regacc_type */ 188 #define CNT_tscmod_regacc_type 6 189 190 /*! 191 \brief 192 This array returns the string version of the enum #tscmod_mdio_type when indexed 193 by the enum var. 194 195 */ 196 extern char* e2s_tscmod_regacc_type [CNT_tscmod_regacc_type]; 197 /*! \enum tscmod_port_type 198 199 This is the port mode type enumeration. 200 201 TSC can be configured in single port mode (i.e. TSC is one single port) or 202 multilane mode (i.e. TSC has more than one port (2, 3, or 4) that are 203 controlled individually. 204 205 */ 206 207 typedef enum { 208 TSCMOD_SINGLE_PORT = 0 , /*!< single port mode: 4 channels as one logical port */ 209 TSCMOD_MULTI_PORT , /*!< Each channel is one logical port */ 210 TSCMOD_DXGXS , /*!< Each paired channel(0-1, 2-3) is one logical port */ 211 TSCMOD_PORT_MODE_ILLEGAL /*!< */ 212 } tscmod_port_type; 213 214 /*! \def CNT_tscmod_port_type Types of enum tscmod_port_type */ 215 #define CNT_tscmod_port_type 4 216 217 /*! 218 \brief 219 This array returns the string version of the enum #tscmod_port_type when indexed 220 by the enum var. 221 222 */ 223 extern char* e2s_tscmod_port_type [CNT_tscmod_port_type]; 224 /*! \enum tscmod_os_type 225 226 Oversampling type. The oversampling is fixed for single port. But can be configured 227 in multilane mode to either 0S5 or OS8 228 229 */ 230 231 typedef enum { 232 TSCMOD_OS1 = 0 , /*!< Hardly ever used. */ 233 TSCMOD_OS2 , /*!< Hardly ever used. */ 234 TSCMOD_OS3 , /*!< Hardly ever used. */ 235 TSCMOD_OS3p3 , /*!< Hardly ever used. */ 236 TSCMOD_OS5 , /*!< TSC Independent mode can have OS5 or OS8 */ 237 TSCMOD_OS6 , /*!< This mode is exclusive to QUAD_SGMII */ 238 TSCMOD_OS_IND_LANE , /*!< This mode is exclusive to XENIA */ 239 TSCMOD_OS8 , /*!< TSC Independent mode can have OS5 or OS8 */ 240 TSCMOD_OS8p25 , /*!< TSC Independent mode can have OS5 or OS8 */ 241 TSCMOD_OS_ILLEGAL /*!< */ 242 } tscmod_os_type; 243 244 /*! \def CNT_tscmod_os_type Types of enum tscmod_os_type */ 245 #define CNT_tscmod_os_type 10 246 247 /*! 248 \brief 249 This array returns the string version of the enum #tscmod_port_type when indexed 250 by the enum var. 251 252 */ 253 extern char* e2s_tscmod_os_type [CNT_tscmod_os_type]; 254 /*! \enum tscmod_duplex_type 255 256 tscmod_duplex_type Duplex types (only half and full duplex supported) 257 258 */ 259 260 typedef enum { 261 TSCMOD_SIMPLEX = 0 , /*!< This is never used in TSC or any modern PHY chips */ 262 TSCMOD_HALF_DUPLEX , /*!< This is relevent only for 1G and below */ 263 TSCMOD_DUPLEX , /*!< This is default for 10G and above */ 264 TSCMOD_DUPLEX_ILLEGAL /*!< Illegal value. programmatic boundary. */ 265 } tscmod_duplex_type; 266 267 /*! \def CNT_tscmod_duplex_type Types of enum tscmod_duplex_type */ 268 #define CNT_tscmod_duplex_type 4 269 270 /*! 271 \brief 272 This array returns the string version of the enum #tscmod_port_type when indexed 273 by the enum var. 274 275 */ 276 extern char* e2s_tscmod_duplex_type [CNT_tscmod_duplex_type]; 277 /*! \enum tscmod_diag_type 278 279 tscmod_diag_type enumerates categories of diagnostic data. 280 has many intermediate stages between down and up. This enum is work in progress 281 282 283 <table cellspacing=0> 284 <tr><td colspan=3><B>'per_lane_control' bit-mappings</B></td></tr> 285 286 <tr><td><B>Type</B></td><td><B>Description</B></td><td><B>Scope</B></td></tr> 287 288 <tr><td>General</td> 289 <td> single/multi port, Device and Revision Id, VCO settings, Firmware state 290 and version, active/passive lanes, MDIO type. PLL info, Oversampling Info</td> 291 <td>Device</td></tr> 292 293 <tr><td>Link</td> 294 <td> Speeds, oversampling, interface, forced/Autoneg, link status, sync 295 status, RX sequencer on/off </td> 296 <td>Lane</td></tr> 297 298 <tr><td>Autoneg</td> 299 <td> Local and remote advertisement, link status, cl73/37/BAM info </td> 300 <td>Lane</td></tr> 301 302 <tr><td>Internal Traffic</td> 303 <td> PRBS type, CJPat Type, Prog_data value, Any associated recorded errors, 304 and misc. info (IPG etc.)</td> 305 <td>Lane </td></tr> 306 307 <tr> 308 <td>DFE</td> 309 <td>Equalization info, Tap settings. (pre/post/overrides), peaking filter values </td> 310 <td>Lane</td></tr> 311 312 <tr><td>IEEE info</td> 313 <td>Clause 72, FEC</td> 314 <td>Lane</td></tr> 315 316 <tr><td>Topology</td> 317 <td>Looping info (Gloop/rloop), lane swapping, polarity swap info</td> 318 <td>Device</td></tr> 319 320 <tr><td>EEE</td> 321 <td>EEE full, passthru modes, some window values?</td> 322 <td>Lane</td></tr> 323 324 <tr><td>Eye Margin</td> 325 <td>Eye margin measurement (readout only)</td> 326 <td>Lane</td></tr> 327 328 <tr><td>All</td> 329 <td>All of the above. Except eye margin.</td> 330 <td>Device</td></tr> 331 332 </table> 333 334 335 */ 336 337 typedef enum { 338 TSCMOD_DIAG_GENERAL = 0x00001 , /*!< General device wide information. */ 339 TSCMOD_DIAG_LINK = 0x00002 , /*!< Link specific info. */ 340 TSCMOD_DIAG_ANEG = 0x00004 , /*!< Autoneg specific info. */ 341 TSCMOD_DIAG_TFC = 0x00008 , /*!< State of tx/rx internal tfc */ 342 TSCMOD_DIAG_DFE = 0x00010 , /*!< DFE related info. */ 343 TSCMOD_DIAG_SLICERS = 0x00020 , /*!< P1, M1, D slicer values. */ 344 TSCMOD_DIAG_TX_AMPS = 0x00040 , /*!< Idriver, Predriver, post2_coef */ 345 TSCMOD_DIAG_TX_TAPS = 0x00080 , /*!< Pre, Main, Post */ 346 TSCMOD_DIAG_RX_TAPS = 0x00100 , /*!< PF, VGA, TAP1 through TAP5 */ 347 TSCMOD_DIAG_IEEE = 0x00200 , /*!< IEEE related info */ 348 TSCMOD_DIAG_TOPOLOGY = 0x00400 , /*!< Loopbacks etc. */ 349 TSCMOD_DIAG_EEE = 0x00800 , /*!< EEE */ 350 TSCMOD_DIAG_EYE = 0x01000 , /*!< eye margin msmt */ 351 TSCMOD_DIAG_SPEED = 0x02000 , /*!< sub-category of TSCMOD_DIAG_LINK(for SDK) */ 352 TSCMOD_DIAG_TX_LOOPBACK = 0x04000 , /*!< sub-category of TSCMOD_DIAG_TOPOLOGY(for SDK) */ 353 TSCMOD_DIAG_RX_LOOPBACK = 0x08000 , /*!< sub-category of TSCMOD_DIAG_TOPOLOGY(for SDK) */ 354 TSCMOD_DIAG_RX_PPM = 0x10000 , /*!< ppm offset that receiver is tracking */ 355 TSCMOD_DIAG_PRBS = 0x20000 , /*!< prbs info */ 356 TSCMOD_DIAG_RX_SIGDET = 0x40000 , /*!< Per lane rx signal detect info. */ 357 TSCMOD_DIAG_POKE = 0x80000 , /*!< poke debug function */ 358 TSCMOD_DIAG_CL72 =0x100000 , /*!< CL72 status function */ 359 TSCMOD_DIAG_PLL =0x200000 , /*!< PLL status function */ 360 TSCMOD_DIAG_PMD =0x400000 , /*!< PMD status function */ 361 TSCMOD_DIAG_HG =0x800000 , /*!< HG status function */ 362 TSCMOD_DIAG_ALL =0xffffff , /*!< Everything but eye margin */ 363 TSCMOD_DIAG_ILLEGAL = 0x00000 /*!< Illegal value. programmatic boundary. */ 364 } tscmod_diag_type; 365 366 /*! \def CNT_tscmod_diag_type Types of enum tscmod_diag_type */ 367 #define CNT_tscmod_diag_type 26 368 369 /*! 370 \brief 371 This array returns the string version of the enum #tscmod_port_type when indexed 372 by the enum var. 373 374 */ 375 extern char* e2s_tscmod_diag_type [CNT_tscmod_diag_type]; 376 /*! \enum tscmod_diag_idx_type 377 378 tscmod_diag_idx_type enumerates categories of diagnostic data. 379 has many intermediate stages between down and up. This enum mirrors with tscmod_diag_type 380 for string printing. 381 382 383 */ 384 385 typedef enum { 386 TSCMOD_DIAG_GENERAL_IDX = 0 , /*!< General device wide information. */ 387 TSCMOD_DIAG_LINK_IDX , /*!< Link specific info. */ 388 TSCMOD_DIAG_ANEG_IDX , /*!< Autoneg specific info. */ 389 TSCMOD_DIAG_TFC_IDX , /*!< State of tx/rx internal tfc */ 390 TSCMOD_DIAG_DFE_IDX , /*!< DFE related info. */ 391 TSCMOD_DIAG_SLICERS_IDX , /*!< P1, M1, D slicer values. */ 392 TSCMOD_DIAG_TX_AMPS_IDX , /*!< Idriver, Predriver, post2_coef */ 393 TSCMOD_DIAG_TX_TAPS_IDX , /*!< Pre, Main, Post */ 394 TSCMOD_DIAG_RX_TAPS_IDX , /*!< PF, VGA, TAP1 through TAP5 */ 395 TSCMOD_DIAG_IEEE_IDX , /*!< IEEE related info */ 396 TSCMOD_DIAG_TOPOLOGY_IDX , /*!< Loopbacks etc. */ 397 TSCMOD_DIAG_EEE_IDX , /*!< EEE */ 398 TSCMOD_DIAG_EYE_IDX , /*!< eye margin msmt */ 399 TSCMOD_DIAG_SPEED_IDX , /*!< sub-category of TSCMOD_DIAG_LINK(for SDK) */ 400 TSCMOD_DIAG_TX_LOOPBACK_IDX , /*!< sub-category of TSCMOD_DIAG_TOPOLOGY(for SDK) */ 401 TSCMOD_DIAG_RX_LOOPBACK_IDX , /*!< sub-category of TSCMOD_DIAG_TOPOLOGY(for SDK) */ 402 TSCMOD_DIAG_RX_PPM_IDX , /*!< ppm offset that receiver is tracking */ 403 TSCMOD_DIAG_PRBS_IDX , /*!< prbs info */ 404 TSCMOD_DIAG_RX_SIGDET_IDX , /*!< Per lane rx signal detect info. */ 405 TSCMOD_DIAG_POKE_IDX , /*!< poke debug function */ 406 TSCMOD_DIAG_CL72_IDX , /*!< CL72 status function */ 407 TSCMOD_DIAG_PLL_IDX , /*!< PLL status function */ 408 TSCMOD_DIAG_PMD_IDX , /*!< PMD status function */ 409 TSCMOD_DIAG_HG_IDX , /*!< HG status function */ 410 TSCMOD_DIAG_ALL_IDX , /*!< Everything but eye margin */ 411 TSCMOD_DIAG_IDX_ILLEGAL /*!< Illegal value. programmatic boundary. */ 412 } tscmod_diag_idx_type; 413 414 /*! \def CNT_tscmod_diag_idx_type Types of enum tscmod_diag_idx_type */ 415 #define CNT_tscmod_diag_idx_type 26 416 417 /*! 418 \brief 419 This array returns the string version of the enum #tscmod_port_type when indexed 420 by the enum var. 421 422 */ 423 extern char* e2s_tscmod_diag_idx_type [CNT_tscmod_diag_idx_type]; 424 /*! 425 \brief 426 This array associates the enum #tscmod_lane_select enum with a bit mask. 427 The index is the #tscmod_lane_select enum value. The value for each entry is 428 interpreted as follows. If bit [n] is 1, then lane [n] is enabled; if bit [n] 429 is 0, then lane [n] is disabled. By enabled, we mean that such-and-such 430 function is to be called for a lane; by disabled, we mean that such-and-such 431 function is not to be called for a lane. So a value of 0xF indicates that all 432 lanes or enabled, while 0x5 indicates that only lanes 0 and 2 are enabled. 433 434 */ 435 extern int e2n_tscmod_diag_idx_type [CNT_tscmod_diag_idx_type]; 436 /*! \enum tscmod_diag_an_type 437 438 tscmod_diag_an_type enumerates different modes used in TSCMOD_DIAG_ANEG. 439 440 441 */ 442 443 typedef enum { 444 TSCMOD_DIAG_AN_DONE = 0 , /*!< AN completion check. */ 445 TSCMOD_DIAG_AN_HCD , /*!< AN HCD speed check. */ 446 TSCMOD_DIAG_AN_MODE , /*!< AN MODE info. */ 447 TSCMOD_DIAG_AN_TYPE_ILLEGAL /*!< Illegal value. programmatic boundary. */ 448 } tscmod_diag_an_type; 449 450 /*! \def CNT_tscmod_diag_an_type Types of enum tscmod_diag_an_type */ 451 #define CNT_tscmod_diag_an_type 4 452 453 /*! 454 \brief 455 This array returns the string version of the enum #tscmod_port_type when indexed 456 by the enum var. 457 458 */ 459 extern char* e2s_tscmod_diag_an_type [CNT_tscmod_diag_an_type]; 460 /*! \enum tscmod_diag_general_type 461 462 tscmod_diag_general_type enumerates different modes used in TSCMOD_DIAG_GENERAL. 463 464 465 */ 466 467 typedef enum { 468 TSCMOD_DIAG_G_INFO = 0 , 469 TSCMOD_DIAG_G_PORT , /*!< port diag. */ 470 TSCMOD_DIAG_G_CFG , /*!< port cfg diag. */ 471 TSCMOD_DIAG_G_SPEED , /*!< speed diag. */ 472 TSCMOD_DIAG_G_AN , /*!< an diag. */ 473 TSCMOD_DIAG_G_DSC , /*!< dsc diag. */ 474 TSCMOD_DIAG_G_DSC_CFG , /*!< dsc related cfg. */ 475 TSCMOD_DIAG_G_UCODE , /*!< ucode FSM */ 476 TSCMOD_DIAG_G_PATTERN , /*!< test patterns */ 477 TSCMOD_DIAG_G_PATH , /*!< loopback, polarity, swap */ 478 TSCMOD_DIAG_G_PMAPMD , /*!< PMA/PMD */ 479 TSCMOD_DIAG_G_CL72 , /*!< CL72 */ 480 TSCMOD_DIAG_G_MISC1 , /*!< TBD */ 481 TSCMOD_DIAG_G_MISC2 , /*!< TBD */ 482 TSCMOD_DIAG_G_MISC3 , /*!< TBD */ 483 TSCMOD_DIAG_G_RXLOS , /* rxlos war */ 484 TSCMOD_DIAG_G_TYPE_ILLEGAL /*!< Illegal value. programmatic boundary. */ 485 } tscmod_diag_general_type; 486 487 /*! \def CNT_tscmod_diag_general_type Types of enum tscmod_diag_general_type */ 488 #define CNT_tscmod_diag_general_type 17 489 490 /*! 491 \brief 492 This array returns the string version of the enum #tscmod_port_type when indexed 493 by the enum var. 494 495 */ 496 extern char* e2s_tscmod_diag_general_type [CNT_tscmod_diag_general_type]; 497 /*! \enum tscmod_aspd_type 498 499 tscmod_aspd_type enumerates SW actual speed. 500 501 502 */ 503 504 typedef enum { 505 TSCMOD_ASPD_10M = 0 , /*!< Actual speed info */ 506 TSCMOD_ASPD_100M , /*!< */ 507 TSCMOD_ASPD_1000M , /*!< */ 508 TSCMOD_ASPD_2p5G_X1 , /*!< */ 509 TSCMOD_ASPD_5G_X4 , /*!< */ 510 TSCMOD_ASPD_6G_X4 , /*!< */ 511 TSCMOD_ASPD_10G_X4 , /*!< */ 512 TSCMOD_ASPD_10G_CX4 , /*!< */ 513 TSCMOD_ASPD_12G_X4 , /*!< */ 514 TSCMOD_ASPD_12p5G_X4 , /*!< */ 515 TSCMOD_ASPD_13G_X4 , /*!< */ 516 TSCMOD_ASPD_15G_X4 , /*!< */ 517 TSCMOD_ASPD_16G_X4 , /*!< */ 518 TSCMOD_ASPD_1G_KX1 , /*!< */ 519 TSCMOD_ASPD_10G_KX4 , /*!< */ 520 TSCMOD_ASPD_10G_KR1 , /*!< */ 521 TSCMOD_ASPD_5G_X1 , /*!< */ 522 TSCMOD_ASPD_6p36G_X1 , /*!< */ 523 TSCMOD_ASPD_20G_CX4 , /*!< */ 524 TSCMOD_ASPD_21G_X4 , /*!< */ 525 TSCMOD_ASPD_25p45G_X4 , /*!< */ 526 TSCMOD_ASPD_10G_X2_NOSCRAMBLE , /*!< */ 527 TSCMOD_ASPD_10G_CX2_NOSCRAMBLE , /*!< */ 528 TSCMOD_ASPD_10p5G_X2 , /*!< */ 529 TSCMOD_ASPD_10p5G_CX2_NOSCRAMBLE , /*!< */ 530 TSCMOD_ASPD_12p7G_X2 , /*!< */ 531 TSCMOD_ASPD_12p7G_CX2 , /*!< */ 532 TSCMOD_ASPD_10G_X1 , /*!< */ 533 TSCMOD_ASPD_40G_X4 , /*!< */ 534 TSCMOD_ASPD_20G_X2 , /*!< */ 535 TSCMOD_ASPD_20G_CX2 , /*!< */ 536 TSCMOD_ASPD_10G_SFI , /*!< */ 537 TSCMOD_ASPD_31p5G_X4 , /*!< */ 538 TSCMOD_ASPD_32p7G_X4 , /*!< */ 539 TSCMOD_ASPD_20G_X4 , /*!< */ 540 TSCMOD_ASPD_10G_X2 , /*!< */ 541 TSCMOD_ASPD_10G_CX2 , /*!< */ 542 TSCMOD_ASPD_12G_SCO_R2 , /*!< */ 543 TSCMOD_ASPD_10G_SCO_X2 , /*!< */ 544 TSCMOD_ASPD_40G_KR4 , /*!< */ 545 TSCMOD_ASPD_40G_CR4 , /*!< */ 546 TSCMOD_ASPD_100G_CR10 , /*!< */ 547 TSCMOD_ASPD_5G_X2 , /*!< */ 548 TSCMOD_ASPD_15p75G_X2 , /*!< */ 549 TSCMOD_ASPD_2G_FC , /*!< */ 550 TSCMOD_ASPD_4G_FC , /*!< */ 551 TSCMOD_ASPD_8G_FC , /*!< */ 552 TSCMOD_ASPD_10G_CX1 , /*!< */ 553 TSCMOD_ASPD_1G_CX1 , /*!< */ 554 TSCMOD_ASPD_20G_KR2 , /*!< */ 555 TSCMOD_ASPD_20G_CR2 , /*!< */ 556 TSCMOD_ASPD_TYPE_ILLEGAL /*!< Illegal value. programmatic boundary. */ 557 } tscmod_aspd_type; 558 559 /*! \def CNT_tscmod_aspd_type Types of enum tscmod_aspd_type */ 560 #define CNT_tscmod_aspd_type 52 561 562 /*! 563 \brief 564 This array returns the string version of the enum #tscmod_port_type when indexed 565 by the enum var. 566 567 */ 568 extern char* e2s_tscmod_aspd_type [CNT_tscmod_aspd_type]; 569 /*! 570 \brief 571 This array associates the enum #tscmod_lane_select enum with a bit mask. 572 The index is the #tscmod_lane_select enum value. The value for each entry is 573 interpreted as follows. If bit [n] is 1, then lane [n] is enabled; if bit [n] 574 is 0, then lane [n] is disabled. By enabled, we mean that such-and-such 575 function is to be called for a lane; by disabled, we mean that such-and-such 576 function is not to be called for a lane. So a value of 0xF indicates that all 577 lanes or enabled, while 0x5 indicates that only lanes 0 and 2 are enabled. 578 579 */ 580 extern int e2n_tscmod_aspd_type [CNT_tscmod_aspd_type]; 581 /*! \enum tscmod_model_type 582 583 tscmod_model_type enumerates different generations and revisions of TSC. 584 Note that we pretty much only look at different versions of TSC. 585 586 We rely on all the information being in the SERDES_ID register. 587 588 589 */ 590 591 typedef enum { 592 TSCMOD_WC = 0 , /*!< Generic TSC (any model) */ 593 TSCMOD_A0 , /*!< TSC Version A0 */ 594 TSCMOD_MODEL_TYPE_ILLEGAL /*!< Illegal value. programmatic boundary. */ 595 } tscmod_model_type; 596 597 /*! \def CNT_tscmod_model_type Types of enum tscmod_model_type */ 598 #define CNT_tscmod_model_type 3 599 600 /*! 601 \brief 602 This array returns the string version of the enum #tscmod_port_type when indexed 603 by the enum var. 604 605 */ 606 extern char* e2s_tscmod_model_type [CNT_tscmod_model_type]; 607 /*! \enum tscmod_an_type 608 609 tscmod_an_type enumerates different types of autoneg modes in TSC. 610 611 */ 612 613 typedef enum { 614 TSCMOD_AN_NONE = 0 , /*!< TSC autoneg not enabled */ 615 TSCMOD_CL73 , /*!< TSC autoneg CL73 enable */ 616 TSCMOD_CL37 , /*!< TSC autoneg CL37 enable */ 617 TSCMOD_CL37_10G , /*!< TSC autoneg CL37 enable, BR 10G */ 618 TSCMOD_CL73_BAM , /*!< TSC autoneg CL73 enable with Brcm Aneg Mode */ 619 TSCMOD_CL37_BAM , /*!< TSC autoneg CL37 enable with Brcm Aneg Mode */ 620 TSCMOD_CL37_SGMII , /*!< TSC autoneg for SGMII */ 621 TSCMOD_HPAM , /*!< TSC autoneg for HP aneg */ 622 TSCMOD_AN_TYPE_ILLEGAL /*!< Illegal value. programmatic boundary. */ 623 } tscmod_an_type; 624 625 /*! \def CNT_tscmod_an_type Types of enum tscmod_an_type */ 626 #define CNT_tscmod_an_type 9 627 628 /*! 629 \brief 630 This array returns the string version of the enum #tscmod_port_type when indexed 631 by the enum var. 632 633 */ 634 extern char* e2s_tscmod_an_type [CNT_tscmod_an_type]; 635 /*! \enum tscmod_tech_ability 636 637 tscmod_tech_ability enumerates different types of speed advertisements in the 638 basic autoneg page. Currently for CL73 and others, but excluding CL37BAM. 639 640 Currently all speeds have the following bit positions in tscmod_st 641 642 \li TSCMOD_ABILITY_1G_KX Bit Pos: 0 643 \li TSCMOD_ABILITY_10G_KX4 Bit Pos: 1 644 \li TSCMOD_ABILITY_10G_KR Bit Pos: 2 645 \li TSCMOD_ABILITY_40G_KR4 Bit Pos: 3 646 \li TSCMOD_ABILITY_40G_CR4 Bit Pos: 4 647 \li TSCMOD_ABILITY_100G_CR10 Bit Pos: 5 648 \li TSCMOD_ABILITY_20G_KR2 Bit Pos: 6 649 \li TSCMOD_ABILITY_20G_CR2 Bit Pos: 7 650 651 652 */ 653 654 typedef enum { 655 TSCMOD_ABILITY_1G_KX = 0 , /*!< CL73 speed 1G_KX ease */ 656 TSCMOD_ABILITY_10G_KX4 , /*!< please write comments */ 657 TSCMOD_ABILITY_10G_KR , /*!< please write comments */ 658 TSCMOD_ABILITY_40G_KR4 , /*!< please write comments */ 659 TSCMOD_ABILITY_40G_CR4 , /*!< please write comments */ 660 TSCMOD_ABILITY_100G_CR10 , /*!< please write comments */ 661 TSCMOD_ABILITY_20G_KR2 , /*!< please write comments */ 662 TSCMOD_ABILITY_20G_CR2 , /*!< please write comments */ 663 TSCMOD_ABILITY_ILLEGAL /*!< Illegal. Programmatic boundary */ 664 } tscmod_tech_ability; 665 666 /*! \def CNT_tscmod_tech_ability Types of enum tscmod_tech_ability */ 667 #define CNT_tscmod_tech_ability 9 668 669 /*! 670 \brief 671 This array returns the string version of the enum #tscmod_port_type when indexed 672 by the enum var. 673 674 */ 675 extern char* e2s_tscmod_tech_ability [CNT_tscmod_tech_ability]; 676 /*! 677 \brief 678 This array associates the enum #tscmod_lane_select enum with a bit mask. 679 The index is the #tscmod_lane_select enum value. The value for each entry is 680 interpreted as follows. If bit [n] is 1, then lane [n] is enabled; if bit [n] 681 is 0, then lane [n] is disabled. By enabled, we mean that such-and-such 682 function is to be called for a lane; by disabled, we mean that such-and-such 683 function is not to be called for a lane. So a value of 0xF indicates that all 684 lanes or enabled, while 0x5 indicates that only lanes 0 and 2 are enabled. 685 686 */ 687 extern int e2n_tscmod_tech_ability [CNT_tscmod_tech_ability]; 688 /*! \enum tscmod_cl37bam_ability 689 690 tscmod_cl37bam_ability enumerates different types of speed advertisements in the 691 basic autoneg page. Currently for CL37BAM only. 692 693 Currently all speeds have the following bit positions in tscmod_st 694 695 696 \li TSCMOD_BAM37ABL_2P5G Bit Pos: 0 697 \li TSCMOD_BAM37ABL_5G_X4 Bit Pos: 1 698 \li TSCMOD_BAM37ABL_6G_X4 Bit Pos: 2 699 \li TSCMOD_BAM37ABL_10G_HIGIG Bit Pos: 3 700 \li TSCMOD_BAM37ABL_10G_CX4 Bit Pos: 4 701 \li TSCMOD_BAM37ABL_12G_X4 Bit Pos: 5 702 \li TSCMOD_BAM37ABL_12P5_X4 Bit Pos: 6 703 \li TSCMOD_BAM37ABL_13G_X4 Bit Pos: 7 704 \li TSCMOD_BAM37ABL_15G_X4 Bit Pos: 8 705 \li TSCMOD_BAM37ABL_16G_X4 Bit Pos: 9 706 \li TSCMOD_BAM37ABL_20G_X4_CX4 Bit Pos: 10 707 \li TSCMOD_BAM37ABL_20G_X4 Bit Pos: 11 708 \li TSCMOD_BAM37ABL_21G_X4 Bit Pos: 12 709 \li TSCMOD_BAM37ABL_25P455G Bit Pos: 13 710 \li TSCMOD_BAM37ABL_31P5G Bit Pos: 14 711 \li TSCMOD_BAM37ABL_32P7G Bit Pos: 15 712 \li TSCMOD_BAM37ABL_40G Bit Pos: 16 713 \li TSCMOD_BAM37ABL_10G_X2_CX4 Bit Pos: 17 714 \li TSCMOD_BAM37ABL_10G_DXGXS Bit Pos: 18 715 \li TSCMOD_BAM37ABL_10P5G_DXGXS Bit Pos: 19 716 \li TSCMOD_BAM37ABL_12P7_DXGXS Bit Pos: 20 717 \li TSCMOD_BAM37ABL_15P75G_R2 Bit Pos: 21 718 \li TSCMOD_BAM37ABL_20G_X2_CX4 Bit Pos: 22 719 \li TSCMOD_BAM37ABL_20G_X2 Bit Pos: 23 720 721 722 */ 723 724 typedef enum { 725 TSCMOD_BAM37ABL_2P5G = 0 , /*!< X1 BRCM */ 726 TSCMOD_BAM37ABL_5G_X4 , /*!< BRCM */ 727 TSCMOD_BAM37ABL_6G_X4 , /*!< BRCM */ 728 TSCMOD_BAM37ABL_10G_HIGIG , /*!< HG (10G_X4) */ 729 TSCMOD_BAM37ABL_10G_CX4 , /*!< (10G_X4_CX4) */ 730 TSCMOD_BAM37ABL_12G_X4 , /*!< HG */ 731 TSCMOD_BAM37ABL_12P5_X4 , /*!< HG */ 732 TSCMOD_BAM37ABL_13G_X4 , /*!< HG */ 733 TSCMOD_BAM37ABL_15G_X4 , /*!< HG */ 734 TSCMOD_BAM37ABL_16G_X4 , /*!< HG */ 735 TSCMOD_BAM37ABL_20G_X4_CX4 , /*!< XAUI 8b10b scram(20G_X4S) */ 736 TSCMOD_BAM37ABL_20G_X4 , /*!< HG */ 737 TSCMOD_BAM37ABL_21G_X4 , /*!< HG */ 738 TSCMOD_BAM37ABL_25P455G , /*!< X4 HG */ 739 TSCMOD_BAM37ABL_31P5G , /*!< X4 HG */ 740 TSCMOD_BAM37ABL_32P7G , /*!< X4 HG */ 741 TSCMOD_BAM37ABL_40G , /*!< X4 BRCM HG (40G_X4) */ 742 TSCMOD_BAM37ABL_10G_X2_CX4 , /*!< 10G_X2_CX4 */ 743 TSCMOD_BAM37ABL_10G_DXGXS , /*!< 10G_X2 */ 744 TSCMOD_BAM37ABL_10P5G_DXGXS , /*!< 10P5_X2 */ 745 TSCMOD_BAM37ABL_12P7_DXGXS , /*!< 12P7_X2 */ 746 TSCMOD_BAM37ABL_15P75G_R2 , /*!< 15P75_X2 */ 747 TSCMOD_BAM37ABL_20G_X2_CX4 , /*!< 20G_X2_CX4 */ 748 TSCMOD_BAM37ABL_20G_X2 , /*!< 20G_X2 */ 749 TSCMOD_BAM37ABL_ILLEGAL /*!< Illegal. Programmatic boundary */ 750 } tscmod_cl37bam_ability; 751 752 /*! \def CNT_tscmod_cl37bam_ability Types of enum tscmod_cl37bam_ability */ 753 #define CNT_tscmod_cl37bam_ability 25 754 755 /*! 756 \brief 757 This array returns the string version of the enum #tscmod_port_type when indexed 758 by the enum var. 759 760 */ 761 extern char* e2s_tscmod_cl37bam_ability [CNT_tscmod_cl37bam_ability]; 762 /*! 763 \brief 764 This array associates the enum #tscmod_lane_select enum with a bit mask. 765 The index is the #tscmod_lane_select enum value. The value for each entry is 766 interpreted as follows. If bit [n] is 1, then lane [n] is enabled; if bit [n] 767 is 0, then lane [n] is disabled. By enabled, we mean that such-and-such 768 function is to be called for a lane; by disabled, we mean that such-and-such 769 function is not to be called for a lane. So a value of 0xF indicates that all 770 lanes or enabled, while 0x5 indicates that only lanes 0 and 2 are enabled. 771 772 */ 773 extern int e2n_tscmod_cl37bam_ability [CNT_tscmod_cl37bam_ability]; 774 /*! \enum tscmod_eye_direction 775 776 The direction of slicer changing always moves from the middle of the eye. 777 Currently all speeds have the following bit positions in tscmod_st 778 779 \li TSCMOD_EYE_VU: Vertical, Upward direction 780 \li TSCMOD_EYE_VD: Vertical, Downward direction 781 \li TSCMOD_EYE_HL: Horizontal, Left direction 782 \li TSCMOD_EYE_HR: Horizontal, Right direction 783 784 785 */ 786 787 typedef enum { 788 TSCMOD_EYE_VU = 0 , /*!< Vertical, Upward direction */ 789 TSCMOD_EYE_VD , /*!< Vertical, Downward direction */ 790 TSCMOD_EYE_HL , /*!< Horizontal, Left direction */ 791 TSCMOD_EYE_HR , /*!< Horizontal, Right direction */ 792 TSCMOD_EYE_ILLEGAL /*!< Programmatic illegal boundary. */ 793 } tscmod_eye_direction; 794 795 /*! \def CNT_tscmod_eye_direction Types of enum tscmod_eye_direction */ 796 #define CNT_tscmod_eye_direction 5 797 798 /*! 799 \brief 800 This array returns the string version of the enum #tscmod_port_type when indexed 801 by the enum var. 802 803 */ 804 extern char* e2s_tscmod_eye_direction [CNT_tscmod_eye_direction]; 805 #endif /* _TSCMOD_ENUM_DEFINES_H */