From patchwork Mon Oct 14 16:03:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 176331 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4784133ill; Mon, 14 Oct 2019 10:15:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3Z9MT8L8lkwFq8wS5+oxDcMTPgtVJ2/D28ZoofwSzqLt7cxBvpdk313ZCLRFj3nRxIya2 X-Received: by 2002:ac8:b42:: with SMTP id m2mr33481631qti.174.1571073323359; Mon, 14 Oct 2019 10:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571073323; cv=none; d=google.com; s=arc-20160816; b=DVn/BCoJISEyOOLJvKbLjZ4eg1LWL0Y+6fFhNo2ARJzqwkdi5w7gO5G2QMnNj3FBun wQrVLgyjEZJX4J22lM1DrWaCNNNO+FQ8+K8S7+jSb6+vWghJSSDij1AMJsnHMp6AIYuy 7zwjz7S7QwwwpW09dc543BdCw7m7Cd9znPIcEdxm8dd0aj7TRhT2HIgzXVOYPBIQJ/7X YVzYWPomAUqMJxAUgpqSnpYMA+5h0nDuWU3b3s0P/t9puA1MeDd5p/HgKRMnl9C9xvML CyAMhDKdE8dmIvxaNmQ25p7GSFlsgK53I/MfcG06H4rzGWtvNuXBpS2zfTX47WsIpr30 rMzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Wulo7R94Iq8ptsT23tpBNYgZOyzQznGQhwj7EIibDEY=; b=ETgRrOwBGxw4KdF9uR/p/r53vQTTi1mdgLJBPFasqP+WMESWYtDaM3t6PlbWKMowYL UcrmwOlHb27WsW2ZtljbK8SO+8bKuFFU9IRcpUjPaXA6Ccp84xcvWC9qPmy3RvpoMMen TVney+iSrO0rJzG/I8MjxUsbFQbdCbS19V5BzT6gTHQiEfWogO10sxJZGwT0yfHrWRnG GXJuNVkfmdyaMBxa3GL5jlz5kvMYhllxkpIu7VF+VnMLKeRFuIakQUaTB4lRNujTbC/i tE8Ak75iqhkUA1EaF9HUJ8Sgur3MNYR09st505LbBY7WrFRTxfVY51+EvCjfTI39EBLc pNVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yQub7cMx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x5si18215602qkn.184.2019.10.14.10.15.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Oct 2019 10:15:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yQub7cMx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK3wI-0000xe-7t for patch@linaro.org; Mon, 14 Oct 2019 13:15:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37464) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK2qp-0005PQ-VS for qemu-devel@nongnu.org; Mon, 14 Oct 2019 12:05:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iK2qo-0008DP-Lj for qemu-devel@nongnu.org; Mon, 14 Oct 2019 12:05:39 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:54052) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iK2qo-0008C8-FC for qemu-devel@nongnu.org; Mon, 14 Oct 2019 12:05:38 -0400 Received: by mail-wm1-x32b.google.com with SMTP id i16so17856781wmd.3 for ; Mon, 14 Oct 2019 09:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Wulo7R94Iq8ptsT23tpBNYgZOyzQznGQhwj7EIibDEY=; b=yQub7cMxUnAJ6+eKmtT2qQEA+E6lh3Oxxd8nYVHujpWomnzQm5I/IvS4HNOszUzs1N bwjJo7+ENHtyXAbkpp41HTpXrYaUQaDLPPYdPVYm/8mifeeDdrRBFk9Xqoh4rDKqwak9 BaSgBbxoejKIs3GKjn8X7oR5xTzJsINFQAz7uzHpMWS94QKknCFF4burasnbI/dnZaml 1K6kVVUvNVq2+ixuqGsXcp6uBx8BWiSPEORsp4y3hwLT5J9wofSmkqG5kiuoeE7EGJjB f1gdryEUS5v8v4oxniHTR23CWIzFhKVaWr4CphJNurqTEpqHXiNnYU9kD/rpnO2TAjNT MCzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Wulo7R94Iq8ptsT23tpBNYgZOyzQznGQhwj7EIibDEY=; b=kZX/zeKhMHK7h6S6XhPTjlSZAMpn9X4Ait8nIPD8ItSsEvrklffVp71YGCfQnHcDYC b7SaG4JlCCAhMqwZflNEq9Dudg2kNXcnTeVM2VDRyBJ08Br12MvbxEuVFHuhIi1wfU/W JAsXYL8Rdc8XTrRjxGtTQN0UkcY1H5wyHB7teigu+9jzcCquTWCe2ezxkDRR8yoE15Yc NQITU5yoPPGTy2ugxgdf5fxwat3wjhqloQ3qDNMJy90xq0ksFAqo4m4uo1vzsUtur5QI wxGVmnHZd5e3VSC6WCFSVPHpeHjfJCqjtcdRdqOKBSBfnheemxFDUDosGWoft41lN1Ot O73g== X-Gm-Message-State: APjAAAXpi+bnuz9lA4G9DrYXvNCgz6b7mEjgxKkCJqbstJKmu/jA7GOT 35X1OuZreKB3YXA8hdkS+oALJk0guijiNw== X-Received: by 2002:a1c:99cd:: with SMTP id b196mr15751213wme.105.1571069137112; Mon, 14 Oct 2019 09:05:37 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id 5sm18029779wrk.86.2019.10.14.09.05.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 09:05:36 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 59/68] aspeed: Add an AST2600 eval board Date: Mon, 14 Oct 2019 17:03:55 +0100 Message-Id: <20191014160404.19553-60-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191014160404.19553-1-peter.maydell@linaro.org> References: <20191014160404.19553-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32b X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Cédric Le Goater Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley Message-id: 20190925143248.10000-21-clg@kaod.org Signed-off-by: Peter Maydell --- include/hw/arm/aspeed.h | 1 + hw/arm/aspeed.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) -- 2.20.1 diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h index 02073a6b4d6..f49bc7081e4 100644 --- a/include/hw/arm/aspeed.h +++ b/include/hw/arm/aspeed.h @@ -18,6 +18,7 @@ typedef struct AspeedBoardConfig { const char *desc; const char *soc_name; uint32_t hw_strap1; + uint32_t hw_strap2; const char *fmc_model; const char *spi_model; uint32_t num_cs; diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 52993f84b46..65453278a75 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -88,6 +88,10 @@ struct AspeedBoardState { /* Witherspoon hardware value: 0xF10AD216 (but use romulus definition) */ #define WITHERSPOON_BMC_HW_STRAP1 ROMULUS_BMC_HW_STRAP1 +/* AST2600 evb hardware value */ +#define AST2600_EVB_HW_STRAP1 0x000000C0 +#define AST2600_EVB_HW_STRAP2 0x00000003 + /* * The max ram region is for firmwares that scan the address space * with load/store to guess how much RAM the SoC has. @@ -187,6 +191,8 @@ static void aspeed_board_init(MachineState *machine, &error_abort); object_property_set_int(OBJECT(&bmc->soc), cfg->hw_strap1, "hw-strap1", &error_abort); + object_property_set_int(OBJECT(&bmc->soc), cfg->hw_strap2, "hw-strap2", + &error_abort); object_property_set_int(OBJECT(&bmc->soc), cfg->num_cs, "num-cs", &error_abort); object_property_set_int(OBJECT(&bmc->soc), machine->smp.cpus, "num-cpus", @@ -308,6 +314,12 @@ static void ast2500_evb_i2c_init(AspeedBoardState *bmc) i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "ds1338", 0x32); } +static void ast2600_evb_i2c_init(AspeedBoardState *bmc) +{ + /* Start with some devices on our I2C busses */ + ast2500_evb_i2c_init(bmc); +} + static void romulus_bmc_i2c_init(AspeedBoardState *bmc) { AspeedSoCState *soc = &bmc->soc; @@ -455,6 +467,17 @@ static const AspeedBoardConfig aspeed_boards[] = { .num_cs = 2, .i2c_init = witherspoon_bmc_i2c_init, .ram = 512 * MiB, + }, { + .name = MACHINE_TYPE_NAME("ast2600-evb"), + .desc = "Aspeed AST2600 EVB (Cortex A7)", + .soc_name = "ast2600-a0", + .hw_strap1 = AST2600_EVB_HW_STRAP1, + .hw_strap2 = AST2600_EVB_HW_STRAP2, + .fmc_model = "w25q512jv", + .spi_model = "mx66u51235f", + .num_cs = 1, + .i2c_init = ast2600_evb_i2c_init, + .ram = 2 * GiB, }, };