[PATCH v2 0/8] Add IBM Huygens BMC machine for AST2700
Mikail Sadic <[email protected]> Thu, 30 Jul 2026 15:09:35 -0500
| Newsgroups | org.nongnu.qemu-arm,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
This series adds initial support for the IBM Huygens BMC, the baseboard
management controller of an IBM POWER12 server platform, based on the
ASPEED AST2700 A2 SoC.
It introduces a CFAM-S FSI responder model, wires the AST2700 FSI
controllers to their APB-to-OPB bridges, fixes an aspeed I2C DMA
block-read corner case, adds a TI UCD90320 PMBus power-sequencer model,
refactors the UFS device into a shared core with a new AST2700 sysbus
frontend, and finally adds the huygens-bmc machine that ties these
together to boot OpenBMC from FMC flash and a UFS root filesystem.
Patch summary:
1. fsi/cfam: a common CFAM model holding the slot, config table,
responder and local bus, with the existing cfam as its first
derivative. No functional change to the existing cfam.
2. fsi/cfam: the CFAM-S as a second derivative - its own config table,
the slave-ID alias window, and a v1 mailbox engine added to lbus.c
alongside the scratchpad.
3. arm/aspeed: wire the two AST2700 FSI controllers to their APB-to-OPB
bridges.
4. i2c/aspeed: fix DMA-receive first-byte handling so SMBus block reads
(I2C_M_RECV_LEN) report the correct length.
5. hw/sensor: TI UCD90320 24-rail PMBus power sequencer.
6. ufs: refactor the transport-independent UFS core out of the PCI
device (SDHCI/XHCI-style) so PCI and sysbus frontends share it.
TYPE_UFS stays a PCI device and -device ufs is unchanged.
7. ufs/aspeed: AST2700 sysbus UFS frontend on the shared core.
8. arm/aspeed: the huygens-bmc machine.
Changes since v1:
* Split the original 5 commits into 8. The aspeed I2C DMA fix, the FSI
controller wiring, the CFAM common base class, and the UFS
core-vs-frontend split are now separate patches (each buildable on its
own).
* UFS: reworked per review (Jeuk Kim). Instead of a second, standalone
UFS implementation, the common core (register block, UTRL/UTMRL, UPIU,
query and ufs-lu handling) is separated from the PCI glue (DMA address
space, IRQ, realize) so the AST2700 controller is a thin sysbus
frontend on top of it, following the SDHCI/XHCI pattern. Two small,
backwards-compatible additions ride on the core: a configurable ufs-lu
logical-block-size (default unchanged, so the PCI device is unaffected)
and an unmapped-LUN INQUIRY that reports "not connected" instead of
failing the request. The PCI ufs-tests qtests still pass.
* CFAM-S: reworked per review (Ninad). It now shares a common base class
with the cfam rather than being a parallel implementation: patch 1 adds
an abstract cfam-common whose realize is driven by an FSICFAMCommonClass
(config table, responder and local-bus offsets, and an engines hook),
and both cfam and cfam-s derive from it. They are siblings rather than
parent and child, since a CFAM-S is another kind of CFAM and not a
specialisation of the P9 one. Patch 2 adds cfam-s supplying only its own
config table, its mailbox engine and the slave-ID alias window; the v1
mailbox is a local bus engine so it sits in lbus.c next to the
scratchpad. Duplicated code has been cleaned. Two behavior changes
follow from sharing the common config ops, both noted in patch 2: cfam-s
now honors the SID_BREAK sequence, and config-table access is word-only
for both types. Also made generic, all specific references dropped.
Patch 1 is intended to be a no-op for the existing cfam, and was
checked that way: aspeed_fsi-test passes, the four P9 config words read
back identically over the OPB, and "info mtree" for ast2600-evb is
unchanged. The Rainier boot test was also run and verified.
* i2c/aspeed: the DMA block-read fix is now its own patch, with a commit
message explaining the I2C_M_RECV_LEN + DMA interaction (Cédric).
* UCD90320: the device-id/monitor-config/mfr-status responses are now
device reset state rather than file-scope constants, with matching
VMState (Cédric).
* Docs: the huygens-bmc and aspeed-ufs boot examples now use -blockdev
instead of -drive (Cédric).
* Machine: commit message expanded (POWER12 BMC on AST2700 A2), the VPD
buffer uses g_autofree, the docs describe the flash-vs-UFS split, and
the networking example was simplified.
* New device files use DEFINE_TYPES() with inlined TypeInfo (Jamin Lin).
* Dropped the v1 functional test for now: depends on non-public Huygens
images. It will be resent once images go public.
Testing done:
* Whole series builds.
* aspeed_fsi-test passes (4/4), unchanged by the CFAM refactor.
* huygens-bmc boots OpenBMC to the login prompt and multi-user target
from FMC flash + UFS storage (internal images).
* PCI UFS ufs-tests qtests pass, unchanged by the refactor.
* make check passes all tests.
Note: checkpatch reports a couple of MAINTAINERS/SPDX warnings for the
new files; they are covered by existing wildcard entries in the ASPEED
and FSI sections.
Thank you for all of the helpful feedback.
Mikail Sadic (8):
fsi/cfam: Add common CFAM base class
fsi/cfam: Add CFAM-S model
arm/aspeed: Wire AST2700 FSI controllers to APB-to-OPB bridges
i2c/aspeed: Fix DMA receive first-byte handling for block reads
hw/sensor: Add UCD90320 model
ufs: Refactor common core out of the PCI implementation
ufs/aspeed: Add AST2700 sysbus UFS frontend
arm/aspeed: Add AST2700 Huygens machine
MAINTAINERS | 2 +
docs/specs/aspeed-ufs.rst | 40 ++++++
docs/specs/fsi.rst | 15 ++
docs/specs/index.rst | 2 +
docs/specs/ucd90320.rst | 36 +++++
docs/system/arm/aspeed.rst | 50 ++++++-
hw/ufs/ufs.h | 18 ++-
include/hw/arm/aspeed.h | 1 +
include/hw/arm/aspeed_soc.h | 3 +
include/hw/fsi/cfam-s.h | 40 ++++++
include/hw/fsi/cfam.h | 68 ++++++++-
include/hw/fsi/fsi-master.h | 2 +
include/hw/fsi/lbus.h | 11 ++
include/hw/ufs/aspeed_ufs.h | 16 +++
hw/arm/aspeed.c | 25 ++++
hw/arm/aspeed_ast27x0.c | 31 ++++
hw/arm/aspeed_ast27x0_huygens.c | 241 ++++++++++++++++++++++++++++++++
hw/fsi/cfam-s.c | 91 ++++++++++++
hw/fsi/cfam.c | 123 +++++++++-------
hw/fsi/fsi-master.c | 9 +-
hw/fsi/lbus.c | 69 +++++++++
hw/i2c/aspeed_i2c.c | 7 +
hw/sensor/ucd90320.c | 169 ++++++++++++++++++++++
hw/ufs/aspeed_ufs.c | 75 ++++++++++
hw/ufs/lu.c | 50 ++++++-
hw/ufs/ufs.c | 57 +++++---
hw/arm/Kconfig | 1 +
hw/arm/meson.build | 1 +
hw/fsi/meson.build | 2 +-
hw/fsi/trace-events | 2 +
hw/sensor/Kconfig | 4 +
hw/sensor/meson.build | 1 +
hw/ufs/meson.build | 1 +
33 files changed, 1182 insertions(+), 81 deletions(-)
create mode 100644 docs/specs/aspeed-ufs.rst
create mode 100644 docs/specs/ucd90320.rst
create mode 100644 include/hw/fsi/cfam-s.h
create mode 100644 include/hw/ufs/aspeed_ufs.h
create mode 100644 hw/arm/aspeed_ast27x0_huygens.c
create mode 100644 hw/fsi/cfam-s.c
create mode 100644 hw/sensor/ucd90320.c
create mode 100644 hw/ufs/aspeed_ufs.c
base-commit: e1705a25aff35635c360bbaba4c2731d019a422a
--
2.53.0