Interfacing I2C and ADV7180

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing I2C and ADV7180

348 Views
abhijeet_ghodga
Contributor III

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.

Labels (2)
Tags (3)
6 Replies

101 Views
mahi
Contributor IV

Hi,

as you are talking about ADV7180, I am pretty sure, you do not want to use it within u-boot, but in Linux?

So u-boot doesn't have to do anything with the problem.

Is the i2c you are missing enabled in the device tree?

Best regards

 Martin

101 Views
abhijeet_ghodga
Contributor III

Yes, it is not connected with u-boot whatsoever. i2c port is declared in the device tree and should get included into the built Linux OS.

i2c is enabled in the main device tree, but we saw that the issue was of the driver for ADV7180 not being recognized. For that, we just included the path of adding kernel modules in local.conf, and it solved the issue. We could not override the issue of recognizing ADV7180 without doing this command - "IMAGE_INSTALL_append = "kernel-modules" ".

0 Kudos

101 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Abhijeet

"U-Boot 2015.10+fslc" is not supported by nxp, one can try some versions from

official source.codeaurora.org/external/imx/uboot-imx repository, like uboot--imx_v2015.04

uboot-imx - i.MX U-Boot 

additional documentation can be found on i.MX Software | NXP 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

101 Views
abhijeet_ghodga
Contributor III

Hi Igor,

I have changed the u-boot source from U-Boot 2015.10+fslc to say uboot--imx_v2015.04.

But, how do I resolve the main issue of i2c-2 driver not being recognized.

0 Kudos

101 Views
igorpadykov
NXP TechSupport
NXP TechSupport

one can check struct i2c_pads_info i2c_pad_info1..

in mx6sabresd.c\mx6sabresd\freescale\board - uboot-imx - i.MX U-Boot 

Best regards
igor

0 Kudos

101 Views
abhijeet_ghodga
Contributor III

i2c is enabled in the main device tree, but we saw that the issue was of the driver for ADV7180 not being recognised. For that, we just included the path of adding kernel modules in local.conf, and it solved the issue. We could not override the issue of recognising ADV7180 without doing this command - "IMAGE_INSTALL_append = "kernel-modules" ". But the OS got built even with the previous u-boot version, so the issue is not there I guess. Is changing the u-boot version from official source.codeaurora.org necessary?

0 Kudos