From patchwork Fri Jun 8 12:44:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 926762 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 412NDV0R5bz9s0W for ; Fri, 8 Jun 2018 23:14:50 +1000 (AEST) Received: from localhost ([::1]:35583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRHE7-0001d6-He for incoming@patchwork.ozlabs.org; Fri, 08 Jun 2018 09:14:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRGlm-00031l-5L for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:45:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRGll-0004EO-CR for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:45:30 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:42588) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fRGll-00046X-5N for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:45:29 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fRGlg-0003dy-DI for qemu-devel@nongnu.org; Fri, 08 Jun 2018 13:45:24 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 8 Jun 2018 13:44:54 +0100 Message-Id: <20180608124517.29475-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180608124517.29475-1-peter.maydell@linaro.org> References: <20180608124517.29475-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: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 08/31] aspeed: add the pc9552 chips to the witherspoon machine X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Cédric Le Goater The pca9552 LED blinkers on the Witherspoon machine are used for leds but also as GPIOs to control fans and GPUs. Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Reviewed-by: Philippe Mathieu-Daudé Message-id: 20180530064049.27976-8-clg@kaod.org Signed-off-by: Peter Maydell --- hw/arm/aspeed.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 5d0ed3391e0..bb9d33848d3 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -384,6 +384,8 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc) AspeedSoCState *soc = &bmc->soc; uint8_t *eeprom_buf = g_malloc0(8 * 1024); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), "pca9552", 0x60); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 4), "tmp423", 0x4c); i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 5), "tmp423", 0x4c); @@ -396,6 +398,8 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc) smbus_eeprom_init_one(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), 0x51, eeprom_buf); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "pca9552", + 0x60); } static void witherspoon_bmc_init(MachineState *machine)