Skip to contentSkip to conversation

Added TMP421 type sensor's support in yosemitev2

PATCH In review Karthikeyan Pasupathi 2 participants 2 messages Mar 7, 2023 Arm/Aspeed machine support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Added TMP421 type sensor's support in yosemitev2

Added TMP421 type support in yosemite v2 platform.

Tested: Tested and verified in yosemite V2 platform.

---
 hw/arm/aspeed.c | 5 +++++
 1 file changed, 5 insertions(+)
hw/arm/aspeed.c +5 -0
index 86601cb1a5..7b5e603bc4 100644
@@ -524,6 +524,11 @@ static void yosemitev2_bmc_i2c_init(AspeedMachineState *bmc)
     at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 4), 0x51, 128 * KiB);
     at24c_eeprom_init_rom(aspeed_i2c_get_bus(&soc->i2c, 8), 0x51, 128 * KiB,
                           yosemitev2_bmc_fruid, yosemitev2_bmc_fruid_len);
+    /* TMP421 */
+    i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 11), "tmp421", 0x1f);
+    i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 9), "tmp421", 0x4e);
+    i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 9), "tmp421", 0x4f);
+
 }
 
 static void romulus_bmc_i2c_init(AspeedMachineState *bmc)
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Karthikeyan Pasupathi

Added TMP421 type support in yosemite v2 platform.

Tested: Tested and verified in yosemite V2 platform.

Thanks,

C.

Quoted 20 lines
---
  hw/arm/aspeed.c | 5 +++++
  1 file changed, 5 insertions(+)
hw/arm/aspeed.c +5 -0
index 86601cb1a5..7b5e603bc4 100644
@@ -524,6 +524,11 @@ static void yosemitev2_bmc_i2c_init(AspeedMachineState *bmc)
      at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 4), 0x51, 128 * KiB);
      at24c_eeprom_init_rom(aspeed_i2c_get_bus(&soc->i2c, 8), 0x51, 128 * KiB,
                            yosemitev2_bmc_fruid, yosemitev2_bmc_fruid_len);
+    /* TMP421 */
+    i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 11), "tmp421", 0x1f);
+    i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 9), "tmp421", 0x4e);
+    i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 9), "tmp421", 0x4f);
+
  }
 
  static void romulus_bmc_i2c_init(AspeedMachineState *bmc)