xref: /dpdk/drivers/net/ntnic/nim/nim_defines.h (revision 4783bd39273b74e4bd9f2e24099c80f7b2b5a0ea)
1eaf1ebdcSSerhii Iliushyk /*
2eaf1ebdcSSerhii Iliushyk  * SPDX-License-Identifier: BSD-3-Clause
3eaf1ebdcSSerhii Iliushyk  * Copyright(c) 2023 Napatech A/S
4eaf1ebdcSSerhii Iliushyk  */
5eaf1ebdcSSerhii Iliushyk 
6eaf1ebdcSSerhii Iliushyk #ifndef NIM_DEFINES_H_
7eaf1ebdcSSerhii Iliushyk #define NIM_DEFINES_H_
8eaf1ebdcSSerhii Iliushyk 
9eaf1ebdcSSerhii Iliushyk #define NIM_IDENTIFIER_ADDR 0	/* 1 byte */
1027c15342SSerhii Iliushyk #define QSFP_EXTENDED_IDENTIFIER 129
11eaf1ebdcSSerhii Iliushyk 
12eaf1ebdcSSerhii Iliushyk /* I2C addresses */
13eaf1ebdcSSerhii Iliushyk #define NIM_I2C_0XA0 0xA0	/* Basic I2C address */
14eaf1ebdcSSerhii Iliushyk #define NIM_I2C_0XA2 0xA2	/* Diagnostic monitoring */
15eaf1ebdcSSerhii Iliushyk 
16eaf1ebdcSSerhii Iliushyk typedef enum {
17eaf1ebdcSSerhii Iliushyk 	NIM_OPTION_TX_DISABLE,
18eaf1ebdcSSerhii Iliushyk 	/* Indicates that the module should be checked for the two next FEC types */
19eaf1ebdcSSerhii Iliushyk 	NIM_OPTION_FEC,
20eaf1ebdcSSerhii Iliushyk 	NIM_OPTION_MEDIA_SIDE_FEC,
21eaf1ebdcSSerhii Iliushyk 	NIM_OPTION_HOST_SIDE_FEC,
22eaf1ebdcSSerhii Iliushyk 	NIM_OPTION_RX_ONLY
23eaf1ebdcSSerhii Iliushyk } nim_option_t;
24eaf1ebdcSSerhii Iliushyk 
25eaf1ebdcSSerhii Iliushyk enum nt_nim_identifier_e {
26eaf1ebdcSSerhii Iliushyk 	NT_NIM_UNKNOWN = 0x00,	/* Nim type is unknown */
2727c15342SSerhii Iliushyk 	NT_NIM_QSFP = 0x0C,	/* Nim type = QSFP */
2827c15342SSerhii Iliushyk 	NT_NIM_QSFP_PLUS = 0x0D,/* Nim type = QSFP+ */
29*4783bd39SSerhii Iliushyk 	NT_NIM_QSFP28 = 0x11,	/* Nim type = QSFP28 */
30eaf1ebdcSSerhii Iliushyk };
31eaf1ebdcSSerhii Iliushyk typedef enum nt_nim_identifier_e nt_nim_identifier_t;
32eaf1ebdcSSerhii Iliushyk 
33eaf1ebdcSSerhii Iliushyk #endif	/* NIM_DEFINES_H_ */
34