From patchwork Mon Jun 27 19:54:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Delevoryas X-Patchwork-Id: 1649102 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=fb.com header.i=@fb.com header.a=rsa-sha256 header.s=facebook header.b=f6bGaiQ9; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4LWz6c538sz9sGk for ; Tue, 28 Jun 2022 05:58:00 +1000 (AEST) Received: from localhost ([::1]:33626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5uru-0006NN-FK for incoming@patchwork.ozlabs.org; Mon, 27 Jun 2022 15:57:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5upK-0004Hq-Sx for qemu-devel@nongnu.org; Mon, 27 Jun 2022 15:55:20 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:8382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5upI-0000Wh-8O for qemu-devel@nongnu.org; Mon, 27 Jun 2022 15:55:18 -0400 Received: from pps.filterd (m0109334.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25RJ1SWC017572 for ; Mon, 27 Jun 2022 12:55:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=facebook; bh=S1yPwEGxngZ43y2+GrPQJjRFjdLmx59CIxlw3mXValk=; b=f6bGaiQ9CPzwBRHuk6ys0QsiOTCE+15XvY8Qrgac9EimuS66xrTqBt9QgYe6To5t9mFp 7TyAGdlaoWnhVA/FMLFSDYBBf4bmCE8X/egposdFWB30kEswXIgQ7BvHpf8skunWE75w jkuH8TWKradjp1hVQ8CwqHpYujbp3RTSvKw= Received: from mail.thefacebook.com ([163.114.132.120]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3gx1p54uw8-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 27 Jun 2022 12:55:12 -0700 Received: from twshared31479.05.prn5.facebook.com (2620:10d:c085:208::f) by mail.thefacebook.com (2620:10d:c085:11d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 27 Jun 2022 12:55:11 -0700 Received: by devvm9194.prn0.facebook.com (Postfix, from userid 385188) id AE2688D206DF; Mon, 27 Jun 2022 12:55:07 -0700 (PDT) From: Peter Delevoryas To: CC: , , , , , , , , Subject: [PATCH 00/14] aspeed: Add I2C new register DMA slave mode support Date: Mon, 27 Jun 2022 12:54:52 -0700 Message-ID: <20220627195506.403715-1-pdel@fb.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-ORIG-GUID: 0XZ_V4i2T_TiXMJkVnzuhHrCt2SFc6NT X-Proofpoint-GUID: 0XZ_V4i2T_TiXMJkVnzuhHrCt2SFc6NT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-27_06,2022-06-24_01,2022-06-22_01 Received-SPF: pass client-ip=67.231.145.42; envelope-from=prvs=71779173e5=pdel@fb.com; helo=mx0a-00082601.pphosted.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Hey everyone, I'm sending a big patch series for this, but only the last commit is really intended to be accepted right now. I'm just including the rest of them because it depends on them for testing. Klaus's changes include the multi-master stuff in hw/i2c/core.c, and the old register mode slave mode support. My series of patches includes a bunch of changes to eliminate most (if not all) of the I2C errors reported by the fb OpenBIC firmware for fby35 CraterLake Bridge Interconnect (BIC) (shortname: oby35-cl) upon startup. In particular, I needed to add the IC_DEVICE_ID to the isl voltage regulator implementation, which required a fix to the pmbus implementation when switching pages. We weren't resetting the buffer state when switching pages there. I also added a placeholder implementation of the PECI controller, that does almost nothing, but doesn't produce errors. I added the fby35-cpld, which oby35-cl queries using master-mode TX and RX commands. And finally, I added an "intel-me" device (Intel Management Engine) that attempts to respond to the first IPMB message sent by the BIC. I used this to test the final patch, which I actually want to merge, the I2C new register DMA slave mode support. All the patches except the last one can be ignored for now if you want, again, I just included them for testing purposes. The final patch is pretty rough, but I wanted to start the review instead of waiting too long. I expect the interrupt handling part will be the main blocker. Thanks, Peter Klaus Jensen (3): hw/i2c: support multiple masters hw/i2c: add asynchronous send hw/i2c/aspeed: add slave device in old register mode Peter Delevoryas (11): aspeed: i2c: Fix DMA len write-enable bit handling aspeed: i2c: Fix R_I2CD_FUN_CTRL reference aspeed: i2c: Fix MASTER_EN missing error message aspeed: Add PECI controller hw/misc: Add fby35-cpld pmbus: Reset out buf after switching pages pmbus: Add read-only IC_DEVICE_ID support aspeed: Add oby35-cl machine hw/misc: Add intel-me aspeed: Add intel-me on i2c6 instead of BMC aspeed: Add I2C new register DMA slave mode support hw/arm/aspeed.c | 42 ++++++ hw/arm/aspeed_ast10x0.c | 11 ++ hw/arm/pxa2xx.c | 2 + hw/display/sii9022.c | 2 + hw/display/ssd0303.c | 2 + hw/i2c/aspeed_i2c.c | 234 +++++++++++++++++++++++++++---- hw/i2c/core.c | 70 ++++++++- hw/i2c/pmbus_device.c | 6 + hw/i2c/smbus_slave.c | 4 + hw/i2c/trace-events | 2 + hw/misc/aspeed_peci.c | 225 +++++++++++++++++++++++++++++ hw/misc/fby35_cpld.c | 137 ++++++++++++++++++ hw/misc/intel_me.c | 176 +++++++++++++++++++++++ hw/misc/meson.build | 5 +- hw/nvram/eeprom_at24c.c | 2 + hw/sensor/isl_pmbus_vr.c | 30 ++++ hw/sensor/lsm303dlhc_mag.c | 2 + include/hw/arm/aspeed_soc.h | 3 + include/hw/i2c/aspeed_i2c.h | 11 ++ include/hw/i2c/i2c.h | 30 ++++ include/hw/i2c/pmbus_device.h | 1 + include/hw/misc/aspeed_peci.h | 34 +++++ include/hw/sensor/isl_pmbus_vr.h | 1 + 23 files changed, 1002 insertions(+), 30 deletions(-) create mode 100644 hw/misc/aspeed_peci.c create mode 100644 hw/misc/fby35_cpld.c create mode 100644 hw/misc/intel_me.c create mode 100644 include/hw/misc/aspeed_peci.h