I am using IMX7 Dual SABRE Board. I've built the Yocto project and booted through the SD card. The board has booted fine and everything is working as expected. I want to interface an I2C device with a slave address 0x60. I connected SDA, SCL, GND, and VCC (tried both 3.3V and 5V) to mikroBus pins on the IMX7Dual Evaluation board (SCH-28590 REV D1). But I am unable to communicate with the I2C slave device.
Upon analyzing using i2c-tools I found that there is a device showing up on I2C-2 address 0x60 always even when nothing is connected on the mikroBus pins.
root@imx7dsabresd:~/i2c# ./i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
The I2C slave dev board I am connecting has three I2C slave chips (0x50, 0x60 and 0x64). So after connecting it to the mikroBus port I run the i2cdetect again,
root@imx7dsabresd:~/i2c# ./i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- 64 -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
As you can see slave 0x50 and 0x64 are showing up now. 0x60 was there before connecting itself. I can talk to the slaves at 0x50 and 0x64 successfully but not able to communicate at 0x60. I tried the slave 0x60 on RPi it worked fine. So the problem is on the IMX7 side.
Upon investigation, I found MPL3115A2 (I2C precision pressure sensor) is at 0x60 on I2C-2 Bus. I tried to remove it and recompile the code as well.
#CONFIG_MPL3115=y
#CONFIG_INPUT_MPL3115=y
Just to be on the safer side I removed below lines from arch/arm/boot/dts/imx7d-sdb.dts as well.
- mpl3115@60 {- compatible = "fsl,mpl3115";- reg = <0x70>; //0x60 is used by microchip ECC608. - };
Even after recompiling the linux kernel and dts files, I am seeing the i2c device emulated
at 0x60 on I2C-2 Bus.
Can somebody please help me resolve the issue?
Are there any I2C device internally connected on the IMX7 Dual Sabre board?
Hi sagar
After removing MPL3115A2 may be recommended to rebuild all image from scratch.
Also one can check i2c signals with oscilloscope to verify that there are no
connected i2c devices.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks for the answer, Igor. I found the problem. The sensor mpl3115 was connected on the I2C-2 Bus. That's the reason it was responding to i2cdetect even when the driver was actually removed. I could have removed the sensor from the board but instead, I decided to use I2C-3.