Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935045AbcKDPsi (ORCPT ); Fri, 4 Nov 2016 11:48:38 -0400 Received: from mail-bn3nam01on0059.outbound.protection.outlook.com ([104.47.33.59]:23232 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934841AbcKDPse (ORCPT ); Fri, 4 Nov 2016 11:48:34 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.227) smtp.mailfrom=opensource.altera.com; vger.kernel.org; dkim=fail (signature did not verify) header.d=altera.onmicrosoft.com;vger.kernel.org; dmarc=none action=none header.from=opensource.altera.com; X-IncomingTopHeaderMarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:8273;Count:38 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=atull@opensource.altera.com; Date: Fri, 4 Nov 2016 10:48:16 -0500 From: atull X-X-Sender: atull@atull-VirtualBox To: Joel Holdsworth CC: , , , , , , Subject: Re: [PATCH v7 3/3] fpga: Add support for Lattice iCE40 FPGAs In-Reply-To: <1478236004-7852-3-git-send-email-joel@airwebreathe.org.uk> Message-ID: References: <1478236004-7852-1-git-send-email-joel@airwebreathe.org.uk> <1478236004-7852-3-git-send-email-joel@airwebreathe.org.uk> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [198.233.217.214] X-ClientProxiedBy: BY1PR0501CA0025.namprd05.prod.outlook.com (10.162.139.35) To CY1PR03MB1520.namprd03.prod.outlook.com (10.163.17.26) X-MS-Office365-Filtering-Correlation-Id: cb5c83ad-1127-4e2f-f608-08d404ca06a8 X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1520;2:qXzxsQw4uQHML04uUBT9gZMkvW650YW4BPUV6w/3eSa4IWUU1ldL84ulMYb+QoTIs45X19uevLI50eAVXODY9z7LIFMWTa7vJLhN8E+RdurzSHvkaKa/IAzpzFZxYGW0tuHeLlqitiEadISfWNM7BOJRZT7Tr2z533oinw3NYYPKqTDEiJSY3LW8CIEBet+qt6NZCprkdiV/5+wqVXc0IA==;3:W7Tv881eUucGxV5FeCLAqY15PjO/skW6SjGorOBzORA1SO/p3+0YhZkcQhS4HL+IirVl2UC1d+SbJSlYINJ3m+LYuNpjIPry7BcPCuXabGqNXuYtrd30+fpFTFDG1c6e8DYhk4Gp8f2w4Bl5rKxMPg==;25:0679kwpueEgB6L5QBwFR6YwQDNuzXCch2ee7Mhcx3SKMTncaK0cLQMktqgUKacW/d8Ix9Ef1dEtla0GhHtgI/aBBakUV98fWfla0GS/VV0pKbDdzHvzHfQDMlVYYIxwv8XlfygQDjniIcuxL56AsGN8U7aXuyonavFgypVDG1ql/mW1M04FV985f9YIgvYjuxo69og7uoI0v4iRlQpwfc0nzjswBNanzCKTc6yRRdTUK1dmqlHPKYa7GArzsNsdI9nibF5nEGnDktjgo2JF25YOpCIR+kv3X+eoJjn5AnCW1MidrGw8/pi0cLDfFC2r9gNn4N9dzggzbQSB+GcsHVW/whaxyFvReRlqoqGIFSvLZonzskTJXBxTBZPVDxEHvwIXb7lthbABM5Xswrkr6k8Y6XSHW5jpeKQG8zm0RBv3IAWnEmblkW1IeOORb6aD7hCgqgGAjX1sdgFiiNsMVVw== X-Microsoft-Antispam-Untrusted: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1520; X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1520;31:pDkWJPLmva8URB/EQ1AJd+0GcEDkJhcL1DZcBo9aHz6K4v2QmGhru3cfmevuombPiKdJfQJ0z8lXB3sGGdP0YZhCArdfZsQOcFzpsHOks2avcZNkJwMz7G+BRdKTZWP48GBzoPb9utTAloIjLyCm/HJsVquu0UFHlmmd5s1xs/kCz1SmZFxZoKZjs8xO/v+tTx1rxygRjApunZizWy8drRK8PQLQa5fb0+0uEdu4szQi4Z8mNOnfYA1pSJ7s9p093dLIQcCLZC0iM/b2epjUZw==;20:XeOYxNvcgINbJOxr9T4F0alRSgt2Go78YPWNdYXhMBKpYV0MOvSsT6MSWpAQpPuewCmnr16Wx3frYa5lqJVe3OMYl8btdwZUqgYwkc/CU2Uf+HEaJnltQgLVpTDiEuqH3ug135Mo4mcK3TpnB5N04VXcH0ND+EnFJHl3K9Izw5o= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(6060226)(6045074)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6061223)(6046074);SRVR:CY1PR03MB1520;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1520;BCL:0;PCL:0;RULEID:(6060226)(6040176)(6045074)(601004)(2401047)(13017025)(8121501046)(13015025)(13024025)(5005006)(13023025)(13018025)(10201501046)(3002001)(6055026)(6061223)(6046074);SRVR:BLUPR03MB280;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB280; X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1520;4:UPqN/k4KAvgAl2gc+pS4I+sZ0oXzhPEGtLYvi/UgFYkO4vc3jvslCBSv++RXWRKKPYv/phTQKZdhpYf/LGdrHnN4KRnvs6w7zu9Eh6PpqDDPqVxLnqT7zrZtkZ/fe57JkMrqp5Hbier7fKcSCJ2JEMfvFVy8YbmoEYl7a5ZWJrnglPHL6WKrHMHAeEo3WetDhrW9F6iF2w5DSAy2OUeq3HDL1SaLEZaOHiC77Wstq0T5dnxdybmN70EpLuAR+HXpe6OYTish/3ogJrXyUCZgzADgMV03PV6t0aN/VFYuuJ9tYI8sJ1yX5+Pzjgfz8Syb6g6ra3kO8nODUW5f4Uxg6yye9V8r1wH9+w00S4uHdLkgHhSg6Y7TWgV4tQZC0RN83L1UGrgxrzwBd4E1In41k9xXloGl6kmjXDt263/cYY02HJk/rUhl0/xqnjvssgX8s+4dakGRMLlI/tlAxRd1pBbsW8ZKQ68zWCZQCPfh1y9TVXWV2/ERax6z0eX/DSE1 X-Forefront-PRVS: 01165471DB X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(199003)(189002)(24454002)(68736007)(6916009)(8676002)(42882006)(42186005)(2950100002)(189998001)(6666003)(81156014)(81166006)(101416001)(105586002)(106356001)(86362001)(86152002)(110136003)(92566002)(66066001)(5890100001)(47776003)(9686002)(7736002)(305945005)(2906002)(83506001)(7846002)(5660300001)(19580395003)(586003)(19580405001)(76176999)(33716001)(23726003)(50986999)(97736004)(4001350100001)(54356999)(6116002)(77096005)(3846002)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB1520;H:[10.0.2.15];FPR:;SPF:None;PTR:InfoNoRecords;A:0;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1;CY1PR03MB1520;23:lntwUI7EqPApcyjEDob087joYdKBRqSmoJgPP5CHY?= =?us-ascii?Q?6IiJrG7vWNs3HHVaWONsdKLpf27bNqCA9TVVLL6sNSVHAW2e2fQAPEFl4blb?= =?us-ascii?Q?TpSSR9jKD7TpIxzAUC/O+GSFgv8ti3tcE4WyORja8wSxjfpGdOQS+C2TUQu1?= =?us-ascii?Q?Nh4+EeV0FuHif/MuFzpFgfvF9K1jWK5mJDuNE9V0kngAmTPjBhIfPEnEXY9P?= =?us-ascii?Q?RLD4SXVoN8KCH+k16IzYAwyQIrBFxgxPk3kPPDIzxFMX/tpuoxQWxZvvfHWx?= =?us-ascii?Q?lV9UiPLoJva+DqZakDmxannZM2wP8Tin2tIXhanhujlX85RxRTHtvef2j+Kp?= =?us-ascii?Q?Q2DcieZMRqp7xBqUmdwMGYXG58RWRkxI3wEH8Jq3ybA57AX62Fxs9monhJlv?= =?us-ascii?Q?3gejFGRp35cLc7BiA9alHMADyyCM/eZ0I0SQOJUDkTM1jQxwPzVyEWCyBDT1?= =?us-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WIuxQQ3iM451+RnOhIo4aGKiVzuQA51ZBtphfJNiP3R0Z/KPrcFBVbez5HDh7dDaDTWQdSBwlorw2uzRK418IIH+U1bKUbPdL3V+DEOxiSu9BR/oaLfH2czgiYJ6ciKBTsNAMyi02CPw1SU4xZZsKlQb9uu9WJS/DO+a+yRftGCNATylOhQZThjjLM4JSdo4wrI0svXhwxQ+FAhaXm9pLsbpZbFexhV93A65jcqs7;5:OPsHN1D9nfGGKSgh1YM8W1BCSzgmmpjM/5S+WXWCxcON01FG4l9p+huXgESrYJ4y5bm3KotH6j+Z0yhqcsS8JC/zjBtMVSORfwFgMX1W/r3avmTPZzLOhKT6f5wt5KAFYDeV5RvTNoECRcq+HcDRpDjrYBWrzik6cYO0c9H12mg=;24:wMI59qpP3V1DMBbvwRHnUclJx412pVl9a6SMIyZ9FV3uSCfZwetY8LLo5O8zBihAeAOAUmsmVzQhFspYbzem3ONgf2HIYuc60UkNVN7DcJk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1520;7:zc54GXF1e4fwC1nyb/RvfszCNW7PfIkvL47tXkF/g2qIEN0Ve1mx96q1fiTnEHe36gHvF/dtfvVhmyJ6KTjdZfvpGEO3ZB194O3HyLB/rr+hiV+o1O7MUPr8/UYEefBCa5LDF1TkS6Tzd9GZu1xEf6vc8m7GehUUegwNokz21RLBw7IHqq2P5BDDHPD3O0YH460gXzv/0FVPXf40jRyBARh45aM4kjOhATY0EIsq61eI+v98GP8o/rehhoP3vsjWA97frWdYQQPMnUxgb1n7iCWQh4hb0PtLIQahCxnUFb87C65V+tPzFxCq4arOiGH1HXkKMOpsxvA7J/c23DiP81y3hKtS9UiK4nvkHiPPj44= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1520 X-IncomingHeaderCount: 38 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BY2FFO11FD051.protection.gbl X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.35.236.227;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(24454002)(189002)(199003)(7736002)(87936001)(54356999)(356003)(81166006)(68736007)(81156014)(66066001)(5660300001)(4001350100001)(8676002)(50986999)(189998001)(46406003)(6070500001)(110136003)(47776003)(336002)(97736004)(85426001)(92566002)(6116002)(77096005)(956001)(76176999)(50466002)(586003)(33716001)(23726003)(626004)(3846002)(86362001)(19580405001)(2950100002)(42882006)(6916009)(19580395003)(86152002)(2906002)(3720700001)(92616002)(7846002)(6666003)(305945005)(90366008)(11100500001)(83506001)(106466001)(8936002)(105606002)(5890100001)(9686002)(4326007)(7099028)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR03MB280;H:sj-itexedge03.altera.priv.altera.com;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD051;1:fJvz2Y8xvbtB9d5oSR/ZYnh+sRMO7G5WHQ57FRUZnUpyy3nmMgY52lCye0KOSrkhdheR2rkzTU5SPJgDsUG21fH7P1QbxVjY8J3FR4Sx3s9JiOg+Q/mJ9EVJnHlZYIjPFFEHByqT9V+MH4wRlYLUA9WcMbAl0u/IUUVeXBmYSuU3MKZWueQo+RWfrkNOJ5sN8CkrGD65VeZ8jGNxHr9Qhew1uxLHkDoymtvD8WZK0pvoVkyxKx06r1Ftz378rPpDdcHQ1ApBOBpVkdPBu6qQuUzJuWGXM8FQxV7Hi43snmbSEWEYirHzECnY+59FpsbpJHd3FxhrtKQdJ28+1PoeBMKRIhIw8A0myX+Fwbv0k+JFM6u2xPr9HC7TLWQ8gnrPzX7yvi6hLBCfrPchRNqsKJo97JP0An9pOiuvdCeQJPg3b/eI39epDngoDrd41dM6aJUcP+DCQBHxyNh5tQsHj27VICVIORJyCOPymrcGsfs+JMv0QhlcLp5Xn9i2mnC1AEJlhMqjRNtQp4fAyNhUQNITGvRm4A+9+bXBqvIGVrePczlCLEA77LdqgwoMVfQMp6nuaBpfbJZRBgvojvAcew== X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB280;2:SsXrIcCxCn3Fc8BCFB92QiFuLmzgHjKC5YrGh56TB8zeVT3Z2al9WJpnCsIx7i9H3vnjgmtv+6n2Vv7sUZ6cIibyAqRlBXvnzaoqkDz7ENpQGiKMilggia4gH7QROwvfZP4QLiWHcAWK4uGBFhGJocHr8jJlktD/XaSwEfHLjmgB2YUoO6oPYFdrmvqrtSgb7Me/HjxU2y4QWr9QAt39bA==;3:Dj+lKzYvyJCvaMT6Pj/lfIigj37Of3nj6nKraNhbDTt2KzA7ZQtzDUtf4STOXYHnHwAQxkswiG/sRBTU5FL95lV3nBFiCr1i4cHsSt29UybTtdVYJ2FtL844HV4azwdi6LF3g2wII0jjO+JHOPPXqAssKvroaeoadXBylr03HrIiwHH9evLXIRChuhVgazTYhlOS482w70gb5/OF+cdEbUGkqY07QM6VEUXhKI0FHVDq4iyJKehgfGIyWz6EcZ1wkH9r4hOrpGxzivTI4NqYjw== X-DkimResult-Test: Failed X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(3002016);SRVR:BLUPR03MB280; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB280;25:+rDp6ZHxhjDbavpT7QjbNqvWPdC1Hgzp6uW8JjcKepTAXirLNQ6W3vfbBrJfsP2WUZUQp98NcQeE+4az5AGs2plM2RM+57SOV+PariXyVs/6tzYZ5tQAii6TtmY9BN4u1ugIf3M9iVCeZtROy6xGkdohUIeu59Wq17W+qL5U7nmic/+8YzYiOB3VR9miIWrF5WSyK2Rgrp7/bjKzbkAGLtHDGpzDlio7/2wdOOE0n2VlBDNh5+hsC76nEh0Xe88bpmb0IKuzmlfPOwRQZx5nlzqsteSP/ZNEEsw16FSgGIHRZcEuOGxIvZwp2Wvn2AeMX9RJv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R03MB280;6:n2JW4YGtx/k07HD/noBuUw+Eqy3jlA1AEQyG4frn74aGyois/juSconjkKBMgGswBVpT5QUs/wiwhOcZWm0dbck66FpGJbdoePE8iuVEKHTpp62we400a6bphAh0C1BjJUJSAe+39hk5fEuthy0zPPvqY7t6bkkAV9HJbbYJb3EOns454/8kc+eJ9U1LPPI6UAkSnKRUU3pFxclEpTVqWMRh+pQPwImKez89QbV85VL2jBDQ3wGOkHXqZ8/idzX5V1FeQASCWPZEvskiQ4Hz0GNou5gMxda0oPQyDE5/0dudBOh6KGzHPO2wt1fDOeClERtvEaUQl8RAmd1wV+nZouXIE6+UWTMVwjKjnc0qwqII14CjVyIRlZMqf5JcwDiw;5:QZGsdCexI+wcoL3yL+2+6VgOfYIMAkj7j8J9Z1LOF3RhQ6V98D1/Ojf8qH+ZUe5nib6wSFBFEHT6OoHRU4TRRG0f8RPyZLJhopHUH3QO7a/wj5sPi0qRzBTCuZEz49+I11mWNqpSu0np2sXJzAeqkn1+3C7DBfBbFCFhqs5Hn24=;24:YhgplpX4pe3o59KivJd0mxx2RWRjKJKwkhex1JJhHMzvUWVYs7qPNz67V/BodI3ZEas/au5//jBGoGGH6Lq78J3feFQpvzrsLqKfFKV4pjQ= X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB280;7:YtM7Ix8Mo/Sq+gvw5SmcFTxX4le32KMrzW8xl7ehQR5Vuf+2Iexdif2vVivdvFZJmiF8+QNBid+TpODXfpYeHFcVgey3aULZDysA+LpA330sajDCIxWMUebabP/HqfUWi59bOgmiM9mPxFE5k7HUo8q59j0X9GwQhz4Od5flSsampfS0MCTCe/sHFliUKNCvxz2GB73Pu7UXJGp+P01+sskbw7rjbnkPXa3B8RdToeZOVFuf/pWwE7YectvxE8b8eW7slA9RA+59iqZW8F00xwV14fs4LigB2gcaVoC30oZU98s8EmYjvYabguga5oXtlvq1PelKvVXWkejJq46odA== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2016 15:48:30.5539 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a;Ip=[66.35.236.227];Helo=[sj-itexedge03.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB280 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8827 Lines: 286 On Fri, 4 Nov 2016, Joel Holdsworth wrote: > The Lattice iCE40 is a family of FPGAs with a minimalistic architecture > and very regular structure, designed for low-cost, high-volume consumer > and system applications. > > This patch adds support to the FPGA manager for configuring the SRAM of > iCE40LM, iCE40LP, iCE40HX, iCE40 Ultra, iCE40 UltraLite and iCE40 > UltraPlus devices, through slave SPI. > > The iCE40 family is notable because it is the first FPGA family to have > complete reverse engineered bit-stream documentation for the iCE40LP and > iCE40HX devices. Furthermore, there is now a Free Software Verilog > synthesis tool-chain: the "IceStorm" tool-chain. > > This project is the work of Clifford Wolf, who is the maintainer of > Yosys Verilog RTL synthesis framework, and Mathias Lasser, with notable > contributions from "Cotton Seed", the main author of "arachne-pnr"; a > place-and-route tool for iCE40 FPGAs. > > Having a Free Software synthesis tool-chain offers interesting > opportunities for embedded devices that are able reconfigure themselves > with open firmware that is generated on the device itself. For example > a mobile device might have an application processor with an iCE40 FPGA > attached, which implements slave devices, or through which the processor > communicates with other devices through the FPGA fabric. > > A kernel driver for the iCE40 is useful, because in some cases, the FPGA > may need to be configured before other devices can be accessed. > > An example of such a device is the icoBoard; a RaspberryPI HAT which > features an iCE40HX8K with a 1 or 8 MBit SRAM and ports for > Digilent-compatible PMOD modules. A PMOD module may contain a device > with which the kernel communicates, via the FPGA. > --- > drivers/fpga/Kconfig | 6 ++ > drivers/fpga/Makefile | 1 + > drivers/fpga/ice40-spi.c | 198 +++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 205 insertions(+) > create mode 100644 drivers/fpga/ice40-spi.c > > diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig > index d614102..85ff429 100644 > --- a/drivers/fpga/Kconfig > +++ b/drivers/fpga/Kconfig > @@ -13,6 +13,12 @@ config FPGA > > if FPGA > > +config FPGA_MGR_ICE40_SPI > + tristate "Lattice iCE40 SPI" > + depends on SPI > + help > + FPGA manager driver support for Lattice iCE40 FPGAs over SPI. > + > config FPGA_MGR_SOCFPGA > tristate "Altera SOCFPGA FPGA Manager" > depends on ARCH_SOCFPGA > diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile > index 8d83fc6..adb5811 100644 > --- a/drivers/fpga/Makefile > +++ b/drivers/fpga/Makefile > @@ -6,5 +6,6 @@ > obj-$(CONFIG_FPGA) += fpga-mgr.o > > # FPGA Manager Drivers > +obj-$(CONFIG_FPGA_MGR_ICE40_SPI) += ice40-spi.o > obj-$(CONFIG_FPGA_MGR_SOCFPGA) += socfpga.o > obj-$(CONFIG_FPGA_MGR_ZYNQ_FPGA) += zynq-fpga.o > diff --git a/drivers/fpga/ice40-spi.c b/drivers/fpga/ice40-spi.c > new file mode 100644 > index 0000000..a977f19 > --- /dev/null > +++ b/drivers/fpga/ice40-spi.c > @@ -0,0 +1,198 @@ > +/* > + * FPGA Manager Driver for Lattice iCE40. > + * > + * Copyright (c) 2016 Joel Holdsworth > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; version 2 of the License. > + * > + * This driver adds support to the FPGA manager for configuring the SRAM of > + * Lattice iCE40 FPGAs through slave SPI. > + */ > + > +#include > +#include > +#include > +#include Hi Joel, It needs #include to be able to build. Alan > + > +#define ICE40_SPI_FPGAMGR_RESET_DELAY 1 /* us (>200ns) */ > +#define ICE40_SPI_FPGAMGR_HOUSEKEEPING_DELAY 1200 /* us */ > + > +#define ICE40_SPI_FPGAMGR_NUM_ACTIVATION_BITS 49 /* bits */ > + > +struct ice40_fpga_priv { > + struct spi_device *dev; > + struct gpio_desc *reset; > + struct gpio_desc *cdone; > +}; > + > +static enum fpga_mgr_states ice40_fpga_ops_state(struct fpga_manager *mgr) > +{ > + struct ice40_fpga_priv *priv = mgr->priv; > + > + return gpiod_get_value(priv->cdone) ? FPGA_MGR_STATE_OPERATING : > + FPGA_MGR_STATE_UNKNOWN; > +} > + > +static int ice40_fpga_ops_write_init(struct fpga_manager *mgr, u32 flags, > + const char *buf, size_t count) > +{ > + struct ice40_fpga_priv *priv = mgr->priv; > + struct spi_device *dev = priv->dev; > + struct spi_message message; > + int ret; > + > + if ((flags & FPGA_MGR_PARTIAL_RECONFIG)) { > + dev_err(&dev->dev, > + "Partial reconfiguration is not supported\n"); > + return -ENOTSUPP; > + } > + > + /* Lock the bus, assert CRESET_B and SS_B and delay >200ns */ > + spi_bus_lock(dev->master); > + > + gpiod_set_value(priv->reset, 1); > + > + spi_message_init(&message); > + spi_message_add_tail(&(struct spi_transfer){.cs_change = 1, > + .delay_usecs = ICE40_SPI_FPGAMGR_RESET_DELAY}, &message); > + ret = spi_sync_locked(dev, &message); > + if (ret) { > + spi_bus_unlock(dev->master); > + return ret; > + } > + > + /* Come out of reset */ > + gpiod_set_value(priv->reset, 0); > + > + /* Check CDONE is de-asserted i.e. the FPGA is reset */ > + if (gpiod_get_value(priv->cdone)) { > + dev_err(&dev->dev, "Device reset failed, CDONE is asserted\n"); > + spi_bus_unlock(dev->master); > + return -EIO; > + } > + > + /* Wait for the housekeeping to complete, and release SS_B */ > + spi_message_init(&message); > + spi_message_add_tail(&(struct spi_transfer){ > + .delay_usecs = ICE40_SPI_FPGAMGR_HOUSEKEEPING_DELAY}, &message); > + ret = spi_sync_locked(dev, &message); > + > + spi_bus_unlock(dev->master); > + > + return ret; > +} > + > +static int ice40_fpga_ops_write(struct fpga_manager *mgr, > + const char *buf, size_t count) > +{ > + return spi_write(((struct ice40_fpga_priv *)mgr->priv)->dev, > + buf, count); > +} > + > +static int ice40_fpga_ops_write_complete(struct fpga_manager *mgr, u32 flags) > +{ > + struct ice40_fpga_priv *priv = mgr->priv; > + struct spi_device *dev = priv->dev; > + > + /* Check CDONE is asserted */ > + if (!gpiod_get_value(priv->cdone)) { > + dev_err(&dev->dev, > + "CDONE was not asserted after firmware transfer\n"); > + return -EIO; > + } > + > + /* Send of zero-padding to activate the firmware */ > + return spi_write(dev, NULL, (ICE40_SPI_FPGAMGR_NUM_ACTIVATION_BITS + > + dev->bits_per_word - 1) / dev->bits_per_word); > +} > + > +static const struct fpga_manager_ops ice40_fpga_ops = { > + .state = ice40_fpga_ops_state, > + .write_init = ice40_fpga_ops_write_init, > + .write = ice40_fpga_ops_write, > + .write_complete = ice40_fpga_ops_write_complete, > +}; > + > +static int ice40_fpga_probe(struct spi_device *spi) > +{ > + struct device *dev = &spi->dev; > + struct device_node *np = spi->dev.of_node; > + struct ice40_fpga_priv *priv; > + int ret; > + > + if (!np) { > + dev_err(dev, "No Device Tree entry\n"); > + return -EINVAL; > + } > + > + priv = devm_kzalloc(&spi->dev, sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + priv->dev = spi; > + > + /* Check board setup data. */ > + if (spi->max_speed_hz > 25000000) { > + dev_err(dev, "Speed is too high\n"); > + return -EINVAL; > + } else if (spi->mode & SPI_CPHA) { > + dev_err(dev, "Bad mode\n"); > + return -EINVAL; > + } > + > + /* Set up the GPIOs */ > + priv->cdone = devm_gpiod_get(dev, "cdone", GPIOD_IN); > + if (IS_ERR(priv->cdone)) { > + dev_err(dev, "Failed to get CDONE GPIO: %ld\n", > + PTR_ERR(priv->cdone)); > + return ret; > + } > + > + priv->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); > + if (IS_ERR(priv->reset)) { > + dev_err(dev, "Failed to get CRESET_B GPIO: %ld\n", > + PTR_ERR(priv->reset)); > + return ret; > + } > + > + /* Register with the FPGA manager */ > + ret = fpga_mgr_register(dev, "Lattice iCE40 FPGA Manager", > + &ice40_fpga_ops, priv); > + if (ret) { > + dev_err(dev, "unable to register FPGA manager"); > + return ret; > + } > + > + return 0; > +} > + > +static int ice40_fpga_remove(struct spi_device *spi) > +{ > + fpga_mgr_unregister(&spi->dev); > + return 0; > +} > + > +#ifdef CONFIG_OF > +static const struct of_device_id ice40_fpga_of_match[] = { > + { .compatible = "lattice,ice40-fpga-mgr", }, > + {}, > +}; > +MODULE_DEVICE_TABLE(of, ice40_fpga_of_match); > +#endif > + > +static struct spi_driver ice40_fpga_driver = { > + .probe = ice40_fpga_probe, > + .remove = ice40_fpga_remove, > + .driver = { > + .name = "ice40spi", > + .of_match_table = of_match_ptr(ice40_fpga_of_match), > + }, > +}; > + > +module_spi_driver(ice40_fpga_driver); > + > +MODULE_AUTHOR("Joel Holdsworth "); > +MODULE_DESCRIPTION("Lattice iCE40 FPGA Manager"); > +MODULE_LICENSE("GPL v2"); > -- > 2.7.4 > >