hw/arm/aspeed_ast1040: Introduce PECI support
Introduce PECI support for the AST1040 SoC model. This change adds the PECI MMIO region and IRQ mapping, initializes the PECI device instance, and realizes the controller during SoC initialization. The PECI controller is mapped at 0x74C1F000 and connected to IRQ 164. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260603040027.938816-5-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Jamin Lin committed
Jun 3, 2026 at 04:00 UTC
a96e91728c3bd5ddf5861a5e96dc180ceb3566e7
1 file changed
+12
hw/arm/aspeed_ast1040.c
+12
@@ -31,6 +31,7 @@ static const hwaddr aspeed_soc_ast1040_memmap[] = {
31
[ASPEED_DEV_SGPIOM0] = 0x74C0C000,
32
[ASPEED_DEV_SGPIOM1] = 0x74C0D000,
33
[ASPEED_DEV_I2C] = 0x74C0F000,
34
+ [ASPEED_DEV_PECI] = 0x74C1F000,
35
[ASPEED_DEV_I3C] = 0x74C20000,
36
[ASPEED_DEV_UART0] = 0x74C33000,
37
[ASPEED_DEV_UART1] = 0x74C33100,
@@ -76,6 +77,7 @@ static const int aspeed_soc_ast1040_irqmap[] = {
77
[ASPEED_DEV_UART11] = 146,
78
[ASPEED_DEV_UART12] = 147,
79
[ASPEED_DEV_JTAG0] = 162,
80
+ [ASPEED_DEV_PECI] = 164,
81
};
82
83
static qemu_irq aspeed_soc_ast1040_get_irq(AspeedSoCState *s, int dev)
@@ -108,6 +110,7 @@ static void aspeed_soc_ast1040_init(Object *obj)
110
}
111
112
object_initialize_child(obj, "adc", &s->adc, TYPE_ASPEED_2700_ADC);
113
+ object_initialize_child(obj, "peci", &s->peci, TYPE_ASPEED_PECI);
114
115
object_initialize_child(obj, "pwm", &s->pwm, TYPE_UNIMPLEMENTED_DEVICE);
116
object_initialize_child(obj, "espi", &s->espi, TYPE_UNIMPLEMENTED_DEVICE);
@@ -199,6 +202,15 @@ static void aspeed_soc_ast1040_realize(DeviceState *dev_soc, Error **errp)
202
sysbus_connect_irq(SYS_BUS_DEVICE(&s->adc), 0,
203
aspeed_soc_ast1040_get_irq(s, ASPEED_DEV_ADC));
204
205
+ /* PECI */
206
+ if (!sysbus_realize(SYS_BUS_DEVICE(&s->peci), errp)) {
207
+ return;
208
+ }
209
+ aspeed_mmio_map(s->memory, SYS_BUS_DEVICE(&s->peci), 0,
210
+ sc->memmap[ASPEED_DEV_PECI]);
211
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->peci), 0,
212
+ aspeed_soc_ast1040_get_irq(s, ASPEED_DEV_PECI));
213
+
214
/* Unimplemented peripherals */
215
aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->pwm),
216
"aspeed.pwm",