Repository navigation
zephyr-cp: add board.STEMMA_I2C - #11640
Merged
Merged
Conversation
A stemma-qt-connector node (upstream's binding, also used for Qwiic connectors) marks a board's STEMMA QT connector. It adds no pin names. - Boards that route buses with iobroker: the connector's pins decide. With the same pins as board.I2C(), STEMMA_I2C is the same object; with other pins, it is a second board I2C bus, as on the QT Py boards in the other ports. - All-static boards: STEMMA_I2C is the instance labeled zephyr_i2c, Zephyr's label for the bus wired to such connectors, and the same object as board.I2C() when it is the same instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a stemma-qt-connector node on SCL/SDA, so board.STEMMA_I2C is board.I2C(), as in ports/nordic. The upstream board has no node for the connector. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tannewt
requested changes
Oct 20, 2026
tannewt
left a comment
Member
There was a problem hiding this comment.
Let's minimize how much we special case this. Please merge in the other commit too. I think it's diff is still showing for me.
Instead of a special case for stemma-qt-connector nodes, give the connector a CONNECTORS entry that names its pins STEMMA_SCL and STEMMA_SDA, and find board.STEMMA_I2C's pins by those names, like board.I2C()'s SCL and SDA. Qwiic connectors use the same binding, so they get the same names. A pin prints as its first board name, so list the STEMMA names last: board.SCL still prints as board.SCL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note by @dhalbert. Written with Claude.
This PR was stacked on #11638, which has now merged. It needs #11638 for
board.I2C()on the Feather RP2040.Provide a mechanism for
board.STEMMA_I2Con both boards where it is shared withboard.I2C()and on other boards where it has its own pins. Motivated by Zephyr CLUE needingboard.STEMMA_I2C. On that board, it shares pins withboard.I2C().Upstream Zephyr already marks STEMMA QT connectors with a
stemma-qt-connectornode, on about 26 boards. Qwiic connectors use the same binding. Zephyr also labels the bus wired to such a connectorzephyr_i2c.stemma-qt-connectorentry inCONNECTORSnames the connector's pinsSTEMMA_SCLandSTEMMA_SDA, andSTEMMA_I2Cuses those pins. So with the same pins asboard.I2C(),STEMMA_I2Cis the same object; with other pins, it is a second board I2C bus.STEMMA_I2Cis the instance labeledzephyr_i2c, and the same object asboard.I2C()when it is the same instance.board.SCLstill prints asboard.SCL, notboard.STEMMA_SCL.board.overlay, on SCL/SDA.Testing
board.STEMMA_I2C()isboard.I2C(); scan finds the onboard sensors.STEMMA_I2Cis a second bus, usable at the same time asboard.I2C()(tested before the switch to pin names; the bus layout code didn't change).stemma_connectorandzephyr_i2c: &i2c1):board.STEMMA_I2C()isboard.I2C().board.STEMMA_SCLandboard.STEMMA_SDAareboard.SCLandboard.SDA, and all four print asboard.SCL/board.SDA.