raspberrypi-4b/i2c: Support for NOSTOP/NOSTART flags and better examples#19181
Open
linguini1 wants to merge 4 commits into
Open
raspberrypi-4b/i2c: Support for NOSTOP/NOSTART flags and better examples#19181linguini1 wants to merge 4 commits into
linguini1 wants to merge 4 commits into
Conversation
This commit adds support for I2C transfers spread across multiple messages using the I2C_M_NOSTOP/I2C_M_NOSTART. The approach greedily merges as many sequential I2C messages together as possible and considers them as a single transfer. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Change the I2C character device registration to depend on the correct CONFIG option for enabling character drivers. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Includes a new I2C configuration (and documentation for it) to use the I2C1 bus on the Raspberry Pi 4B. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit includes BMP280 driver registration on I2C1 in the RPi4B bringup logic _if_ the user selects the board-level configuration option (so as to not interfere with any user's custom implementation of interfacing with this sensor). A configuration is added with the BMP280 registration, example program and `uorb_listener` that is also documented. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
d151e08 to
09a5c5f
Compare
acassis
approved these changes
Jun 20, 2026
simbit18
approved these changes
Jun 20, 2026
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.
Summary
List of patches:
raspberrypi-4b/bmp280: Include optional registration of BMP280 driver
This commit includes BMP280 driver registration on I2C1 in the RPi4B
bringup logic if the user selects the board-level configuration option
(so as to not interfere with any user's custom implementation of
interfacing with this sensor). A configuration is added with the BMP280
registration, example program and
uorb_listenerthat is alsodocumented.
raspberrypi-4b/i2c: Added I2C configuration
Includes a new I2C configuration (and documentation for it) to use the
I2C1 bus on the Raspberry Pi 4B.
rpi4b/bringup: Use correct CONFIG option for I2C char driver
Change the I2C character device registration to depend on the correct
CONFIG option for enabling character drivers.
bcm2711/i2c: Support I2C_M_NOSTOP/I2C_M_NOSTART properly
This commit adds support for I2C transfers spread across multiple
messages using the I2C_M_NOSTOP/I2C_M_NOSTART. The approach greedily
merges as many sequential I2C messages together as possible and
considers them as a single transfer.
Related issues
This is part of the GSoC project #18507; milestone 1 item 1 (I2C improvement).
Impact
BCM2711 I2C driver is improved to support flags required for many I2C
devices, as per the discussion in [FEATURE] Complete RPi 4B I2C driver #16937.
An I2C configuration for the most commonly used bus (I2C1) is provided with
the
i2ctoolfor users to play with.A BMP280 configuration is supplied for users to play with a breakout board if
they wish.
Testing
I tested using the
raspberrypi-4b:bmp280configuration supplied in this patch.It includes all the functionality of
raspberrypi-4b:i2c1and tests the I2Clogic patch for supporting NO_STOP/NO_START flags. Here is the output of the
bmp280 program being run on the device:
And the I2C scanner:
Everything works as expected.