fix #228 and initialize io_dir setting at io_expander.rs #257

Merged
sb10q merged 2 commits from morgan/artiq-zynq:bugfix_pinswap into release-7 2023-09-04 15:50:45 +08:00
Owner
  • SFP0_LED pin is now configured with hw_rev and fix #228

    • add io_expander LED and TX_disable pins for hw version v1.1 and v1.0 at io_expander.rs
  • port direction setting is now initialized at io_expander.rs

    • remove io_expander.set_oe() at satman and runtime main.rs to avoid duplicate logic
  • add self.config["hw_rev"] at kasli_sco.py for hw_rev="version no." cfg

  • compilation check

    • run nix build <variant> -L for kasli-soc master, satellite & standalone and all built successfully
  • functional check

    • veritied with a multimeter that the TX_DISABLE pin of SFP0..3 were driven to false after startup for all 3 variants
    • veritied with a multimeter that the VUSB_PRESENT_N was NOT driven to GND after a correct hw_rev is set

Checklist of backporting SFP0..3 LED indication

  • change write_rustc_cfg_file(soc, filename) to follow artiq repo (PR #254)
  • change io_expander not to borrow i2c indefinitely and create io_expander0..1 to store out_current data (PR #255)
  • update io_expander due to pin swap on Kasli-soc v1.1 #228 (This PR)
  • implement SFP0..3 LED indication (PR #258)
- `SFP0_LED` pin is now configured with `hw_rev` and fix #228 - add `io_expander` LED and TX_disable pins for hw version `v1.1` and `v1.0` at `io_expander.rs` - port direction setting is now initialized at `io_expander.rs` - remove `io_expander.set_oe()` at satman and runtime `main.rs` to avoid duplicate logic - add `self.config["hw_rev"]` at `kasli_sco.py` for `hw_rev="version no."` cfg - compilation check - run `nix build <variant> -L` for kasli-soc master, satellite & standalone and all built successfully - functional check - veritied with a multimeter that the TX_DISABLE pin of SFP0..3 were driven to false after startup for all 3 variants - veritied with a multimeter that the VUSB_PRESENT_N was **NOT** driven to GND after a correct `hw_rev` is set ## Checklist of backporting SFP0..3 LED indication - [X] change write_rustc_cfg_file(soc, filename) to follow artiq repo (PR #254) - [X] change io_expander not to borrow i2c indefinitely and create io_expander0..1 to store out_current data (PR #255) - [X] update io_expander due to pin swap on Kasli-soc v1.1 #228 (This PR) - [x] implement SFP0..3 LED indication (PR #258)
morgan added 1 commit 2023-09-04 10:16:14 +08:00
30a8ec8fbd - ioexpander.rs: use hw_rev to store SFP0LED pin
- ioexpander.rs: now initialize the expander port direction
- main.rs: remove set_oe for io_expander
- kasli_sco.py: add hw_rev for rustc-cfg file
sb10q reviewed 2023-09-04 14:29:39 +08:00
@ -484,10 +484,6 @@ pub extern fn main_core0() -> i32 {
.init(&mut i2c)
.expect("I2C I/O expander #1 initialization failed");
// Actively drive TX_DISABLE to false on SFP0..3
Owner

"Actively" comment becomes misleading since the code it refers to no longer touches OE.

"Actively" comment becomes misleading since the code it refers to no longer touches OE.
morgan marked this conversation as resolved
morgan added 1 commit 2023-09-04 14:51:39 +08:00
Owner

Commit messages and PR title need improvement.

Commit messages and PR title need improvement.
sb10q merged commit b47152f2c2 into release-7 2023-09-04 15:50:45 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#257
No description provided.