From: Jamin Lin <jaminlin1207@gmail.com>
To: Emmanuel Blot <emmanuel.blot@free.fr>
Cc: qemu-devel@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Steven Lee" <steven_lee@aspeedtech.com>,
"Troy Lee" <leetroy@gmail.com>,
"Jamin Lin" <jamin_lin@aspeedtech.com>,
"Kane Chen" <kane_chen@aspeedtech.com>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Joel Stanley" <joel@jms.id.au>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
qemu-arm@nongnu.org, "Patrick Leis" <venture@google.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
qemu-ppc@nongnu.org, qemu-riscv@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Subject: Re: [PATCH v3 48/50] hw/arm: minerva: add Facebook BMC machine
Date: Fri, 16 Oct 2026 17:32:58 +0800 [thread overview]
Message-ID: <atHvSjOrggEyJeaN@JaminLin-PC.aspeed.com> (raw)
In-Reply-To: <20261015-bmc-minerva-v3-48-7d50c8a108e5@free.fr>
On Thu, Oct 15, 2026 at 11:28:35AM +0200, Emmanuel Blot via wrote:
> Add a machine for the Facebook Minerva Chassis Management Module (BMC),
> an AST2600-based board modelled from its device tree
> (aspeed-bmc-facebook-minerva.dts).
>
> The board uses INA230 and INA238 power monitors, TMP75 temperature
> sensors, PCA9555 IO expanders, PCA9545 and PCA9548 I2C muxes, AT24C
> EEPROMs and a DS1339 RTC.
>
> Every device the Minerva device tree describes and QEMU already models
> is instantiated. The remaining ones (LTC4287, XDP710, MAX31790, PCF8563
> and IPMB) have no QEMU model and are left documented as comments.
>
> Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
> ---
> docs/system/arm/aspeed.rst | 1 +
> hw/arm/aspeed_ast2600_minerva.c | 180 ++++++++++++++++++++++++++++++++++++++++
> hw/arm/meson.build | 1 +
> 3 files changed, 182 insertions(+)
>
> diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst
> index f38f33cbe1..bbd3d9cdf4 100644
> --- a/docs/system/arm/aspeed.rst
> +++ b/docs/system/arm/aspeed.rst
> @@ -36,6 +36,7 @@ AST2600 SoC based machines :
> - ``catalina-bmc`` Facebook Catalina BMC
> - ``sanmiguel-bmc`` Facebook SanMiguel BMC
> - ``anacapa-bmc`` Facebook Anacapa BMC
> +- ``minerva-bmc`` Facebook Minerva BMC
> - ``gb200nvl-bmc`` Nvidia GB200nvl BMC
>
> Supported devices
> diff --git a/hw/arm/aspeed_ast2600_minerva.c b/hw/arm/aspeed_ast2600_minerva.c
> new file mode 100644
> index 0000000000..93abc64770
> --- /dev/null
> +++ b/hw/arm/aspeed_ast2600_minerva.c
> @@ -0,0 +1,180 @@
> +/*
> + * Facebook Minerva Chassis Management Module
> + *
> + * Copyright (c) 2026 Meta Platforms, Inc. and affiliates.
> + *
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#include "qemu/osdep.h"
> +#include "hw/arm/aspeed.h"
> +#include "hw/arm/aspeed_soc.h"
> +#include "hw/i2c/i2c_mux_pca954x.h"
> +#include "hw/gpio/pca9552.h"
> +#include "hw/nvram/eeprom_at24c.h"
> +#include "hw/rtc/ds1338.h"
> +#include "hw/sensor/ina230.h"
> +#include "hw/sensor/ina238.h"
> +#include "hw/sensor/tmp105.h"
> +
> +/*
> + * Minerva hardware values.
> + */
> +#define MINERVA_BMC_HW_STRAP1 0x00002002
> +#define MINERVA_BMC_HW_STRAP2 0x00000800
> +#define MINERVA_BMC_RAM_SIZE (2 * GiB)
> +
> +/*
> + * Fan Controller Board (FCB). The Minerva BMC device tree describes six
> + * identical FCBs, each hanging off one channel of the PCA9548 on i2c2.
> + */
> +static void minerva_fcb_i2c_init(I2CBus *bus)
> +{
> + /* eeprom@50 - atmel,24c128 */
> + at24c_eeprom_init(bus, 0x50, 16 * KiB);
> + /* pwm@5e - maxim,max31790 (no model) */
> + /* power-sensor@40/41/44/45 - ti,ina238 */
> + i2c_slave_create_simple(bus, TYPE_INA238, 0x40);
> + i2c_slave_create_simple(bus, TYPE_INA238, 0x41);
> + i2c_slave_create_simple(bus, TYPE_INA238, 0x44);
> + i2c_slave_create_simple(bus, TYPE_INA238, 0x45);
> + /* temperature-sensor@4b - tmp75 */
> + i2c_slave_create_simple(bus, TYPE_TMP75, 0x4b);
> + /* gpio@11/12/13/17 - pca9555 */
> + i2c_slave_create_simple(bus, TYPE_PCA9555, 0x11);
> + i2c_slave_create_simple(bus, TYPE_PCA9555, 0x12);
> + i2c_slave_create_simple(bus, TYPE_PCA9555, 0x13);
> + i2c_slave_create_simple(bus, TYPE_PCA9555, 0x17);
> +}
> +
> +static void minerva_pca9545_eeprom_init(I2CBus *bus, uint8_t addr,
> + unsigned neeprom)
> +{
> + I2CSlave *i2c_mux = i2c_slave_create_simple(bus, TYPE_PCA9545, addr);
> +
> + for (unsigned idx = 0; idx < neeprom; idx++) {
> + at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, idx), 0x50, 8 * KiB);
> + }
> +}
> +
> +static void minerva_bmc_i2c_init(AspeedMachineState *bmc)
> +{
> + /* Reference: aspeed-bmc-facebook-minerva.dts */
> +
> + AspeedSoCState *soc = bmc->soc;
> + I2CBus *i2c[16] = {};
> + I2CSlave *i2c_mux;
> +
> + for (unsigned idx = 0; idx < ARRAY_SIZE(i2c); idx++) {
> + i2c[idx] = aspeed_i2c_get_bus(&soc->i2c, idx);
> + }
> +
> + /* &i2c0 */
> + /* power-monitor@40/41 - ti,ina230 */
> + i2c_slave_create_simple(i2c[0], TYPE_INA230, 0x40);
> + i2c_slave_create_simple(i2c[0], TYPE_INA230, 0x41);
> + /* power-monitor@44 - lltc,ltc4287 (no model) */
> + /* power-monitor@43 - infineon,xdp710 (no model) */
> + /* leds_gpio: gpio@19 - pca9555 */
> + i2c_slave_create_simple(i2c[0], TYPE_PCA9555, 0x19);
> + /* gpio@11/12/13 - pca9555 */
> + i2c_slave_create_simple(i2c[0], TYPE_PCA9555, 0x11);
> + i2c_slave_create_simple(i2c[0], TYPE_PCA9555, 0x12);
> + i2c_slave_create_simple(i2c[0], TYPE_PCA9555, 0x13);
> +
> + /* &i2c1 */
> + /* temperature-sensor@4b/4f - tmp75 */
> + i2c_slave_create_simple(i2c[1], TYPE_TMP75, 0x4b);
> + i2c_slave_create_simple(i2c[1], TYPE_TMP75, 0x4f);
> + /* eeprom@54 - atmel,24c128 */
> + at24c_eeprom_init(i2c[1], 0x54, 16 * KiB);
> +
> + /* &i2c2 */
> + /* i2c-mux@77 (PCA9548) - six Fan Controller Boards */
> + i2c_mux = i2c_slave_create_simple(i2c[2], TYPE_PCA9548, 0x77);
> + /* FCB 1 - imux16 (channel 1) */
> + minerva_fcb_i2c_init(pca954x_i2c_get_bus(i2c_mux, 1));
> + /* FCB 2 - imux17 (channel 0) */
> + minerva_fcb_i2c_init(pca954x_i2c_get_bus(i2c_mux, 0));
> + /* FCB 3 - imux18 (channel 3) */
> + minerva_fcb_i2c_init(pca954x_i2c_get_bus(i2c_mux, 3));
> + /* FCB 4 - imux19 (channel 2) */
> + minerva_fcb_i2c_init(pca954x_i2c_get_bus(i2c_mux, 2));
> + /* FCB 5 - imux20 (channel 4) */
> + minerva_fcb_i2c_init(pca954x_i2c_get_bus(i2c_mux, 4));
> + /* FCB 6 - imux21 (channel 5) */
> + minerva_fcb_i2c_init(pca954x_i2c_get_bus(i2c_mux, 5));
> + /* imux22/imux23 (channels 6/7) - empty */
> +
> + /* &i2c3 */
> + /* i2c-mux@72 (PCA9545) - imux24-27, eeprom@50 on each channel */
> + minerva_pca9545_eeprom_init(i2c[3], 0x72, 4);
> +
> + /* &i2c4 */
> + /* i2c-mux@72 (PCA9545) - imux28-31, eeprom@50 on each channel */
> + minerva_pca9545_eeprom_init(i2c[4], 0x72, 4);
> +
> + /* &i2c5 */
> + /* i2c-mux@72 (PCA9545) - imux32-35, eeprom@50 on each channel */
> + minerva_pca9545_eeprom_init(i2c[5], 0x72, 4);
> +
> + /* &i2c6 */
> + /* i2c-mux@72 (PCA9545) - imux36-39, eeprom@50 on each channel */
> + minerva_pca9545_eeprom_init(i2c[6], 0x72, 4);
> +
> + /* &i2c7 - empty */
> + /* &i2c8 - empty */
> +
> + /* &i2c9 */
> + /* eeprom@50 - atmel,24c64 */
> + at24c_eeprom_init(i2c[9], 0x50, 8 * KiB);
> + /* rtc@51 - nxp,pcf8563 (no model) */
> + /* rtc@68 - dallas,ds1339 */
> + i2c_slave_create_simple(i2c[9], TYPE_DS1339, 0x68);
> +
> + /* &i2c12 */
> + /* i2c-mux@70 (PCA9545) - imux40-42 eeprom@50, imux43 empty */
> + minerva_pca9545_eeprom_init(i2c[12], 0x70, 3);
> +
> + /* &i2c13 */
> + /* i2c-mux@70 (PCA9545) - imux44-46 eeprom@50, imux47 empty */
> + minerva_pca9545_eeprom_init(i2c[13], 0x70, 3);
> +
> + /* &i2c14 */
> + /* ipmb@10 - ipmb-dev (no model) */
> +
> + /* &i2c15 */
> + /* eeprom@50 - atmel,24c128 */
> + at24c_eeprom_init(i2c[15], 0x50, 16 * KiB);
> + /* eeprom@56 - atmel,24c64 */
> + at24c_eeprom_init(i2c[15], 0x56, 8 * KiB);
> +}
> +
> +static void aspeed_machine_minerva_class_init(ObjectClass *oc,
> + const void *data)
> +{
> + MachineClass *mc = MACHINE_CLASS(oc);
> + AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
> +
> + mc->desc = "Facebook Minerva BMC (Cortex-A7)";
> + amc->soc_name = "ast2600-a3";
> + amc->hw_strap1 = MINERVA_BMC_HW_STRAP1;
> + amc->hw_strap2 = MINERVA_BMC_HW_STRAP2;
> + amc->fmc_model = "mx66l1g45g";
> + amc->spi_model = NULL;
> + amc->num_cs = 2;
> + amc->macs_mask = ASPEED_MAC3_ON;
> + amc->i2c_init = minerva_bmc_i2c_init;
> + mc->default_ram_size = MINERVA_BMC_RAM_SIZE;
> + aspeed_machine_class_init_cpus_defaults(mc);
> +}
> +
> +static const TypeInfo aspeed_ast2600_minerva_types[] = {
> + {
> + .name = MACHINE_TYPE_NAME("minerva-bmc"),
> + .parent = TYPE_ASPEED_MACHINE,
> + .class_init = aspeed_machine_minerva_class_init,
> + }
> +};
> +
> +DEFINE_TYPES(aspeed_ast2600_minerva_types)
> diff --git a/hw/arm/meson.build b/hw/arm/meson.build
> index bcc068de04..a9e8270b85 100644
> --- a/hw/arm/meson.build
> +++ b/hw/arm/meson.build
> @@ -63,6 +63,7 @@ arm_common_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
> 'aspeed_ast2600_fby35.c',
> 'aspeed_ast2600_fuji.c',
> 'aspeed_ast2600_gb200nvl.c',
> + 'aspeed_ast2600_minerva.c',
> 'aspeed_ast2600_rainier.c',
> 'aspeed_ast2600_sanmiguel.c',
> 'aspeed_ast10x0.c',
>
> --
> 2.53.0-Meta
>
>
Reviewed-by: Jamin Lin <jaminlin1207@gmail.com>
next prev parent reply other threads:[~2026-10-16 9:33 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 9:27 [PATCH v3 00/50] Aspeed: I2C device models and the Minerva BMC machine Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 01/50] docs/system/arm/aspeed: add the catalina-bmc machine Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 02/50] docs/system/arm/aspeed: add the sanmiguel-bmc machine Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 03/50] hw/arm: sanmiguel: remove the second SPI flash controller Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 04/50] hw/i2c: pca954x: drop unused header inclusions Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 05/50] hw/i2c: pca954x: add PCA9545 4-channel mux model Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 06/50] hw/i2c: pca954x: migrate mux state Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 07/50] tests/qtest: pca9545: add mux test Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 08/50] hw/rtc: ds1338: move TYPE_DS1338 to a public header Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 09/50] hw: ds1338: use the TYPE_DS1338 constant instead of the "ds1338" string Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 10/50] hw/rtc: ds1338: implement Resettable reset Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 11/50] hw/rtc: ds1338: prefix the file-local helpers with ds1338_ Emmanuel Blot via qemu development
2026-10-15 9:27 ` [PATCH v3 12/50] hw/rtc: ds1338: parameterise the register map via a device class Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 13/50] hw/rtc: ds1338: program the clock from the time registers Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 14/50] hw/rtc: ds1338: implement the DS1338 clock-halt bit Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 15/50] hw/rtc: ds1338: refresh the user registers on a read rollover only Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 16/50] hw/rtc: ds1338: add a persist-on-reset property Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 17/50] tests/qtest: ds1338: cover the DS1338-specific register map Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 18/50] tests/qtest: ds1338: cover the power-on register defaults Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 19/50] tests/qtest: ds1338: cover the clock-halt bit Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 20/50] tests/qtest: ds1338: cover persist-on-reset Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 21/50] tests/qtest: ds1338: cover the reserved bits of the time registers Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 22/50] hw/rtc: ds1338: add DS1339 variant Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 23/50] tests/qtest: ds1339: add RTC test Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 24/50] tests/qtest: ds1339: cover power-on defaults and reserved-bit masking Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 25/50] tests/qtest: ds1339: cover oscillator stop/restart and time programming Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 26/50] tests/qtest: ds1339: cover the Century bit Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 27/50] tests/qtest: ds1339: cover the end-of-month rollover Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 28/50] tests/qtest: ds1339: cover the 12-hour format Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 29/50] tests/qtest: ds1339: cover the day-of-week counter Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 30/50] tests/qtest: ds1339: cover persist-on-reset Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 31/50] tests/qtest: ds1339: cover the migration round trip Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 32/50] hw/sensor: ina230: add current/voltage/power monitor Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 33/50] tests/qtest: ina230: add current/voltage/power monitor test Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 34/50] tests/qtest: ina230: cover voltage injection and power derivation Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 35/50] tests/qtest: ina230: cover the ALERT limit functions and CVRF Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 36/50] tests/qtest: ina230: cover the injection-property limits Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 37/50] tests/qtest: ina230: cover operating modes and triggered conversions Emmanuel Blot via qemu development
2026-10-15 14:19 ` Miles Glenn
2026-10-15 9:28 ` [PATCH v3 38/50] tests/qtest: ina230: cover ALERT latch persistence Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 39/50] tests/qtest: ina230: cover a cleared calibration per channel Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 40/50] hw/sensor: ina238: add current/voltage/power monitor Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 41/50] tests/qtest: ina238: add current/voltage/power monitor test Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 42/50] tests/qtest: ina238: cover voltage/temperature injection and derivation Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 43/50] tests/qtest: ina238: cover the ALERT path and conversion-ready flag Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 44/50] tests/qtest: ina238: cover the injection-property limits Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 45/50] tests/qtest: ina238: cover the operating modes Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 46/50] tests/qtest: ina238: cover conversion-ready and alert-latch semantics Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 47/50] tests/qtest: ina238: cover a cleared calibration per channel Emmanuel Blot via qemu development
2026-10-15 9:28 ` [PATCH v3 48/50] hw/arm: minerva: add Facebook BMC machine Emmanuel Blot via qemu development
2026-10-16 9:32 ` Jamin Lin [this message]
2026-10-15 9:28 ` [PATCH v3 49/50] hw/arm: minerva: populate EEPROM data Emmanuel Blot via qemu development
2026-10-16 9:25 ` Jamin Lin
2026-10-15 9:28 ` [PATCH v3 50/50] tests/functional/arm: minerva: add BMC boot test Emmanuel Blot via qemu development
2026-10-16 9:29 ` Jamin Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atHvSjOrggEyJeaN@JaminLin-PC.aspeed.com \
--to=jaminlin1207@gmail.com \
--cc=andrew@codeconstruct.com.au \
--cc=clg@kaod.org \
--cc=emmanuel.blot@free.fr \
--cc=farosas@suse.de \
--cc=jamin_lin@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=kane_chen@aspeedtech.com \
--cc=leetroy@gmail.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@oss.qualcomm.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=steven_lee@aspeedtech.com \
--cc=venture@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox