Hi,
I am using I2C1 bus for a Smart battery (SMBUS specifications) which is the host rather than a slave (flips back and forth - master then slave), and so need a second I2C bus for a standard slave device, so I tried using I2C0 but it does not seem to work. I had a good look at the device tree and there doesn’t seem to be a reason for that.
What is going on !??? This should work!
User space I2C-16 is I2C0 (Pins 140,142) - neither device show addresses solo or in combination
User space I2C-17 is I2C1 (Pins 196, 194) - works fine and both devices show an address
I2C0 is defined in the device tree and feeds X2 and the SODIMM connections, (extract from im8qxp-Colibri here)…
/* On-module MIPI CSI I2C accessible on FFC (X3) */
&i2c0_mipi_lvds1 {
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c0_mipi_lvds1>;
};
/* Colibri I2C */
&i2c1 {
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
};
Then later…
/* On Module I2C */
pinctrl_i2c0: i2c0grp {
fsl,pins = <
IMX8QXP_MIPI_CSI0_GPIO0_00_ADMA_I2C0_SCL 0x06000021
IMX8QXP_MIPI_CSI0_GPIO0_01_ADMA_I2C0_SDA 0x06000021
>;
};
/* Colibri I2C */
pinctrl_i2c1: i2c1grp {
fsl,pins = <
IMX8QXP_MIPI_DSI0_GPIO0_00_ADMA_I2C1_SCL 0x06000021 /* SODIMM 196 */
IMX8QXP_MIPI_DSI0_GPIO0_01_ADMA_I2C1_SDA 0x06000021 /* SODIMM 194 */
>;
};
Then later
pinctrl_i2c0_mipi_lvds0: mipi_lvds0_i2c0_grp {
fsl,pins = <
IMX8QXP_MIPI_DSI0_I2C0_SCL_MIPI_DSI0_I2C0_SCL 0xc6000020 /* SODIMM 140 */
IMX8QXP_MIPI_DSI0_I2C0_SDA_MIPI_DSI0_I2C0_SDA 0xc6000020 /* SODIMM 142 */
>;
};