Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87003D25051 for ; Mon, 12 Jan 2026 08:37:51 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vfDKf-0005Dq-4L; Mon, 12 Jan 2026 03:31:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vfDKL-000556-4Y; Mon, 12 Jan 2026 03:31:12 -0500 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX01.aspeed.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vfDKH-0008QA-Pz; Mon, 12 Jan 2026 03:31:03 -0500 Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Mon, 12 Jan 2026 16:30:54 +0800 Received: from mail.aspeedtech.com (192.168.10.10) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Mon, 12 Jan 2026 16:30:54 +0800 To: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Andrew Jeffery , Joel Stanley , "open list:ASPEED BMCs" , "open list:All patches CC here" CC: , Kane-Chen-AS Subject: [PATCH v1 0/1] hw/i2c/aspeed: Introduce 'bus-label' to customize bus naming Date: Mon, 12 Jan 2026 16:30:52 +0800 Message-ID: <20260112083054.4151945-1-kane_chen@aspeedtech.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Received-SPF: pass client-ip=211.20.114.72; envelope-from=kane_chen@aspeedtech.com; helo=TWMBX01.aspeed.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_FAIL=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Kane Chen From: Kane Chen via Errors-To: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org From: Kane-Chen-AS Currently, the Aspeed I2C controller uses a static naming convention for its buses (e.g., "aspeed.i2c.bus.0"). This approach leads to object name conflicts in machine models that incorporate multiple I2C controllers, such as an Aspeed SoC paired with an external IO expander or a co-processor like the AST1700. This patch series introduces a 'bus-label' property to the Aspeed I2C controller. By setting this property, higher-level platform code (e.g., the SoC realize function) can provide a unique prefix for the I2C buses. Changes in v1: Added bus-label property to AspeedI2CState. Added bus-name property to AspeedI2CBus. Modified aspeed_i2c_realize to generate bus names based on the label. Updated aspeed_i2c_bus_realize to use the customized name for bus initialization and memory region naming. Example usage: If a controller's bus-label is set to "ioexp0", its buses will be named "ioexp0.0", "ioexp0.1", etc., instead of the default "aspeed.i2c.bus.0". Any feedback or suggestions are appreciated. Best Regards, Kane Kane-Chen-AS (1): hw/i2c/aspeed: Introduce 'bus-label' to customize bus naming include/hw/i2c/aspeed_i2c.h | 2 ++ hw/i2c/aspeed_i2c.c | 27 +++++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) -- 2.43.0