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>,
	"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 v6 01/11] hw/arm/aspeed_ast1700: Correct AST2700 SCU to SCUIO
Date: Thu, 23 Jul 2026 02:23:02 +0000	[thread overview]
Message-ID: <20260723022300.4174471-2-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20260723022300.4174471-1-jamin_lin@aspeedtech.com>

Per the AST1700 datasheet, its SCU register layout matches the AST2700
SCUIO (I/O-die SCU), not the AST2700 SCU. Correct the I/O expander to
instantiate TYPE_ASPEED_2700_SCUIO instead of TYPE_ASPEED_2700_SCU, and
rename the "scu" field/property to "scuio" throughout
aspeed_ast1700.c/h so the type change is clear at every call site.

Fixes: b500ab00552da06566a505a397255f4c031670aa ("hw/arm/aspeed: Attach SCU device to AST1700 model")
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Kane Chen <kane_chen@aspeedtech.com>
---
 include/hw/arm/aspeed_ast1700.h |  2 +-
 hw/arm/aspeed_ast1700.c         | 22 +++++++++++-----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/hw/arm/aspeed_ast1700.h b/include/hw/arm/aspeed_ast1700.h
index 39c5977cf1..86bdb266b0 100644
--- a/include/hw/arm/aspeed_ast1700.h
+++ b/include/hw/arm/aspeed_ast1700.h
@@ -41,7 +41,7 @@ struct AspeedAST1700SoCState {
     MemoryRegion sram;
     AspeedSMCState spi;
     AspeedADCState adc;
-    Aspeed2700SCUState scu;
+    AspeedSCUState scuio;
     AspeedGPIOState gpio;
     AspeedSGPIOState sgpiom[AST1700_SGPIO_NUM];
     AspeedI2CState i2c;
diff --git a/hw/arm/aspeed_ast1700.c b/hw/arm/aspeed_ast1700.c
index 5af5da5b8a..418c9fcd45 100644
--- a/hw/arm/aspeed_ast1700.c
+++ b/hw/arm/aspeed_ast1700.c
@@ -22,7 +22,7 @@ enum {
     ASPEED_AST1700_DEV_PWM,
     ASPEED_AST1700_DEV_SRAM,
     ASPEED_AST1700_DEV_ADC,
-    ASPEED_AST1700_DEV_SCU,
+    ASPEED_AST1700_DEV_SCUIO,
     ASPEED_AST1700_DEV_GPIO,
     ASPEED_AST1700_DEV_SGPIOM0,
     ASPEED_AST1700_DEV_SGPIOM1,
@@ -39,7 +39,7 @@ static const hwaddr aspeed_ast1700_io_memmap[] = {
     [ASPEED_AST1700_DEV_PWM]       =  0x000C0000,
     [ASPEED_AST1700_DEV_SRAM]      =  0x00BC0000,
     [ASPEED_AST1700_DEV_ADC]       =  0x00C00000,
-    [ASPEED_AST1700_DEV_SCU]       =  0x00C02000,
+    [ASPEED_AST1700_DEV_SCUIO]     =  0x00C02000,
     [ASPEED_AST1700_DEV_GPIO]      =  0x00C0B000,
     [ASPEED_AST1700_DEV_SGPIOM0]   =  0x00C0C000,
     [ASPEED_AST1700_DEV_SGPIOM1]   =  0x00C0D000,
@@ -108,15 +108,15 @@ static void aspeed_ast1700_realize(DeviceState *dev, Error **errp)
                         aspeed_ast1700_io_memmap[ASPEED_AST1700_DEV_ADC],
                         sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->adc), 0));
 
-    /* SCU */
-    qdev_prop_set_uint32(DEVICE(&s->scu), "silicon-rev",
+    /* SCUIO */
+    qdev_prop_set_uint32(DEVICE(&s->scuio), "silicon-rev",
                          s->silicon_rev);
-    if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) {
+    if (!sysbus_realize(SYS_BUS_DEVICE(&s->scuio), errp)) {
         return;
     }
     memory_region_add_subregion(&s->iomem,
-                        aspeed_ast1700_io_memmap[ASPEED_AST1700_DEV_SCU],
-                        sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->scu), 0));
+                        aspeed_ast1700_io_memmap[ASPEED_AST1700_DEV_SCUIO],
+                        sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->scuio), 0));
 
     /* GPIO */
     if (!sysbus_realize(SYS_BUS_DEVICE(&s->gpio), errp)) {
@@ -171,7 +171,7 @@ static void aspeed_ast1700_realize(DeviceState *dev, Error **errp)
         hwaddr wdt_offset = aspeed_ast1700_io_memmap[ASPEED_AST1700_DEV_WDT] +
                             i * awc->iosize;
 
-        object_property_set_link(OBJECT(&s->wdt[i]), "scu", OBJECT(&s->scu),
+        object_property_set_link(OBJECT(&s->wdt[i]), "scu", OBJECT(&s->scuio),
                                  errp);
         if (!sysbus_realize(SYS_BUS_DEVICE(&s->wdt[i]), errp)) {
             return;
@@ -207,9 +207,9 @@ static void aspeed_ast1700_instance_init(Object *obj)
     object_initialize_child(obj, "ioexp-adc", &s->adc,
                             "aspeed.adc-ast2700");
 
-    /* SCU */
-    object_initialize_child(obj, "ioexp-scu", &s->scu,
-                            TYPE_ASPEED_2700_SCU);
+    /* SCUIO */
+    object_initialize_child(obj, "ioexp-scu", &s->scuio,
+                            TYPE_ASPEED_2700_SCUIO);
 
     /* GPIO */
     object_initialize_child(obj, "ioexp-gpio", &s->gpio,
-- 
2.43.0


  reply	other threads:[~2026-07-23  2:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23  2:23 [PATCH v6 00/11] Add SSP/TSP power control and DRAM remap support for AST2700 Jamin Lin
2026-07-23  2:23 ` Jamin Lin [this message]
2026-07-23  2:23 ` [PATCH v6 02/11] hw/arm/ast27x0: Start SSP in powered-off state to match hardware behavior Jamin Lin
2026-07-23  2:23 ` [PATCH v6 03/11] hw/arm/ast27x0: Start TSP " Jamin Lin
2026-07-23  2:23 ` [PATCH v6 04/11] hw/arm/ast27x0: Add DRAM alias for SSP SDRAM remap Jamin Lin
2026-07-23  2:23 ` [PATCH v6 05/11] hw/arm/ast27x0: Add DRAM alias for TSP " Jamin Lin
2026-07-23  2:23 ` [PATCH v6 06/11] hw/misc/aspeed_scu: Implement SSP reset and power-on control via SCU registers Jamin Lin
2026-07-23  2:23 ` [PATCH v6 07/11] hw/misc/aspeed_scu: Implement TSP " Jamin Lin
2026-07-23  2:23 ` [PATCH v6 08/11] hw/misc/aspeed_scu: Add SCU support for SSP SDRAM remap Jamin Lin
2026-07-23  2:23 ` [PATCH v6 09/11] hw/misc/aspeed_scu: Add SCU support for TSP " Jamin Lin
2026-07-23  2:23 ` [PATCH v6 10/11] tests/functional/aarch64/test_aspeed_ast2700fc: Boot SSP/TSP via PSP and load binaries from DRAM Jamin Lin
2026-07-23  2:23 ` [PATCH v6 11/11] docs: Add support vbootrom and update Manual boot for ast2700fc 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=20260723022300.4174471-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.