From eb350c3459a97c0276b2d0f138302ead5c098fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kulik?= Date: Mon, 24 Aug 2020 15:32:04 +0200 Subject: [PATCH] Drive SFP0 TX_DISABLE low during startup (as was in Kasli v1.1). Fixes Ethernet on SFP modules with pullup on this line. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Kulik --- artiq/firmware/runtime/main.rs | 3 +++ artiq/firmware/satman/main.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/artiq/firmware/runtime/main.rs b/artiq/firmware/runtime/main.rs index fda9d37ba..73660b611 100644 --- a/artiq/firmware/runtime/main.rs +++ b/artiq/firmware/runtime/main.rs @@ -107,6 +107,9 @@ fn startup() { io_expander1 = board_misoc::io_expander::IoExpander::new(1); io_expander0.init().expect("I2C I/O expander #0 initialization failed"); io_expander1.init().expect("I2C I/O expander #1 initialization failed"); + io_expander0.set_oe(0, 1 << 1).unwrap(); + io_expander0.set(0, 1, false); + io_expander0.service().unwrap(); } rtio_clocking::init(); diff --git a/artiq/firmware/satman/main.rs b/artiq/firmware/satman/main.rs index 9e2144370..60f0f4c0a 100644 --- a/artiq/firmware/satman/main.rs +++ b/artiq/firmware/satman/main.rs @@ -475,6 +475,9 @@ pub extern fn main() -> i32 { io_expander1.set(1, 7, true); io_expander1.service().unwrap(); } + io_expander0.set_oe(0, 1 << 1).unwrap(); + io_expander0.set(0, 1, false); + io_expander0.service().unwrap(); } #[cfg(has_si5324)]