All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/50] Aspeed: I2C device models and the Minerva BMC machine
@ 2026-10-15  9:27 ` Emmanuel Blot via
  0 siblings, 0 replies; 157+ messages in thread
From: Emmanuel Blot via @ 2026-10-15  9:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cédric Le Goater, Peter Maydell, Steven Lee, Troy Lee,
	Jamin Lin, Kane Chen, Andrew Jeffery, Joel Stanley,
	Pierrick Bouvier, qemu-arm, Patrick Leis, Fabiano Rosas,
	Laurent Vivier, Paolo Bonzini, qemu-ppc, qemu-riscv,
	Philippe Mathieu-Daudé, Emmanuel Blot, Jamin Lin,
	Cédric Le Goater, Bernhard Beschow, Glenn Miles

Add the minerva-bmc machine and the I2C device models it needs.

Based on master, at:
  615ece3c40 ("Merge tag 'for-upstream' of
  https://gitlab.com/bonzini/qemu into staging")

New models:

  INA230   TI 36V current-shunt and power monitor
  INA238   TI 85V current-shunt, power and temperature monitor
  DS1339   RTC, a DS1338 variant
  PCA9545  4-channel I2C mux with per-channel interrupt inputs

The INA devices derive current and power from the shunt voltage and
their calibration registers. ALERT output is supported. Measurements
come in through QOM properties; however, conversion delay is not
modelled.

Introduce a device class to manage different variants of the DS1338
register map, such as the DS1339. Improve the DS1338 implementation
with a Resettable reset, support for the clock-halt bit, and a
"persist-on-reset" property keeping the registers across a reset.

The minerva-bmc machine is derived from the platform device tree and
instantiates every device that is supported in QEMU. FRU EEPROMs are
sanitised images taken from real hardware.

New qtests for the DS1339, INA230, INA238 and PCA9545, plus DS1338
cases for the register map, and a functional test booting OpenBMC on
minerva-bmc.

The docs now mention the previously missing catalina-bmc and
sanmiguel-bmc machines, and the title has been simplified.

One thing worth a second opinion: the PCA954x muxes now have a
VMStateDescription, which changes the migration stream for the
existing PCA9546 and PCA9548. The DS1338 vmstate also goes from
version 2 to 3, but older streams still load fine.

Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
---
Changes in v3:
- ina230: drop a stray comment in the operating-modes test.
- Link to v2: https://lore.kernel.org/qemu-devel/20261012-bmc-minerva-v2-0-4c3dff084ec9@free.fr

Changes in v2:
- Rebase onto master, which now contains the v1 base.
- minerva: drop ASPEED_RAM_SIZE, removed upstream.
- No other changes; v1 received no review comments.
- Link to v1: https://lore.kernel.org/qemu-devel/20260907-bmc-minerva-v1-0-0d83ad610c3b@free.fr

---
Emmanuel Blot (50):
      docs/system/arm/aspeed: add the catalina-bmc machine
      docs/system/arm/aspeed: add the sanmiguel-bmc machine
      hw/arm: sanmiguel: remove the second SPI flash controller
      hw/i2c: pca954x: drop unused header inclusions
      hw/i2c: pca954x: add PCA9545 4-channel mux model
      hw/i2c: pca954x: migrate mux state
      tests/qtest: pca9545: add mux test
      hw/rtc: ds1338: move TYPE_DS1338 to a public header
      hw: ds1338: use the TYPE_DS1338 constant instead of the "ds1338" string
      hw/rtc: ds1338: implement Resettable reset
      hw/rtc: ds1338: prefix the file-local helpers with ds1338_
      hw/rtc: ds1338: parameterise the register map via a device class
      hw/rtc: ds1338: program the clock from the time registers
      hw/rtc: ds1338: implement the DS1338 clock-halt bit
      hw/rtc: ds1338: refresh the user registers on a read rollover only
      hw/rtc: ds1338: add a persist-on-reset property
      tests/qtest: ds1338: cover the DS1338-specific register map
      tests/qtest: ds1338: cover the power-on register defaults
      tests/qtest: ds1338: cover the clock-halt bit
      tests/qtest: ds1338: cover persist-on-reset
      tests/qtest: ds1338: cover the reserved bits of the time registers
      hw/rtc: ds1338: add DS1339 variant
      tests/qtest: ds1339: add RTC test
      tests/qtest: ds1339: cover power-on defaults and reserved-bit masking
      tests/qtest: ds1339: cover oscillator stop/restart and time programming
      tests/qtest: ds1339: cover the Century bit
      tests/qtest: ds1339: cover the end-of-month rollover
      tests/qtest: ds1339: cover the 12-hour format
      tests/qtest: ds1339: cover the day-of-week counter
      tests/qtest: ds1339: cover persist-on-reset
      tests/qtest: ds1339: cover the migration round trip
      hw/sensor: ina230: add current/voltage/power monitor
      tests/qtest: ina230: add current/voltage/power monitor test
      tests/qtest: ina230: cover voltage injection and power derivation
      tests/qtest: ina230: cover the ALERT limit functions and CVRF
      tests/qtest: ina230: cover the injection-property limits
      tests/qtest: ina230: cover operating modes and triggered conversions
      tests/qtest: ina230: cover ALERT latch persistence
      tests/qtest: ina230: cover a cleared calibration per channel
      hw/sensor: ina238: add current/voltage/power monitor
      tests/qtest: ina238: add current/voltage/power monitor test
      tests/qtest: ina238: cover voltage/temperature injection and derivation
      tests/qtest: ina238: cover the ALERT path and conversion-ready flag
      tests/qtest: ina238: cover the injection-property limits
      tests/qtest: ina238: cover the operating modes
      tests/qtest: ina238: cover conversion-ready and alert-latch semantics
      tests/qtest: ina238: cover a cleared calibration per channel
      hw/arm: minerva: add Facebook BMC machine
      hw/arm: minerva: populate EEPROM data
      tests/functional/arm: minerva: add BMC boot test

 docs/system/arm/aspeed.rst                  |   7 +-
 hw/arm/Kconfig                              |   2 +
 hw/arm/aspeed_ast2400_palmetto.c            |   4 +-
 hw/arm/aspeed_ast2400_supermicrox11.c       |   4 +-
 hw/arm/aspeed_ast2500_romulus.c             |   4 +-
 hw/arm/aspeed_ast2500_supermicro-x11spi.c   |   4 +-
 hw/arm/aspeed_ast2500_witherspoon.c         |   4 +-
 hw/arm/aspeed_ast2600_bletchley.c           |   3 +-
 hw/arm/aspeed_ast2600_catalina.c            |   2 +-
 hw/arm/aspeed_ast2600_minerva.c             | 856 ++++++++++++++++++++++++++++
 hw/arm/aspeed_ast2600_sanmiguel.c           |   7 +-
 hw/arm/meson.build                          |   1 +
 hw/arm/realview.c                           |   3 +-
 hw/arm/versatilepb.c                        |   3 +-
 hw/i2c/i2c_mux_pca954x.c                    |  98 +++-
 hw/ppc/e500.c                               |   3 +-
 hw/riscv/tt_atlantis.c                      |   3 +-
 hw/rtc/ds1338.c                             | 427 +++++++++++---
 hw/sensor/Kconfig                           |   8 +
 hw/sensor/ina230.c                          | 597 +++++++++++++++++++
 hw/sensor/ina238.c                          | 802 ++++++++++++++++++++++++++
 hw/sensor/meson.build                       |   2 +
 hw/sensor/trace-events                      |  14 +
 include/hw/i2c/i2c_mux_pca954x.h            |   1 +
 include/hw/rtc/ds1338.h                     |  21 +
 include/hw/sensor/ina230.h                  |  14 +
 include/hw/sensor/ina238.h                  |  14 +
 tests/functional/arm/meson.build            |   2 +
 tests/functional/arm/test_aspeed_minerva.py |  30 +
 tests/qtest/ds1338-test.c                   | 191 ++++++-
 tests/qtest/ds1339-test.c                   | 581 +++++++++++++++++++
 tests/qtest/ina230-test.c                   | 602 +++++++++++++++++++
 tests/qtest/ina238-test.c                   | 806 ++++++++++++++++++++++++++
 tests/qtest/meson.build                     |   4 +
 tests/qtest/pca9545-test.c                  | 116 ++++
 35 files changed, 5125 insertions(+), 115 deletions(-)
---
base-commit: 615ece3c406b262996e569f29ea6eed0d81c4d8d
change-id: 20260907-bmc-minerva-cd13a718c90b

Best regards,
--  
Emmanuel Blot <emmanuel.blot@free.fr>



^ permalink raw reply	[flat|nested] 157+ messages in thread

end of thread, other threads:[~2026-10-16  9:33 UTC | newest]

Thread overview: 157+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15  9:27 [PATCH v3 00/50] Aspeed: I2C device models and the Minerva BMC machine Emmanuel Blot via
2026-10-15  9:27 ` Emmanuel Blot via qemu development
2026-10-15  9:27 ` Emmanuel Blot via
2026-10-15  9:27 ` [PATCH v3 01/50] docs/system/arm/aspeed: add the catalina-bmc machine Emmanuel Blot via
2026-10-15  9:27   ` Emmanuel Blot via
2026-10-15  9:27   ` 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
2026-10-15  9:27   ` Emmanuel Blot via
2026-10-15  9:27   ` 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
2026-10-15  9:27   ` Emmanuel Blot via qemu development
2026-10-15  9:27   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:27   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:27   ` Emmanuel Blot via
2026-10-15  9:27 ` [PATCH v3 06/50] hw/i2c: pca954x: migrate mux state Emmanuel Blot via
2026-10-15  9:27   ` Emmanuel Blot via qemu development
2026-10-15  9:27   ` Emmanuel Blot via
2026-10-15  9:27 ` [PATCH v3 07/50] tests/qtest: pca9545: add mux test Emmanuel Blot via
2026-10-15  9:27   ` Emmanuel Blot via
2026-10-15  9:27   ` 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
2026-10-15  9:27   ` Emmanuel Blot via
2026-10-15  9:27   ` 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
2026-10-15  9:27   ` Emmanuel Blot via qemu development
2026-10-15  9:27   ` Emmanuel Blot via
2026-10-15  9:27 ` [PATCH v3 10/50] hw/rtc: ds1338: implement Resettable reset Emmanuel Blot via
2026-10-15  9:27   ` Emmanuel Blot via
2026-10-15  9:27   ` 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   ` Emmanuel Blot via
2026-10-15  9:27   ` Emmanuel Blot via
2026-10-15  9:27 ` [PATCH v3 12/50] hw/rtc: ds1338: parameterise the register map via a device class Emmanuel Blot via
2026-10-15  9:27   ` Emmanuel Blot via
2026-10-15  9:27   ` 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
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 15/50] hw/rtc: ds1338: refresh the user registers on a read rollover only Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 16/50] hw/rtc: ds1338: add a persist-on-reset property Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 17/50] tests/qtest: ds1338: cover the DS1338-specific register map Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 18/50] tests/qtest: ds1338: cover the power-on register defaults Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` 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
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 23/50] tests/qtest: ds1339: add RTC test Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 24/50] tests/qtest: ds1339: cover power-on defaults and reserved-bit masking Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 26/50] tests/qtest: ds1339: cover the Century bit Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 27/50] tests/qtest: ds1339: cover the end-of-month rollover Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` 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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 29/50] tests/qtest: ds1339: cover the day-of-week counter Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28 ` [PATCH v3 30/50] tests/qtest: ds1339: cover persist-on-reset Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 31/50] tests/qtest: ds1339: cover the migration round trip Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 32/50] hw/sensor: ina230: add current/voltage/power monitor Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` 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
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 34/50] tests/qtest: ina230: cover voltage injection and power derivation Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` 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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 37/50] tests/qtest: ina230: cover operating modes and triggered conversions Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` 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
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` 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
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` 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
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` 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
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` 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
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` 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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 45/50] tests/qtest: ina238: cover the operating modes Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
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   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28 ` [PATCH v3 48/50] hw/arm: minerva: add Facebook BMC machine Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-16  9:32   ` Jamin Lin
2026-10-15  9:28 ` [PATCH v3 49/50] hw/arm: minerva: populate EEPROM data Emmanuel Blot via qemu development
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
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-15  9:28   ` Emmanuel Blot via
2026-10-15  9:28   ` Emmanuel Blot via
2026-10-16  9:29   ` Jamin Lin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.