Difference between revisions of "How to use I2C"

From IGEP - ISEE Wiki

Jump to: navigation, search
Line 1: Line 1:
 
= Overview  =
 
= Overview  =
  
This How-To is meant to be a starting point for people to learn use I2C for IGEP v2 devices as quickly and easily as possible. For this how-to i do a program that reads and decodes EDID information from EEPROM display. This program was tested in [http://releases.linaro.org/platform/linaro-m/headless/final/linaro-m-headless-tar-20101108-2.tar.gz Linaro Headless] with [[Linux_Kernel_2.6.35.y|Kernel 2.6.35.y]] and [[How to get the Poky Linux distribution|Poky Linux distribution.]]<br>  
+
This How-To is meant to be a starting point for people to learn use I2C for IGEP v2 devices as quickly and easily as possible. For this how-to i do a program that reads and decodes EDID information from EEPROM display. This program was tested in [http://releases.linaro.org/platform/linaro-m/headless/final/linaro-m-headless-tar-20101108-2.tar.gz Linaro Headless] with [[Linux Kernel 2.6.35.y|Kernel 2.6.35.y]] and [[How to get the Poky Linux distribution|Poky Linux distribution.]]<br>  
  
More information about [http://en.wikipedia.org/wiki/Extended_display_identification_data EDID].<br>
+
More information about [http://en.wikipedia.org/wiki/Extended_display_identification_data EDID].<br>  
  
 
= Feedback and Contributing  =
 
= Feedback and Contributing  =
Line 19: Line 19:
 
<pre>i2c-1 i2c      OMAP I2C adapter                I2C adapter
 
<pre>i2c-1 i2c      OMAP I2C adapter                I2C adapter
 
i2c-3 i2c      OMAP I2C adapter                I2C adapter
 
i2c-3 i2c      OMAP I2C adapter                I2C adapter
</pre>
+
</pre>  
It's important than i2c-3 is enable, because it connect by default to DVI-D.
+
It's important than i2c-3 is enable, because it connect by default to DVI-D.  
  
 
= Compile  =
 
= Compile  =
  
 
Download '''(upload source code)''' and extract it. Compile program using your Cross Compiler, i used arm-linux-gnueabi-:  
 
Download '''(upload source code)''' and extract it. Compile program using your Cross Compiler, i used arm-linux-gnueabi-:  
<pre>arm-linux-gnueabi-gcc parse-edid-beta2.c -o parse-edid-beta2</pre>
+
<pre>arm-linux-gnueabi-gcc parse-edid-beta2.c -o parse-edid-beta2</pre>  
Make sure that i2c.dev.h has the same path as parse-edid-beta2.c.
+
Make sure that i2c.dev.h has the same path as parse-edid-beta2.c.  
  
= Run program =
+
= Run program =
  
Run program as root.<br>
+
Run program as root.<br>  
 +
 
 +
= Results =
 +
 
 +
'''Under construction'''
  
 
[[Category:Communications]] [[Category:Work_in_progress]]
 
[[Category:Communications]] [[Category:Work_in_progress]]

Revision as of 17:55, 16 January 2012

Overview

This How-To is meant to be a starting point for people to learn use I2C for IGEP v2 devices as quickly and easily as possible. For this how-to i do a program that reads and decodes EDID information from EEPROM display. This program was tested in Linaro Headless with Kernel 2.6.35.y and Poky Linux distribution.

More information about EDID.

Feedback and Contributing

At any point, if you see a mistake you can contribute to this How-To.

Check I2C Devices

In this How-to i used pre-compiled modules, because: it's quick and it works. All versions of Linux are supported, as long as I2C support is included in the kernel.

To make sure that I2C driver works well, follow the next steps (tested in Linaro Headless):

sudo apt-get install  i2c-tools
i2cdetect -l

The result will be similar at that:

i2c-1	i2c       	OMAP I2C adapter                	I2C adapter
i2c-3	i2c       	OMAP I2C adapter                	I2C adapter

It's important than i2c-3 is enable, because it connect by default to DVI-D.

Compile

Download (upload source code) and extract it. Compile program using your Cross Compiler, i used arm-linux-gnueabi-:

arm-linux-gnueabi-gcc parse-edid-beta2.c -o parse-edid-beta2

Make sure that i2c.dev.h has the same path as parse-edid-beta2.c.

Run program

Run program as root.

Results

Under construction