Skip to content

Conversation

@omeh-a
Copy link
Member

@omeh-a omeh-a commented Nov 28, 2025

This PR adds several things to the I2C protocol:

  1. Extracted all common logic from the meson driver into i2c_common.c. All code here can be used unmodified for all i2c drivers.
  2. Changes FSM API to support drivers arbitrarily adding or removing states - they are no longer bound to premade states.
  3. Added RISCV64 support to libco
  4. Added a new i2c_bus_scan example which can run on any device - no external tester apparatus needed for CI.

... and also adds a driver for https://github.com/au-ts/serengeti 's implementation of the OpenTitan I2C peripherals. This driver technically supports Cheshire too, but Cheshire lacks the peripheral timer required to run any examples so we restrict it to just Serengeti for now.

@omeh-a omeh-a force-pushed the cheshire-i2c-v2 branch 2 times, most recently from cfdda09 to 0a904ec Compare November 28, 2025 05:49
@omeh-a omeh-a marked this pull request as ready for review November 28, 2025 06:15
Copy link
Contributor

@midnightveil midnightveil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Design isn't anything new, really, so that's fine.

Some minor comments about the code.

@omeh-a omeh-a force-pushed the cheshire-i2c-v2 branch 4 times, most recently from 1bb2fd9 to 1c5991a Compare December 8, 2025 04:50
omeh-a and others added 4 commits December 8, 2025 15:53
…cture

Extracted all common logic from meson i2c driver to a common file and
added some new abstractions to make it easier to reuse the existing i2c
logic in other drivers. Finalised opentitan i2c

Signed-off-by: Lesley Rossouw <[email protected]>
Signed-off-by: Lesley Rossouw <[email protected]>
Added CI for bus scan example
Update style and copyright for cheshire i2c merge

Signed-off-by: Lesley Rossouw <[email protected]>
@omeh-a omeh-a merged commit b9ecdc1 into main Dec 8, 2025
14 checks passed
@omeh-a omeh-a deleted the cheshire-i2c-v2 branch December 8, 2025 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants