DART-SD410 Debian I2C-5.7.0

From Variscite Wiki
Revision as of 13:19, 26 November 2020 by Leonid (talk | contribs) (Created page with "{{PageHeader|DART-SD410 - I2C}} {{DocImage|category1=DART-SD410|category2=Debian}} __toc__ = Available I2C buses = List I2C available devices: <pre> # ls -l /dev/i2c-* crw-rw...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
DART-SD410 - I2C

Available I2C buses

List I2C available devices:

# ls -l /dev/i2c-*
crw-rw---- 1 root i2c 89, 0 Jun  7  2020 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 Jun  7  2020 /dev/i2c-1
crw-rw---- 1 root i2c 89, 3 Jun  7  2020 /dev/i2c-3
crw-rw---- 1 root i2c 89, 4 Jun  7  2020 /dev/i2c-4

System class:

# ls /sys/class/i2c-dev/
i2c-0  i2c-1  i2c-3  i2c-4

I2C devices per bus

Scan bus 0:

root@linaro-alip:/sys/class/rtc/rtc0# 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@linaro-alip:~# i2cdetect -y -r 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Scan bus 3:

root@linaro-alip:/sys/class/rtc/rtc0# i2cdetect -y -r 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- --
30: -- -- -- -- -- -- -- -- 38 39 -- -- 3c -- -- 3f
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Scan bus 4 is not enabled because this is Camera Control Interface:

root@linaro-alip:/sys/class/rtc/rtc0# i2cdetect -y -r 4
Error: Bus doesn't support detection commands

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 described 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 Touch controller


  • I2C-3 0x2C DSI to LVDS bridge
  • I2C-3 0x38 DSI to HDMI bridge
  • I2C-3 0x39 DSI to HDMI bridge
  • I2C-3 0x3C DUMMY driver
  • I2C-3 0x3F DUMMY driver
  • I2C-3 0x50..0x57 SOM EEPROM - do not alter
  • I2C-3 0x68 VAR-SD410CustomBoard DS1307 RTC