[openbmc-qemu]: How does the aspeed-i2c driver in QEMU work?
Cédric Le Goater
clg at kaod.org
Thu Jun 24 21:27:50 AEST 2021
Please copy the openbmc mailing list or better the qemu-devel list for such
On 6/24/21 10:19 AM, www wrote:
> hi Cédric Le Goater，
> I see that you added the aspeed-i2c driver in QEMU. I have some questions about the running of QEMU：
> When there is a function in BMC image that uses I2C to read information from EEPROM, I2C driver in image will set aspeed I2C register, send data to EEPROM and read information from EEPROM(Also read and write aspeeed I2C register). How does QEMU cooperate at this time?
> There is an smbus_slave.c, aspeed_i2c.c. and smbus_eeprom.c in QEMU, how do they cooperate?
aspeed_i2c is the I2C controller model, it defines a set of busses for the
Aspeed SoC. I2C devices are plugged into these busses in the *i2c_init()
routine of each machine (See file aspeed.c). A couple of these machines
(sonorapass, witherspoon ) have EEPROMS. Take a look at these. The I2C
protocol is modeled under the hw/i2c/core.c file, it links the devices
to the controller.
More information about the openbmc