From patchwork Thu Aug 1 16:06:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mary Strodl X-Patchwork-Id: 13750688 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7684C3DA64 for ; Thu, 1 Aug 2024 16:06:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7D6AA6B0085; Thu, 1 Aug 2024 12:06:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 786806B0089; Thu, 1 Aug 2024 12:06:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 64E766B008C; Thu, 1 Aug 2024 12:06:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 4ABB66B0085 for ; Thu, 1 Aug 2024 12:06:27 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 057621C42CF for ; Thu, 1 Aug 2024 16:06:27 +0000 (UTC) X-FDA: 82404154014.08.CF7C963 Received: from greygoose-centos7.csh.rit.edu (greygoose-centos7.csh.rit.edu [129.21.49.170]) by imf19.hostedemail.com (Postfix) with ESMTP id 83C2A1A002B for ; Thu, 1 Aug 2024 16:06:24 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=csh.rit.edu header.s=mail header.b=PoVx96se; spf=pass (imf19.hostedemail.com: domain of mstrodl@csh.rit.edu designates 129.21.49.170 as permitted sender) smtp.mailfrom=mstrodl@csh.rit.edu; dmarc=pass (policy=none) header.from=csh.rit.edu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722528328; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=4HeeNiB7T7XK6gu5fxfPvUDtEC3hBM+44jejdo7oZSk=; b=zq+nyP7HILVEH5Zgu1j9Kqhy1ewka8uUZk+xTlzg2X2A+LiY/Er35lvSCEJU+2lasKoqiQ dyzpnqNprPhy1ncBY6F9FZGWllZAYR5OeoIrTx1zYlY80GKFeFOsb/Xw1c4VvzqjMe9Aa3 uQh03ComwHmhioYWFONHmeikwRTkZVg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722528328; a=rsa-sha256; cv=none; b=S9jY996qr8xKTPDQYsFIMHO6HW+DlpqMo6OKyuSvkCRA86cqSUuu7myeNGivYllIsgGcPe D+GB9aaq05StX4/bdHjG5WGktJ9USaGlql6tn2rYaRg74SK674CqbGFnL0/eM5OfThIK5G PPVDQaJp1S224SMy+A1YcTzfGtTweDg= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=csh.rit.edu header.s=mail header.b=PoVx96se; spf=pass (imf19.hostedemail.com: domain of mstrodl@csh.rit.edu designates 129.21.49.170 as permitted sender) smtp.mailfrom=mstrodl@csh.rit.edu; dmarc=pass (policy=none) header.from=csh.rit.edu Received: from localhost (localhost [127.0.0.1]) by greygoose-centos7.csh.rit.edu (Postfix) with ESMTP id 62D5C456D91E; Thu, 1 Aug 2024 12:06:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=csh.rit.edu; h= content-transfer-encoding:mime-version:x-mailer:message-id:date :date:subject:subject:from:from:received:received; s=mail; t= 1722528382; x=1724342783; bh=/8nriejmXzDzWVmm/IlmiLk0ggY6nmt4tGP eWk9wNsE=; b=PoVx96se74RXOXibEBplzKOSXOOmf51PNbVy6gTdW38BwRj4xSE +xN9S9FtKdp3kD73nLjy3lW/frcR+fZiFe0qzLn1xlDSPnIWjIK2IeRjOhK+V2t0 4Gx/vAhZf59DB4xpY2pS3rAZjUTJ1n8mPV5QSdMr4DbibUf9LV64hE/Q= X-Virus-Scanned: amavisd-new at csh.rit.edu Received: from greygoose-centos7.csh.rit.edu ([127.0.0.1]) by localhost (mail.csh.rit.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ZLVFkvNF_GIA; Thu, 1 Aug 2024 12:06:22 -0400 (EDT) Received: from freedom.csh.rit.edu (freedom.csh.rit.edu [129.21.49.182]) by greygoose-centos7.csh.rit.edu (Postfix) with ESMTP id AD7EB457328D; Thu, 1 Aug 2024 12:06:22 -0400 (EDT) From: Mary Strodl To: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, urezki@gmail.com, hch@infradead.org, linux-mm@kvack.org, lee@kernel.org, andi.shyti@kernel.org, linux-i2c@vger.kernel.org, s.hauer@pengutronix.de, christian.gmeiner@gmail.com, Mary Strodl Subject: [PATCH v2 0/2] Add support for Congatec CGEB BIOS interface Date: Thu, 1 Aug 2024 12:06:08 -0400 Message-ID: <20240801160610.101859-1-mstrodl@csh.rit.edu> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Rspamd-Queue-Id: 83C2A1A002B X-Stat-Signature: p81x9xip78k9qiehb6sxx1t9ftkh7uj4 X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1722528384-459584 X-HE-Meta: U2FsdGVkX1+YXAr9fPoxw5wIROYsR5yCB4tf1HyOfEJsly7F/cFAqtq/7GUy4dqVUotI1WBk2BAJ7w6/ukYdTOiUB53r3dIRxY9IcnuhefH4rIc7faTADs2CkxSsGiki2SxP94VNcafJY3AbdODfsfh6obL5BPunqofFdt0rqkbT8LF798/M57cJgamSgscSkSbu0LTzMs787406BZE2oXAuNR+ITsCei85e2g5zDQWBuvcRPiZ/eY2moki+voj1pX7uH9kWC2kRcgikyq+fx4csaJpB6+TLQ9Sjalz2n6bs6owkEzaZWcw4ER0Zx0hCjmDnTcW5zK26kg7lwwNQWBSC9gSn8dGZODCEiDKLGTIXFjKsrX0JNKZK6wuRV9WCWBkBJjAg8i6EUJ66shdZuGIRXbRpgeQGqNGTMlocCa8mJJ8wCta+e3hWVgX7cu6y2hU+55yAsGk69EjQ+RHlSOr439iSeIy2M/CGyEETMPwYm8zPXVUk1EBbGtrScU8J6jbW/43I/HmR2yGu7GYJgKVCcS7as6oml8B59uOVw5v4/kZpAIbeUfaAmx+hHqmxPCuc321glFOf2sD2YadwnJA3YvXtjpgQVBJ3ATJpMyXpbzRIO+DPoJHgxCu8wbMU4VK6TDebs709oOcY12+CqFRgNpbiSr3SZgQs0onYJ7yxr3J8fZzfp+nqlrmbNRV4UtDA4EDXz47vFVYeEDqR89CGtd3FCVwUE6ly4uKTpX9y9MelIFPzQs4l9myxpe6fq6Gcw2Jj+GCSwlzHt0dtwvIU7tcrZxhQgHPcZDU9w4A+F2JBkCPWpRf1Z3I5mMNvb5VLT0vtn4o+OJVumFVCbluD0BubT50M0DX7B5Z8P0MIilhy2zjHZc3rTjZPe0Pndsw9BvsJP5HtRsKrKybUdsh3rSyXCVPcSf5t4Y3PLYCKcafPJz/swPW2F3VWBeTO8NFEQDbtHotXb49wv9l gvohr7WH Ye3QnIhuRAPeCUVNO7S8+OX2eVhbB+lg7nQVjVTiix3gkXENQxLJHRgQ7ySuccQ3WA1AULQGNBVErr+FvFzBt6bhqLXz7nWCHbyo7uMQVpolflY9ob1UBtHfXGXg6oczNN/AhKpJADy/TSZAh1zqvbxeqah9zK0p41Ms6E5zixTg+pOZUtH/NqDv7tJbDxrBV8aHHxAjFDG/1shhSO5JH5YIJv2edxqZ+3LORqb3sqTFAWYdj8pMc4Mc+eq/UnTyDPFbaaBcgxtxUdsg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The following series adds support for the Congatec CGEB interface found on some Congatec x86 boards. The CGEB interface is a BIOS interface which provides access to onboard peripherals like I2C busses and watchdogs. It works by mapping BIOS code and searching for magic values which specify the entry points to the CGEB call. The CGEB call is an API provided by the BIOS which provides access to the functions in an ioctl like fashion. At the request of some folks last time this series went out, CGEB now has a userspace component which runs the x86 blob (rather than running it directly in the kernel), which sends requests back and forth using the cn_netlink API. You can find a reference implementation of the userspace helper here: https://github.com/Mstrodl/cgeb-helper I didn't get an answer when I asked where the userspace component should live, so I didn't put a ton of work into getting the helper up to snuff since similar userspace helpers (like v86d) are not in-tree. If folks would like the helper in-tree, that's fine too. This series is based on the excellent work of Sascha Hauer and Christian Gmeiner. You can find their original work here: http://patchwork.ozlabs.org/patch/219756/ http://patchwork.ozlabs.org/patch/219755/ http://patchwork.ozlabs.org/patch/219757/ http://patchwork.ozlabs.org/patch/483262/ http://patchwork.ozlabs.org/patch/483264/ http://patchwork.ozlabs.org/patch/483261/ http://patchwork.ozlabs.org/patch/483263/ Mary Strodl (1): x86: Add basic support for the Congatec CGEB BIOS interface Sascha Hauer (1): i2c: Add Congatec CGEB I2C driver drivers/i2c/busses/Kconfig | 7 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-congatec-cgeb.c | 189 ++++ drivers/mfd/Kconfig | 10 + drivers/mfd/Makefile | 1 + drivers/mfd/congatec-cgeb.c | 1139 ++++++++++++++++++++++++ include/linux/mfd/congatec-cgeb.h | 111 +++ include/uapi/linux/connector.h | 4 +- 8 files changed, 1461 insertions(+), 1 deletion(-) create mode 100644 drivers/i2c/busses/i2c-congatec-cgeb.c create mode 100644 drivers/mfd/congatec-cgeb.c create mode 100644 include/linux/mfd/congatec-cgeb.h