From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists1p.gnu.org (lists1p.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 BFE3FC79F8C for ; Sun, 6 Sep 2026 17:14:46 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x3GPN-0005aN-Fp; Sun, 06 Sep 2026 13:11:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x3GPL-0005FS-VG for qemu-devel@nongnu.org; Sun, 06 Sep 2026 13:11:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x3GPK-0000Mf-C6 for qemu-devel@nongnu.org; Sun, 06 Sep 2026 13:11:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1788714713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+EyHba9AO0aIJAAangy0KYzvZcDPD4M4fdPLQozi62Q=; b=NZGihTL7xV2kk2Ic00MKs5GMs9rTaf8NVuOe4EmR+Wy6hdCG3Kj+2uNBSrACn7TASrRK0D fOPvw1zXBiBErNWb0stNKTb/d2/7zNzczlxc1gUxUsbZcf49c+nGUUnuiRXaCcpP43bLsi cfnz+djtm6CjN2GKm7/VxoRnETy77Z8= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-2-pctgeoFyPRC-n4gT4eZwtw-1; Sun, 06 Sep 2026 13:11:48 -0400 X-MC-Unique: pctgeoFyPRC-n4gT4eZwtw-1 X-Mimecast-MFC-AGG-ID: pctgeoFyPRC-n4gT4eZwtw_1788714707 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2CE4418001E6; Sun, 6 Sep 2026 17:11:47 +0000 (UTC) Received: from yukon.redhat.com (unknown [10.44.32.24]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BE5871955F06; Sun, 6 Sep 2026 17:11:45 +0000 (UTC) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Emmanuel Blot , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 39/40] hw/arm: fuji: use the real TMP75 and LM75B temperature sensors Date: Sun, 6 Sep 2026 19:10:20 +0200 Message-ID: <20260906171021.26568-40-clg@redhat.com> In-Reply-To: <20260906171021.26568-1-clg@redhat.com> References: <20260906171021.26568-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Emmanuel Blot The Fuji BMC instantiates many ti,tmp75 sensors and several NXP LM75B sensors; the original board code approximated both with a plain TMP105 via local TYPE_TMP75 and TYPE_LM75 aliases (the latter mislabelling the LM75B parts as LM75). Now that hw/sensor/tmp105.h provides proper TMP75 and LM75B models, drop the local aliases (and their guards) and instantiate the accurate devices. Signed-off-by: Emmanuel Blot Reviewed-by: Cédric Le Goater Link: https://lore.kernel.org/qemu-devel/20260731-sanmiguel-bmc-locator-v2-15-1266926ba769@free.fr Signed-off-by: Cédric Le Goater --- hw/arm/aspeed_ast2600_fuji.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/hw/arm/aspeed_ast2600_fuji.c b/hw/arm/aspeed_ast2600_fuji.c index 6318aa606b6b..dae023938793 100644 --- a/hw/arm/aspeed_ast2600_fuji.c +++ b/hw/arm/aspeed_ast2600_fuji.c @@ -14,14 +14,6 @@ #include "hw/sensor/tmp105.h" #include "hw/nvram/eeprom_at24c.h" -/* - * Guard the aliases against the TYPE_TMP75 that hw/sensor/tmp105.h now defines; - * TYPE_LM75 is guarded too for consistency (no LM75 model exists yet). - */ -#undef TYPE_LM75 -#define TYPE_LM75 TYPE_TMP105 -#undef TYPE_TMP75 -#define TYPE_TMP75 TYPE_TMP105 #define TYPE_TMP422 "tmp422" /* Fuji hardware value */ @@ -62,8 +54,8 @@ static void fuji_bmc_i2c_init(AspeedMachineState *bmc) get_pca9548_channels(i2c[40 + i], 0x76, &i2c[80 + i * 8]); } - i2c_slave_create_simple(i2c[17], TYPE_LM75, 0x4c); - i2c_slave_create_simple(i2c[17], TYPE_LM75, 0x4d); + i2c_slave_create_simple(i2c[17], TYPE_LM75B, 0x4c); + i2c_slave_create_simple(i2c[17], TYPE_LM75B, 0x4d); /* * EEPROM 24c64 size is 64Kbits or 8 Kbytes @@ -73,15 +65,15 @@ static void fuji_bmc_i2c_init(AspeedMachineState *bmc) at24c_eeprom_init(i2c[20], 0x50, 256); at24c_eeprom_init(i2c[22], 0x52, 256); - i2c_slave_create_simple(i2c[3], TYPE_LM75, 0x48); - i2c_slave_create_simple(i2c[3], TYPE_LM75, 0x49); - i2c_slave_create_simple(i2c[3], TYPE_LM75, 0x4a); + i2c_slave_create_simple(i2c[3], TYPE_LM75B, 0x48); + i2c_slave_create_simple(i2c[3], TYPE_LM75B, 0x49); + i2c_slave_create_simple(i2c[3], TYPE_LM75B, 0x4a); i2c_slave_create_simple(i2c[3], TYPE_TMP422, 0x4c); at24c_eeprom_init(i2c[8], 0x51, 8 * KiB); - i2c_slave_create_simple(i2c[8], TYPE_LM75, 0x4a); + i2c_slave_create_simple(i2c[8], TYPE_LM75B, 0x4a); - i2c_slave_create_simple(i2c[50], TYPE_LM75, 0x4c); + i2c_slave_create_simple(i2c[50], TYPE_LM75B, 0x4c); at24c_eeprom_init(i2c[50], 0x52, 8 * KiB); i2c_slave_create_simple(i2c[51], TYPE_TMP75, 0x48); i2c_slave_create_simple(i2c[52], TYPE_TMP75, 0x49); -- 2.55.0