Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4909

Troubleshooting • Issues with MCP23017 dtoverlay when using I2C0 on CM4

$
0
0
Hello,

I am having issues getting an MCP23017 IO expander to work with with a CM4. To be more specific, while I am able to see and interact with the device on the I2C bus (using i2cdetect), even with the dtoverlay enabled the chip is not recognized by gpiodetect. In my /boot/firmware/config.txt I have the following:

Code:

dtparam=i2c_vc=ondtoverlay=mcp23017,noints,i2c_csi_dsi
I have also tried using

Code:

dtoverlay=i2c0,pins_44_45
instead of i2c_vc=on with the same result.
Running sudo dmesg, I see the following lines which may be relevant:

Code:

[    4.033692] i2c i2c-22: Added multiplexed i2c bus 0[    4.058087] i2c i2c-22: Added multiplexed i2c bus 10[    4.124283] mcp230xx 0-0020: prop pinctrl-0 index 0 invalid phandle
Looking at pinctrl, I also notice that GPIO2/3 are being initialized as I2C pins even though I do not set that anywhere in my device tree (which breaks my soft shutdown button):

Code:

2: a0    pu | hi // GPIO2 = SDA1 3: a0    pu | hi // GPIO3 = SCL1
Does anyone have any idea what this might be?

Statistics: Posted by jshapiro — Thu May 16, 2024 12:43 am



Viewing all articles
Browse latest Browse all 4909

Trending Articles