DART-6UL I2C: Difference between revisions

From Variscite Wiki
Line 57: Line 57:
<br/>Driver with numbers are available.
<br/>Driver with numbers are available.
<br/>Variscite devices:
<br/>Variscite devices:
<br/>I2C-0 0x3C CAMERA
<pre>
<br/>
I2C-1 0x38 – focaltech touch
<br/>I2C-1 0x37 HDMI
I2C-1 0x54 - EEPROM
<br/>I2C-1 0x49 HDMI
I2C-1 0x55 - EEPROM
<br/>I2C-1 0x59 HDMI
 
<br/>I2C-1 0x50
I2C-2 0x1A – audio codec
<br/>I2C-1 0x56 On-SOM EEPROM - do not alter
I2C-2 0x50 - EEPROM
<br/>I2C-1 0x57 On-SOM EEPROM - do not alter
I2C-2 0x51 - EEPROM
<br/>
</pre>
<br/>I2C-2 0x38 Capacitive touch panel
<br/>I2C-2 0x68 VAR-DVK-MX6 DS1307 RTC

Revision as of 10:40, 28 December 2015

DART-6UL - I2C


Available I2C buses

List I2C available devices:

root@imx6ul-var-dart:~# ls -l /dev/i2c-*
crw------- 1 root root 89, 0 Dec 28 09:28 /dev/i2c-0
crw------- 1 root root 89, 1 Dec 28 09:28 /dev/i2c-1

System class:

root@imx6ul-var-dart:~# ls /sys/class/i2c-dev/
i2c-0  i2c-1

I2C devices per bus

Scan bus 0:

root@imx6ul-var-dart:~# i2cdetect -y -r 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- 54 55 -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Scan bus 1:

root@imx6ul-var-dart:~# i2cdetect -y -r 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Reading / Writing from an I2C device

Variscite includes I2CTools as a part of the default file system build, examples of optional commands:
i2cdump - dump the content of an I2C device
i2cset - write a single character to an I2C device
i2cget - read a single character to an I2C device.

In addition follow 'C' code example as describe in the linux kernel documentation : https://www.kernel.org/doc/Documentation/i2c/dev-interface

Variscite's system integrated I2C devices

Note:Don't manipulate Variscite's on-SOM EEPROM, or you will damage the SOM!

When the device is marked with "UU" it says a driver is using it.
Driver with numbers are available.
Variscite devices:

I2C-1 0x38 – focaltech touch
I2C-1 0x54 - EEPROM
I2C-1 0x55 - EEPROM

I2C-2 0x1A – audio codec
I2C-2 0x50 - EEPROM
I2C-2 0x51 - EEPROM