From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D381C48BEB for ; Wed, 21 Feb 2024 19:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=oxAxh2XPFPPqyGbMEDMGxoKfbUAEvFX5Obbw51+Wjo4=; b=nwvTd2VQzW7yoB QP4+un5qeZhh/Scoad6yH5rcEX85LK19BO99XSQw0gc7PL3GXNuVivS2/UV8Qcywu8sem28VSx1Xy F8DuRF5VI6JRSws6wbhjsCAsDq2B5pIRcDksSxlW7pj3PCcYRJsG5VRW6EfljT3Rh+xgb8BPqs+ZY ZfqQ28relK2N0r1xK0LWayKQZuXHWig6g1XX6/lBFDDCi1u3YoL7lm4P+lKc/Ronmwa8moFYTkOMv aUzZy2GwOvKMw5sr4lFDAbd6Bw7L/3fbhkf3jgXXzYejrzssd489syi3id4Ht/NpFGYTKxBklt6AB 65wEmmKpiWVl436rLFiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcsdi-00000002NgZ-1Zrf; Wed, 21 Feb 2024 19:52:22 +0000 Received: from mail.savoirfairelinux.com ([208.88.110.44]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcsde-00000002NaY-3JKG for linux-arm-kernel@lists.infradead.org; Wed, 21 Feb 2024 19:52:20 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 5F5409C4AFC; Wed, 21 Feb 2024 14:52:06 -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 f7h5hxMpFJtW; Wed, 21 Feb 2024 14:52:05 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 6E9749C4B59; Wed, 21 Feb 2024 14:52:05 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 6E9749C4B59 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1708545125; bh=84El8YZEA23jo1PRxQQ+f5wwFQuTQbf/GA9Hwoe3eDU=; h=From:To:Date:Message-ID:MIME-Version; b=kTqXVU7HM+tOTPwCiR0f15NQFeomiKJwOxw+Xx6yAT5fe4c0j8i2PajCajPdidzAs NAiRc2dEMyb4dEoNX+fK+jeAfLMIhht7tffTzf5DWade2OPrFecOOOvnXjgMEQ6Ehw J2KAfvQRR0HVZsYa7HGwqPMkvOOPmTgd4rIH+2CCQF/5YgA/M7bJBboTHIItfRDgpB BXc0Z+FEaZVok5vd5Dk7Hp5Kzo9elRdwa/huGC9XNdtV1xoIFPmY4TgT98aocH9W+d XybEiNsq+gEOXAniAsgxgDW+SNvmmRNmICym1Vx51C8DBEDBh4y3qwoWc34nE+uKbV NSfIuwQ5G9gLw== 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 Nl1slpRdueOK; Wed, 21 Feb 2024 14:52:05 -0500 (EST) Received: from pcperry.mtl.sfl (unknown [192.168.51.254]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 346839C4AFC; Wed, 21 Feb 2024 14:52:05 -0500 (EST) From: Charles Perry To: mdf@kernel.org Cc: avandiver@markem-imaje.com, bcody@markem-imaje.com, Charles Perry , Wu Hao , Xu Yilun , Tom Rix , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michal Simek , linux-fpga@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 0/3] fpga: xilinx-selectmap: add new driver Date: Wed, 21 Feb 2024 14:50:46 -0500 Message-ID: <20240221195058.1281973-1-charles.perry@savoirfairelinux.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240221_115219_102620_806EB946 X-CRM114-Status: GOOD ( 14.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Changes since v3: (from Rob Herring review) * Fix an error in the DT binding example compatible. * Drop the renaming of "prog_b" to "prog" and "init-b" to "init". Patches 2 and 3 are removed. Changes since v2: * Inserted patch 2 and 3 which rename "prog_b" and "init-b" into "prog" and "init" for the SPI driver. * From Krzysztof Kozlowski review's: * Use more specific compatible names * Remove other missing occurences of the slave word missed in v2. * From Xu Yilun review's: * Fix vertical whitespace in get_done_gpio(). * Combine write() and write_one_dummy_byte() together. * Eliminate most of the xilinx_core_probe() arguments, the driver needs to populate those directly into the xilinx_fpga_core struct. Added some documentation to struct xilinx_fpga_core to clarify this. * Removed typedefs from xilinx-core.h. * Moved null checks in xilinx_core_probe() to first patch. * Move csi_b and rdwr_b out of xilinx_selectmap_conf as they are not used out of the probe function. Changes since v1: (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-selectmap: add DT schema fpga: xilinx-selectmap: add new driver .../bindings/fpga/xlnx,fpga-selectmap.yaml | 86 +++++++ drivers/fpga/Kconfig | 12 + drivers/fpga/Makefile | 2 + drivers/fpga/xilinx-core.c | 208 +++++++++++++++++ drivers/fpga/xilinx-core.h | 28 +++ drivers/fpga/xilinx-selectmap.c | 97 ++++++++ drivers/fpga/xilinx-spi.c | 212 ++---------------- 7 files changed, 446 insertions(+), 199 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel