From: Yubin Zou <yubinz@google.com>
To: qemu-devel@nongnu.org
Cc: "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>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Joel Stanley" <joel@jms.id.au>,
"Fabiano Rosas" <farosas@suse.de>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
Kane-Chen-AS <kane_chen@aspeedtech.com>,
"Nabih Estefan" <nabihestefan@google.com>,
qemu-arm@nongnu.org, "Yubin Zou" <yubinz@google.com>
Subject: [PATCH v2 0/6] hw/gpio/aspeed_sgpio: Add Aspeed Serial GPIO (SGPIO) controller model
Date: Tue, 09 Dec 2025 00:01:32 +0000 [thread overview]
Message-ID: <20251209-aspeed-sgpio-v2-0-976e5f5790c2@google.com> (raw)
This series introduces a model for the Aspeed Serial GPIO (SGPIO) controller,
commonly found on Aspeed SoCs such as the AST2700. The SGPIO peripheral
provides a large number of GPIO pins that can be controlled and monitored
serially.
Improvement to QEMU:
These patches enhance QEMU's hardware emulation capabilities for platforms
using Aspeed SoCs, particularly for BMC simulations. By modeling the SGPIO
controller, QEMU can more accurately represent the hardware, allowing for
better development and testing of firmware and software that relies on these
GPIOs for various functions like sensor monitoring, presence detect, and
system control signals.
Impact (Before/After):
Before:
QEMU lacked a model for the Aspeed SGPIO controller. Any guest software
attempting to interact with the SGPIO register space would find no device.
Firmware features depending on SGPIO pin states or interrupts could not be
tested in QEMU.
After:
QEMU emulates the Aspeed SGPIO controller on supported machines (e.g.,
ast2700-evb).
- Guest firmware can configure SGPIO pins, set output values, and read input
values through the memory-mapped registers.
- External entities (like test scripts or other QEMU components) can interact
with the pins via QOM properties (e.g., to simulate external signal changes).
Path example: /machine/soc/sgpio[0]/sgpio0
- The model generates interrupts based on input pin transitions, according to
the configured mode (level/edge), enabling testing of interrupt handlers.
Signed-off-by: Yubin Zou <yubinz@google.com>
---
Changes in v2:
Split the v1 into smaller commits and reorder it for better review:
- Link to v1: https://lore.kernel.org/qemu-devel/20251106-aspeed-sgpio-v1-0-b026093716fa@google.com
---
Yubin Zou (6):
hw/gpio/aspeed_sgpio: Add basic device model for Aspeed SGPIO
hw/gpio/aspeed_sgpio: aspeed: Add QOM property accessors for SGPIO pins
hw/gpio/aspeed_sgpio: Implement SGPIO interrupt handling
hw/arm/aspeed_soc: Update Aspeed SoC to support two SGPIO controllers
hw/arm/aspeed_ast27x0: Wire SGPIO controller to AST2700 SoC
test/qtest: Add Unit test for Aspeed SGPIO
hw/arm/aspeed_ast10x0.c | 6 +-
hw/arm/aspeed_ast27x0.c | 26 +++
hw/gpio/aspeed_sgpio.c | 348 +++++++++++++++++++++++++++++++++++++++
hw/gpio/meson.build | 1 +
include/hw/arm/aspeed_soc.h | 8 +-
include/hw/gpio/aspeed_sgpio.h | 68 ++++++++
tests/qtest/ast2700-sgpio-test.c | 152 +++++++++++++++++
tests/qtest/meson.build | 1 +
8 files changed, 605 insertions(+), 5 deletions(-)
---
base-commit: 917ac07f9aef579b9538a81d45f45850aba42906
change-id: 20251105-aspeed-sgpio-1d49de6cea66
Best regards,
--
Yubin Zou <yubinz@google.com>
next reply other threads:[~2025-12-09 0:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 0:01 Yubin Zou [this message]
2025-12-09 0:01 ` [PATCH v2 1/6] hw/gpio/aspeed_sgpio: Add basic device model for Aspeed SGPIO Yubin Zou
2025-12-09 9:22 ` Cédric Le Goater
2025-12-10 8:02 ` Yubin Zou
2025-12-09 0:01 ` [PATCH v2 2/6] hw/gpio/aspeed_sgpio: aspeed: Add QOM property accessors for SGPIO pins Yubin Zou
2025-12-09 14:52 ` Cédric Le Goater
2025-12-10 8:08 ` Yubin Zou
2025-12-09 0:01 ` [PATCH v2 3/6] hw/gpio/aspeed_sgpio: Implement SGPIO interrupt handling Yubin Zou
2025-12-09 0:01 ` [PATCH v2 4/6] hw/arm/aspeed_soc: Update Aspeed SoC to support two SGPIO controllers Yubin Zou
2025-12-09 16:15 ` Cédric Le Goater
2025-12-09 0:01 ` [PATCH v2 5/6] hw/arm/aspeed_ast27x0: Wire SGPIO controller to AST2700 SoC Yubin Zou
2025-12-09 16:15 ` Cédric Le Goater
2025-12-09 0:01 ` [PATCH v2 6/6] test/qtest: Add Unit test for Aspeed SGPIO Yubin Zou
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=20251209-aspeed-sgpio-v2-0-976e5f5790c2@google.com \
--to=yubinz@google.com \
--cc=andrew@codeconstruct.com.au \
--cc=clg@kaod.org \
--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=nabihestefan@google.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=steven_lee@aspeedtech.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;
as well as URLs for NNTP newsgroup(s).