oxidecomputer / oxidecomputer/quartz

QSFP/I2C: Ability to request protocol resets

Open
#116 0 comments 0 reactions 1 assignee View on GitHub

@Aaron-Hartwig is already working on this.

Since Nov 17, 2023.

Front IO - QSFPx32
Dominant language
VHDL
Stars
22
Forks
2
Avg merge
9h 38m
Merged PRs (30d)
1

Description

Per SFF-8636 section 5.2.2:

Synchronization issues may cause the master and slave state machines to disagree on the specific bit location currently being transferred, the type of operation or even if an operation is in progress. The 2-wire interface protocol has no explicitly defined reset mechanism. The following procedure may force completion of the current operation and cause the slave to release SDA.
a) The master shall provide up to nine SCL clock cycles (drive low, then high) to the slave.
b) The master shall monitor SDA while SCL is high on each cycle.
c) If the slave releases SDA, it will be high and the master shall initiate a START condition.
d) If SDA remains low after a full nine clock cycles the protocol reset has failed.

The I2CCore::Operation enum should be expanded to accommodate a ProtocolReset variant. Per the above, the I2CCore state machine would need to clock out 9 cycles while reading SDA. If SDA is or transitions high during that period, the peripheral has released the bus. If not, the protocol reset has failed.

From the QsfpModuleController perspective, we will need to decide when this should be done. All our module I2C busses are point to point, so we should never get an unexpected NACK. In the case we do receive one, perhaps we should execute a protocol reset?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.