All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Jae Hyun Yoo" <quic_jaehyoo@quicinc.com>,
	"Cédric Le Goater" <clg@kaod.org>
Subject: [PULL 13/27] hw/arm/aspeed: add support for the Qualcomm DC-SCM v1 board
Date: Thu, 30 Jun 2022 13:23:57 +0200	[thread overview]
Message-ID: <20220630112411.1474431-14-clg@kaod.org> (raw)
In-Reply-To: <20220630112411.1474431-1-clg@kaod.org>

From: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>

Add qcom-dc-scm-v1 board support.

Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220627154703.148943-2-quic_jaehyoo@quicinc.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/arm/aspeed.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index b43dc0fda853..6e4b287fd31b 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -174,6 +174,10 @@ struct AspeedMachineState {
 #define BLETCHLEY_BMC_HW_STRAP1 AST2600_EVB_HW_STRAP1
 #define BLETCHLEY_BMC_HW_STRAP2 AST2600_EVB_HW_STRAP2
 
+/* Qualcomm DC-SCM hardware value */
+#define QCOM_DC_SCM_V1_BMC_HW_STRAP1  0x00000000
+#define QCOM_DC_SCM_V1_BMC_HW_STRAP2  0x00000041
+
 #define AST_SMP_MAILBOX_BASE            0x1e6e2180
 #define AST_SMP_MBOX_FIELD_ENTRY        (AST_SMP_MAILBOX_BASE + 0x0)
 #define AST_SMP_MBOX_FIELD_GOSIGN       (AST_SMP_MAILBOX_BASE + 0x4)
@@ -951,6 +955,13 @@ static void fby35_i2c_init(AspeedMachineState *bmc)
      */
 }
 
