AnsweredAssumed Answered

Interfacing I2C and ADV7180

Question asked by Abhijeet Gokar on Aug 29, 2019
Latest reply on Sep 3, 2019 by Abhijeet Gokar

The ultimate aim is to recognize ad7180 driver from the i2c2 bus. We have defined the analog videoIn adv 7180 in the i2c2 node in imx6qdl-sabresd.dtsi.

Using the u-boot I2Ccommands: i2c probe, the driver of i2c-2 is not identified whereas i2c-1 is probed fetching three addresses.

 

During the boot process, the second I2C bus is not getting recognized. 

Given below are the serial console print statements that are seen from the entire boot sequence when the flattened device tree is loaded.

*************************************************************************

U-Boot 2015.10+fslc+g1b6aee7 (Jan 16 2018 - 14:57:01 +0530)

CPU: Freescale i.MX6Q rev1.2 996 MHz (running at 792 MHz)
CPU: Automotive temperature grade (-40C to 125C) at 26C
Reset cause: POR
Board: MX6-SabreSD
I2C: ready

Line 129: i2c i2c-1: IMX I2C adapter registered   //i2c-2 not registered??

Line 272 onwards: i2c /dev entries driver
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR RC5 (streamzap) protocol handler initialized
IR SANYO protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
mxc_v4l2_output v4l2_out.28: V4L2 device registered as video16
mxc_v4l2_output v4l2_out.28: V4L2 device registered as video17
i2c-core: driver [mag3110] using legacy suspend method
i2c-core: driver [mag3110] using legacy resume method  

****************************************************************************

 

I have written these extra lines in defconfig files in the source directory of my Yocto Built.

CONFIG_IMX_HAVE_PLATFORM_IMX_I2C=y
# CONFIG_I2C_COMPAT is not set
CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_HELPER_AUTO is not set
CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ALGOPCA=m
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_IMX=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX=y

 

I have also check Kconfig files and seen that i2c driver is passed from the kernel-source directory in the built.

 

Do I have to make modifications to the C-files(driver files) made in the path `/home/fsl-community-bsp-myproject/build/tmp/work-shared/imx6qonlinepdd/kernel-source/drivers/i2c` of my yocto built? Can this issue be solved using i2c-tools package?

 

The command cat /sys/dev/char/89\:1/device/name only identifies i2c-1.

Outcomes