From patchwork Mon Dec 16 11:08:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 181700 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4185964ile; Mon, 16 Dec 2019 03:35:11 -0800 (PST) X-Google-Smtp-Source: APXvYqzDWxmSnu+C9JysdUAeVj7U+WBotqP0ajl8ntbbKf1UHZvXIaA4V0KIR/5l4QO0mLam9KHf X-Received: by 2002:a05:620a:2010:: with SMTP id c16mr25468633qka.386.1576496111027; Mon, 16 Dec 2019 03:35:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576496111; cv=none; d=google.com; s=arc-20160816; b=ea778c1Td1zN9jHcuoL0dAcwsc+21oaVOt1nPofOHQ3chc/sI6I/ryTzB/khLU/bLC D7FzZBzaTUSAizMhyFMc40VxnpxAv3+SNdcP7F4wBZJqZ9ZTsRtjd4kbh4oUfxnBb1Cm BTrx1HoRUZ1+WtaX8yfkT02J4vLYmXnlAlGCem0r0JYea/lnYhhIZqc/0MyDtsrIwQCo +XpkoQYQs90oIEks/kx92usCCdGPrCCVh5aHR3hK5Ih19B8TslqXTQVMCA0IPbphH175 DJtYGivSgKcDKVQGMSX0xv+c4TojabKrIyXkhjyUOJljpH0PE04IFUKFHKy2Iil5F4Ns SnwQ== 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=L01Bt7Pn8EbpPwCHMv8nyAgPyUlPk/hoQ9vzWdPLN80=; b=nL/FLUKtyE8rIKo47NA041HH1OtEXAlv8pZfeKwHe3tbsexHB/oB4GEMjubhlum99z aWAiQBOyT8u+v9SLb4tAiatbrDNhhg7O/sRJga6uNrAwF5HbDG5eAgOGQ11KYIPfzr3p ka1ewaZogsQJjuoODU7J02FN4CtpgxiL9JMoosGk8kdgOkFbz4Es63pFWNkB2aJeoOJD wyElQ3ZFFsk8Hc7Q1CiIHIEKfYleOXBJeHbqkno7n9ER28aO9UmB6fC6RhTQzNHAoa7A bDpLbEex2kMdPFu3V8uI63IWdVzYF5yxe5ypz/KifNaKzOeOvHOSmVetxsMAPe1Bta4A CJ4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RJZUjOgv; 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 f63si8672099qtd.99.2019.12.16.03.35.10 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 03:35:11 -0800 (PST) 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=RJZUjOgv; 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]:51860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igoeb-0007uD-UX for patch@linaro.org; Mon, 16 Dec 2019 06:35:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51028) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igoFk-0007ne-Mi for qemu-devel@nongnu.org; Mon, 16 Dec 2019 06:09:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igoFj-0008DF-Dc for qemu-devel@nongnu.org; Mon, 16 Dec 2019 06:09:28 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:54091) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igoFj-000888-6m for qemu-devel@nongnu.org; Mon, 16 Dec 2019 06:09:27 -0500 Received: by mail-wm1-x344.google.com with SMTP id m24so4865941wmc.3 for ; Mon, 16 Dec 2019 03:09:27 -0800 (PST) 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=L01Bt7Pn8EbpPwCHMv8nyAgPyUlPk/hoQ9vzWdPLN80=; b=RJZUjOgvO0qyIxENiw+1QxNEsvUdcvTb8Qc3CzTD924W2vt2U8C0LtCdmp3Bcc5QVx H3u47BgHUXjpQKF/bUZstVXnhq+FRR/1RyLKHjc1tgYBUC6DDxgYnqnZAA6X3gVALJwp XTC10qkSry5tuYki+YgBmBp/rGyPS6yK5UOdWzZAqJhQKmNlWY4GEr3sVvm7Rm5U2PCi J8+lw4TO1PwTStg/FOHNxnceyd9w4gg40x+El8DU3sdqvcCAxtukYD4ByfZnB/KtMgju 1o+qMTOPnMm6o2IaWA5LRtTtbTCZ453nDjVjStALYdWk6anB6p8kuZy+ixBWd2iJXOR/ sMog== 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=L01Bt7Pn8EbpPwCHMv8nyAgPyUlPk/hoQ9vzWdPLN80=; b=EoLKi32BEeJzPg1T9G+qWuyK3zEJUVgCniF35A23oc8OfqBFPSRR13hkED7X7wibdf JuNmxIqZxkIemJ9kgH5UesBMEHYcGmt6ZfIbeBpKGDooZ7bZTbBz7AoIYf3S11N2Oz4t LKhP1bF4x636VJddsvVOrJTt947Rw0/wPpIaRz6Ps76gVM/gc8bfkF7jk3XJxzjK+loO wVdI9/pNWb9P5ohkzaEokabOC/3FzyMYzU36FkfPchU6kfINI8lmYwURiYjgZp6pOyin Z+Mk3omWzWYNCFboAkNHSjOdOdBPDcH1K2mwVwepw534d1c5j0CWlNfCtaCAeKxwTNlv bjsw== X-Gm-Message-State: APjAAAX7Aj3vkZXgXBlhRZ3WdGyb+Ed1U+h11ZGW2SnwsequsD2lOBPA HS4oVpbyDW8+LhHNpNeq4w52AtxrL5Gtxg== X-Received: by 2002:a7b:cd83:: with SMTP id y3mr28187588wmj.168.1576494564817; Mon, 16 Dec 2019 03:09:24 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id x10sm20976131wrp.58.2019.12.16.03.09.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 03:09:24 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/34] aspeed: Add support for the tacoma-bmc board Date: Mon, 16 Dec 2019 11:08:46 +0000 Message-Id: <20191216110904.30815-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216110904.30815-1-peter.maydell@linaro.org> References: <20191216110904.30815-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::344 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 The Tacoma BMC board is replacement board for the BMC of the OpenPOWER Witherspoon system. It uses a AST2600 SoC instead of a AST2500 and the I2C layout is the same as it controls the same main board. Used for HW bringup. Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley Signed-off-by: Cédric Le Goater Message-id: 20191119141211.25716-15-clg@kaod.org Signed-off-by: Peter Maydell --- hw/arm/aspeed.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) -- 2.20.1 diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index e34e6787430..cc06af4fbb3 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -92,6 +92,10 @@ struct AspeedBoardState { #define AST2600_EVB_HW_STRAP1 0x000000C0 #define AST2600_EVB_HW_STRAP2 0x00000003 +/* Tacoma hardware value */ +#define TACOMA_BMC_HW_STRAP1 0x00000000 +#define TACOMA_BMC_HW_STRAP2 0x00000000 + /* * The max ram region is for firmwares that scan the address space * with load/store to guess how much RAM the SoC has. @@ -363,6 +367,9 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc) AspeedSoCState *soc = &bmc->soc; uint8_t *eeprom_buf = g_malloc0(8 * 1024); + /* Bus 3: TODO bmp280@77 */ + /* Bus 3: TODO max31785@52 */ + /* Bus 3: TODO dps310@76 */ i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), TYPE_PCA9552, 0x60); @@ -381,6 +388,7 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc) eeprom_buf); i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), TYPE_PCA9552, 0x60); + /* Bus 11: TODO ucd90160@64 */ } static void aspeed_machine_class_init(ObjectClass *oc, void *data) @@ -485,6 +493,22 @@ static void aspeed_machine_ast2600_evb_class_init(ObjectClass *oc, void *data) mc->default_ram_size = 1 * GiB; }; +static void aspeed_machine_tacoma_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc = MACHINE_CLASS(oc); + AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc); + + mc->desc = "Aspeed AST2600 EVB (Cortex A7)"; + amc->soc_name = "ast2600-a0"; + amc->hw_strap1 = TACOMA_BMC_HW_STRAP1; + amc->hw_strap2 = TACOMA_BMC_HW_STRAP2; + amc->fmc_model = "mx66l1g45g"; + amc->spi_model = "mx66l1g45g"; + amc->num_cs = 2; + amc->i2c_init = witherspoon_bmc_i2c_init; /* Same board layout */ + mc->default_ram_size = 1 * GiB; +}; + static const TypeInfo aspeed_machine_types[] = { { .name = MACHINE_TYPE_NAME("palmetto-bmc"), @@ -510,6 +534,10 @@ static const TypeInfo aspeed_machine_types[] = { .name = MACHINE_TYPE_NAME("ast2600-evb"), .parent = TYPE_ASPEED_MACHINE, .class_init = aspeed_machine_ast2600_evb_class_init, + }, { + .name = MACHINE_TYPE_NAME("tacoma-bmc"), + .parent = TYPE_ASPEED_MACHINE, + .class_init = aspeed_machine_tacoma_class_init, }, { .name = TYPE_ASPEED_MACHINE, .parent = TYPE_MACHINE,