[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/14] aspeed: Add oby35-cl machine
From: |
Peter Delevoryas |
Subject: |
[PATCH 11/14] aspeed: Add oby35-cl machine |
Date: |
Mon, 27 Jun 2022 12:55:03 -0700 |
Signed-off-by: Peter Delevoryas <pdel@fb.com>
---
hw/arm/aspeed.c | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index a06f7c1b62..2b9c1600c6 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -1429,6 +1429,42 @@ static void
aspeed_minibmc_machine_ast1030_evb_class_init(ObjectClass *oc,
amc->macs_mask = 0;
}
+static void oby35_cl_i2c_init(AspeedMachineState *bmc)
+{
+ AspeedSoCState *soc = &bmc->soc;
+ I2CBus *i2c[14];
+ I2CBus *ssd[8];
+ int i;
+
+ for (i = 0; i < 14; i++) {
+ i2c[i] = aspeed_i2c_get_bus(&soc->i2c, i);
+ }
+ get_pca9548_channels(i2c[1], 0x71, ssd);
+
+ i2c_slave_create_simple(i2c[0], "fby35-cpld", 0x21);
+ i2c_slave_create_simple(i2c[1], "tmp105", 0x48);
+ i2c_slave_create_simple(i2c[1], "tmp105", 0x49);
+ i2c_slave_create_simple(i2c[1], "tmp105", 0x4a);
+ i2c_slave_create_simple(i2c[1], "adm1272", 0x40);
+ i2c_slave_create_simple(i2c[1], "tmp421", 0x4c);
+ i2c_slave_create_simple(i2c[4], "isl69259", 0x76);
+ i2c_slave_create_simple(i2c[4], "isl69259", 0x62);
+ i2c_slave_create_simple(i2c[4], "isl69259", 0x60);
+
+ for (int i = 0; i < 8; i++) {
+ i2c_slave_create_simple(ssd[i], "tmp105", 0x6a);
+ }
+}
+
+static void aspeed_machine_oby35_cl_class_init(ObjectClass *oc, void *data)
+{
+ MachineClass *mc = MACHINE_CLASS(oc);
+ AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
+
+ mc->desc = "Meta Platforms fby35 CraterLake BIC (Cortex-M4)";
+ amc->i2c_init = oby35_cl_i2c_init;
+}
+
static const TypeInfo aspeed_machine_types[] = {
{
.name = MACHINE_TYPE_NAME("palmetto-bmc"),
@@ -1494,6 +1530,10 @@ static const TypeInfo aspeed_machine_types[] = {
.name = MACHINE_TYPE_NAME("ast1030-evb"),
.parent = TYPE_ASPEED_MACHINE,
.class_init = aspeed_minibmc_machine_ast1030_evb_class_init,
+ }, {
+ .name = MACHINE_TYPE_NAME("oby35-cl"),
+ .parent = MACHINE_TYPE_NAME("ast1030-evb"),
+ .class_init = aspeed_machine_oby35_cl_class_init,
}, {
.name = TYPE_ASPEED_MACHINE,
.parent = TYPE_MACHINE,
--
2.30.2
- [PATCH 08/14] hw/misc: Add fby35-cpld, (continued)
- [PATCH 08/14] hw/misc: Add fby35-cpld, Peter Delevoryas, 2022/06/27
- [PATCH 07/14] aspeed: Add PECI controller, Peter Delevoryas, 2022/06/27
- [PATCH 10/14] pmbus: Add read-only IC_DEVICE_ID support, Peter Delevoryas, 2022/06/27
- [PATCH 09/14] pmbus: Reset out buf after switching pages, Peter Delevoryas, 2022/06/27
- [PATCH 11/14] aspeed: Add oby35-cl machine,
Peter Delevoryas <=
- Re: [PATCH 00/14] aspeed: Add I2C new register DMA slave mode support, Peter Delevoryas, 2022/06/27
- [PATCH 12/14] hw/misc: Add intel-me, Peter Delevoryas, 2022/06/27
- [PATCH 13/14] aspeed: Add intel-me on i2c6 instead of BMC, Peter Delevoryas, 2022/06/27
- Re: [PATCH 12/14] hw/misc: Add intel-me, Cédric Le Goater, 2022/06/28
- Re: [PATCH 00/14] aspeed: Add I2C new register DMA slave mode support, Cédric Le Goater, 2022/06/28