Skip to contentSkip to conversation

: How does the aspeed-i2c driver in QEMU work?

openbmc-qemu Cédric Le Goater 1 participant 1 message Jun 24, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello Byron,

Please copy the openbmc mailing list or better the qemu-devel list for such questions.

Quoted 7 lines · www

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.

Cheers,

C.