From patchwork Mon Aug 15 13:21:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Bornyakov X-Patchwork-Id: 12943580 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 587F9C25B06 for ; Mon, 15 Aug 2022 13:25:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241526AbiHONXM (ORCPT ); Mon, 15 Aug 2022 09:23:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242921AbiHONXK (ORCPT ); Mon, 15 Aug 2022 09:23:10 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37DC01CB16; Mon, 15 Aug 2022 06:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=metrotek.ru; s=mail; h=from:subject:date:message-id:to:cc:mime-version:content-transfer-encoding; bh=XNPtRBIgnIdwwDa0fshxVwxNk2H6vekPXxCch/BBUP0=; b=G0FMv9qLtRUXaNWt/uO0VeoFmodRo318GZWUqLDxdmUHrhFvvA5AsAv5hc4gzfWgQRVYUhLiX0Idh eh0OdHqS2ZdUkqOd0MuuvXh/J+wHOxZs9IXtrnk81OiWU9WoBggxoZ6c1QAitgU7LHP5l6C68VVJqk KUqyUKzalKjUWs2cEeM70Q2MXhD4yVn7fhx4ng22qzJLbTbipciA2BN1CbOQMPLpGSP+IiqEN135Mu FEYy64h3xSifXLazQkY1iFjj5mcykYqXhfl+O2RPpMLTrahsd23Q0nsgxXK00xenNexVY14voyOrk+ Q2DJe5wlpMzEMVVeG3jfLbq3Xor7omQ== X-Kerio-Anti-Spam: Build: [Engines: 2.16.3.1424, Stamp: 3], Multi: [Enabled, t: (0.000009,0.006984)], BW: [Enabled, t: (0.000014,0.000001)], RTDA: [Enabled, t: (0.075403), Hit: No, Details: v2.41.0; Id: 15.52k4h3.1gagqnnpu.5tqt; mclb], total: 0(700) X-Footer: bWV0cm90ZWsucnU= Received: from h-e2.ddg ([85.143.252.66]) (authenticated user i.bornyakov@metrotek.ru) by mail.pr-group.ru with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)); Mon, 15 Aug 2022 16:22:50 +0300 From: Ivan Bornyakov To: mdf@kernel.org, hao.wu@intel.com, yilun.xu@intel.com, trix@redhat.com, dg@emlix.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: Ivan Bornyakov , linux-fpga@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, system@metrotek.ru Subject: [PATCH v6 0/2] Lattice ECP5 FPGA manager Date: Mon, 15 Aug 2022 16:21:55 +0300 Message-Id: <20220815132157.8083-1-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org Add support to the FPGA manager for programming Lattice ECP5 FPGA over slave SPI interface with .bit formatted uncompressed bitstream image. ChangeLog: v1 -> v2: * remove "spi" from compatible string * reword description in dt-bindings doc * add reference to spi-peripheral-props.yaml in dt-binding doc * fix DTS example in dt-bindings doc: 4-spaces indentations, no undersores in node names. v2 -> v3: * fix typo "##size-cells" -> "#size-cells" in dt-bindings example v3 -> v4: * dt-bindings: reword description * dt-bindings: revert props order v4 -> v5: * dt-bindings: remove trailing dot from title * dt-bindings: reword description to avoid driver reference * dt-bindings: add "Reviewed-by: Krzysztof Kozlowski" tag v5 -> v6: * ecp5-spi: lock SPI bus for exclusive usage in ecp5_ops_write_init(), release in ecp5_ops_write_complete() or on error Ivan Bornyakov (2): fpga: ecp5-spi: add Lattice ECP5 FPGA manager dt-bindings: fpga: add binding doc for ecp5-spi fpga mgr .../bindings/fpga/lattice,ecp5-fpga-mgr.yaml | 74 +++++ drivers/fpga/Kconfig | 7 + drivers/fpga/Makefile | 1 + drivers/fpga/ecp5-spi.c | 311 ++++++++++++++++++ 4 files changed, 393 insertions(+) create mode 100644 Documentation/devicetree/bindings/fpga/lattice,ecp5-fpga-mgr.yaml create mode 100644 drivers/fpga/ecp5-spi.c