Skip to content

Import QEMU patch files that have been accepted for upstream - #280

Open
eblot wants to merge 1 commit into
facebook:heliumfrom
eblot:export-D114236127
Open

eblot wants to merge 1 commit into
facebook:heliumfrom
eblot:export-D114236127

Conversation

@eblot

@eblot eblot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary:
hw/arm: improve Aspeed Catalina BMC emulation

This series improves emulation of the Aspeed-based Catalina BMC machine,
mostly around its I2C buses: the GPIO expanders the board relies on and
the temperature sensors sitting next to them.

The bulk of the work is on the PCA95xx I/O expander models. The existing
PCA9552 and PCA9554 drivers only really covered the exact parts a couple
of boards happened to use, and some of their register and pin behaviour
did not match the datasheets. Catalina needs a few more variants and
expects them to act like the real chips, so:

  • the PCA9552 driver now provides proper PCA9555/PCA9535 types, applies
    input polarity inversion on reads, and handles the command register
    as the datasheet describes (auto-increment and wrapping);

  • the PCA9554 driver gains the 4-bit PCA9536 variant, reflects
    push-pull
    outputs back into the input register, and grows an opt-in mode that
    honours the configured pin direction instead of forcing pins to
    outputs;

  • both drivers expose each line as a "pinN" QOM property, which lets an
    external actor drive an input pin. The property also allows reading
    the value driven onto an output-configured pin, which is the more
    useful capability, but nothing exercises it yet.

Along the way both models get a fair bit of cleanup (DEFINE_TYPES, the
Resettable interface, state moved out of the headers, default
descriptions derived from the instantiated type).

On the machine itself, Catalina now instantiates its PCA9555 expanders
as their own type, gains the NIC and FIO temperature sensors present on
real hardware, and drives the pca9554 expander input pins from outside
the guest.

Finally, the register-level behaviour of both expanders is covered by
new qtests.

Test Plan:
Run QEMU with a Catalina flash image:

./facebook/start-qemu --pkg-dir rebuild-docker -f .../flash-catalina

Reviewed By: ifel, jamesatha

Differential Revision: D114236127

Summary:
hw/arm: improve Aspeed Catalina BMC emulation

This series improves emulation of the Aspeed-based Catalina BMC machine,
mostly around its I2C buses: the GPIO expanders the board relies on and
the temperature sensors sitting next to them.

The bulk of the work is on the PCA95xx I/O expander models. The existing
PCA9552 and PCA9554 drivers only really covered the exact parts a couple
of boards happened to use, and some of their register and pin behaviour
did not match the datasheets. Catalina needs a few more variants and
expects them to act like the real chips, so:

 - the PCA9552 driver now provides proper PCA9555/PCA9535 types, applies
   input polarity inversion on reads, and handles the command register
   as the datasheet describes (auto-increment and wrapping);

 - the PCA9554 driver gains the 4-bit PCA9536 variant, reflects
push-pull
   outputs back into the input register, and grows an opt-in mode that
   honours the configured pin direction instead of forcing pins to
   outputs;

 - both drivers expose each line as a "pinN" QOM property, which lets an
   external actor drive an input pin. The property also allows reading
   the value driven onto an output-configured pin, which is the more
   useful capability, but nothing exercises it yet.

Along the way both models get a fair bit of cleanup (DEFINE_TYPES, the
Resettable interface, state moved out of the headers, default
descriptions derived from the instantiated type).

On the machine itself, Catalina now instantiates its PCA9555 expanders
as their own type, gains the NIC and FIO temperature sensors present on
real hardware, and drives the pca9554 expander input pins from outside
the guest.

Finally, the register-level behaviour of both expanders is covered by
new qtests.

Test Plan:
Run QEMU with a Catalina flash image:

./facebook/start-qemu --pkg-dir rebuild-docker -f .../flash-catalina

Reviewed By: ifel, jamesatha

Differential Revision: D114236127
@meta-cla meta-cla Bot added the CLA Signed label Aug 3, 2026
@meta-codesync

meta-codesync Bot commented Aug 3, 2026

Copy link
Copy Markdown

@eblot has exported this pull request. If you are a Meta employee, you can view the originating Diff in D114236127.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant