All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	"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>,
	"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>,
	 Kane Chen <kane_chen@aspeedtech.com>,
	"nabihestefan@google.com" <nabihestefan@google.com>
Subject: [PATCH v2 03/11] hw/arm/aspeed_ast27x0: Add AST2700 A2 SoC support
Date: Tue, 10 Feb 2026 05:10:12 +0000	[thread overview]
Message-ID: <20260210051008.355149-4-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20260210051008.355149-1-jamin_lin@aspeedtech.com>

AST2700 A2 is functionally identical to AST2700 A1.
There are no changes to the IRQ layout, memory map, or peripheral
configuration. The only difference is the silicon revision.

This commit introduces a dedicated AST2700 A2 SoC type by reusing
the existing AST2700 A1 implementation and setting the A2 silicon
revision accordingly.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
 hw/arm/aspeed_ast27x0.c | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c
index 61790ea1cc..87dcb82e1b 100644
--- a/hw/arm/aspeed_ast27x0.c
+++ b/hw/arm/aspeed_ast27x0.c
@@ -1166,6 +1166,36 @@ static void aspeed_soc_ast2700a1_class_init(ObjectClass *oc, const void *data)
     sc->memmap       = aspeed_soc_ast2700_memmap;
 }
 
+static void aspeed_soc_ast2700a2_class_init(ObjectClass *oc, const void *data)
+{
+    static const char * const valid_cpu_types[] = {
+        ARM_CPU_TYPE_NAME("cortex-a35"),
+        NULL
+    };
+    DeviceClass *dc = DEVICE_CLASS(oc);
+    AspeedSoCClass *sc = ASPEED_SOC_CLASS(oc);
+
+    /* Reason: The Aspeed SoC can only be instantiated from a board */
+    dc->user_creatable = false;
+    dc->realize      = aspeed_soc_ast2700_realize;
+
+    sc->valid_cpu_types = valid_cpu_types;
+    sc->silicon_rev  = AST2700_A2_SILICON_REV;
+    sc->sram_size    = 0x20000;
+    sc->pcie_num     = 3;
+    sc->spis_num     = 3;
+    sc->sgpio_num    = 2;
+    sc->ehcis_num    = 4;
+    sc->wdts_num     = 8;
+    sc->macs_num     = 3;
+    sc->uarts_num    = 13;
+    sc->num_cpus     = 4;
+    sc->ioexp_num    = 2;
+    sc->uarts_base   = ASPEED_DEV_UART0;
+    sc->irqmap       = aspeed_soc_ast2700a1_irqmap;
+    sc->memmap       = aspeed_soc_ast2700_memmap;
+}
+
 static const TypeInfo aspeed_soc_ast27x0_types[] = {
     {
         .name           = TYPE_ASPEED27X0_SOC,
@@ -1179,6 +1209,12 @@ static const TypeInfo aspeed_soc_ast27x0_types[] = {
         .instance_init  = aspeed_soc_ast2700_init,
         .class_init     = aspeed_soc_ast2700a1_class_init,
     },
+    {
+        .name           = "ast2700-a2",
+        .parent         = TYPE_ASPEED27X0_SOC,
+        .instance_init  = aspeed_soc_ast2700_init,
+        .class_init     = aspeed_soc_ast2700a2_class_init,
+    },
 };
 
 DEFINE_TYPES(aspeed_soc_ast27x0_types)
-- 
2.43.0


  parent reply	other threads:[~2026-02-10  5:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10  5:10 [PATCH v2 00/11] Support ASPEED AST2700 A2 Jamin Lin
2026-02-10  5:10 ` [PATCH v2 01/11] hw/misc/aspeed_scu: Remove unused SoC silicon revision definitions Jamin Lin
2026-02-10  5:10 ` [PATCH v2 02/11] hw/misc/aspeed_scu: Add AST2700 A2 silicon revisions Jamin Lin
2026-02-10  5:10 ` Jamin Lin [this message]
2026-02-10  7:14   ` [PATCH v2 03/11] hw/arm/aspeed_ast27x0: Add AST2700 A2 SoC support Cédric Le Goater
2026-02-10 19:25     ` Nabih Estefan
2026-02-10  5:10 ` [PATCH v2 04/11] hw/arm/aspeed_ast27x0_evb: Add AST2700 A2 EVB machine Jamin Lin
2026-02-10  7:15   ` Cédric Le Goater
2026-02-10  5:10 ` [PATCH v2 05/11] hw/arm/aspeed_ast27x0_evb: Move ast2700-evb alias to AST2700 A2 EVB Jamin Lin
2026-02-10 15:11   ` Cédric Le Goater
2026-02-10  5:10 ` [PATCH v2 06/11] tests/qtest/ast2700-hace-test: Use ast2700-evb alias for AST2700 HACE tests Jamin Lin
2026-02-10  5:10 ` [PATCH v2 07/11] tests/functional/aarch64/test_aspeed_ast2700: Rename AST2700 A1 test to reduce test runtime Jamin Lin
2026-02-10  7:15   ` Cédric Le Goater
2026-02-10  5:10 ` [PATCH v2 08/11] tests/functional/aarch64/test_aspeed_ast2700: Add AST2700 A2 EVB functional tests Jamin Lin
2026-02-10 15:15   ` Cédric Le Goater
2026-02-11  1:59     ` Jamin Lin
2026-02-10  5:10 ` [PATCH v2 09/11] hw/arm/aspeed_ast27x0-fc: Switch AST2700 FC machine to A2 SoC Jamin Lin
2026-02-10  7:16   ` Cédric Le Goater
2026-02-10  5:10 ` [PATCH v2 10/11] hw/arm/aspeed_ast27x0-fc: Increase BMC DRAM size to 2GB for AST2700 A2 Jamin Lin
2026-02-10  7:16   ` Cédric Le Goater
2026-02-10  5:10 ` [PATCH v2 11/11] tests/functional/aarch64/test_aspeed_ast2700fc: Use AST2700 A2 SDK image for FC tests 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=20260210051008.355149-4-jamin_lin@aspeedtech.com \
    --to=jamin_lin@aspeedtech.com \
    --cc=andrew@codeconstruct.com.au \
    --cc=clg@kaod.org \
    --cc=farosas@suse.de \
    --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 \
    --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.