From patchwork Mon Feb 21 09:27:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 544431 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp3118086imn; Mon, 21 Feb 2022 02:09:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwo9f6m7nL+2QG0hIPG79TtIvwsZVpfd73Q6mXgIxrvdrX52m7QfmAylvqUou5HDpxmleYz X-Received: by 2002:a0c:8051:0:b0:42d:ef02:183c with SMTP id 75-20020a0c8051000000b0042def02183cmr14787823qva.28.1645438156867; Mon, 21 Feb 2022 02:09:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645438156; cv=none; d=google.com; s=arc-20160816; b=rPrXnpRB3J4HF3wInM5jwUdKfpiEYEkDo8FQKr3voNBx2G0ts2JY0z6W8VoE+OKrxI qedk1mvHiFZ3i0dcHFQKsZRl9J+U5TosHJJjNFLBSLhdd6X4OASU22DUNz8Q9sdK+qnM jpl4aqsoLoxKzBSsgXqb19SJNUvWh0TLWzVDe0G7sli0iciY3OixCnCATd0CBabLxFcF LsXJrfxOlvy1/2rP12dvOHEDJvxkVe2z39uQznuhMRjav80UzBC3E9PAyQIikWcWpZKu /jXzwM5KbdOWiRHnFWDPn7Mx8VZdhvOBiqCRnEGAnCAAOiTxGQZSOEOq5n+NS6EiKJPT 4efg== 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=NofIEc0Y2hiRFl6rcfetddRUollXOWZIliDCYgCWghU=; b=qXLCmk6j3/VoeydImtKoQ5V5dflfb1F49HL4HAlLnjxxZt+RlN6iU2Bf9Ww0m7ppYZ Ub5pt9yYyKH1z56VCldDF7ZPwwXH5zJG5NZFxOzTFduO8x67UqwZQY2A8SzXxYXnB3y/ aUAPE/RGCissa2dAA5K+1C0LFhar+59Z8GvFva5rcZOCZ+W7RasxSnTpXYCivFDQUQKY MLgpjJjAtwEbTtL2QH9xjRWD1+1c9QnMi28xj7qvu5TqyWH3Z9lj/yiZ1A7yrfd4wuG3 rOAYU1kwqABMfQC9eEspW6gAZkPnCgx90cJ868yiFbU0VnMDklR4wAWF5y2GOI71R/vY zFnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TQ5e8hjG; 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 ey15si8957213qvb.317.2022.02.21.02.09.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Feb 2022 02:09:16 -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=TQ5e8hjG; 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]:52142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM5d6-0004uz-G0 for patch@linaro.org; Mon, 21 Feb 2022 05:09:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM4zo-0000Du-Dv for qemu-devel@nongnu.org; Mon, 21 Feb 2022 04:28:43 -0500 Received: from [2a00:1450:4864:20::42a] (port=38508 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nM4zZ-00013R-7m for qemu-devel@nongnu.org; Mon, 21 Feb 2022 04:28:37 -0500 Received: by mail-wr1-x42a.google.com with SMTP id d27so25926427wrb.5 for ; Mon, 21 Feb 2022 01:28:21 -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=NofIEc0Y2hiRFl6rcfetddRUollXOWZIliDCYgCWghU=; b=TQ5e8hjGjYN+a3CxhQVMevyBZUQ2jJSjexn9ArTPLrFlvMrP7vpow94Ln6AWJnupDZ CU4YWi/5fMoFORPL8sSt8sV1t5+aqUBWNFL8vhyv7+S3cYzk+wJGdDHa1abModGhQmvR t7y4DbQu4E+1x5x9m8SnawB2takGC8SEEO8eYQ/HxrKiwLj1Pbd5g//am+LCzXK1alyt R71n3fknwa0nWdwu3KrkmlceOfBbO0IlMXVFvOyeevTSRAsl3rOJ2nIsmFjullaAD5tp 1umTr94yG5rHdHsE1qCg3bTmtNXH2rbbk6raBXtw2/VLsnOv/N8dACSfVMrbN+8HKtY6 8H9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NofIEc0Y2hiRFl6rcfetddRUollXOWZIliDCYgCWghU=; b=GEkiPBiIdTcxT3L7qSW5LyYv4Lv4qKLEChRl2AumJVZgwuqZDKO4ogJBLc0JdqoX1L o5f0eYJtPAzRysiQ04GMcrslTB5SneX4L9dHjzEHtlVKOl+5IqKw0raai6ZRIh6+Wp7z ZBlfRD2cL3OVdGe9YZsAysBSfuIB8FIkdjSCEcq2k6qX6dLjAhlnL5UmktTbdMi3+5y6 bLY/c/91NcIko7zTlZCquI5EAwynCozKgPRxc4rfZDhOIzXh78N8Np0v1pA9R1rUwZSW p1GoObZbIv+J3scKxwYg+IkiW6C6h3sLSBMxoUNk6qyVzBuIkGNy8Yb22LKMBhscdMu/ 70xQ== X-Gm-Message-State: AOAM533V5yf8NeM7+gb0d9kuNdM9qsiKulU2M+2G8JDdIeA6+uW/icaW EYlnDupA1YdHghZRwb9s2oZaV7T8JKkmyA== X-Received: by 2002:a5d:65c4:0:b0:1e3:ed0:a6df with SMTP id e4-20020a5d65c4000000b001e30ed0a6dfmr14808103wrw.3.1645435700953; Mon, 21 Feb 2022 01:28:20 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q76sm7555778wme.1.2022.02.21.01.28.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 01:28:20 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/26] hw/arm: add initial mori-bmc board Date: Mon, 21 Feb 2022 09:27:57 +0000 Message-Id: <20220221092800.404870-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220221092800.404870-1-peter.maydell@linaro.org> References: <20220221092800.404870-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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: Patrick Venture This is the BMC attached to the OpenBMC Mori board. Signed-off-by: Patrick Venture Reviewed-by: Chris Rauer Reviewed-by: Ilkyun Choi Message-id: 20220208233104.284425-1-venture@google.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- docs/system/arm/nuvoton.rst | 1 + hw/arm/npcm7xx_boards.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/docs/system/arm/nuvoton.rst b/docs/system/arm/nuvoton.rst index adf497e6791..ef2792076aa 100644 --- a/docs/system/arm/nuvoton.rst +++ b/docs/system/arm/nuvoton.rst @@ -21,6 +21,7 @@ Hyperscale applications. The following machines are based on this chip : - ``quanta-gbs-bmc`` Quanta GBS server BMC - ``quanta-gsj`` Quanta GSJ server BMC - ``kudo-bmc`` Fii USA Kudo server BMC +- ``mori-bmc`` Fii USA Mori server BMC There are also two more SoCs, NPCM710 and NPCM705, which are single-core variants of NPCM750 and NPCM730, respectively. These are currently not diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index d701e5cc55a..0678a56156f 100644 --- a/hw/arm/npcm7xx_boards.c +++ b/hw/arm/npcm7xx_boards.c @@ -34,6 +34,7 @@ #define QUANTA_GSJ_POWER_ON_STRAPS 0x00001fff #define QUANTA_GBS_POWER_ON_STRAPS 0x000017ff #define KUDO_BMC_POWER_ON_STRAPS 0x00001fff +#define MORI_BMC_POWER_ON_STRAPS 0x00001fff static const char npcm7xx_default_bootrom[] = "npcm7xx_bootrom.bin"; @@ -429,6 +430,21 @@ static void kudo_bmc_init(MachineState *machine) npcm7xx_load_kernel(machine, soc); } +static void mori_bmc_init(MachineState *machine) +{ + NPCM7xxState *soc; + + soc = npcm7xx_create_soc(machine, MORI_BMC_POWER_ON_STRAPS); + npcm7xx_connect_dram(soc, machine->ram); + qdev_realize(DEVICE(soc), NULL, &error_fatal); + + npcm7xx_load_bootrom(machine, soc); + npcm7xx_connect_flash(&soc->fiu[1], 0, "mx66u51235f", + drive_get(IF_MTD, 3, 0)); + + npcm7xx_load_kernel(machine, soc); +} + static void npcm7xx_set_soc_type(NPCM7xxMachineClass *nmc, const char *type) { NPCM7xxClass *sc = NPCM7XX_CLASS(object_class_by_name(type)); @@ -501,6 +517,18 @@ static void kudo_bmc_machine_class_init(ObjectClass *oc, void *data) mc->default_ram_size = 1 * GiB; }; +static void mori_bmc_machine_class_init(ObjectClass *oc, void *data) +{ + NPCM7xxMachineClass *nmc = NPCM7XX_MACHINE_CLASS(oc); + MachineClass *mc = MACHINE_CLASS(oc); + + npcm7xx_set_soc_type(nmc, TYPE_NPCM730); + + mc->desc = "Mori BMC (Cortex-A9)"; + mc->init = mori_bmc_init; + mc->default_ram_size = 1 * GiB; +} + static const TypeInfo npcm7xx_machine_types[] = { { .name = TYPE_NPCM7XX_MACHINE, @@ -525,6 +553,10 @@ static const TypeInfo npcm7xx_machine_types[] = { .name = MACHINE_TYPE_NAME("kudo-bmc"), .parent = TYPE_NPCM7XX_MACHINE, .class_init = kudo_bmc_machine_class_init, + }, { + .name = MACHINE_TYPE_NAME("mori-bmc"), + .parent = TYPE_NPCM7XX_MACHINE, + .class_init = mori_bmc_machine_class_init, }, };