sonic-buildimage/platform/innovium/sonic-platform-modules-cameo/esqc610-56sq/modules/x86-64-cameo-esqc610-56sq-sfp.h
shihjeff 940aaa0cbe
[201911] [Innovium] Update Cameo & Wistron Drivers (#7855)
Fix #8068

Update Innovium configs on Cameo and Wistron platforms
2021-07-21 09:09:36 -07:00

218 lines
4.6 KiB
C

/* register offset define */
#define SFP_1_8_TX_ENABLE_REG 0x70
#define SFP_9_16_TX_ENABLE_REG 0x71
#define SFP_17_24_TX_ENABLE_REG 0x72
#define SFP_25_32_TX_ENABLE_REG 0x73
#define SFP_33_40_TX_ENABLE_REG 0x70
#define SFP_41_48_TX_ENABLE_REG 0x71
#define SFP_1_8_RX_LOSS_REG 0x90
#define SFP_9_16_RX_LOSS_REG 0x91
#define SFP_17_24_RX_LOSS_REG 0x92
#define SFP_25_32_RX_LOSS_REG 0x93
#define SFP_33_40_RX_LOSS_REG 0x90
#define SFP_41_48_RX_LOSS_REG 0x91
#define SFP_1_8_PRESENT_REG 0x80
#define SFP_9_16_PRESENT_REG 0x81
#define SFP_17_24_PRESENT_REG 0x82
#define SFP_25_32_PRESENT_REG 0x83
#define SFP_33_40_PRESENT_REG 0x80
#define SFP_41_48_PRESENT_REG 0x81
unsigned char sfp_tx_enable_regs[49][2] = {
{0x00, 0x00}, //cpld offset, bit mask
{0x70, 0x01},
{0x70, 0x02},
{0x70, 0x04},
{0x70, 0x08},
{0x70, 0x10},
{0x70, 0x20},
{0x70, 0x40},
{0x70, 0x80},
{0x71, 0x01},
{0x71, 0x02},
{0x71, 0x04},
{0x71, 0x08},
{0x71, 0x10},
{0x71, 0x20},
{0x71, 0x40},
{0x71, 0x80},
{0x72, 0x01},
{0x72, 0x02},
{0x72, 0x04},
{0x72, 0x08},
{0x72, 0x10},
{0x72, 0x20},
{0x72, 0x40},
{0x72, 0x80},
{0x73, 0x01},
{0x73, 0x02},
{0x73, 0x04},
{0x73, 0x08},
{0x73, 0x10},
{0x73, 0x20},
{0x73, 0x40},
{0x73, 0x80},
{0x70, 0x01},
{0x70, 0x02},
{0x70, 0x04},
{0x70, 0x08},
{0x70, 0x10},
{0x70, 0x20},
{0x70, 0x40},
{0x70, 0x80},
{0x71, 0x01},
{0x71, 0x02},
{0x71, 0x04},
{0x71, 0x08},
{0x71, 0x10},
{0x71, 0x20},
{0x71, 0x40},
{0x71, 0x80}
};
unsigned char sfp_rx_loss[49][2] = {
{0x00, 0x00}, //cpld offset, bit mask
{0x90, 0x01},
{0x90, 0x02},
{0x90, 0x04},
{0x90, 0x08},
{0x90, 0x10},
{0x90, 0x20},
{0x90, 0x40},
{0x90, 0x80},
{0x91, 0x01},
{0x91, 0x02},
{0x91, 0x04},
{0x91, 0x08},
{0x91, 0x10},
{0x91, 0x20},
{0x91, 0x40},
{0x91, 0x80},
{0x92, 0x01},
{0x92, 0x02},
{0x92, 0x04},
{0x92, 0x08},
{0x92, 0x10},
{0x92, 0x20},
{0x92, 0x40},
{0x92, 0x80},
{0x93, 0x01},
{0x93, 0x02},
{0x93, 0x04},
{0x93, 0x08},
{0x93, 0x10},
{0x93, 0x20},
{0x93, 0x40},
{0x93, 0x80},
{0x90, 0x01},
{0x90, 0x02},
{0x90, 0x04},
{0x90, 0x08},
{0x90, 0x10},
{0x90, 0x20},
{0x90, 0x40},
{0x90, 0x80},
{0x91, 0x01},
{0x91, 0x02},
{0x91, 0x04},
{0x91, 0x08},
{0x91, 0x10},
{0x91, 0x20},
{0x91, 0x40},
{0x91, 0x80}
};
unsigned char sfp_present_regs[49][2] = {
{0x00, 0x00}, //cpld offset, bit mask
{0x80, 0x01},
{0x80, 0x02},
{0x80, 0x04},
{0x80, 0x08},
{0x80, 0x10},
{0x80, 0x20},
{0x80, 0x40},
{0x80, 0x80},
{0x81, 0x01},
{0x81, 0x02},
{0x81, 0x04},
{0x81, 0x08},
{0x81, 0x10},
{0x81, 0x20},
{0x81, 0x40},
{0x81, 0x80},
{0x82, 0x01},
{0x82, 0x02},
{0x82, 0x04},
{0x82, 0x08},
{0x82, 0x10},
{0x82, 0x20},
{0x82, 0x40},
{0x82, 0x80},
{0x83, 0x01},
{0x83, 0x02},
{0x83, 0x04},
{0x83, 0x08},
{0x83, 0x10},
{0x83, 0x20},
{0x83, 0x40},
{0x83, 0x80},
{0x80, 0x01},
{0x80, 0x02},
{0x80, 0x04},
{0x80, 0x08},
{0x80, 0x10},
{0x80, 0x20},
{0x80, 0x40},
{0x80, 0x80},
{0x81, 0x01},
{0x81, 0x02},
{0x81, 0x04},
{0x81, 0x08},
{0x81, 0x10},
{0x81, 0x20},
{0x81, 0x40},
{0x81, 0x80}
};
unsigned char sfp_rx_loss_int_regs[7][2] = {
{0x00, 0x00}, //cpld offset, bit mask
{0xd0, 0x10}, //1-8
{0xd0, 0x20}, //9-16
{0xd0, 0x40}, //17-24
{0xd0, 0x80}, //25-32
{0xd0, 0x08}, //33-40
{0xd0, 0x10} //41-48
};
unsigned char sfp_present_int_regs[7][2] = {
{0x00, 0x00}, //cpld offset, bit mask
{0xd0, 0x01}, //1-8
{0xd0, 0x02}, //9-16
{0xd0, 0x04}, //17-24
{0xd0, 0x08}, //25-32
{0xd0, 0x01}, //33-40
{0xd0, 0x02} //41-48
};
unsigned char sfp_rx_loss_int_mask_regs[7][2] = {
{0x00, 0x00}, //cpld offset, bit mask
{0xd1, 0x10}, //1-8
{0xd1, 0x20}, //9-16
{0xd1, 0x40}, //17-24
{0xd1, 0x80}, //25-32
{0xd1, 0x08}, //33-40
{0xd1, 0x10} //41-48
};
unsigned char sfp_present_int_mask_regs[7][2] = {
{0x00, 0x00}, //cpld offset, bit mask
{0xd1, 0x01}, //1-8
{0xd1, 0x02}, //9-16
{0xd1, 0x04}, //17-24
{0xd1, 0x08}, //25-32
{0xd1, 0x01}, //33-40
{0xd1, 0x02} //41-48
};
/* end of register offset define */