Skip to content

How to add emulated I2C slave devices

Robert edited this page Sep 13, 2016 · 2 revisions

Background

Most of the I2C slave devices are accessed through BMC (Baseboard Management Controller) with IPMI master write-read command in physical server. In virtual BMC system, there should be able to emulate an I2C device, and should provide the ability to read/write the I2C devices.

How to add MC

  1. mc_add < address > < ... > ...
  2. mc_enable < address >

How to add I2C slave device and data

mc_add_i2c_data < mc address > < bridged mc address > < i2c slave addr > < offset or command code > < data length > data ...

Note: mc address is the BMC address, bridged mc address is the target MC handling the request, MC will receive the request from users, and then forward the request to the bridged mc.

Example:

mc_add_i2c_data 0x20 0x68 0xb0 0x9c 0x05 data 'C 'H 'I 'N 'A

Clone this wiki locally