Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1981467rdb; Wed, 31 Jan 2024 15:42:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5AZSCdgU+0VQ3/fcYWzq6XIUOJb1elt+sirquursfY2z7OyL5QsdyANplXfoMb7R7XqBw X-Received: by 2002:a05:6a00:ccb:b0:6df:e229:8f16 with SMTP id b11-20020a056a000ccb00b006dfe2298f16mr2191570pfv.17.1706744557877; Wed, 31 Jan 2024 15:42:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706744557; cv=pass; d=google.com; s=arc-20160816; b=ngZh74RDHbdCP1KG268HlRg0fpwQAgyizLHlR4TmvdvwRKGmoEb9dax2SBEnc3tbc9 P2oNe6NCEVk4m7ez2JQbOFrj4Op5K8TE+9KE2VkcCx0mYXQixRmhKC8v+z5QaP07+s41 IcGVCq1WXqpbNKMDVOmazT3TjUrUl0xuask0ci7c3hULllVLHn98FKLIO/yCD8Uo+/RZ BtpjDD2C9sSkSqWebDxeJG5JZSf8vmLdDov2irwsV92UsezfdCua39gtnVRPWAQ9Q+DF bsmqBaJDipn9Gvhv4giq3ZyBJ3hP79KF2MEwTF1XPsQbTFrGjgkgM1LnbFgC3jmLVA/V 7nEw== 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=UPjRs0sYcLRxhPkkxZdDCe7322Hmbw5LU3+dG/wBKe4=; b=UlzYQkWj0L9AgqbEOrvZyTkGuNMQNNMYywpHQVMf7gJB2fnaAXi0LpdR9jX68gxqmP MDy3E7bX7ocWxevP+ipPFRAss88KCkW7HxBkmQGhn0/0kLQ6s+4G/atzRNswPuB8Ucaa AuhP/dege8141UnIMIndPlUIw5vdv8hLCv8AhN2ryWBfhHT+qdHd81zYAsiPWZof4fJF q+YGmk9Fzd99IEJwkITF4VaGme9IJxXRdwf6ovSGNouFkweKCs6oZMuOUjx6nW2EWWoo 91gvV36P5Mqb3RkmXmk0wuERRwEyy7aBHrRFyE+8+nkFvRXP9zA/cWksUhb8xCEWzQ/T B+zA==; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47335-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWp/9SFfqbmaTNr7obSPZRFerJb9B1LnCpNmm4fvAyz6SNmZL/i9gYNh2Jb6ruaE1iUOsT+zCobhyGeTB63uOC/RHsr53AP75ioiZujig== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c11-20020a056a00008b00b006dde16e7e1bsi10375263pfj.235.2024.01.31.15.42.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 15:42:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47335-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47335-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 27C6629FD0B for ; Wed, 31 Jan 2024 23:24:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B673F405D8; Wed, 31 Jan 2024 23:06:20 +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 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 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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-sele= ctmap.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