Repository navigation
Zephyr port: bring back board.I2C, board.SPI and board.UART on non-Nordic boards - #11590
Open
mikeysklar wants to merge 1 commit into
Open
mikeysklar wants to merge 1 commit into
mikeysklar wants to merge 1 commit into
Conversation
The iobroker check treated a bus as routable at runtime when every nRF psel in its default pinctrl state was disconnected. Pinctrl states on other SoCs have no psels, so the list was empty, all() returned True, and every I2C, SPI and UART on RP2, SiWx917 and other non-nRF boards was dropped from board. busio then refused pins too. Only treat a bus as routable when it has psels and all are disconnected. Move the check into a helper so it can be tested. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tannewt
requested changes
Oct 13, 2026
tannewt
left a comment
Member
There was a problem hiding this comment.
Sorry for breaking this! I think we may want to know the vendor to ensure our bitmask is relevant.
| if psels is not None and all( | ||
| (value & NRF_PIN_FIELD_MASK) == NRF_PIN_FIELD_MASK for value in psels | ||
| ): | ||
| if _dynamically_routable(device_tree.label2node[labels[0]]): |
Member
There was a problem hiding this comment.
Shouldn't we actually know this is a nordic bus?
dhalbert
requested changes
Oct 13, 2026
dhalbert
left a comment
Collaborator
There was a problem hiding this comment.
Did this happen due to one of my recent PR's? I think this will be fixed as part of my series of PR's. I'm finishing nordic now.
Collaborator
|
I am going to fix this as part of #11596 |
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.
What
Non-Nordic Zephyr boards get their board.I2C, board.SPI and board.UART back.
Why
Since runtime pin routing landed, every non-Nordic bus looks routable at runtime.
So those buses vanish from board, and busio refuses pins too.
Bus objects in the generated
board.c, main → this PR:board.I2C(),board.SPI0(),board.UART()construct (none existed before)busio.I2Candbusio.SPIon any pins still workNot tested on hardware: STM32, NXP, SiWx917.
Written with Claude; tested on hardware by me.
🤖 Generated with Claude Code