On 9/6/24 07:49, Cédric Le Goater wrote:
Joel,

Would have access to a Bonnell BMC ? To get the HW strapping
register values.

On 9/6/24 14:35, Guenter Roeck wrote:
Introduce support for the IBM Bonnell BMC.

Use Rainier machine information for HW strapping and other machine details
since the actual hardware configuration is unknown. I2C device
instantiation is based on the devicetree file in the upstream Linux kernel.

Major difference to Rainier is that the Bonnell devicetree file
instantiates a TPM. It is therefore possible to test TPM functionality
without having to instantiate the TPM manually from the Linux command
line.

Signed-off-by: Guenter Roeck <li...@roeck-us.net>
---
  hw/arm/aspeed.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 87 insertions(+)

diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index fd5603f7aa..4f833c5708 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -865,6 +865,70 @@ static void rainier_bmc_i2c_init(AspeedMachineState *bmc)
      create_pca9552(soc, 15, 0x60);
  }
+static void bonnell_bmc_i2c_init(AspeedMachineState *bmc)
+{
+    AspeedSoCState *soc = bmc->soc;
+    I2CBus *bus;
+
+    bus = aspeed_i2c_get_bus(&soc->i2c, 0);
+
+    at24c_eeprom_init(bus, 0x51, 8 * KiB);      /* atmel,24c64 */
+    /* tca9554@11:20 */
+    i2c_slave_create_simple(bus, "pca9554", 0x20);


The other machine tend to simply do :

   i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 0), "pca9554", 0x20);

But that's fine.


I know, I tried to avoid multiple calls to aspeed_i2c_get_bus() if the bus
is needed multiple times.

Thanks,
Guenter


Reply via email to