Commit 77ea9751 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

boards/afcz: enable all SFPs by default

parent 3ab231ab
......@@ -484,17 +484,27 @@ void sfp_setup()
gen_gpio_out( &pin_rtm_4sfp_i2c_reset_n, 1 );
pp_printf("pre-scan\n");
bb_i2c_scan( &board.si57x.master );
// select SFP0
tca9548_select_channels( &board.si57x.master, 0x74, 1 << RTM_4SFP_MUX_SFP0 );
const int sfp_busses [] =
{
RTM_4SFP_MUX_SFP0,
RTM_4SFP_MUX_SFP1,
RTM_4SFP_MUX_SFP2,
RTM_4SFP_MUX_SFP3,
RTM_4SFP_MUX_SFP4,
RTM_4SFP_MUX_SFP5,
RTM_4SFP_MUX_SFP6,
-1
};
int i;
pp_printf("post-scan\n");
bb_i2c_scan( &board.si57x.master );
for( i = 0; sfp_busses[i] >= 0; i++ )
{
// select SFPx
tca9548_select_channels( &board.si57x.master, 0x74, 1 << sfp_busses[i] );
gen_gpio_set_dir( &pin_rtm_4sfp_sfp_tx_disable, 1 );
gen_gpio_out( &pin_rtm_4sfp_sfp_tx_disable, 0 );
gen_gpio_set_dir( &pin_rtm_4sfp_sfp_tx_disable, 1 );
gen_gpio_out( &pin_rtm_4sfp_sfp_tx_disable, 0 );
}
......
......@@ -34,6 +34,14 @@
#define AFCZ_I2C_MUX_CHANNEL_RTM 7
#define RTM_4SFP_MUX_SFP0 0
#define RTM_4SFP_MUX_SFP1 1
#define RTM_4SFP_MUX_SFP2 2
#define RTM_4SFP_MUX_SFP3 3
#define RTM_4SFP_MUX_SFP4 4
#define RTM_4SFP_MUX_SFP5 5
#define RTM_4SFP_MUX_SFP6 6
/* Board-specific parameters */
#define TICS_PER_SECOND 1000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment