Good evening,Yes, it should work fine with i2c2 on Pi 5 provided the pins are suitable for your application:Code:
Usage: dtoverlay=i2c2-pi5,<param>=<val>
I believe my configuration questions are resolved and wanted to thank you again as well as document my solution.
Yes, the i2c2-pi5 overlay is working. It nicely creates an i2c2 bus and those devices can be accessed via i2c requests.
However, I had trouble using that i2c2 bus as a target for another dtoverlay with the command line dtoverlay command or the config.txt dtoverlay directive.
This is failing for both of my devices on i2c2. (command line version shown below, the config.txt version also did not work for me.)
Code:
$ sudo dtoverlay i2c-fan emc2301 addr=0x4D i2c2* Unknown parameter 'i2c2'$$ sudo dtoverlay mcp23017 addr=0x20 i2c2* Unknown parameter 'i2c2'
The solution that did work was using the full device tree path to i2c2 in my config.txt as shown here:
Just using a ,i2c2 target did not work on either the command line or the config.txt. This may not be ideal, perhaps a bit hack-ish. I'll work with it for now... it's progress.dtoverlay=mcp23017,addr=0x20,noints,i2c-path=/axi/pcie@120000/rp1/i2c@78000
Thanks again,
TJ
Statistics: Posted by tjsmith — Wed Jan 22, 2025 4:29 am