Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2233063/?format=api
{ "id": 2233063, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2233063/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505154410.230969-5-alexander.hansen@9elements.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.2/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260505154410.230969-5-alexander.hansen@9elements.com>", "list_archive_url": null, "date": "2026-05-05T15:42:58", "name": "[v2,4/4] ast2600: yosemite4 initial support", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "70708e6f281e1cb032ffd41f8ac0e704f7d8c68b", "submitter": { "id": 87518, "url": "http://patchwork.ozlabs.org/api/1.2/people/87518/?format=api", "name": "Alexander Hansen", "email": "alexander.hansen@9elements.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505154410.230969-5-alexander.hansen@9elements.com/mbox/", "series": [ { "id": 502857, "url": "http://patchwork.ozlabs.org/api/1.2/series/502857/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502857", "date": "2026-05-05T15:42:54", "name": "initial support for yosemite v4", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/502857/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2233063/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2233063/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=9elements.com header.i=@9elements.com header.a=rsa-sha256\n header.s=google header.b=OIwP3viA;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g92t04BzZz1yJx\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 01:46:00 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wKHxe-0008HC-Cm; Tue, 05 May 2026 11:45:26 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <alexander.hansen@9elements.com>)\n id 1wKHxP-00080s-Ed\n for qemu-devel@nongnu.org; Tue, 05 May 2026 11:45:13 -0400", "from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <alexander.hansen@9elements.com>)\n id 1wKHxK-0002rt-B4\n for qemu-devel@nongnu.org; Tue, 05 May 2026 11:45:10 -0400", "by mail-wr1-x42b.google.com with SMTP id\n ffacd0b85a97d-44509921fbcso2807432f8f.3\n for <qemu-devel@nongnu.org>; Tue, 05 May 2026 08:45:05 -0700 (PDT)", "from alexanderarchlinux ([188.111.3.154])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-45054b02abbsm5255305f8f.18.2026.05.05.08.45.02\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 05 May 2026 08:45:03 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=9elements.com; s=google; t=1777995904; x=1778600704; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=B0nwwAXPHrpOQLX3+o1oZmUh3uLp9M1ZG0F0CiBN9v8=;\n b=OIwP3viAHBe9kGk4Bp6GtQt6su0McrEux0cmwqsAkcIj7ZM+5KvEk0suOqpkOzHlnd\n 2/obzjEIkLGDSqAu+uy2ryk2U7oLCUB7E79tYSyCCP9rGHSbNT2rrGRGiFxy6H27eabe\n c7L/RN0eHQFQNHWl4GUx9f+Q35n1oOQSBl/eUywh3hH3lw1JDzXlUj8puFPuOhUxj4NC\n 94SI/qKdONgTIWY2hQ+ju99hc6iU9RkgtyJxhXq0j0ZYVhDGszsltK9TifK1+qVYrOF0\n wCI40m+933q3W43nACDlbzuJc7OXC3m3u8aKtiU5j1CXi3BXdKDI5q1uBpyJmeruRq90\n mFaw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777995904; x=1778600704;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=B0nwwAXPHrpOQLX3+o1oZmUh3uLp9M1ZG0F0CiBN9v8=;\n b=Om9Vc1/Vl5XUFMbIumgce7V0LkP22/fgmXkeKzv6D9ekK7MKhTyTADqr+1gxgpWxVu\n lZx2tVHAvSLqaipP1hJVgzOnpabFhMl46dl06NMmD2IfFSyg4uFjaJwFJ1YiLhtD+gIw\n ZMJXnv9m9QNyJA0Cx/PlO6Tpslsb+Hco/udVC/580hMsfcldkROuHPn32zmMUcBFpfjb\n JbWEAJbbv3mKKRvdROmmb76UZKctWLl6HjlBPfYAqWMMHWXf1D2ovTIZgT/gfvD3Qt0k\n E0Y2Jmbw+5fWWyMqJ9JpSdA2a3D6P+0/pMbE2XEfZ/RZF/r/4jWRqg0IPP9Slo2aTpjn\n biQw==", "X-Gm-Message-State": "AOJu0YxhtAW1YSTUZFocoNTeDb3Nuxfl76PYPirweX5gQJO6X/8O5hDL\n dwHV7sFjNqTcWcP+4rQM0xfwQJ1/XNENYaRl77x+u6SymE1bn1UN20mYYjYLcraeiCsCZ47lLfk\n Uijtuam1a5A==", "X-Gm-Gg": "AeBDieugHj+6FbnA1WkZY9nc6FmTjyG0zzDjCmTNcvF7AspVRWmkt3GN/aE+z49slsx\n lHRDOOy6cS0yYVYWMmzTC+TPa/JuQKR5ZlNu68tthJyryIOx/DPAhJUxGdaqaUAdwALHUFIdid4\n QaskSJ+qIUygwjgiJboiytOiur8/H7kuWfcpLvV0B3oJae9LMBpYpjKOq43ceXMGhnwf1ysaNF3\n 3VbmXgIZhqY6WYX1Knbob5Q5CxtsK9bXsrTkP+JpNsboSFxqys9DrC5ggGGTE903HJW5Imcd6ow\n CLb9lPrqEWrfcahB9UFJdjUXEI6tX+6Khrt23Sh4aTssTXYG+B2a5657DUxHsyW2MERVL/wjbs2\n 7CLSSKpM2tT50BgF8WaYxK2LP27OKSIn8S5r+tPRnIaMxLyXRxY2AL7unURKcjIzapzd4p82ZcU\n q1HO/Ar2SpQoLoRIhNRtBcDJRNVDDvJxK+W9CspkOr1kIRe5hPEHyn3rM=", "X-Received": "by 2002:a05:6000:144f:b0:44d:67f7:e1a6 with SMTP id\n ffacd0b85a97d-44d67f7e2f6mr18604102f8f.20.1777995903761;\n Tue, 05 May 2026 08:45:03 -0700 (PDT)", "From": "Alexander Hansen <alexander.hansen@9elements.com>", "To": "qemu-devel@nongnu.org", "Cc": "Alexander Hansen <alexander.hansen@9elements.com>, =?utf-8?q?C=C3=A9dric?=\n\t=?utf-8?q?_Le_Goater?= <clg@kaod.org>,\n Peter Maydell <peter.maydell@linaro.org>,\n Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>,\n Jamin Lin <jamin_lin@aspeedtech.com>, Kane Chen <kane_chen@aspeedtech.com>,\n Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>,\n qemu-arm@nongnu.org", "Subject": "[PATCH v2 4/4] ast2600: yosemite4 initial support", "Date": "Tue, 5 May 2026 17:42:58 +0200", "Message-ID": "<20260505154410.230969-5-alexander.hansen@9elements.com>", "X-Mailer": "git-send-email 2.54.0", "In-Reply-To": "<20260505154410.230969-1-alexander.hansen@9elements.com>", "References": "<20260505154410.230969-1-alexander.hansen@9elements.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2a00:1450:4864:20::42b;\n envelope-from=alexander.hansen@9elements.com; helo=mail-wr1-x42b.google.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "Initial patch based on [1] to support yosemite v4 bmc emulation.\n\nThe goal of this machine support is to support OpenBMC development.\n\nReference linux devicetree from openbmc linux is [2].\n\nStatus:\n- Enclosure FRU: showing up\n- Management Board FRU: showing up\n- Blade Board FRU: showing up\n- Blade Board sensors: not implemented\n- Blade Chassis FRU: showing up\n- Fan Board FRU: both showing up\n- Fan Board sensors: supported\n\nOverall the emulation is incomplete but already helpful in development\nand testing.\n\nThe focus of this initial support is on the FRU eeproms and fanboard\nsensors.\n\nTested: booted an OpenBMC image for yosemite4 target.\n\nTested: functional test (see [5] for the image) passed.\n\n```\nexport QEMU_TEST_QEMU_BINARY=qemu-system-arm\n./build/run tests/functional/arm/test_aspeed_fby4.py\nTAP version 13\nok 1 test_aspeed_fby4.YosemiteV4Machine.test_arm_ast2600_yosemitev4_openbmc\n1..1\n```\n\nReferences:\n[1] https://github.com/9elements/qemu/commit/32139f913c2bd0ebe4bd26c46765861f6f9f2d49\n[2] arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts\n[3] https://github.com/legoater/qemu-aspeed-boot/pull/5\n\nCc: \"Cédric Le Goater\" <clg@kaod.org> (maintainer:ASPEED BMCs)\nCc: Peter Maydell <peter.maydell@linaro.org> (maintainer:ASPEED BMCs)\nCc: Steven Lee <steven_lee@aspeedtech.com> (reviewer:ASPEED BMCs)\nCc: Troy Lee <leetroy@gmail.com> (reviewer:ASPEED BMCs)\nCc: Jamin Lin <jamin_lin@aspeedtech.com> (reviewer:ASPEED BMCs)\nCc: Kane Chen <kane_chen@aspeedtech.com> (reviewer:ASPEED BMCs)\nCc: Andrew Jeffery <andrew@codeconstruct.com.au> (reviewer:ASPEED BMCs)\nCc: Joel Stanley <joel@jms.id.au> (reviewer:ASPEED BMCs)\nCc: qemu-arm@nongnu.org (open list:ASPEED BMCs)\nCc: qemu-devel@nongnu.org (open list:All patches CC here)\nSigned-off-by: Alexander Hansen <alexander.hansen@9elements.com>\n---\n hw/arm/aspeed_ast2600_fby4.c | 289 +++++++++++++++++++++++\n hw/arm/meson.build | 1 +\n tests/functional/arm/meson.build | 2 +\n tests/functional/arm/test_aspeed_fby4.py | 44 ++++\n 4 files changed, 336 insertions(+)\n create mode 100644 hw/arm/aspeed_ast2600_fby4.c\n create mode 100755 tests/functional/arm/test_aspeed_fby4.py", "diff": "diff --git a/hw/arm/aspeed_ast2600_fby4.c b/hw/arm/aspeed_ast2600_fby4.c\nnew file mode 100644\nindex 0000000000..284f64e3f3\n--- /dev/null\n+++ b/hw/arm/aspeed_ast2600_fby4.c\n@@ -0,0 +1,289 @@\n+/*\n+ * Yosemite V4\n+ *\n+ * Copyright 2026 9elements.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0-or-later\n+ */\n+\n+#include \"qemu/osdep.h\"\n+#include \"qapi/error.h\"\n+#include \"hw/arm/machines-qom.h\"\n+#include \"hw/arm/aspeed.h\"\n+#include \"hw/arm/aspeed_soc.h\"\n+#include \"hw/nvram/eeprom_at24c.h\"\n+#include \"hw/sensor/tmp105.h\"\n+#include \"hw/sensor/max31790.h\"\n+#include \"hw/sensor/max11615.h\"\n+#include \"hw/sensor/adc128d818.h\"\n+#include \"hw/i2c/i2c_mux_pca954x.h\"\n+#include \"hw/gpio/pca9552.h\"\n+#include \"system/reset.h\"\n+\n+#define FBY4_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB)\n+\n+/* START OF EEPROM CONTENTS */\n+\n+/*\n+ *./frugen -s board.mfg=\"Wiwynn\" \\\n+ * --set board.pname=\"Fan Board FSC-MAX ADC-TI LED-NXP EFUSE-MAX\" \\\n+ * --set text:board.pn=\"BRD-PN-345\" \\\n+ * --board-date \"10/1/2017 12:58:00\" \\\n+ * --set board.serial=\"123456\" \\\n+ * --set product.pname=\"Yosemite V4\" \\\n+ * --set product.mfg=\"Wiwynn\" \\\n+ * --set product.ver=\"v1.1\" \\\n+ * --set product.serial=\"123456\" \\\n+ * --set product.atag=\"PLACEHOLDER\" \\\n+ * --set product.custom=\"Fanboard Custom1\" \\\n+ * --set product.custom.1=\"Fanboard Custom2\" \\\n+ * --set text:product.pn=\"PN-345\" \\\n+ * fru-yv4-fanboard.bin\n+ */\n+/* EM Config: yosemite4_fanboard_fsc_max_adc_ti_led_nxp_ons_efuse_max.json */\n+/* Yosemite4 fan board */\n+static const uint8_t fru_yv4_fanboard_bin[] = {\n+ 0x01, 0x00, 0x00, 0x01, 0x0b, 0x00, 0x00, 0xf3, 0x01, 0x0a, 0x19, 0xce,\n+ 0xc2, 0xa8, 0xc6, 0x57, 0x69, 0x77, 0x79, 0x6e, 0x6e, 0xea, 0x46, 0x61,\n+ 0x6e, 0x20, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x20, 0x46, 0x53, 0x43, 0x2d,\n+ 0x4d, 0x41, 0x58, 0x20, 0x41, 0x44, 0x43, 0x2d, 0x54, 0x49, 0x20, 0x4c,\n+ 0x45, 0x44, 0x2d, 0x4e, 0x58, 0x50, 0x20, 0x45, 0x46, 0x55, 0x53, 0x45,\n+ 0x2d, 0x4d, 0x41, 0x58, 0x85, 0x91, 0x34, 0x51, 0x95, 0x05, 0xca, 0x42,\n+ 0x52, 0x44, 0x2d, 0x50, 0x4e, 0x2d, 0x33, 0x34, 0x35, 0xc0, 0xc1, 0x00,\n+ 0x00, 0x00, 0x00, 0xdb, 0x01, 0x09, 0x19, 0xc6, 0x57, 0x69, 0x77, 0x79,\n+ 0x6e, 0x6e, 0xcb, 0x59, 0x6f, 0x73, 0x65, 0x6d, 0x69, 0x74, 0x65, 0x20,\n+ 0x56, 0x34, 0xc6, 0x50, 0x4e, 0x2d, 0x33, 0x34, 0x35, 0xc4, 0x76, 0x31,\n+ 0x2e, 0x31, 0x85, 0x91, 0x34, 0x51, 0x95, 0x05, 0x89, 0x30, 0x1b, 0x8e,\n+ 0x25, 0xfa, 0xb2, 0x64, 0x29, 0x03, 0xc0, 0xd0, 0x46, 0x61, 0x6e, 0x62,\n+ 0x6f, 0x61, 0x72, 0x64, 0x20, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x32,\n+ 0xc1, 0x00, 0x00, 0x9d\n+};\n+static const size_t fru_yv4_fanboard_bin_len = sizeof(fru_yv4_fanboard_bin);\n+\n+/*\n+ *./frugen -s board.mfg=\"Wiwynn\" \\\n+ * --set board.pname=\"Sentinel Dome without Retimer\" \\\n+ * --set text:board.pn=\"BRD-PN-345\" \\\n+ * --board-date \"10/1/2017 12:58:00\" \\\n+ * --set board.serial=\"123456\" \\\n+ * --set product.pname=\"Yosemite V4\" \\\n+ * --set product.mfg=\"Wiwynn\" \\\n+ * --set product.ver=\"v1.1\" \\\n+ * --set product.serial=\"123456\" \\\n+ * --set product.atag=\"PLACEHOLDER\" \\\n+ * --set product.custom=\"Yosemite V4 T1\" \\\n+ * --set product.custom.1=\"Yosemite V4 T1\" \\\n+ * --set text:product.pn=\"PN-345\" \\\n+ * fru-yv4-sentineldome-board.bin\n+ */\n+/* product.cust maps to PRODUCT_INFO_AM2 */\n+/* EM Config: yosemite4_sentineldome_t1.json */\n+/* Yosemite4 Sentinel Dome without Retimer Boards */\n+static const uint8_t fru_yv4_sentineldome_board_bin[] = {\n+ 0x01, 0x00, 0x00, 0x01, 0x09, 0x00, 0x00, 0xf5, 0x01, 0x08, 0x19, 0xce,\n+ 0xc2, 0xa8, 0xc6, 0x57, 0x69, 0x77, 0x79, 0x6e, 0x6e, 0xdd, 0x53, 0x65,\n+ 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x6c, 0x20, 0x44, 0x6f, 0x6d, 0x65, 0x20,\n+ 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x52, 0x65, 0x74, 0x69,\n+ 0x6d, 0x65, 0x72, 0x85, 0x91, 0x34, 0x51, 0x95, 0x05, 0xca, 0x42, 0x52,\n+ 0x44, 0x2d, 0x50, 0x4e, 0x2d, 0x33, 0x34, 0x35, 0xc0, 0xc1, 0x00, 0x78,\n+ 0x01, 0x09, 0x19, 0xc6, 0x57, 0x69, 0x77, 0x79, 0x6e, 0x6e, 0xcb, 0x59,\n+ 0x6f, 0x73, 0x65, 0x6d, 0x69, 0x74, 0x65, 0x20, 0x56, 0x34, 0xc6, 0x50,\n+ 0x4e, 0x2d, 0x33, 0x34, 0x35, 0xc4, 0x76, 0x31, 0x2e, 0x31, 0x85, 0x91,\n+ 0x34, 0x51, 0x95, 0x05, 0x89, 0x30, 0x1b, 0x8e, 0x25, 0xfa, 0xb2, 0x64,\n+ 0x29, 0x03, 0xc0, 0xce, 0x59, 0x6f, 0x73, 0x65, 0x6d, 0x69, 0x74, 0x65,\n+ 0x20, 0x56, 0x34, 0x20, 0x54, 0x31, 0xc1, 0x00, 0x00, 0x00, 0x00, 0xeb\n+};\n+static const size_t fru_yv4_sentineldome_board_bin_len =\n+ sizeof(fru_yv4_sentineldome_board_bin);\n+\n+/*\n+ *./frugen -s board.mfg=\"Wiwynn\" \\\n+ * --set board.pname=\"Sentinel Dome\" \\\n+ * --set text:board.pn=\"BRD-PN-345\" \\\n+ * --board-date \"10/1/2017 12:58:00\" \\\n+ * --set board.serial=\"123456\" \\\n+ * --set product.pname=\"Yosemite V4\" \\\n+ * --set product.mfg=\"Wiwynn\" \\\n+ * --set product.ver=\"v1.1\" \\\n+ * --set product.serial=\"123456\" \\\n+ * --set product.atag=\"PLACEHOLDER\" \\\n+ * --set text:product.pn=\"PN-345\" \\\n+ * fru-yv4-sentineldome-chassis.bin\n+ */\n+/* EM Config: yosemite4_sentineldome_chassis.json */\n+/* Yosemite 4 Sentinel Dome Chassis FRU */\n+static const uint8_t fru_yv4_sentineldome_chassis_bin[] = {\n+ 0x01, 0x00, 0x00, 0x01, 0x07, 0x00, 0x00, 0xf7, 0x01, 0x06, 0x19, 0xce,\n+ 0xc2, 0xa8, 0xc6, 0x57, 0x69, 0x77, 0x79, 0x6e, 0x6e, 0xcd, 0x53, 0x65,\n+ 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x6c, 0x20, 0x44, 0x6f, 0x6d, 0x65, 0x85,\n+ 0x91, 0x34, 0x51, 0x95, 0x05, 0xca, 0x42, 0x52, 0x44, 0x2d, 0x50, 0x4e,\n+ 0x2d, 0x33, 0x34, 0x35, 0xc0, 0xc1, 0x00, 0xb6, 0x01, 0x07, 0x19, 0xc6,\n+ 0x57, 0x69, 0x77, 0x79, 0x6e, 0x6e, 0xcb, 0x59, 0x6f, 0x73, 0x65, 0x6d,\n+ 0x69, 0x74, 0x65, 0x20, 0x56, 0x34, 0xc6, 0x50, 0x4e, 0x2d, 0x33, 0x34,\n+ 0x35, 0xc4, 0x76, 0x31, 0x2e, 0x31, 0x85, 0x91, 0x34, 0x51, 0x95, 0x05,\n+ 0x89, 0x30, 0x1b, 0x8e, 0x25, 0xfa, 0xb2, 0x64, 0x29, 0x03, 0xc0, 0xc1,\n+ 0x00, 0x00, 0x00, 0x59\n+};\n+static const size_t fru_yv4_sentineldome_chassis_bin_len =\n+ sizeof(fru_yv4_sentineldome_chassis_bin);\n+\n+/*\n+ *./frugen -s board.mfg=\"Wiwynn\" \\\n+ * --set board.pname=\"Management Board wBMC\" \\\n+ * --set text:board.pn=\"BRD-PN-345\" \\\n+ * --board-date \"10/1/2017 12:58:00\" \\\n+ * --set board.serial=\"123456\" \\\n+ * --set product.pname=\"Yosemite V4\" \\\n+ * --set product.mfg=\"Wiwynn\" \\\n+ * --set product.ver=\"v1.1\" \\\n+ * --set product.serial=\"123456\" \\\n+ * --set product.atag=\"PLACEHOLDER\" \\\n+ * --set text:product.pn=\"PN-345\" \\\n+ * fru-yv4-eclosure.bin\n+ */\n+/* EM Config: yosemite4_chassis.json, yosemite4.json */\n+/* Yosemite 4 Sentinel Dome Enclosure FRU */\n+static const uint8_t fru_yv4_eclosure_bin[] = {\n+ 0x01, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0xf6, 0x01, 0x07, 0x19, 0xce,\n+ 0xc2, 0xa8, 0xc6, 0x57, 0x69, 0x77, 0x79, 0x6e, 0x6e, 0xd5, 0x4d, 0x61,\n+ 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x42, 0x6f, 0x61,\n+ 0x72, 0x64, 0x20, 0x77, 0x42, 0x4d, 0x43, 0x85, 0x91, 0x34, 0x51, 0x95,\n+ 0x05, 0xca, 0x42, 0x52, 0x44, 0x2d, 0x50, 0x4e, 0x2d, 0x33, 0x34, 0x35,\n+ 0xc0, 0xc1, 0x00, 0x26, 0x01, 0x07, 0x19, 0xc6, 0x57, 0x69, 0x77, 0x79,\n+ 0x6e, 0x6e, 0xcb, 0x59, 0x6f, 0x73, 0x65, 0x6d, 0x69, 0x74, 0x65, 0x20,\n+ 0x56, 0x34, 0xc6, 0x50, 0x4e, 0x2d, 0x33, 0x34, 0x35, 0xc4, 0x76, 0x31,\n+ 0x2e, 0x31, 0x85, 0x91, 0x34, 0x51, 0x95, 0x05, 0x89, 0x30, 0x1b, 0x8e,\n+ 0x25, 0xfa, 0xb2, 0x64, 0x29, 0x03, 0xc0, 0xc1, 0x00, 0x00, 0x00, 0x59\n+};\n+static const size_t fru_yv4_eclosure_bin_len = sizeof(fru_yv4_eclosure_bin);\n+\n+/* END OF EEPROM CONTENTS */\n+\n+static void fby4_i2c_init_fanboard(I2CSlave *fan_mux, size_t eepromSize)\n+{\n+ /* 2 fan boards */\n+ for (int i = 0; i <= 1; i++) {\n+ /* downstream bus */\n+ I2CBus *bus = pca954x_i2c_get_bus(fan_mux, i);\n+\n+ /* ti,adc128d818 @ 0x1f (adc) */\n+ /* the driver will throw away the last 4 bits, set them 0 */\n+ static const uint16_t adc_values1[8] = {\n+ 0b011110000000, 0b010100010000,\n+ 0b001000110000, 0b100000100000,\n+ 0b011110000000, 0b010100010000,\n+ 0b001000110000, 0b100000100000};\n+ adc128d818_init_with_values(bus, 0x1f, adc_values1, 8);\n+\n+ /* maxim,max31790 @ 0x20 (pwm) */\n+ i2c_slave_create_simple(bus, TYPE_MAX31790, 0x20);\n+\n+ /*\n+ * ti,tca6424 @ 0x22 (gpio)\n+ * linux handles tca6424 with PCA953X_TYPE, same as pca9535\n+ * { \"pca9535\", 16 | PCA953X_TYPE | PCA_INT, },\n+ * { \"tca6424\", 24 | PCA953X_TYPE | PCA_INT, },\n+ * so we _could_ be fine here unless more than 16 gpios are used\n+ */\n+ i2c_slave_create_simple(bus, TYPE_PCA9535, 0x22);\n+\n+ /*\n+ * NOTE: above works and could use for gpio presence:\n+ * $ gpioget gpiochip2 2\n+ * 1\n+ */\n+\n+ /* maxim,max31790 @ 0x2f (pwm) */\n+ i2c_slave_create_simple(bus, TYPE_MAX31790, 0x2f);\n+\n+ /* maxim,max11615 @ 0x33 (adc) */\n+ static const uint16_t adc_values[8] = {\n+ 0b011110000010, 0b010100011000,\n+ 0b001000110100, 0b100000101001,\n+ 0b011110000010, 0b010100011000,\n+ 0b001000110100, 0b100000101001};\n+ max11615_init_with_values(bus, 0x33, adc_values, 8);\n+\n+ at24c_eeprom_init_rom(\n+ bus, 0x52, eepromSize,\n+ fru_yv4_fanboard_bin,\n+ fru_yv4_fanboard_bin_len);\n+\n+ /* LED blink driver / gpio expander */\n+ /* nxp,pca9552 @ 0x61 (gpio) */\n+ i2c_slave_create_simple(bus, TYPE_PCA9552, 0x61);\n+ }\n+}\n+\n+static void fby4_i2c_init_blade_chassis(I2CBus *bus, size_t eepromSize)\n+{\n+ /* Sentinel Dome Blade EEPROMS */\n+\n+ /* Board */\n+ at24c_eeprom_init_rom(bus, 0x54, eepromSize,\n+ fru_yv4_sentineldome_board_bin, fru_yv4_sentineldome_board_bin_len);\n+\n+ /* Chassis */\n+ at24c_eeprom_init_rom(bus, 0x55, eepromSize,\n+ fru_yv4_sentineldome_chassis_bin, fru_yv4_sentineldome_chassis_bin_len);\n+}\n+\n+static void fby4_i2c_init_multiple_blade_chassis(I2CBus **i2c,\n+ size_t eepromSize)\n+{\n+ /* there is 8 blade chassis, but we only emulate 2 for performance reason */\n+ for (int bus = 1; bus <= (8 / 4); bus++) {\n+\n+ fby4_i2c_init_blade_chassis(i2c[bus], eepromSize);\n+ }\n+}\n+\n+static void fby4_i2c_init(AspeedMachineState *bmc)\n+{\n+ AspeedSoCState *soc = bmc->soc;\n+ I2CBus *i2c[16];\n+\n+ for (int i = 0; i < 16; i++) {\n+ i2c[i] = aspeed_i2c_get_bus(&soc->i2c, i);\n+ }\n+\n+ const size_t eepromSize = 128 * KiB;\n+\n+ const uint8_t enclosure_addr = 0x51;\n+\n+ /* Enclosure (EM Config: yosemite4_chassis.json, yosemite4.json) */\n+ at24c_eeprom_init_rom(i2c[1], enclosure_addr, eepromSize,\n+ fru_yv4_eclosure_bin, fru_yv4_eclosure_bin_len);\n+\n+ fby4_i2c_init_multiple_blade_chassis(i2c, eepromSize);\n+\n+ /* Yv4 fanboard connection */\n+ I2CSlave *fan_mux = i2c_slave_create_simple(i2c[14], TYPE_PCA9546, 0x74);\n+\n+ fby4_i2c_init_fanboard(fan_mux, eepromSize);\n+}\n+\n+static void aspeed_machine_fby4_class_init(ObjectClass *oc, const void *data)\n+{\n+ MachineClass *mc = MACHINE_CLASS(oc);\n+ AspeedMachineClass *amc = ASPEED_MACHINE_CLASS(oc);\n+\n+ mc->desc = \"Facebook fby4 BMC (Cortex-A7)\";\n+ amc->fmc_model = \"mx66l1g45g\";\n+ amc->num_cs = 2;\n+ amc->macs_mask = ASPEED_MAC3_ON;\n+ amc->i2c_init = fby4_i2c_init;\n+ mc->default_ram_size = FBY4_BMC_RAM_SIZE;\n+ aspeed_machine_class_init_cpus_defaults(mc);\n+}\n+\n+static const TypeInfo aspeed_ast2600_fby4_types[] = {\n+ {\n+ .name = MACHINE_TYPE_NAME(\"fby4-bmc\"),\n+ .parent = MACHINE_TYPE_NAME(\"ast2600-evb\"),\n+ .class_init = aspeed_machine_fby4_class_init,\n+ .interfaces = arm_machine_interfaces,\n+ }\n+};\n+\n+DEFINE_TYPES(aspeed_ast2600_fby4_types)\ndiff --git a/hw/arm/meson.build b/hw/arm/meson.build\nindex 84b8ec5fb5..ccbc23e549 100644\n--- a/hw/arm/meson.build\n+++ b/hw/arm/meson.build\n@@ -60,6 +60,7 @@ arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(\n 'aspeed_ast2600_catalina.c',\n 'aspeed_ast2600_evb.c',\n 'aspeed_ast2600_fby35.c',\n+ 'aspeed_ast2600_fby4.c',\n 'aspeed_ast2600_fuji.c',\n 'aspeed_ast2600_gb200nvl.c',\n 'aspeed_ast2600_qcom-dc-scm-v1.c',\ndiff --git a/tests/functional/arm/meson.build b/tests/functional/arm/meson.build\nindex 2f538f29a2..10c0006f22 100644\n--- a/tests/functional/arm/meson.build\n+++ b/tests/functional/arm/meson.build\n@@ -14,6 +14,7 @@ test_arm_timeouts = {\n 'aspeed_ast2600_sdk_otp' : 720,\n 'aspeed_bletchley' : 480,\n 'aspeed_catalina' : 480,\n+ 'aspeed_fby4': 480,\n 'aspeed_gb200nvl_bmc' : 480,\n 'aspeed_rainier' : 480,\n 'bpim2u' : 500,\n@@ -47,6 +48,7 @@ tests_arm_system_thorough = [\n 'aspeed_ast2600_sdk_otp',\n 'aspeed_bletchley',\n 'aspeed_catalina',\n+ 'aspeed_fby4',\n 'aspeed_gb200nvl_bmc',\n 'aspeed_rainier',\n 'bpim2u',\ndiff --git a/tests/functional/arm/test_aspeed_fby4.py b/tests/functional/arm/test_aspeed_fby4.py\nnew file mode 100755\nindex 0000000000..9679e4a1c5\n--- /dev/null\n+++ b/tests/functional/arm/test_aspeed_fby4.py\n@@ -0,0 +1,44 @@\n+#!/usr/bin/env python3\n+#\n+# Functional test that boots the ASPEED machines\n+#\n+# SPDX-License-Identifier: GPL-2.0-or-later\n+\n+from qemu_test import Asset\n+from aspeed import AspeedTest\n+\n+\n+class YosemiteV4Machine(AspeedTest):\n+\n+ ASSET_YOSEMITE_V4_FLASH = Asset(\n+ 'https://github.com/pointbazaar/qemu-aspeed-boot/raw/3ef9a0d8cd2902c2039924ad1f16c8f2345486f3/images/yosemite4-bmc/openbmc-20260505132843/obmc-phosphor-image-yosemite4-20260505132843.static.mtd.xz',\n+ 'dff6946363b41f952b15cfc3156482b89fcfc1b0ecfc3ec8b3ed496a5f001ef9')\n+\n+ def do_test_arm_aspeed_openbmc_no_network(self, machine, image, uboot,\n+ cpu_id, soc):\n+\n+ self.set_machine(machine)\n+ self.vm.set_console()\n+ self.vm.add_args('-drive', f'file={image},if=mtd,format=raw',\n+ '-snapshot')\n+ self.vm.launch()\n+\n+ self.wait_for_console_pattern(f'U-Boot {uboot}')\n+ self.wait_for_console_pattern('## Loading kernel from FIT Image')\n+ self.wait_for_console_pattern('Starting kernel ...')\n+ self.wait_for_console_pattern(f'Booting Linux on physical CPU {cpu_id}')\n+ self.wait_for_console_pattern(f'ASPEED {soc}')\n+ self.wait_for_console_pattern('/init as init process')\n+ # yosemite v4 does not emit the hostname log which is\n+ # different from the other machines.\n+ self.wait_for_console_pattern('yosemite4 login:')\n+\n+ def test_arm_ast2600_yosemitev4_openbmc(self):\n+ image_path = self.uncompress(self.ASSET_YOSEMITE_V4_FLASH)\n+\n+ self.do_test_arm_aspeed_openbmc_no_network('fby4-bmc', image=image_path,\n+ uboot='2019.04', cpu_id='0xf00',\n+ soc='AST2600 rev A3')\n+\n+if __name__ == '__main__':\n+ AspeedTest.main()\n", "prefixes": [ "v2", "4/4" ] }