+static void qcom_dc_scm_bmc_i2c_init(AspeedMachineState *bmc)
+{
+    AspeedSoCState *soc = &bmc->soc;
+
+    i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 15), "tmp105", 0x4d);
+}
+
 static bool aspeed_get_mmio_exec(Object *obj, Error **errp)
 {
     return ASPEED_MACHINE(obj)->mmio_exec;
@@ -1398,6 +1409,26 @@ static void aspeed_minibmc_machine_ast1030_evb_class_init(ObjectClass *oc,
     amc->macs_mask = 0;
 }
 
+static void aspeed_machine_qcom_dc_scm_v1_class_init(ObjectClass *oc,
+                                                     void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+    AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);
+
+    mc->desc       = "Qualcomm DC-SCM V1 BMC (Cortex A7)";
+    amc->soc_name  = "ast2600-a3";
+    amc->hw_strap1 = QCOM_DC_SCM_V1_BMC_HW_STRAP1;
+    amc->hw_strap2 = QCOM_DC_SCM_V1_BMC_HW_STRAP2;
+    amc->fmc_model = "n25q512a";
+    amc->spi_model = "n25q512a";
+    amc->num_cs    = 2;
+    amc->macs_mask = ASPEED_MAC2_ON | ASPEED_MAC3_ON;
+    amc->i2c_init  = qcom_dc_scm_bmc_i2c_init;
+    mc->default_ram_size = 1 * GiB;
+    mc->default_cpus = mc->min_cpus = mc->max_cpus =
+        aspeed_soc_num_cpus(amc->soc_name);
+};
+
 static const TypeInfo aspeed_machine_types[] = {
     {
         .name          = MACHINE_TYPE_NAME("palmetto-bmc"),
@@ -1435,6 +1466,10 @@ static const TypeInfo aspeed_machine_types[] = {
         .name          = MACHINE_TYPE_NAME("g220a-bmc"),
         .parent        = TYPE_ASPEED_MACHINE,
         .class_init    = aspeed_machine_g220a_class_init,
+    }, {
+        .name          = MACHINE_TYPE_NAME("qcom-dc-scm-v1-bmc"),
+        .parent        = TYPE_ASPEED_MACHINE,
+        .class_init    = aspeed_machine_qcom_dc_scm_v1_class_init,
     }, {
         .name          = MACHINE_TYPE_NAME("fp5280g2-bmc"),
         .parent        = TYPE_ASPEED_MACHINE,
-- 
2.35.3



  parent reply	other threads:[~2022-06-30 12:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 11:23 [PULL 00/27] aspeed queue Cédric Le Goater
2022-06-30 11:23 ` [PULL 01/27] hw: m25p80: add WP# pin and SRWD bit for write protection Cédric Le Goater
2022-06-30 11:23 ` [PULL 02/27] hw: m25p80: add tests for write protect (WP# and SRWD bit) Cédric Le Goater
2022-06-30 11:23 ` [PULL 03/27] aspeed: Set the dram container at the SoC level Cédric Le Goater
2022-06-30 11:23 ` [PULL 04/27] aspeed/scu: Add trace events for read ops Cédric Le Goater
2022-06-30 11:23 ` [PULL 05/27] aspeed/i2c: Change trace event for NORMAL_STOP states Cédric Le Goater
2022-06-30 11:23 ` [PULL 06/27] aspeed/hace: Accumulative mode supported Cédric Le Goater
2022-06-30 11:23 ` [PULL 07/27] aspeed/smc: Fix potential overflow Cédric Le Goater
2022-06-30 11:23 ` [PULL 08/27] aspeed: Set CPU memory property explicitly Cédric Le Goater
2022-06-30 11:23 ` [PULL 09/27] aspeed: Add memory property to Aspeed SoC Cédric Le Goater
2022-06-30 11:23 ` [PULL 10/27] aspeed: Remove usage of sysbus_mmio_map Cédric Le Goater
2022-06-30 11:23 ` [PULL 11/27] aspeed: Map unimplemented devices in SoC memory Cédric Le Goater
2022-06-30 11:23 ` [PULL 12/27] aspeed: Remove use of qemu_get_cpu Cédric Le Goater
2022-06-30 11:23 ` Cédric Le Goater [this message]
2022-06-30 11:23 ` [PULL 14/27] hw/arm/aspeed: add Qualcomm Firework BMC machine Cédric Le Goater
2022-06-30 11:23 ` [PULL 15/27] hw/i2c: pmbus: Page #255 is valid page for read requests Cédric Le Goater
2022-06-30 11:24 ` [PULL 16/27] hw/sensor: add Maxim MAX31785 device Cédric Le Goater
2022-06-30 11:24 ` [PULL 17/27] hw/arm/aspeed: Add MAX31785 Fan controllers Cédric Le Goater
2022-06-30 11:24 ` [PULL 18/27] hw/arm/aspeed: firework: Add Thermal Diodes Cédric Le Goater
2022-06-30 11:24 ` [PULL 19/27] hw/arm/aspeed: firework: add I2C MUXes for VR channels Cédric Le Goater
2022-06-30 11:24 ` [PULL 20/27] hw/i2c/aspeed: Fix R_I2CD_FUN_CTRL reference Cédric Le Goater
2022-06-30 11:24 ` [PULL 21/27] hw/i2c/aspeed: Fix DMA len write-enable bit handling Cédric Le Goater
2022-06-30 11:24 ` [PULL 22/27] hw/i2c/aspeed: Fix MASTER_EN missing error message Cédric Le Goater
2022-06-30 11:24 ` [PULL 23/27] hw/i2c: support multiple masters Cédric Le Goater
2022-06-30 11:24 ` [PULL 24/27] hw/i2c: add asynchronous send Cédric Le Goater
2022-06-30 11:24 ` [PULL 25/27] hw/i2c/aspeed: add slave device in old register mode Cédric Le Goater
2022-06-30 11:24 ` [PULL 26/27] hw/i2c/aspeed: Add new-registers DMA slave mode RX support Cédric Le Goater
2022-06-30 11:24 ` [PULL 27/27] hw/misc/aspeed: Add PECI controller Cédric Le Goater
2022-07-01  1:28 ` [PULL 00/27] aspeed queue Richard Henderson

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=20220630112411.1474431-14-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quic_jaehyoo@quicinc.com \
    --cc=richard.henderson@linaro.org \
    /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.