forked from M-Labs/artiq
1
0
Fork 0

kasli v2.0: drive TX_DISABLE low on all SFPs (fixes #1570)

This was the same problem as #1508 but on SFP1..3
This commit is contained in:
Chris Ballance 2020-12-21 16:43:44 +00:00 committed by Sébastien Bourdeauducq
parent 43ecb3fea6
commit 43be383c86
2 changed files with 18 additions and 0 deletions

View File

@ -106,9 +106,18 @@ fn startup() {
io_expander1 = board_misoc::io_expander::IoExpander::new(1); io_expander1 = board_misoc::io_expander::IoExpander::new(1);
io_expander0.init().expect("I2C I/O expander #0 initialization failed"); io_expander0.init().expect("I2C I/O expander #0 initialization failed");
io_expander1.init().expect("I2C I/O expander #1 initialization failed"); io_expander1.init().expect("I2C I/O expander #1 initialization failed");
// Actively drive TX_DISABLE to false on SFP0..3
io_expander0.set_oe(0, 1 << 1).unwrap(); io_expander0.set_oe(0, 1 << 1).unwrap();
io_expander0.set_oe(1, 1 << 1).unwrap();
io_expander1.set_oe(0, 1 << 1).unwrap();
io_expander1.set_oe(1, 1 << 1).unwrap();
io_expander0.set(0, 1, false); io_expander0.set(0, 1, false);
io_expander0.set(1, 1, false);
io_expander1.set(0, 1, false);
io_expander1.set(1, 1, false);
io_expander0.service().unwrap(); io_expander0.service().unwrap();
io_expander1.service().unwrap();
} }
rtio_clocking::init(); rtio_clocking::init();

View File

@ -475,9 +475,18 @@ pub extern fn main() -> i32 {
io_expander1.set(1, 7, true); io_expander1.set(1, 7, true);
io_expander1.service().unwrap(); io_expander1.service().unwrap();
} }
// Actively drive TX_DISABLE to false on SFP0..3
io_expander0.set_oe(0, 1 << 1).unwrap(); io_expander0.set_oe(0, 1 << 1).unwrap();
io_expander0.set_oe(1, 1 << 1).unwrap();
io_expander1.set_oe(0, 1 << 1).unwrap();
io_expander1.set_oe(1, 1 << 1).unwrap();
io_expander0.set(0, 1, false); io_expander0.set(0, 1, false);
io_expander0.set(1, 1, false);
io_expander1.set(0, 1, false);
io_expander1.set(1, 1, false);
io_expander0.service().unwrap(); io_expander0.service().unwrap();
io_expander1.service().unwrap();
} }
#[cfg(has_si5324)] #[cfg(has_si5324)]