From nobody Sat May 4 08:27:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=google.com ARC-Seal: i=1; a=rsa-sha256; t=1623184013; cv=none; d=zohomail.com; s=zohoarc; b=F8E2E9mnLpGP9mWF9OUWtuLL5l2qGC7cPXoEooSTI/ounU9x8hnYv4qJjKsUF/9sNhWAcy7vH5Cn4AjTU7gIgt3soRh8D9/D10UVHnvDq9Tlbw91pK+zDnUOps3lc5P9dNSXbovn1gJE9PjbbTp25J1m8ec44wkapGxeMx8XQNQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623184013; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BuLZRWh+N1B9P7DN5vdDFIi7K4s3geFpmLZAmBGD7UA=; b=WAGRo66x3F1CtpS3IsPmvoSWmQuHiXtocIe+dNnUj5IvLoKhwMOO0OW1R/lQhWbHoZ7riyhf6YQCNaJVbq6nqJ3bRUWyZCHSMvRIZ8J3o9dT6GRmz7BCKeOesxaoCUKNTdKIWzU577TYqupg0zGLXfuix27AaoUA5d3ZQ1F+xqY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623184013141896.6318352717723; Tue, 8 Jun 2021 13:26:53 -0700 (PDT) Received: from localhost ([::1]:52770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqiJI-00022N-30 for importer2@patchew.org; Tue, 08 Jun 2021 16:26:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3PNK_YAcKCusiRagheRTbbTYR.PbZdRZh-QRiRYabaTah.beT@flex--venture.bounces.google.com>) id 1lqiI4-000053-71 for qemu-devel@nongnu.org; Tue, 08 Jun 2021 16:25:36 -0400 Received: from mail-qk1-x749.google.com ([2607:f8b0:4864:20::749]:47060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3PNK_YAcKCusiRagheRTbbTYR.PbZdRZh-QRiRYabaTah.beT@flex--venture.bounces.google.com>) id 1lqiI2-0001Mi-KZ for qemu-devel@nongnu.org; Tue, 08 Jun 2021 16:25:35 -0400 Received: by mail-qk1-x749.google.com with SMTP id 205-20020a3707d60000b02903aa9208caa2so6492747qkh.13 for ; Tue, 08 Jun 2021 13:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=BuLZRWh+N1B9P7DN5vdDFIi7K4s3geFpmLZAmBGD7UA=; b=JabcKgumtewW53lGfjBr0Clh49I/rDF/HPglmwCJo4Hh9e4T3rrN9wtEfOQQ2ELm/i QA707y1iRt2EZkOLbboLyFzB/PqV/4Bc3xHpESMDTUnnsKMruGzBaJYpRQ0dY3/2BDjO diBtAQahjlY1XvmMqc+2VvWR9cs2fJQOaYeHuLO2KJZW91AbwsHrPFmYN3VQaZozrFq/ K2s8rgsV7riweyK5rnU91Flc0dbvtvkW64ofbllBMjO5mWfv2Ispl0opscgUhI8B9y7u XG+TPmS5h5JmnR8FuSQxYcoNGlaGLTo5SaFO7iCze/UOc0TEl0Zh1B+9VW657YsCmwry fpgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=BuLZRWh+N1B9P7DN5vdDFIi7K4s3geFpmLZAmBGD7UA=; b=UjBdQqXA26gdRw6BvdXR3A2pzTsUuZbC0FcqTyxydJqp8LSH5BXZEIo2IN0h1FgYrb cNaFOClJ8gH7fgm1K+lV5/6OnIPSGwfJrW48KCP09HfvaePZGi8kSjan6md76BoatMGt 98E+98DaEsUP+3LiDo1T/yys+jth/R60jjqn+CZHKaDw8nxc0bAfnnbsgnGbzWNlcDr7 mKvlDmGx88f0phlPOINM9Juq02IFzS3ZYDPS48eBboQpFRTJKJ/wlTJO+B9etsLUWjZu uqFOimk22D/g+t1R2iWOd+3XvRmmVQtHAyHmVKUjZ++omHIXgj92ck3vpYlAdf79M0fp ySiQ== X-Gm-Message-State: AOAM531u1ctiHU0j7xKlcFJoDiSjAlXZQhVlIchCrzMp6aMQUFx7+KXS 4LBhP2kOy9mR1hs+X/EGmob8+XH67N/L X-Google-Smtp-Source: ABdhPJzk3AxJemlRbW8F31QH+M16oDiDF96Py5NVwqPbmE/zCjA6cFlW8NJz/WWNKDfoz5t8bTwknS9qUIng X-Received: from venture.svl.corp.google.com ([2620:15c:2a3:200:f886:41e8:7e16:711b]) (user=venture job=sendgmr) by 2002:ad4:4ae4:: with SMTP id cp4mr2119815qvb.44.1623183932946; Tue, 08 Jun 2021 13:25:32 -0700 (PDT) Date: Tue, 8 Jun 2021 13:25:20 -0700 In-Reply-To: <20210608202522.2677850-1-venture@google.com> Message-Id: <20210608202522.2677850-2-venture@google.com> Mime-Version: 1.0 References: <20210608202522.2677850-1-venture@google.com> X-Mailer: git-send-email 2.32.0.rc1.229.g3e70b5a671-goog Subject: [PATCH v2 1/3] hw/arm: gsj add i2c comments From: Patrick Venture To: hskinnemoen@google.com, kfting@nuvoton.com, clg@kaod.org, peter.maydell@linaro.org, andrew@aj.id.au, joel@jms.id.au Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, Patrick Venture , Hao Wu Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::749; envelope-from=3PNK_YAcKCusiRagheRTbbTYR.PbZdRZh-QRiRYabaTah.beT@flex--venture.bounces.google.com; helo=mail-qk1-x749.google.com X-Spam_score_int: -95 X-Spam_score: -9.6 X-Spam_bar: --------- X-Spam_report: (-9.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @google.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Adds comments to the board init to identify missing i2c devices. Signed-off-by: Patrick Venture Reviewed-by: Hao Wu Reviewed-by: Joel Stanley --- hw/arm/npcm7xx_boards.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index d4553e3786..9b7a7cd201 100644 --- a/hw/arm/npcm7xx_boards.c +++ b/hw/arm/npcm7xx_boards.c @@ -220,7 +220,21 @@ static void quanta_gsj_i2c_init(NPCM7xxState *soc) at24c_eeprom_init(soc, 9, 0x55, 8192); at24c_eeprom_init(soc, 10, 0x55, 8192); =20 - /* TODO: Add additional i2c devices. */ + /* + * i2c-11: + * - power-brick@36: delta,dps800 + * - hotswap@15: ti,lm5066i + */ + + /* + * i2c-12: + * - ucd90160@6b + */ + + /* + * i2c-15: + * - pca9548@75 + */ } =20 static void quanta_gsj_fan_init(NPCM7xxMachine *machine, NPCM7xxState *soc) --=20 2.32.0.rc1.229.g3e70b5a671-goog From nobody Sat May 4 08:27:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=google.com ARC-Seal: i=1; a=rsa-sha256; t=1623184100; cv=none; d=zohomail.com; s=zohoarc; b=SNnQKsPBnvBLgcgKbjjKq7dQguCVYGtfNeSJpB8c79sVQIWEKZi8kkX+y/9a+7IWKJ6SdCFGiipC4D0wy8JCO1B3tMPUeHC3TN4n9CK8mKsfeaKD4G6eL+ksdg/2Wu3GXUh6uXhxb5gvIlfnnq3VBA0h1f5seEelxDNmm235eF4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623184100; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FxAe0EZ6wpi9A2ORE+AfuOAXtfCwqR3DwiGh/urmkpk=; b=kce05ycDmVJvdQ+Iot7huWttPnbyat9+Tbzwf0igtjIT/HNFUSTV17TA4aEI1wLeqNI/Rp4lXkEvf/dzm6YP09rQCsg5ccscZetn3NWH6m4MNKzifzBMnS/uXkGyYJEztdBLlZLyr3WTidGIHD53V0RuL5xXQAs1JP6XcQMzA2c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623184100047283.4450845193087; Tue, 8 Jun 2021 13:28:20 -0700 (PDT) Received: from localhost ([::1]:59218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqiKg-0006Vw-Vp for importer2@patchew.org; Tue, 08 Jun 2021 16:28:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3P9K_YAcKCu4lUdjkhUWeeWbU.SecgUck-TUlUbdedWdk.ehW@flex--venture.bounces.google.com>) id 1lqiI7-0000J0-RW for qemu-devel@nongnu.org; Tue, 08 Jun 2021 16:25:39 -0400 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]:57157) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3P9K_YAcKCu4lUdjkhUWeeWbU.SecgUck-TUlUbdedWdk.ehW@flex--venture.bounces.google.com>) id 1lqiI4-0001OA-WB for qemu-devel@nongnu.org; Tue, 08 Jun 2021 16:25:39 -0400 Received: by mail-yb1-xb49.google.com with SMTP id m205-20020a25d4d60000b029052a8de1fe41so28333531ybf.23 for ; Tue, 08 Jun 2021 13:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=FxAe0EZ6wpi9A2ORE+AfuOAXtfCwqR3DwiGh/urmkpk=; b=ATeo1MPXz4RN6CEL1CaBboXG/D0weUZ4MqO3+5ql72HHn2HSCiQLsy6LRi2lAHEN8I JeB4He2IR/3uaOwcNqEWUA1hhx6jyqbSyFlwBEbocwBFFaC0GLslyKeN9WKdgK3iYvaF CRNFJhdI3sZ2SVaZyHsqYhgog6OOaFpJhjnuxl3v1bVUWewiKcXC80JRGP5edvNq1ONq Cfef5Ix4SN8Wyl3rdz0Be2zxfSClVeSHLSthvAE4U2nFa5ER/8twaZDOdZ/MRsrvHZND KDFhxxdiBnn1fYxWTt1ClOW2HSt1Zk597s7HZXIr9CxrVRsq+5/RNZPtkDuOd/FM8sHw aqIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=FxAe0EZ6wpi9A2ORE+AfuOAXtfCwqR3DwiGh/urmkpk=; b=CXzNEDgbbD41P5CLS9w2QDt60n4EME0NUyDV+RGC66NZj8iJom1tJAzlo8yTgUS/6g R4JgseUW1GOfBL46yOaUxZ4Wt4VKeGZaBmqV0AK2gFDxM485schvysiu22FNF1GFzkvT zrDjBOlSsyHz/EdyzDODTm9N5s+O+6OknR0/zAX7mlcENxmiiAFdyCQ91UFhHz2nnizG pXcq2HxZQKyTVFK8hB2Z+Qib6/rpkR/5e4kO8oAxW+P0uH4uRi0UV0TDmX1E9xZHB5SC gSbB4/qNjOIQfL8XxbZzqSlc7mgteqKfJt8PFD2O0RBKYDX02+Qh/L37dxN51KKkQODv Ueug== X-Gm-Message-State: AOAM533hgJJq4xOknnFBEZYt0PvMWOt2t959wt7iXddZQs0CqI1a4m0a bJShHiayIVFZSkEyh0qHFjM+DKO5WsHQ X-Google-Smtp-Source: ABdhPJx/k4rUl+qzsO71MWYH02uizvrfzr25LbV+G87z5h8fieBv/RbrTlEvlehUY5wG5i1ppsLKblWx+V3Z X-Received: from venture.svl.corp.google.com ([2620:15c:2a3:200:f886:41e8:7e16:711b]) (user=venture job=sendgmr) by 2002:a25:9bc3:: with SMTP id w3mr32517916ybo.9.1623183935674; Tue, 08 Jun 2021 13:25:35 -0700 (PDT) Date: Tue, 8 Jun 2021 13:25:21 -0700 In-Reply-To: <20210608202522.2677850-1-venture@google.com> Message-Id: <20210608202522.2677850-3-venture@google.com> Mime-Version: 1.0 References: <20210608202522.2677850-1-venture@google.com> X-Mailer: git-send-email 2.32.0.rc1.229.g3e70b5a671-goog Subject: [PATCH v2 2/3] hw/arm: gsj add pca9548 From: Patrick Venture To: hskinnemoen@google.com, kfting@nuvoton.com, clg@kaod.org, peter.maydell@linaro.org, andrew@aj.id.au, joel@jms.id.au Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, Patrick Venture , Hao Wu Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::b49; envelope-from=3P9K_YAcKCu4lUdjkhUWeeWbU.SecgUck-TUlUbdedWdk.ehW@flex--venture.bounces.google.com; helo=mail-yb1-xb49.google.com X-Spam_score_int: -95 X-Spam_score: -9.6 X-Spam_bar: --------- X-Spam_report: (-9.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @google.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Tested: Quanta-gsj firmware booted. i2c /dev entries driver I2C init bus 1 freq 100000 I2C init bus 2 freq 100000 I2C init bus 3 freq 100000 I2C init bus 4 freq 100000 I2C init bus 8 freq 100000 I2C init bus 9 freq 100000 at24 9-0055: 8192 byte 24c64 EEPROM, writable, 1 bytes/write I2C init bus 10 freq 100000 at24 10-0055: 8192 byte 24c64 EEPROM, writable, 1 bytes/write I2C init bus 12 freq 100000 I2C init bus 15 freq 100000 i2c i2c-15: Added multiplexed i2c bus 16 i2c i2c-15: Added multiplexed i2c bus 17 i2c i2c-15: Added multiplexed i2c bus 18 i2c i2c-15: Added multiplexed i2c bus 19 i2c i2c-15: Added multiplexed i2c bus 20 i2c i2c-15: Added multiplexed i2c bus 21 i2c i2c-15: Added multiplexed i2c bus 22 i2c i2c-15: Added multiplexed i2c bus 23 pca954x 15-0075: registered 8 multiplexed busses for I2C switch pca9548 Signed-off-by: Patrick Venture Reviewed-by: Hao Wu Reviewed-by: Joel Stanley --- hw/arm/Kconfig | 1 + hw/arm/npcm7xx_boards.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index b887f6a5b1..9d1c2a6f7b 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -377,6 +377,7 @@ config NPCM7XX select SERIAL select SSI select UNIMP + select PCA954X =20 config FSL_IMX25 bool diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index 9b7a7cd201..f0a96564e2 100644 --- a/hw/arm/npcm7xx_boards.c +++ b/hw/arm/npcm7xx_boards.c @@ -18,6 +18,7 @@ =20 #include "hw/arm/npcm7xx.h" #include "hw/core/cpu.h" +#include "hw/i2c/i2c_mux_pca954x.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/loader.h" #include "hw/qdev-core.h" @@ -231,10 +232,7 @@ static void quanta_gsj_i2c_init(NPCM7xxState *soc) * - ucd90160@6b */ =20 - /* - * i2c-15: - * - pca9548@75 - */ + i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 15), "pca9548", 0x75); } =20 static void quanta_gsj_fan_init(NPCM7xxMachine *machine, NPCM7xxState *soc) --=20 2.32.0.rc1.229.g3e70b5a671-goog From nobody Sat May 4 08:27:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=google.com ARC-Seal: i=1; a=rsa-sha256; t=1623184103; cv=none; d=zohomail.com; s=zohoarc; b=j0kcuWx6/KMEaOLAbUty+JJ/h7imBKmiBd89zxIMJkQiqM5+Qy0cJpXKleG9A2oJghz8it+0I2QewkDu6YjoIwYdEqER5oSaHBaOVN3DSExijY8fB1GA+u5CWqYgHwbHIgkCk9SC+uZ05XnlwWWg5EvHbywzlTVKf3ua+iv4Lgw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623184103; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jNdnDMKzuwyZjBH28VZozL/ia5Go6l0KkjDets+IuzM=; b=h3SM+NLW45+CPLUjpvlr9rHWej650DAqQcmCWfu33lO6os2TBkqTl8BdtS0FCQCzerQGpcwjlSjtOQg8hj52OiHub/iEHmkUiCgNjljs0omTHTah4zHKB2tUsKUWxojdvGbqa3IZeq6gT7jsA5G46Tcfx0qcy6R0+XLd71ghjNg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623184103539455.11719322363297; Tue, 8 Jun 2021 13:28:23 -0700 (PDT) Received: from localhost ([::1]:59406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqiKk-0006df-Ex for importer2@patchew.org; Tue, 08 Jun 2021 16:28:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3Q9K_YAcKCvIpYhnolYaiiafY.WigkYgo-XYpYfhihaho.ila@flex--venture.bounces.google.com>) id 1lqiIA-0000Sv-Gp for qemu-devel@nongnu.org; Tue, 08 Jun 2021 16:25:42 -0400 Received: from mail-qk1-x74a.google.com ([2607:f8b0:4864:20::74a]:35424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3Q9K_YAcKCvIpYhnolYaiiafY.WigkYgo-XYpYfhihaho.ila@flex--venture.bounces.google.com>) id 1lqiI8-0001PW-Lc for qemu-devel@nongnu.org; Tue, 08 Jun 2021 16:25:42 -0400 Received: by mail-qk1-x74a.google.com with SMTP id y5-20020a37af050000b02903a9c3f8b89fso15681735qke.2 for ; Tue, 08 Jun 2021 13:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=jNdnDMKzuwyZjBH28VZozL/ia5Go6l0KkjDets+IuzM=; b=vUHXqlgWdyCgLOqD0OEeEpheJmreByYt1nes9Cr56jziTt+iAcE3pITLsr0Nh5HftJ A4g4QFnT53rtBj21SDKg+7G9mi9X3Z7OVSmEbBe16AUdY1/oIKgC//KPaStftq5Oed9s mRFO2jcaNwy7Y6gJ8AD/qlQBz8xrtnDuyG4r7T1L+Wib0QD8bB8i14D/kddxXlRPxCBp /6T5x9UZHoGGWObQZt7oWLc9mydodKV/4f8XkwdCtFuj1q1qhnV+h/r+xrO9UQBdVEIo JB5IOjfb5goBOrn+3p9xCReFfSuyvmo3T3gKgnYqWs9njojErKIqirtqLQsrVeCyyidx 3NTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=jNdnDMKzuwyZjBH28VZozL/ia5Go6l0KkjDets+IuzM=; b=eIfoJxpevzjt34uOn/troIU5MPm9uR3A9qdumktzW22yPpjrXtIq9pQZcw7qFk4Paa 6vWYORpgevp/msLtZRoOzfMN9bhOoAy6vW+7X06QaWcUFhowcaLflSfsJAqxoHlbX7ky +E18wa2JTxaUMBRzOGeGZRd5SfwLpu4Oxfyuep/YqmTi1NyE4idKi6jujumzkfd/oT7U wAF5OxrcoZ0QvfmPteotQhtWK8XVgCUaLqoayUHs+csbTtEbuDWHEn5PjRO8ByBDOtmX EQSMgmSmnHkTiaOjHRkNHMi+r+iiQjUqmOO03t6uTHhGUMiZVCj6GSofshy+1oK3uhvY 3EQg== X-Gm-Message-State: AOAM531vorA5/CR71vVM1/JUWYsc2VpQfagyAPS7hgViQlP3U57RgZyN p5Fo0KPVR0FxBziNgzqMNoqdxsZ7u/VE X-Google-Smtp-Source: ABdhPJyNYds6SdqQ/9H0DwihFJoC7DyDgMlc0Y/874UcrxxLFHiqRRRKEpzrVVtcooDYkUKuKNYdxjuFlbQV X-Received: from venture.svl.corp.google.com ([2620:15c:2a3:200:f886:41e8:7e16:711b]) (user=venture job=sendgmr) by 2002:ad4:5aeb:: with SMTP id c11mr2177687qvh.34.1623183939269; Tue, 08 Jun 2021 13:25:39 -0700 (PDT) Date: Tue, 8 Jun 2021 13:25:22 -0700 In-Reply-To: <20210608202522.2677850-1-venture@google.com> Message-Id: <20210608202522.2677850-4-venture@google.com> Mime-Version: 1.0 References: <20210608202522.2677850-1-venture@google.com> X-Mailer: git-send-email 2.32.0.rc1.229.g3e70b5a671-goog Subject: [PATCH v2 3/3] hw/arm: quanta-q71l add pca954x muxes From: Patrick Venture To: hskinnemoen@google.com, kfting@nuvoton.com, clg@kaod.org, peter.maydell@linaro.org, andrew@aj.id.au, joel@jms.id.au Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, Patrick Venture , Hao Wu Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::74a; envelope-from=3Q9K_YAcKCvIpYhnolYaiiafY.WigkYgo-XYpYfhihaho.ila@flex--venture.bounces.google.com; helo=mail-qk1-x74a.google.com X-Spam_score_int: -95 X-Spam_score: -9.6 X-Spam_bar: --------- X-Spam_report: (-9.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @google.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Adds the pca954x muxes expected. Tested: Booted quanta-q71l image to userspace. Signed-off-by: Patrick Venture Reviewed-by: Hao Wu Reviewed-by: Joel Stanley Reviewed-by: C=C3=A9dric Le Goater --- hw/arm/Kconfig | 1 + hw/arm/aspeed.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 9d1c2a6f7b..4a033e81ef 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -413,6 +413,7 @@ config ASPEED_SOC select PCA9552 select SERIAL select SMBUS_EEPROM + select PCA954X select SSI select SSI_M25P80 select TMP105 diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 3fe6c55744..35a28b0e8b 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -14,6 +14,7 @@ #include "hw/arm/boot.h" #include "hw/arm/aspeed.h" #include "hw/arm/aspeed_soc.h" +#include "hw/i2c/i2c_mux_pca954x.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/misc/pca9552.h" #include "hw/misc/tmp105.h" @@ -461,14 +462,18 @@ static void quanta_q71l_bmc_i2c_init(AspeedMachineSta= te *bmc) /* TODO: i2c-1: Add Frontpanel FRU eeprom@57 24c64 */ /* TODO: Add Memory Riser i2c mux and eeproms. */ =20 - /* TODO: i2c-2: pca9546@74 */ - /* TODO: i2c-2: pca9548@77 */ + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9546", 0= x74); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9548", 0= x77); + /* TODO: i2c-3: Add BIOS FRU eeprom@56 24c64 */ - /* TODO: i2c-7: Add pca9546@70 */ + + /* i2c-7 */ + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9546", 0= x70); /* - i2c@0: pmbus@59 */ /* - i2c@1: pmbus@58 */ /* - i2c@2: pmbus@58 */ /* - i2c@3: pmbus@59 */ + /* TODO: i2c-7: Add PDB FRU eeprom@52 */ /* TODO: i2c-8: Add BMC FRU eeprom@50 */ } --=20 2.32.0.rc1.229.g3e70b5a671-goog