From: Jamin Lin <jamin_lin@aspeedtech.com>
To: "Cédric Le Goater" <clg@kaod.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Steven Lee" <steven_lee@aspeedtech.com>,
"Troy Lee" <leetroy@gmail.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>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
"open list:All patches CC here" <qemu-devel@nongnu.org>
Cc: Jamin Lin <jamin_lin@aspeedtech.com>, Troy Lee <troy_lee@aspeedtech.com>
Subject: [PATCH v1 1/9] hw/arm/aspeed_ast1040: Add common init function for AST1040/AST1080 SoCs
Date: Thu, 15 Oct 2026 06:36:27 +0000 [thread overview]
Message-ID: <20261015063625.186708-2-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20261015063625.186708-1-jamin_lin@aspeedtech.com>
AST1040 and AST1080 are the next-generation SoCs of AST1030 and AST1060,
respectively.
The AST1030 and AST1060 SoCs share common initialization through
aspeed_soc_ast10x0_init(). Similarly, introduce
aspeed_soc_ast10x0_g2_init() to provide common initialization for the
AST1040 and AST1080 SoCs.
Move the shared AST1040 initialization into the new common function so
that it can be reused when adding AST1080 support. The PECI and eSPI
controllers are only available on the AST1040, so their initialization
is kept in aspeed_soc_ast1040_init().
No functional changes.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
hw/arm/aspeed_ast1040.c | 36 +++++++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git a/hw/arm/aspeed_ast1040.c b/hw/arm/aspeed_ast1040.c
index 74a1097bd7..5d2713e8bb 100644
--- a/hw/arm/aspeed_ast1040.c
+++ b/hw/arm/aspeed_ast1040.c
@@ -81,19 +81,23 @@ static const int aspeed_soc_ast1040_irqmap[] = {
[ASPEED_DEV_PECI] = 164,
};
-static const UnimplementedDeviceConfig aspeed_soc_ast1040_unimp_devs[] = {
- { "pwm", "aspeed.pwm", 0x740C0000, 0x10000, -1000 },
- { "espi", "aspeed.espi", 0x74C05000, 0x1000, -1000 },
- { "udc", "aspeed.udc", 0x74120000, 0x4000, -1000 },
- { "jtag[0]", "aspeed.jtag0", 0x74C01000, 0x100, -1000 },
- { "jtag[1]", "aspeed.jtag1", 0x74C09000, 0x100, -1000 },
+static const UnimplementedDeviceConfig aspeed_soc_ast10x0_g2_unimp_devs[] = {
{ "fmc-filter", "aspeed.fmc-filter", 0x74000400, 0x1000, -1000 },
{ "spi0-filter", "aspeed.spi0-filter", 0x74010400, 0x1000, -1000 },
{ "spi1-filter", "aspeed.spi1-filter", 0x74020400, 0x1000, -1000 },
+ { "pwm", "aspeed.pwm", 0x740C0000, 0x10000, -1000 },
+ { "udc", "aspeed.udc", 0x74120000, 0x4000, -1000 },
+ { "caliptra", "aspeed.caliptra", 0x74200000, 0x100000, -1000 },
+ { "jtag[0]", "aspeed.jtag0", 0x74C01000, 0x100, -1000 },
{ "otp", "aspeed.otp", 0x74C07000, 0x800, -1000 },
- { "atc", "aspeed.atc", 0x74C35000, 0x100, -1000 },
+ { "jtag[1]", "aspeed.jtag1", 0x74C09000, 0x100, -1000 },
{ "i3c", "aspeed.i3c", 0x74C20000, 0x8000, -1000 },
- { "caliptra", "aspeed.caliptra", 0x74200000, 0x100000, -1000 },
+ { "atc", "aspeed.atc", 0x74C35000, 0x100, -1000 },
+ { }
+};
+
+static const UnimplementedDeviceConfig aspeed_soc_ast1040_unimp_devs[] = {
+ { "espi", "aspeed.espi", 0x74C05000, 0x1000, -1000 },
{ }
};
@@ -105,7 +109,7 @@ static qemu_irq aspeed_soc_ast1040_get_irq(AspeedSoCState *s, int dev)
return qdev_get_gpio_in(DEVICE(&a->armv7m), sc->irqmap[dev]);
}
-static void aspeed_soc_ast1040_init(Object *obj)
+static void aspeed_soc_ast10x0_g2_init(Object *obj)
{
Aspeed10x0SoCState *a = ASPEED10X0_SOC(obj);
AspeedSoCState *s = ASPEED_SOC(obj);
@@ -117,7 +121,7 @@ static void aspeed_soc_ast1040_init(Object *obj)
s->sysclk = qdev_init_clock_in(DEVICE(s), "sysclk", NULL, NULL, 0);
- /* AST1040 uses the AST2700 SCUIO model */
+ /* AST10x0 G2 uses the AST2700 SCUIO model */
object_initialize_child(obj, "scu", &s->scu, TYPE_ASPEED_2700_SCUIO);
qdev_prop_set_uint32(DEVICE(&s->scu), "silicon-rev", sc->silicon_rev);
@@ -129,7 +133,6 @@ static void aspeed_soc_ast1040_init(Object *obj)
}
object_initialize_child(obj, "adc", &s->adc, TYPE_ASPEED_2700_ADC);
- object_initialize_child(obj, "peci", &s->peci, TYPE_ASPEED_PECI);
object_initialize_child(obj, "gpio", &s->gpio, "aspeed.gpio-ast2700");
for (i = 0; i < sc->sgpio_num; i++) {
object_initialize_child(obj, "sgpio[*]", &s->sgpiom[i],
@@ -150,6 +153,15 @@ static void aspeed_soc_ast1040_init(Object *obj)
}
}
+static void aspeed_soc_ast1040_init(Object *obj)
+{
+ AspeedSoCState *s = ASPEED_SOC(obj);
+
+ aspeed_soc_ast10x0_g2_init(obj);
+
+ object_initialize_child(obj, "peci", &s->peci, TYPE_ASPEED_PECI);
+}
+
static void aspeed_soc_ast1040_realize(DeviceState *dev_soc, Error **errp)
{
Aspeed10x0SoCState *a = ASPEED10X0_SOC(dev_soc);
@@ -313,6 +325,8 @@ static void aspeed_soc_ast1040_realize(DeviceState *dev_soc, Error **errp)
}
/* Unimplemented devices */
+ create_unimplemented_devices(OBJECT(s), s->memory,
+ aspeed_soc_ast10x0_g2_unimp_devs);
create_unimplemented_devices(OBJECT(s), s->memory, sc->unimp_devs);
}
--
2.53.0
next prev parent reply other threads:[~2026-10-15 6:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 6:36 [PATCH v1 0/9] hw/arm/aspeed: Add AST1080 SoC and EVB support Jamin Lin
2026-10-15 6:36 ` Jamin Lin [this message]
2026-10-15 6:36 ` [PATCH v1 2/9] hw/arm/aspeed_ast1040: Add common realize function for AST1040/AST1080 SoCs Jamin Lin
2026-10-15 6:36 ` [PATCH v1 3/9] hw/misc/aspeed_scu: Add AST1080 A0 silicon revision definition Jamin Lin
2026-10-15 6:36 ` [PATCH v1 4/9] hw/arm/aspeed_ast1040: Add AST1080 SoC support Jamin Lin
2026-10-15 6:36 ` [PATCH v1 5/9] hw/arm/aspeed_ast1040: Add AST1080 QSPI filters as unimplemented device Jamin Lin
2026-10-15 6:36 ` [PATCH v1 6/9] hw/arm/aspeed_ast1040: Add AST1080 I2C filter as an " Jamin Lin
2026-10-15 6:36 ` [PATCH v1 7/9] hw/arm/aspeed_ast1040_evb: Add AST1080 EVB machine support Jamin Lin
2026-10-15 6:36 ` [PATCH v1 8/9] tests/functional/arm/aspeed: Add AST1080 test with ASPEED MCU FW Hub v01.00 Jamin Lin
2026-10-15 6:36 ` [PATCH v1 9/9] docs/system/arm/aspeed: Add AST1080 Platform Root of Trust evaluation board 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=20261015063625.186708-2-jamin_lin@aspeedtech.com \
--to=jamin_lin@aspeedtech.com \
--cc=andrew@codeconstruct.com.au \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=kane_chen@aspeedtech.com \
--cc=leetroy@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=steven_lee@aspeedtech.com \
--cc=troy_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 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.