diff options
author | Howard Chiu <howard_chiu@aspeedtech.com> | 2022-05-25 10:00:01 +0000 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2022-05-25 16:22:37 +0200 |
commit | 52bcd997800fab67d57bea6d93e368f6f7a93b24 (patch) | |
tree | 7a6f03191fcde10a36edfe99df8a98df8c6263ce /hw/arm/aspeed.c | |
parent | 554c294514dc7445c5442266a50012ed774d63fe (diff) |
hw/arm/aspeed: Add i2c devices for AST2600 EVB
Add EEPROM and LM75 temperature sensor according to hardware schematic
Signed-off-by: Howard Chiu <howard_chiu@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/arm/aspeed.c')
-rw-r--r-- | hw/arm/aspeed.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 725c169488..98dc185acd 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -527,8 +527,15 @@ static void ast2500_evb_i2c_init(AspeedMachineState *bmc) static void ast2600_evb_i2c_init(AspeedMachineState *bmc) { - /* Start with some devices on our I2C busses */ - ast2500_evb_i2c_init(bmc); + AspeedSoCState *soc = &bmc->soc; + uint8_t *eeprom_buf = g_malloc0(8 * 1024); + + smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 7), 0x50, + eeprom_buf); + + /* LM75 is compatible with TMP105 driver */ + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 8), + TYPE_TMP105, 0x4d); } static void romulus_bmc_i2c_init(AspeedMachineState *bmc) |