In an upcoming version of our application, we’ve added some ICs to one of the i2c busses on the Xavier NX - I’ve got the AT24CS32 chip working fine (using the AT24) driver, so I know the i2c bus itself is working.
I’m having trouble with the three MCP23008 chips (i2c addresses 0x20, 0x21 and 0x22) - I can see them fine with i2cdetect
, but it’s not clear to me how I’m supposed to attach the Linux GPIO driver to them.
I’ve created a devicetree overlay file (which does work for the AT24CS32), but I don’t see any indication of the MCP23008 devices being detected by the kernel. I have tried rebuilding the kernel with CONFIG_PINCTRL_MCP23S08_I2C=y
but that doesn’t seem to help either.
The documentation on this driver is very thin on the ground - can someone point at what I’m doing wrong?
Here’s the .dts overlay I’m using (trimmed to only show one working and one nonworking device):
/dts-v1/;
/plugin/;
/{
compatible = "nvidia,p3509-0000+p3668-0000\0nvidia,p3509-0000+p3668-0001
";
overlay-name = "Olyns i2c devices Overlay";
jetson-header-name = "Jetson 40pin Header";
fragment@0 {
target-path = "/";
__overlay__ {
i2c@31e0000{
compatible = "nvidia,tegra194-i2c";
gpio@20 {
compatible = "microchip,mcp23008";
gpio-controller;
#gpio-cells = <2>;
reg = <0x20>;
status = "okay";
};
at24@50 {
compatible = "atmel,24c32","at24";
reg = <0x50>;
pagesize = <32>;
size = <4096>;
address-width = <16>;
};
};
};
};
};