DART-6UL I2C: Difference between revisions
From Variscite Wiki
(Created page with "{{PageHeader|DART-6UL - I2C}} {{DocImage|category1=DART-6UL|category2=Yocto}} __toc__ = Available I2C buses = List I2C available devices: <pre> root@var-som-mx6:~# ls -l /d...") |
No edit summary |
||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{PageHeader|DART-6UL - I2C}} {{DocImage|category1= | {{PageHeader|DART-6UL - I2C}} {{DocImage|category1=Yocto|category2=Debian}} [[category:DART-6UL]] __toc__ | ||
Line 6: | Line 6: | ||
List I2C available devices: | List I2C available devices: | ||
<pre> | <pre> | ||
root@var- | root@imx6ul-var-dart:~# ls -l /dev/i2c-* | ||
crw------- 1 root root 89, 0 Dec | crw------- 1 root root 89, 0 Dec 28 09:28 /dev/i2c-0 | ||
crw------- 1 root root 89, 1 Dec | crw------- 1 root root 89, 1 Dec 28 09:28 /dev/i2c-1 | ||
</pre> | </pre> | ||
System class: | System class: | ||
<pre> | <pre> | ||
root@var- | root@imx6ul-var-dart:~# ls /sys/class/i2c-dev/ | ||
i2c-0 i2c-1 | i2c-0 i2c-1 | ||
</pre> | </pre> | ||
Line 20: | Line 19: | ||
Scan bus 0: | Scan bus 0: | ||
<pre> | <pre> | ||
root@var- | root@imx6ul-var-dart:~# i2cdetect -y -r 0 | ||
0 1 2 3 4 5 6 7 8 9 a b c d e f | 0 1 2 3 4 5 6 7 8 9 a b c d e f | ||
00: -- -- -- -- -- -- -- -- -- -- -- -- -- | 00: -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
30: -- -- -- -- -- -- -- -- -- -- -- -- | 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
70: -- -- -- -- -- -- -- -- | 70: -- -- -- -- -- -- -- -- | ||
</pre> | </pre> | ||
Scan bus 1: | Scan bus 1: | ||
<pre> | <pre> | ||
root@var- | root@imx6ul-var-dart:~# i2cdetect -y -r 1 | ||
0 1 2 3 4 5 6 7 8 9 a b c d e f | 0 1 2 3 4 5 6 7 8 9 a b c d e f | ||
00: -- -- -- -- -- | 00: -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
10: -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- | |||
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | |||
30: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- | |||
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | |||
50: 50 51 52 53 -- -- -- -- -- -- -- -- -- -- -- -- | |||
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- | |||
70: -- -- -- -- -- -- -- -- | |||
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | |||
30: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- | |||
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | |||
50: | |||
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- | |||
70: -- -- -- -- -- -- -- -- | |||
</pre> | </pre> | ||
Line 62: | Line 48: | ||
i2cdump - dump the content of an I2C device <br> | i2cdump - dump the content of an I2C device <br> | ||
i2cset - write a single character to an I2C device<br> | i2cset - write a single character to an I2C device<br> | ||
i2cget - read a single character | i2cget - read a single character from an I2C device.<br> | ||
<br> | <br> | ||
In addition follow 'C' code example as describe in the linux kernel documentation : https://www.kernel.org/doc/Documentation/i2c/dev-interface | 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 = | = Variscite's system integrated I2C devices = | ||
{{note|Note: | {{note|Note: Do not manipulate Variscite's on-SOM EEPROM, or you will damage the SOM!|info}} | ||
When the device is marked with "UU" it says a driver is using it. | When the device is marked with "UU" it says a driver is using it. | ||
<br/>Driver with numbers are available. | <br/>Driver with numbers are available. | ||
<br/>Variscite devices: | <br/>Variscite devices: | ||
< | <pre> | ||
I2C-2 0x38 – focaltech touch | |||
I2C-2 0x68 - RTC On carrier | |||
I2C-2 0x52 - EEPROM on carrier | |||
I2C-2 0x53 - EEPROM on carrier | |||
I2C-2 0x1A – audio codec | |||
I2C-2 0x50 - EEPROM on SOM. Do not write to it! | |||
I2C-2 0x51 - EEPROM on SOM. Do not write to it! | |||
< | </pre> | ||
Latest revision as of 08:57, 21 October 2024
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: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 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: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 51 52 53 -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 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 from 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: Do not 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-2 0x38 – focaltech touch I2C-2 0x68 - RTC On carrier I2C-2 0x52 - EEPROM on carrier I2C-2 0x53 - EEPROM on carrier I2C-2 0x1A – audio codec I2C-2 0x50 - EEPROM on SOM. Do not write to it! I2C-2 0x51 - EEPROM on SOM. Do not write to it!