Message ID | 20240131230542.3993409-1-charles.perry@savoirfairelinux.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-47335-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp99037dyc; Wed, 31 Jan 2024 15:53:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxpqG/TOb2bsPVuHDJUXspcLPkpVZaIhqM3C1pl1zX9Sh3iG2yjX7YefbDq69XUBtJLpd0 X-Received: by 2002:a05:6a20:b287:b0:19c:6f2b:ad0a with SMTP id ei7-20020a056a20b28700b0019c6f2bad0amr2577382pzb.51.1706745199413; Wed, 31 Jan 2024 15:53:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706745199; cv=pass; d=google.com; s=arc-20160816; b=k2cE45XG2Ut3woYqTy76OCEbPg3agmgB7nmy9GhRv1iF/rCUYDY7qxeFENh6wndb5s bcAdqx97XZPUqO13Abh0xdK1AXDF5rZYLLrLJSRWNEi0KPHaDU3aXiuDhDYu/dM994nS AhB2JWQZCxqzXclE6w5AHb6IGueHCDQfclaZJKtLFUL2UvPj+Nge9e67HeYBmiL9OeB4 aP4UKk/r9Ku20DUoJ9G+XVY3r6SUMnCGO9l9WOFLSL1aqVUdSAPTxtbJQT9sG7QenJZC qjcK+/dyysp8nEj3QX3QUfPmaqsAUJuWjqN4/3KE1uti7Tn7wldtZ8U4pIBo7l36Sab+ RH+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=YyNZx9Kwr8uHCYcqYCuicqbnXCLiCFYtvBTXF0+LUw4=; fh=WKdnzvTW8ZLmJRS5vrRaebW/vuikDBaADVL3oEg6ZzQ=; b=E7Wo33YCLBDoohiDcLgIwpF9DN4iWl5uPFwqrOXH2iNbBr8tBxVKOHih40o/iUKEdM 58/IqNcW7OKryEhXZzhS8XxF7c2kbqBHJi5nUJqVhtGVg4zAtW5ND+CmhNmmJ0dK1eOs zRCk7oX9hBJ1O4qSUaicwg0tQsCIFHQsD2Rd5UUSJtLe75jtS8wm5G42o5xdokojcbbN lKeNtSUzxE4g7oGJqi4S1QTOzfWpNA25hig1VKsXPu1Nx8Aaed3p529ozvTTDpNagam0 QOX1abvroWS+r+hHIfzQApd1ewRVoBkmRZcYlPthCuuYZnnK9GRqm3gEtasAEpQRiZWh ONWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b="mF/Ok2ZD"; arc=pass (i=1 spf=pass spfdomain=savoirfairelinux.com dkim=pass dkdomain=savoirfairelinux.com); spf=pass (google.com: domain of linux-kernel+bounces-47335-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47335-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVPOZCDO54T2IVkvRBgxwE7jopnZev3AFndIYPyS4oW62Lz851ASc+FpGzG576E5juxLomFuTl1YNcYI2yW6h/0X0EYrA== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s8-20020a170902ea0800b001d59055c547si3377880plg.293.2024.01.31.15.53.19 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 15:53:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47335-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b="mF/Ok2ZD"; arc=pass (i=1 spf=pass spfdomain=savoirfairelinux.com dkim=pass dkdomain=savoirfairelinux.com); spf=pass (google.com: domain of linux-kernel+bounces-47335-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47335-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DE97AB352DE for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 23:25:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B357541238; Wed, 31 Jan 2024 23:06:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b="mF/Ok2ZD" Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71AD33AC2D; Wed, 31 Jan 2024 23:06:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=208.88.110.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706742379; cv=none; b=NHdzikaBiJ106ZF3ZlgvV1evvG7l+vB12Kn9K9C3D6/Bba+uu32ibl93JjHioPh80yg3yD0nhP25YlO1fU4nZ9q3aSpt7oZn+CkhHSNp5p/iS/00WmoO3c7P0o4HrhyofL7KEAMov92ihF21Vt/kQLdqIbo9jgxUsxkfj5k9xSg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706742379; c=relaxed/simple; bh=yQ5sSp/srX5L79aKi05FfTRn8K15X3L/qJZyRoFxKgs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rBBNt7qEkcyZwUkC3vbOoU6w1/wlrh7BxglYGizILmXDikt7pwylEHACoT4lpubW+vgVxL7vQTEkIdvJ4apF2iQH22YXEcJet3b/jS/Uv1fFGBaqgX3GQxC7HqamGtZelWwRCfhYqpRk2rXbgyMyPt4MSo7pkvIb2+8AbJVDND4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com; spf=pass smtp.mailfrom=savoirfairelinux.com; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b=mF/Ok2ZD; arc=none smtp.client-ip=208.88.110.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=savoirfairelinux.com Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 54A179C0490; Wed, 31 Jan 2024 18:06:15 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id IIYOHo_50m_G; Wed, 31 Jan 2024 18:06:14 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 1F4AB9C443E; Wed, 31 Jan 2024 18:06:14 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 1F4AB9C443E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1706742374; bh=YyNZx9Kwr8uHCYcqYCuicqbnXCLiCFYtvBTXF0+LUw4=; h=From:To:Date:Message-ID:MIME-Version; b=mF/Ok2ZDiSGhdWQqS+QVDX286AyN/NDizeBLKr/O/in21PI9WIqOa8d9hxpmlaxX1 BLaSknULAL5EDKkFuuBaqAsp92c/wWmv5a/xjE787MvtRV0W15ElzUgJkj1e/Kx1aE 4NCmfIGa/6XfadWi3T55rTiYqiDcLEN+NsoXl9tYfpbVJO+36VpYlyBgtRMs+3Z1DK 71Ht45tQ2cy5/Uxityg9vvawsN3pzpaJWvOSF8PSs1Z2mDB5fNrtRmWcbs+umFaFyT 6FgGxFpIGVxBK0bRllmkAZcIjhOkGgXFSJd91g4vFP3huXY5q69c93It5Jq/2dr/Cw yriiyZzOFgLgQ== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id biSyfPgtlLx9; Wed, 31 Jan 2024 18:06:14 -0500 (EST) Received: from pcperry.mtl.sfl (unknown [192.168.51.254]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id D4ACE9C0490; Wed, 31 Jan 2024 18:06:13 -0500 (EST) From: Charles Perry <charles.perry@savoirfairelinux.com> To: mdf@kernel.org Cc: avandiver@markem-imaje.com, bcody@markem-imaje.com, Charles Perry <charles.perry@savoirfairelinux.com>, Wu Hao <hao.wu@intel.com>, Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Michal Simek <michal.simek@amd.com>, linux-fpga@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/3] fpga: xilinx-selectmap: add new driver Date: Wed, 31 Jan 2024 18:05:30 -0500 Message-ID: <20240131230542.3993409-1-charles.perry@savoirfairelinux.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240129225602.3832449-1-charles.perry@savoirfairelinux.com> References: <20240129225602.3832449-1-charles.perry@savoirfairelinux.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789467331617831001 X-GMAIL-MSGID: 1789652054385368453 |
Series |
fpga: xilinx-selectmap: add new driver
|
|
Message
Charles Perry
Jan. 31, 2024, 11:05 p.m. UTC
Hello, This patchset adds a new driver for the 7 series FPGA's SelectMAP interface. The SelectMAP interface shares a common GPIO protocol with the SPI interface which is already in the kernel (drivers/fpga/xilinx-spi.c). The approach proposed in this patchset is to refactor xilinx-spi.c into xilinx-core.c which would handle the common GPIO protocol. This is then used to build two drivers, the already existing xilinx-spi.c driver and a newly added xilinx-selectmap.c driver. The SelectMAP driver proposed only supports 8 bit mode. This is because the 16 and 32 bits mode have limitations with regards to compressed bitstream support as well as introducing endianness considerations. I'm testing xilinx-selectmap.c on a custom i.MX6 board connected to an Artix 7 FPGA. Flashing a 913K bitstream takes 0.44 seconds. v2: From Krzysztof Kozlowski review's: * Use more conventional names for gpio DT bindings * fix example in DT bindings * add mc-peripheral-props.yaml to DT bindings * fix various formatting mistakes * Remove all occurences of the "slave" word. Charles Perry (3): fpga: xilinx-spi: extract a common driver core dt-bindings: fpga: xlnx,fpga-slave-selectmap: add DT schema fpga: xilinx-selectmap: add new driver .../bindings/fpga/xlnx,fpga-selectmap.yaml | 83 +++++++ drivers/fpga/Kconfig | 12 + drivers/fpga/Makefile | 2 + drivers/fpga/xilinx-core.c | 215 ++++++++++++++++++ drivers/fpga/xilinx-core.h | 28 +++ drivers/fpga/xilinx-selectmap.c | 106 +++++++++ drivers/fpga/xilinx-spi.c | 205 ++--------------- 7 files changed, 462 insertions(+), 189 deletions(-) create mode 100644 Documentation/devicetree/bindings/fpga/xlnx,fpga-selectmap.yaml create mode 100644 drivers/fpga/xilinx-core.c create mode 100644 drivers/fpga/xilinx-core.h create mode 100644 drivers/fpga/xilinx-selectmap.c -- 2.43.0