Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dtoverlays: Add override for target-path on I2C overlays #6541

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Dec 16, 2024

To allow for attaching any of the standard overlays to a bitbashed i2c-gpio bus, allow specifying the target path for the overlay.

Suggested by:
https://forums.raspberrypi.com/viewtopic.php?t=381059 2 overlays implemented as examples, but could be applied to all.

Example:

dtoverlay=i2c-gpio,i2c_gpio_sda=10,i2c_gpio_scl=11
dtoverlay=mcp23017,i2c-path=/i2c@0
dtoverlay=i2c-gpio,i2c_gpio_sda=12,i2c_gpio_scl=13,bus=3
dtoverlay=mcp23017,i2c-path=/i2c@3

@6by9 6by9 requested a review from pelwell December 16, 2024 15:20
Copy link
Contributor

@pelwell pelwell left a comment

Choose a reason for hiding this comment

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

I'm happy with that. It could go in i2c-rtc and i2c-sensor as well.

@6by9
Copy link
Contributor Author

6by9 commented Dec 16, 2024

I'm happy with that. It could go in i2c-rtc and i2c-sensor as well.

I was wanting to make sure you approved of the approach, but was then intending to add it to the majority of the overlays for I2C peripherals.
I didn't want to go to that effort if you were going to point out the obvious flaw in the patch!

I'll go and update a load more now.

@6by9 6by9 force-pushed the rpi-6.6.y-dt branch 4 times, most recently from 42e8a83 to 02f3a93 Compare December 16, 2024 18:23
@6by9
Copy link
Contributor Author

6by9 commented Dec 16, 2024

Updated with almost all the I2C based overlays.

Now to just get all the dtoverlaycheck issues sorted.....

To allow for attaching any of the standard overlays to a
bitbashed i2c-gpio bus, allow specifying the target path for
the overlay.

Suggested by:
https://forums.raspberrypi.com/viewtopic.php?t=381059

Example:
dtoverlay=i2c-gpio,i2c_gpio_sda=10,i2c_gpio_scl=11
dtoverlay=mcp23017,i2c-path=/i2c@0
dtoverlay=i2c-gpio,i2c_gpio_sda=12,i2c_gpio_scl=13,bus=3
dtoverlay=mcp23017,i2c-path=/i2c@3

Signed-off-by: Dave Stevenson <[email protected]>
@6by9 6by9 marked this pull request as ready for review December 16, 2024 18:32
@pelwell pelwell merged commit b75fd2a into raspberrypi:rpi-6.6.y Dec 16, 2024
12 checks passed
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.

2 participants