wcmod_enum_defines.h (30260B)
1 /* 2 * 3 * 4 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 5 * 6 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 7 */ 8 #include <sal/types.h> 9 /* FILE: wcmod_enum_defines.h */ 10 /* DATE: Mon Jun 13 10:28:56 PDT 2011 */ 11 12 13 /* This file is automatically generated. Do not modify it. Modify the 14 * inc/enum_desc.txt to change enums, elems, or comments. For issues about 15 * the process that creates this file contact the wcmod development team. 16 */ 17 18 #ifndef _WCMOD_ENUM_DEFINES_H 19 #define _WCMOD_ENUM_DEFINES_H 20 21 /*! \enum wcmod_lane_select 22 23 A '1' in the latter part of the enum name signifies that the lane is selected. 24 Other parameters in the warpcore context will decide what to do with the 25 selected lane(s). In most cases we either enable or disable a feature on the 26 selected lanes. 27 28 In the future, multiple lanes can be supported with a single call (for example, 29 disable autoneg on lanes 1, and 3. only.) 30 But currently Tier1s only support operations on a single lane. If multiple 31 lanes need to be programmed, multiple calls to Tier1s should be made. 32 33 Lane selection is enumerated to avoid wrong selection of lanes. 34 35 In the future release, we can select all lanes, but not be in broadcast mode. 36 Currently lane_select is set to WCMOD_LANE_BCST to broadcast to all lanes. 37 38 Note that when you write, data is broadcast to registers of all lanes. But when 39 you read in broadcast mode, the value of the register in lane 0 is returned. 40 41 */ 42 43 typedef enum { 44 WCMOD_LANE_0_0_0_1 = 0 , /*!< lane number 0 selected */ 45 WCMOD_LANE_0_0_1_0 , /*!< lane number 1 selected */ 46 WCMOD_LANE_0_0_1_1 , /*!< lane numbers 0,1 selected */ 47 WCMOD_LANE_0_1_0_0 , /*!< lane number 2 selected */ 48 WCMOD_LANE_0_1_0_1 , /*!< lane numbers 2,0 selected */ 49 WCMOD_LANE_0_1_1_0 , /*!< lane numbers 2,1 selected */ 50 WCMOD_LANE_0_1_1_1 , /*!< lane numbers 2,1,0 selected */ 51 WCMOD_LANE_1_0_0_0 , /*!< lane number 3 selected */ 52 WCMOD_LANE_1_0_0_1 , /*!< lane numbers 3,0 selected */ 53 WCMOD_LANE_1_0_1_0 , /*!< lane numbers 3,1 selected */ 54 WCMOD_LANE_1_0_1_1 , /*!< lane numbers 3,1,0 selected */ 55 WCMOD_LANE_1_1_0_0 , /*!< lane numbers 3,2 selected */ 56 WCMOD_LANE_1_1_0_1 , /*!< lane numbers 3,2,0 selected */ 57 WCMOD_LANE_1_1_1_0 , /*!< lane numbers 3,2,1 selected */ 58 WCMOD_LANE_1_1_1_1 , /*!< lane numbers 3,2,1,0 selected */ 59 WCMOD_LANE_BCST , /*!< lane numbers 3,2,1,0 BCST */ 60 WCMOD_LANE_0_0_0_1_0_0_0_0 , /*!< lane number 4 selected for QSGMII */ 61 WCMOD_LANE_0_0_1_0_0_0_0_0 , /*!< lane number 5 selected for QSGMII */ 62 WCMOD_LANE_0_1_0_0_0_0_0_0 , /*!< lane number 6 selected for QSGMII */ 63 WCMOD_LANE_1_0_0_0_0_0_0_0 , /*!< lane number 7 selected for QSGMII */ 64 WCMOD_LANE_0_0_0_1_0_0_0_1 , /*!< lane number 0 and lane 4 selected for QSGMII */ 65 WCMOD_LANE_1_1_1_1_1_1_1_1 , /*!< lane number 7 through 0 selected for QSGMII */ 66 WCMOD_LANE_ILLEGAL /*!< Illegal (programmatic boundary) */ 67 } wcmod_lane_select; 68 69 /*! \def CNT_wcmod_lane_select Types of enum wcmod_lane_select */ 70 #define CNT_wcmod_lane_select 23 71 72 /*! 73 \brief 74 This array returns the string version of the enum #wcmod_lane_select when indexed by the 75 enum var. 76 77 */ 78 extern char* e2s_wcmod_lane_select [CNT_wcmod_lane_select]; 79 /*! 80 \brief 81 This array associates the enum #wcmod_lane_select enum with a bit mask. 82 The index is the #wcmod_lane_select enum value. The value for each entry is 83 interpreted as follows. If bit [n] is 1, then lane [n] is enabled; if bit [n] 84 is 0, then lane [n] is disabled. By enabled, we mean that such-and-such 85 function is to be called for a lane; by disabled, we mean that such-and-such 86 function is not to be called for a lane. So a value of 0xF indicates that all 87 lanes or enabled, while 0x5 indicates that only lanes 0 and 2 are enabled. 88 89 */ 90 extern int e2n_wcmod_lane_select [CNT_wcmod_lane_select]; 91 /*! \enum wcmod_spd_intfc_set 92 93 All legal speed-interface combination are encapsulated in this enum 94 95 There are 42 speed and interface combinations allowed for a logical Warpcore 96 port. Names and speeds are self explanatory. 97 98 Speed and interface selection is combined because we don't want the speeds 99 to be incompatible with interface. 100 101 */ 102 103 typedef enum { 104 WCMOD_SPD_ZERO = 0 , /*!< Illegal value (programmatic boundary) */ 105 WCMOD_SPD_10_SGMII , /*!< 10Mb SGMII (serial, customer prop.) */ 106 WCMOD_SPD_100_SGMII , /*!< 100Mb SGMII (serial, customer prop.) */ 107 WCMOD_SPD_100_FX , /*!< 100Mb fiber */ 108 WCMOD_SPD_1000_SGMII , /*!< 1Gb SGMII (serial, customer prop.) */ 109 WCMOD_SPD_2000 , /*!< 2Gb serial(qsgmii serdes only) */ 110 WCMOD_SPD_1000_FIBER , /*!< 1Gb 1000BASE-X (serial) */ 111 WCMOD_SPD_2500 , /*!< 2.5Gb (BRCM prop.) based on 1000BASE-X */ 112 WCMOD_SPD_5000 , /*!< 5Gb XAUI (BRCM prop.) */ 113 WCMOD_SPD_6000 , /*!< 6b XAUI (BRCM prop.) */ 114 WCMOD_SPD_10000_HI , /*!< 10Gb XAUI HiG (BRCM prop.) */ 115 WCMOD_SPD_10000 , /*!< 10Gb XAUI */ 116 WCMOD_SPD_12000_HI , /*!< 10Gb XAUI HiG (BRCM prop.) */ 117 WCMOD_SPD_12500 , /*!< 12.5Gb XAUI (BRCM prop.) */ 118 WCMOD_SPD_13000 , /*!< 13Gb XAUI (BRCM prop.) */ 119 WCMOD_SPD_15000 , /*!< 15Gb XAUI (BRCM prop.) */ 120 WCMOD_SPD_16000 , /*!< 16Gb XAUI (BRCM prop.) */ 121 WCMOD_SPD_5000_SINGLE , /*!< 5Gb serial (BRCM prop.) */ 122 WCMOD_SPD_6364_SINGLE , /*!< 6.3Gb serial (BRCM prop.) */ 123 WCMOD_SPD_20000 , /*!< 20Gb XAUI (BRCM prop.) */ 124 WCMOD_SPD_21000 , /*!< 21Gb XAUI (BRCM prop.) */ 125 WCMOD_SPD_25455 , /*!< 25Gb XAUI (BRCM prop.) 64/66 codec */ 126 WCMOD_SPD_10000_HI_DXGXS , /*!< 10Gb dual lane XGXS HiG (BRCM prop.) */ 127 WCMOD_SPD_10000_DXGXS , /*!< 10Gb dual lane XGXS (BRCM prop.) */ 128 WCMOD_SPD_10500_HI_DXGXS , /*!< 10.5Gb dual lane XGXS HiG (BRCM prop.) */ 129 WCMOD_SPD_10500_DXGXS , /*!< 10.5Gb dual lane XGXS (BRCM prop.) */ 130 WCMOD_SPD_12773_HI_DXGXS , /*!< 12.73Gb dual lane XGXS HiG (BRCM prop.) */ 131 WCMOD_SPD_12773_DXGXS , /*!< 12.73Gb dual lane XGXS (BRCM prop.) */ 132 WCMOD_SPD_31500 , /*!< 31.5Gb quad lane XAUI (BRCM prop.) */ 133 WCMOD_SPD_40G , /*!< 40Gb quad lane XAUI (BRCM prop.) */ 134 WCMOD_SPD_42G , /*!< 42Gb quad lane XAUI (BRCM prop.) */ 135 WCMOD_SPD_10000_XFI , /*!< 10Gb serial XFI */ 136 WCMOD_SPD_10000_SFI , /*!< 10Gb serial SFI */ 137 WCMOD_SPD_10600_XFI_HG , /*!< 10.5Gb serial XFI (HgSOLO) */ 138 WCMOD_SPD_20000_SCR , /*!< 20Gb XAUI scrambled output */ 139 WCMOD_SPD_10000_HI_DXGXS_SCR , /*!< 10Gb dual lane scrambled output HiG */ 140 WCMOD_SPD_10000_DXGXS_SCR , /*!< 10Gb dual lane scrambled output */ 141 WCMOD_SPD_X2_10000 , /*!< 10Gb dual lane customer prop. */ 142 WCMOD_SPD_X2_23000 , /*!< 2*11.5Gb dual lane customer prop. */ 143 WCMOD_SPD_20000_HI_DXGXS , /*!< 20Gb dual lane HiG */ 144 WCMOD_SPD_40G_KR4 , /*!< 40Gb quad lane MLD backplane */ 145 WCMOD_SPD_40G_CR4 , /*!< 40Gb quad lane MLD copper cable */ 146 WCMOD_SPD_15750_HI_DXGXS , /*!< 15.75Gb scrambled dual lane HiG(BRCM prop) */ 147 WCMOD_SPD_21G_HI_DXGXS , /*!< 21.2Gb dual HiG(BRCM prop.)(20+plldiv=70) */ 148 WCMOD_SPD_R2_12000 , /*!< 12Gb dual customer prop.) */ 149 WCMOD_SPD_PCSBYP_3P125G , /*!< 3.125Gb serial pcbbyp */ 150 WCMOD_SPD_PCSBYP_5G , /*!< 5.75 Gb serial pcbbyp */ 151 WCMOD_SPD_PCSBYP_5P75G , /*!< 5.75 Gb serial pcbbyp */ 152 WCMOD_SPD_PCSBYP_6P25G , /*!< 6.250Gb serial pcbbyp */ 153 WCMOD_SPD_PCSBYP_10P3125 , /*!< 10P3125Gb serial */ 154 WCMOD_SPD_PCSBYP_10P9375 , /*!< 10P9375Gb serial */ 155 WCMOD_SPD_PCSBYP_11P5 , /*!< 11P5Gb serial */ 156 WCMOD_SPD_11P5 , /*!< 11P5Gb with PCS serial */ 157 WCMOD_SPD_PCSBYP_12P5 , /*!< 12P5Gb serial */ 158 WCMOD_SPD_12P5 , /*!< 12P5Gb with PCS serial */ 159 WCMOD_SPD_40G_XLAUI , /*!< 40Gb quad lane MLD copper trace */ 160 WCMOD_SPD_42G_XLAUI , /*!< 42Gb quad lane MLD copper trace */ 161 WCMOD_SPD_42G_KR4 , /*!< 42Gb quad lane MLD backplane */ 162 WCMOD_SPD_20G_DXGXS , /*!< 20Gb dual lane */ 163 WCMOD_SPD_20G_KR2 , /*!< 20Gb MLD backplane */ 164 WCMOD_SPD_20G_CR2 , /*!< 20Gb MLD copper */ 165 WCMOD_SPD_100G_CR10 , /*!< 100G */ 166 WCMOD_SPD_120G_CR12 , /*!< 120G */ 167 WCMOD_SPD_CUSTOM_BYPASS , /*!< generic pcs bypass speed mode */ 168 WCMOD_SPD_1G_QSGMII , /*!< 1G QSGMII */ 169 WCMOD_SPD_48G , /*!< ethernet 12.5G per lane */ 170 WCMOD_SPD_20G_DXGXS_SCR , /*!< 20Gb dual scrambled lane */ 171 WCMOD_SPD_44G , /*!< ethernet 11.5G per lane */ 172 WCMOD_SPD_ILLEGAL /*!< Illegal value (programmatic boundary) */ 173 } wcmod_spd_intfc_set; 174 175 /*! \def CNT_wcmod_spd_intfc_set Types of enum wcmod_spd_intfc_set */ 176 #define CNT_wcmod_spd_intfc_set 69 177 178 /*! 179 \brief 180 This array returns the string version of the enum #wcmod_lane_select when indexed by the 181 enum var. 182 183 */ 184 extern char* e2s_wcmod_spd_intfc_set [CNT_wcmod_spd_intfc_set]; 185 /*! 186 \brief 187 This array associates the enum #wcmod_lane_select enum with a bit mask. 188 The index is the #wcmod_lane_select enum value. The value for each entry is 189 interpreted as follows. If bit [n] is 1, then lane [n] is enabled; if bit [n] 190 is 0, then lane [n] is disabled. By enabled, we mean that such-and-such 191 function is to be called for a lane; by disabled, we mean that such-and-such 192 function is not to be called for a lane. So a value of 0xF indicates that all 193 lanes or enabled, while 0x5 indicates that only lanes 0 and 2 are enabled. 194 195 */ 196 extern int e2n_wcmod_spd_intfc_set [CNT_wcmod_spd_intfc_set]; 197 /*! \enum wcmod_mdio_type 198 199 Types of MDIO to access warpcore registers. 22 (32 registers) and 45 are 200 supported. Picking 22 automatically selects BRCM prop.) clause 22 mode 201 with extensions for 64K registers. Actual clause 22 is not yet supported. 202 203 */ 204 205 typedef enum { 206 WCMOD_MDIO_CL22 = 0 , /*!< IEEE clause 22 (BRCM prop.) based MDIO */ 207 WCMOD_MDIO_CL45 , /*!< IEEE clause 45 based MDIO */ 208 WCMOD_MDIO_CL22_IEEE , /*!< IEEE clause 22 (not BRCM prop.) based MDIO */ 209 WCMOD_MDIO_PCB , /*!< For verilog only (drive parallel bus) */ 210 WCMOD_MDIO_ILLEGAL /*!< */ 211 } wcmod_mdio_type; 212 213 /*! \def CNT_wcmod_mdio_type Types of enum wcmod_mdio_type */ 214 #define CNT_wcmod_mdio_type 5 215 216 /*! 217 \brief 218 This array returns the string version of the enum #wcmod_mdio_type when indexed 219 by the enum var. 220 221 */ 222 extern char* e2s_wcmod_mdio_type [CNT_wcmod_mdio_type]; 223 /*! \enum wcmod_port_type 224 225 This is the port mode type enumeration. 226 227 WC can be configured in combo mode (i.e. entire WC is a single port) or 228 independent mode (i.e. WC has more than one port (2, 3, or 4) that are 229 controlled individually. 230 231 */ 232 233 typedef enum { 234 WCMOD_COMBO = 0 , /*!< Combo mode treats 4 channels as one logical port */ 235 WCMOD_INDEPENDENT , /*!< Each channel is one logical port */ 236 WCMOD_DXGXS , /*!< Each paired channel(0-1, 2-3) is one logical port */ 237 WCMOD_PORT_MODE_ILLEGAL /*!< */ 238 } wcmod_port_type; 239 240 /*! \def CNT_wcmod_port_type Types of enum wcmod_port_type */ 241 #define CNT_wcmod_port_type 4 242 243 /*! 244 \brief 245 This array returns the string version of the enum #wcmod_port_type when indexed 246 by the enum var. 247 248 */ 249 extern char* e2s_wcmod_port_type [CNT_wcmod_port_type]; 250 251 /*! \enum firmware_mode_type 252 253 This is the firmware_mode type enumeration. 254 255 microController can be configured in SFP_OPT_SR4, SFP_DAC 256 , XLAUI, etc ... 257 258 */ 259 260 typedef enum { 261 WCMOD_DEFAULT = 0 , /*!< default mode */ 262 WCMOD_SFP_OPT_SR4 , /*!< SFP-OPT-SR4 */ 263 WCMOD_SFP_DAC , /*!< SFP-DAC */ 264 WCMOD_XLAUI , /*!< XLAUI */ 265 WCMOD_FORCE_OSDFE , /*!< FORCE_OSDFE */ 266 WCMOD_FORCE_BRDFE , /*!< FORCE_BRDFE */ 267 WCMOD_SW_CL72 , /*!< SW_CL72 */ 268 WCMOD_CL72_woAN , /*!<CL72_woAN */ 269 WCMOD_FIRMWARE_MODE_ILLEGAL 270 } wcmod_firmware_mode_type; 271 272 /*! \def CNT_wcmod_port_type Types of enum wcmod_firmware_mode_type */ 273 #define CNT_wcmod_firmware_mode_type 9 274 275 276 /*! 277 \brief 278 This array returns the string version of the enum #wcmod_firmware_mode_type when indexed 279 by the enum var. 280 281 */ 282 extern char* e2s_wcmod_firmware_mode_type [CNT_wcmod_firmware_mode_type]; 283 /*! \enum wcmod_os_type 284 285 Oversampling type. The oversampling is fixed for combo. But can be configured 286 in independent mode to either 0S5 or OS8 287 288 */ 289 290 typedef enum { 291 WCMOD_OS1 = 0 , /*!< Hardly ever used. */ 292 WCMOD_OS3 , /*!< Hardly ever used. */ 293 WCMOD_OS5 , /*!< WC Independent mode can have OS5 or OS8 */ 294 WCMOD_OS6 , /*!< This mode is exclusive to QUAD_SGMII */ 295 WCMOD_OS_IND_LANE , /*!< This mode is exclusive to XENIA */ 296 WCMOD_OS8 , /*!< WC Independent mode can have OS5 or OS8 */ 297 WCMOD_OS_ILLEGAL /*!< */ 298 } wcmod_os_type; 299 300 /*! \def CNT_wcmod_os_type Types of enum wcmod_os_type */ 301 #define CNT_wcmod_os_type 7 302 303 /*! 304 \brief 305 This array returns the string version of the enum #wcmod_port_type when indexed 306 by the enum var. 307 308 */ 309 extern char* e2s_wcmod_os_type [CNT_wcmod_os_type]; 310 /*! \enum wcmod_duplex_type 311 312 wcmod_duplex_type Duplex types (only half and full duplex supported) 313 314 */ 315 316 typedef enum { 317 WCMOD_SIMPLEX = 0 , /*!< This is never used in WC or any modern PHY chips */ 318 WCMOD_HALF_DUPLEX , /*!< This is relevent only for 1G and below */ 319 WCMOD_DUPLEX , /*!< This is default for 10G and above */ 320 WCMOD_DUPLEX_ILLEGAL /*!< Illegal value. programmatic boundary. */ 321 } wcmod_duplex_type; 322 323 /*! \def CNT_wcmod_duplex_type Types of enum wcmod_duplex_type */ 324 #define CNT_wcmod_duplex_type 4 325 326 /*! 327 \brief 328 This array returns the string version of the enum #wcmod_port_type when indexed 329 by the enum var. 330 331 */ 332 extern char* e2s_wcmod_duplex_type [CNT_wcmod_duplex_type]; 333 /*! \enum wcmod_diag_type 334 335 wcmod_diag_type enumerates categories of diagnostic data. 336 has many intermediate stages between down and up. This enum is work in progress 337 338 339 <table cellspacing=0> 340 <tr><td colspan=3><B>'per_lane_control' bit-mappings</B></td></tr> 341 342 <tr><td><B>Type</B></td><td><B>Description</B></td><td><B>Scope</B></td></tr> 343 344 <tr><td>General</td> 345 <td> Combo/independent, Device and Revision Id, VCO settings, Firmware state 346 and version, active/passive lanes, MDIO type. PLL info, Oversampling Info</td> 347 <td>Device</td></tr> 348 349 <tr><td>Link</td> 350 <td> Speeds, oversampling, interface, forced/Autoneg, link status, sync 351 status, RX sequencer on/off </td> 352 <td>Lane</td></tr> 353 354 <tr><td>Autoneg</td> 355 <td> Local and remote advertisement, link status, cl73/37/BAM info </td> 356 <td>Lane</td></tr> 357 358 <tr><td>Internal Traffic</td> 359 <td> PRBS type, CJPat Type, Prog_data value, Any associated recorded errors, 360 and misc. info (IPG etc.)</td> 361 <td>Lane </td></tr> 362 363 <tr> 364 <td>DFE</td> 365 <td>Equalization info, Tap settings. (pre/post/overrides), peaking filter values </td> 366 <td>Lane</td></tr> 367 368 <tr><td>IEEE info</td> 369 <td>Clause 72, FEC</td> 370 <td>Lane</td></tr> 371 372 <tr><td>Topology</td> 373 <td>Looping info (Gloop/rloop), lane swapping, polarity swap info</td> 374 <td>Device</td></tr> 375 376 <tr><td>EEE</td> 377 <td>EEE full, passthru modes, some window values?</td> 378 <td>Lane</td></tr> 379 380 <tr><td>Eye Margin</td> 381 <td>Eye margin measurement (readout only)</td> 382 <td>Lane</td></tr> 383 384 <tr><td>All</td> 385 <td>All of the above. Except eye margin.</td> 386 <td>Device</td></tr> 387 388 </table> 389 390 391 */ 392 393 typedef enum { 394 WCMOD_DIAG_GENERAL = 0x00001 , /*!< General device wide information. */ 395 WCMOD_DIAG_LINK = 0x00002 , /*!< Link specific info. */ 396 WCMOD_DIAG_ANEG = 0x00004 , /*!< Autoneg specific info. */ 397 WCMOD_DIAG_TFC = 0x00008 , /*!< State of tx/rx internal tfc */ 398 WCMOD_DIAG_DFE = 0x00010 , /*!< DFE related info. */ 399 WCMOD_DIAG_SLICERS = 0x00020 , /*!< P1, M1, D slicer values. */ 400 WCMOD_DIAG_TX_AMPS = 0x00040 , /*!< Idriver, Predriver, post2_coef */ 401 WCMOD_DIAG_TX_TAPS = 0x00080 , /*!< Pre, Main, Post */ 402 WCMOD_DIAG_RX_TAPS = 0x00100 , /*!< PF, VGA, TAP1 through TAP5 */ 403 WCMOD_DIAG_IEEE = 0x00200 , /*!< IEEE related info */ 404 WCMOD_DIAG_TOPOLOGY = 0x00400 , /*!< Loopbacks etc. */ 405 WCMOD_DIAG_EEE = 0x00800 , /*!< EEE */ 406 WCMOD_DIAG_EYE = 0x01000 , /*!< eye margin msmt */ 407 WCMOD_DIAG_SPEED = 0x02000 , /*!< sub-category of WCMOD_DIAG_LINK(for SDK) */ 408 WCMOD_DIAG_TX_LOOPBACK = 0x04000 , /*!< sub-category of WCMOD_DIAG_TOPOLOGY(for SDK) */ 409 WCMOD_DIAG_RX_LOOPBACK = 0x08000 , /*!< sub-category of WCMOD_DIAG_TOPOLOGY(for SDK) */ 410 WCMOD_DIAG_RX_PPM = 0x10000 , /*!< ppm offset that receiver is tracking */ 411 WCMOD_DIAG_PRBS = 0x20000 , /*!< prbs info */ 412 WCMOD_DIAG_RX_SIGDET = 0x40000 , /*!< Per lane rx signal detect info. */ 413 WCMOD_DIAG_POLARITY = 0x80000 , /*!< per lane rx/tx polarity */ 414 WCMOD_DIAG_RX_PCS_BYPASS_LOOPBACK = 0x100000 , /*!< sub-category of WCMOD_DIAG_TOPOLOGY(for SDK) */ 415 WCMOD_DIAG_PRBS_DECOUPLE_TX = 0x200000 , /*!< sub-category of WCMOD_DIAG_TOPOLOGY(for SDK) */ 416 WCMOD_DIAG_PRBS_DECOUPLE_RX = 0x400000 , /*!< sub-category of WCMOD_DIAG_TOPOLOGY(for SDK) */ 417 WCMOD_DIAG_TX_SQUELCH = 0x800000 , /*!< sub-category of WCMOD_Diag for tx_squelch(for SDK) */ 418 WCMOD_DIAG_ALL = 0xffffff , /*!< Everything but eye margin */ 419 WCMOD_DIAG_ILLEGAL = 0x000000 /*!< Illegal value. programmatic boundary. */ 420 } wcmod_diag_type; 421 422 /*! \def CNT_wcmod_diag_type Types of enum wcmod_diag_type */ 423 #define CNT_wcmod_diag_type 25 424 425 /*! 426 \brief 427 This array returns the string version of the enum #wcmod_port_type when indexed 428 by the enum var. 429 430 */ 431 extern char* e2s_wcmod_diag_type [CNT_wcmod_diag_type]; 432 433 typedef enum { 434 WCMOD_INFO_DSC = 0x000000 , 435 WCMOD_INFO_RD = 0x000004 , 436 WCMOD_INFO_WR = 0x000008 , 437 WCMOD_INFO_SPEED = 0x000010 , 438 WCMOD_INFO_ANEG = 0x000020 , 439 WCMOD_INFO_TX_AMPS = 0x000040 , /* same position as WCMOD_DIAG_TX_AMPS, and below */ 440 WCMOD_INFO_TX_TAPS = 0x000080 , 441 WCMOD_INFO_RX_TAPS = 0x000100 , 442 WCMOD_INFO_IEEE = 0x000200 , 443 WCMOD_INFO_TOPOLOGY = 0x000400 , 444 WCMOD_INFO_EEE = 0x000800 , 445 WCMOD_INFO_EYE = 0x001000 , /* 0x002000 is not defined */ 446 WCMOD_INFO_TX_LOOPBACK = 0x004000 , 447 WCMOD_INFO_RX_LOOPBACK = 0x008000 , 448 WCMOD_INFO_RX_PPM = 0x010000 , 449 WCMOD_INFO_PRBS = 0x020000 , 450 WCMOD_INFO_RX_SIGDET = 0x040000 , 451 WCMOD_INFO_POLARITY = 0x080000 , /* same position as WCMOD_DIAG_POLARITY, and above */ 452 WCMOD_INFO_TFC = 0x100000 , 453 WCMOD_INFO_DFE = 0x200000 , 454 WCMOD_INFO_SLICERS = 0x400000 , 455 WCMOD_INFO_ALL = 0x800000 , /* 0x80_0000 */ 456 WCMOD_INFO_ALL_LANES =0x1000000 /*0x100_0000 */ 457 } wcmod_info_type; 458 459 460 461 /*! \enum wcmod_model_type 462 463 wcmod_model_type enumerates different generations and revisions of warpcore. 464 Note that we pretty much only look at different versions of Warpcore. 465 466 We rely on all the information being in the SERDES_ID register. 467 468 469 */ 470 471 typedef enum { 472 WCMOD_WC = 0 , /*!< Generic Warpcore (any model) */ 473 WCMOD_WC_A0 , /*!< Warpcore Version A0 */ 474 WCMOD_WC_A1 , /*!< Warpcore Version A1 */ 475 WCMOD_WC_A2 , /*!< Warpcore Version A2 */ 476 WCMOD_WC_B0 , /*!< Warpcore Version B0 */ 477 WCMOD_WC_B1 , /*!< Warpcore Version B1 */ 478 WCMOD_WC_B2 , /*!< Warpcore Version B2 */ 479 WCMOD_WC_C0 , /*!< Warpcore Version C0, model no. differs from other WCs */ 480 WCMOD_WC_C1 , /*!< Warpcore Version C1, model no. differs from other WCs */ 481 WCMOD_WC_C2 , /*!< Warpcore Version C2, model no. differs from other WCs */ 482 WCMOD_WC_D0 , /*!< Warpcore Version D0 */ 483 WCMOD_WC_D1 , /*!< Warpcore Version D1 */ 484 WCMOD_WC_D2 , /*!< Warpcore Version D2 */ 485 WCMOD_XN , /*!< Generic Xenia Core (any model) */ 486 WCMOD_WL , /*!< Generic Warpcore Lite (any model) */ 487 WCMOD_WL_A0 , /*!< WarpLite Core A0*/ 488 WCMOD_WL_B0 , /*!< WarpLite Core B0*/ 489 WCMOD_QS , /*!< Generic QSGMII core (any model) */ 490 WCMOD_QS_A0 , /*!< QSGMII core Version A0 */ 491 WCMOD_QS_B0 , /*!< QSGMII core Version B0 */ 492 WCMOD_MODEL_TYPE_ILLEGAL /*!< Illegal value. programmatic boundary. */ 493 } wcmod_model_type; 494 495 /*! \def CNT_wcmod_model_type Types of enum wcmod_model_type */ 496 #define CNT_wcmod_model_type 21 497 498 /*! 499 \brief 500 This array returns the string version of the enum #wcmod_port_type when indexed 501 by the enum var. 502 503 */ 504 extern char* e2s_wcmod_model_type [CNT_wcmod_model_type]; 505 /*! \enum wcmod_an_type 506 507 wcmod_an_type enumerates different types of autoneg modes in warpcore. 508 509 */ 510 511 typedef enum { 512 WCMOD_CL73 = 0 , /*!< Warpcore autoneg CL73 enable */ 513 WCMOD_CL37 , /*!< Warpcore autoneg CL37 enable */ 514 WCMOD_CL73_BAM , /*!< Warpcore autoneg CL73 enable with Brcm Aneg Mode */ 515 WCMOD_CL37_BAM , /*!< Warpcore autoneg CL37 enable with Brcm Aneg Mode */ 516 WCMOD_AN_TYPE_ILLEGAL /*!< Illegal value. programmatic boundary. */ 517 } wcmod_an_type; 518 519 /*! \def CNT_wcmod_an_type Types of enum wcmod_an_type */ 520 #define CNT_wcmod_an_type 5 521 522 /*! 523 \brief 524 This array returns the string version of the enum #wcmod_port_type when indexed 525 by the enum var. 526 527 */ 528 extern char* e2s_wcmod_an_type [CNT_wcmod_an_type]; 529 /*! \enum wcmod_tech_ability 530 531 wcmod_tech_ability enumerates different types of speed advertisements in the 532 basic autoneg page. Currently for CL73 only. 533 534 Currently all speeds have the following bit positions in wcmod_st 535 536 \li WCMOD_ABILITY_1G_KX Bit Pos: 0 537 \li WCMOD_ABILITY_10G_KX4 Bit Pos: 1 538 \li WCMOD_ABILITY_10G_KR Bit Pos: 2 539 \li WCMOD_ABILITY_40G_KR4 Bit Pos: 3 540 \li WCMOD_ABILITY_40G_CR4 Bit Pos: 4 541 \li WCMOD_ABILITY_100G_CR10 Bit Pos: 5 542 \li WCMOD_ABILITY_2P5G Bit Pos: 6 543 \li WCMOD_ABILITY_5G_X4 Bit Pos: 7 544 \li WCMOD_ABILITY_6G_X4 Bit Pos: 8 545 \li WCMOD_ABILITY_10G_HIGIG Bit Pos: 9 546 \li WCMOD_ABILITY_10G_CX4 Bit Pos: 10 547 \li WCMOD_ABILITY_12G_X4 Bit Pos: 11 548 \li WCMOD_ABILITY_12P5_X4 Bit Pos: 12 549 \li WCMOD_ABILITY_13G_X4 Bit Pos: 13 550 \li WCMOD_ABILITY_15G_X4 Bit Pos: 14 551 \li WCMOD_ABILITY_16G_X4 Bit Pos: 15 552 \li WCMOD_ABILITY_20G_X4 Bit Pos: 16 553 \li WCMOD_ABILITY_40G Bit Pos: 17 554 \li WCMOD_ABILITY_31P5G Bit Pos: 18 555 \li WCMOD_ABILITY_25P455G Bit Pos: 19 556 \li WCMOD_ABILITY_21G_X4 Bit Pos: 20 557 \li WCMOD_ABILITY_20G_X4S Bit Pos: 21 558 \li WCMOD_ABILITY_10G_DXGXS_HIGIG Bit Pos: 22 559 \li WCMOD_ABILITY_10G_DXGXS Bit Pos: 23 560 \li WCMOD_ABILITY_10P5G_DXGXS Bit Pos: 24 561 \li WCMOD_ABILITY_12P5_DXGXS Bit Pos: 25 562 \li WCMOD_ABILITY_20G_KR2_HIGIG Bit Pos: 26 563 \li WCMOD_ABILITY_20G_KR2 Bit Pos: 27 564 \li WCMOD_ABILITY_15P75G_R2 Bit Pos: 28 565 566 567 */ 568 569 typedef enum { 570 WCMOD_ABILITY_1G_KX = 0 , /*!< CL73 speed 1G_KX ease */ 571 WCMOD_ABILITY_10G_KX4 , /*!< please write comments */ 572 WCMOD_ABILITY_10G_KR , /*!< please write comments */ 573 WCMOD_ABILITY_40G_KR4 , /*!< please write comments */ 574 WCMOD_ABILITY_40G_CR4 , /*!< please write comments */ 575 WCMOD_ABILITY_100G_CR10 , /*!< please write comments */ 576 WCMOD_ABILITY_2P5G , /*!< please write comments */ 577 WCMOD_ABILITY_5G_X4 , /*!< please write comments */ 578 WCMOD_ABILITY_6G_X4 , /*!< please write comments */ 579 WCMOD_ABILITY_10G_HIGIG , /*!< please write comments */ 580 WCMOD_ABILITY_10G_CX4 , /*!< please write comments */ 581 WCMOD_ABILITY_12G_X4 , /*!< please write comments */ 582 WCMOD_ABILITY_12P5_X4 , /*!< please write comments */ 583 WCMOD_ABILITY_13G_X4 , /*!< please write comments */ 584 WCMOD_ABILITY_15G_X4 , /*!< please write comments */ 585 WCMOD_ABILITY_16G_X4 , /*!< please write comments */ 586 WCMOD_ABILITY_20G_X4 , /*!< please write comments */ 587 WCMOD_ABILITY_40G , /*!< please write comments */ 588 WCMOD_ABILITY_31P5G , /*!< please write comments */ 589 WCMOD_ABILITY_25P455G , /*!< please write comments */ 590 WCMOD_ABILITY_21G_X4 , /*!< please write comments */ 591 WCMOD_ABILITY_20G_X4S , /*!< XAUI 8b10b scrambled data */ 592 WCMOD_ABILITY_10G_DXGXS_HIGIG , /*!< please write comments */ 593 WCMOD_ABILITY_10G_DXGXS , /*!< please write comments */ 594 WCMOD_ABILITY_10P5G_DXGXS , /*!< please write comments */ 595 WCMOD_ABILITY_12P5_DXGXS , /*!< please write comments */ 596 WCMOD_ABILITY_20G_KR2_HIGIG , /*!< please write comments */ 597 WCMOD_ABILITY_20G_KR2 , /*!< please write comments */ 598 WCMOD_ABILITY_15P75G_R2 , /*!< please write comments */ 599 WCMOD_ABILITY_ILLEGAL /*!< Illegal. Programmatic boundary */ 600 } wcmod_tech_ability; 601 602 /*! \def CNT_wcmod_tech_ability Types of enum wcmod_tech_ability */ 603 #define CNT_wcmod_tech_ability 30 604 605 /*! 606 \brief 607 This array returns the string version of the enum #wcmod_port_type when indexed 608 by the enum var. 609 610 */ 611 extern char* e2s_wcmod_tech_ability [CNT_wcmod_tech_ability]; 612 /*! 613 \brief 614 This array associates the enum #wcmod_lane_select enum with a bit mask. 615 The index is the #wcmod_lane_select enum value. The value for each entry is 616 interpreted as follows. If bit [n] is 1, then lane [n] is enabled; if bit [n] 617 is 0, then lane [n] is disabled. By enabled, we mean that such-and-such 618 function is to be called for a lane; by disabled, we mean that such-and-such 619 function is not to be called for a lane. So a value of 0xF indicates that all 620 lanes or enabled, while 0x5 indicates that only lanes 0 and 2 are enabled. 621 622 */ 623 extern int e2n_wcmod_tech_ability [CNT_wcmod_tech_ability]; 624 /*! \enum wcmod_eye_direction 625 626 The direction of slicer changing always moves from the middle of the eye. 627 Currently all speeds have the following bit positions in wcmod_st 628 629 \li WCMOD_EYE_VU: Vertical, Upward direction 630 \li WCMOD_EYE_VD: Vertical, Downward direction 631 \li WCMOD_EYE_HL: Horizontal, Left direction 632 \li WCMOD_EYE_HR: Horizontal, Right direction 633 634 635 */ 636 637 typedef enum { 638 WCMOD_EYE_VU = 0 , /*!< Vertical, Upward direction */ 639 WCMOD_EYE_VD , /*!< Vertical, Downward direction */ 640 WCMOD_EYE_HL , /*!< Horizontal, Left direction */ 641 WCMOD_EYE_HR , /*!< Horizontal, Right direction */ 642 WCMOD_EYE_ILLEGAL /*!< Programmatic illegal boundary. */ 643 } wcmod_eye_direction; 644 645 /*! \def CNT_wcmod_eye_direction Types of enum wcmod_eye_direction */ 646 #define CNT_wcmod_eye_direction 5 647 648 /*! 649 \brief 650 This array returns the string version of the enum #wcmod_port_type when indexed 651 by the enum var. 652 653 */ 654 extern char* e2s_wcmod_eye_direction [CNT_wcmod_eye_direction]; 655 #endif /* _WCMOD_ENUM_DEFINES_H */