beautypg.com

Table 7-8, U-boot i2c utilities – Artesyn COMX-P40x0 ENP2 Installation and Use (January 2015) User Manual

Page 111

background image

BSP

COMX-P40x0 ENP2 Installation and Use (6806800R95C)

111

U-Boot provides the following utilities for I2C bus and devices.

I2C buses in the U-Boot have been re-assigned as follows:

The devices displayed via the "i2c probe" command are 7-bit I2C addresses. The addresses
found in the HW

Table 4-8 on page 86

are 8-bit addresses. (For example: 7-bit address 0x18

corresponds to the 8-bit address 0x30)

Table 7-8 U-Boot I2C Utilities

Utility

Description

i2c crc32 chip address[.0, .1, .2] count

Compute CRC32 checksum

i2c dev [dev]

Shows or sets current I2C bus

i2c loop chip address[.0, .1, .2] [# of objects]
[# of delay(us)]

Loops reading of device

i2c md chip address[.0, .1, .2] [# of objects]

Reads from I2C device

i2c mm chip address[.0, .1, .2]

Writes to I2C device (auto-incrementing)

i2c mw chip address[.0, .1, .2] value [count]

Writes to I2C device (fill)

i2c nm chip address[.0, .1, .2]

Writes to I2C device (constant address)

i2c probe

Shows devices on the I2C bus

i2c read chip address[.0, .1, .2] length
memaddress

Reads to memory

i2c reset

Re-initializes the I2C Controller

i2c speed [speed]

Shows or set I2C bus speed

’i2c dev 0’ selects I2C<1>

’i2c dev 1’ selects I2C<2>

’i2c dev 2’ selects I2C<4>