From nobody Wed Nov 27 09:39:46 2024 Delivered-To: importer@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+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1699645896; cv=none; d=zohomail.com; s=zohoarc; b=RdQhRviuCN5srgS23btrQCiKihF67THu9yf1yQ8Le3LQrXmvXY0zXS64q2qiPvX6uR7IzkbTCX+eQmpRkZVRlkv2NwZM689+WCF/MS54S0LrxTgntq2tLw3UDoHcbd8HaMlI9QEsWRif4EqBMzd4CjBm5AD3lUbTC3psqQafctE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699645896; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lSCwXtgUTmVysbm4xLDff5HbcJZ5DD4Hmjjmt0BqgWs=; b=g3A5DoIz9gZNP+YO6G8616K+hyETkWPBnwnUAkHYidaaAZ309j3X3+7UiOc7lD1qAn9miz0jyo2sWAJaRIWvryIfCtx0N6JS25BAMu/+mJ2AlCK9P+VkOPaSYaKw4tP24kgRr3zPmOhB699ZBuE/W39A7B8kCup1p4urujU79XU= 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+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699645896519234.38852139482628; Fri, 10 Nov 2023 11:51:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1XWI-00028g-LY; Fri, 10 Nov 2023 14:50:22 -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 1r1XVq-0001xq-BL; Fri, 10 Nov 2023 14:49:54 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1XVn-00023A-Df; Fri, 10 Nov 2023 14:49:54 -0500 Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AAJHhp4013650; Fri, 10 Nov 2023 19:49:45 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u9thwrxvt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Nov 2023 19:49:44 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3AAJHvHU014408; Fri, 10 Nov 2023 19:49:44 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u9thwrxvd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Nov 2023 19:49:44 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3AAIlxIt028305; Fri, 10 Nov 2023 19:49:43 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([172.16.1.7]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3u7w22w7nh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Nov 2023 19:49:43 +0000 Received: from smtpav04.wdc07v.mail.ibm.com (smtpav04.wdc07v.mail.ibm.com [10.39.53.231]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3AAJngaX18547344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Nov 2023 19:49:42 GMT Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 18FC158054; Fri, 10 Nov 2023 19:49:42 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ACAF058045; Fri, 10 Nov 2023 19:49:41 +0000 (GMT) Received: from mamboa4.aus.stglabs.ibm.com (unknown [9.3.84.87]) by smtpav04.wdc07v.mail.ibm.com (Postfix) with ESMTP; Fri, 10 Nov 2023 19:49:41 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=lSCwXtgUTmVysbm4xLDff5HbcJZ5DD4Hmjjmt0BqgWs=; b=slGtCEfp+63HSJcgrkfoZE4LSNK7RPb310OYtXasSBhrc3GNf9X60NSQRDlx/51mtd2J 9XZDX0xorecG9yanEOWPiH+ML//LCvdKMryWfe+g/kE0L8XbYU4EjHwF1cP6yDdka6Mb 1NiNW4VTWqRSxbPoYbC4r7uvyc0ZuatsIYYQzRtGCOxOhHy5cMJBveQTNeioLzqxfKfA VS8dNKEdkC62+3i+hAWHBht6l7NitlXz1ALegcif832n7KkpzvNOrN0QWGj/7FG4Uzjl Q3W/bl4+m8w7w9fi1rhWsew54SWmsVqokV1dOLsug0VVzQmhmcKEoDudLCLP6apq0Gey LQ== From: Glenn Miles To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: Glenn Miles , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Nicholas Piggin , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barrat?= Subject: [PATCH v2 1/8] ppc/pnv: Add pca9552 to powernv10 for PCIe hotplug power control Date: Fri, 10 Nov 2023 13:49:18 -0600 Message-Id: <20231110194925.475909-2-milesg@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231110194925.475909-1-milesg@linux.vnet.ibm.com> References: <20231110194925.475909-1-milesg@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: GmEVj-vi8Zc0Xxc8kZYslwByOGzF9tfR X-Proofpoint-GUID: 0Z3elvYNWoKkC5ljwaY36UJRYh950PHp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-10_17,2023-11-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=654 mlxscore=0 clxscore=1015 bulkscore=0 adultscore=0 priorityscore=1501 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311100166 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.156.1; envelope-from=milesg@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1699645898297100003 Content-Type: text/plain; charset="utf-8" The Power Hypervisor code expects to see a pca9552 device connected to the 3rd PNV I2C engine on port 1 at I2C address 0x63 (or left- justified address of 0xC6). This is used by hypervisor code to control PCIe slot power during hotplug events. Signed-off-by: Glenn Miles --- Based-on: <20231024181144.4045056-3-milesg@linux.vnet.ibm.com> [PATCH v3 2/2] misc/pca9552: Let external devices set pca9552 inputs hw/ppc/Kconfig | 1 + hw/ppc/pnv.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index 56f0475a8e..f77ca773cf 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -32,6 +32,7 @@ config POWERNV select XIVE select FDT_PPC select PCI_POWERNV + select PCA9552 =20 config PPC405 bool diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 9c29727337..7afaf1008f 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -1877,6 +1877,13 @@ static void pnv_chip_power10_realize(DeviceState *de= v, Error **errp) qdev_get_gpio_in(DEVICE(&chip10->psi), PSIHB9_IRQ_SBE_I2C)); } + + /* + * Add a PCA9552 I2C device for PCIe hotplug control + * to engine 2, bus 1, address 0x63 + */ + i2c_slave_create_simple(chip10->i2c[2].busses[1], "pca9552", 0x63); + } =20 static uint32_t pnv_chip_power10_xscom_pcba(PnvChip *chip, uint64_t addr) --=20 2.31.1