Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2497070rwb; Mon, 15 Aug 2022 06:33:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR7FTKCPJFhhZAVl1X+Tog5rnqaJvGaEC4pFlYzON4qW5Zyv4acnBu7AmlmnUNAfIrG9HZcT X-Received: by 2002:a17:907:6095:b0:731:87a0:b9e8 with SMTP id ht21-20020a170907609500b0073187a0b9e8mr10662388ejc.124.1660570390240; Mon, 15 Aug 2022 06:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660570390; cv=none; d=google.com; s=arc-20160816; b=UTDkG0yclALDdLvNQLXIKfGpnut+/1l9TXDgKwy6eFH3cnwp9FU0griZOSs1HLon5R cn/6DtcfXWB3Io4FUJO0S0uDA4lvjueOL1PS4hGB6Xes6v7IAu7IDpulZtqv4jYg6FwQ Em/oCFLpMBkjHawtCf4Kr2IssdbmpMDUrc9U0z+/qiawApT7TAKOVrlomI2YhvTQhCME 9JZpjf2EjyYYMpcTc6+juo1hVvMSUVHdwA9crPC2WM5hIMcEsrHnsmNYT5RUTZ5iR1Nk irtLsDSMke6/RmowH5iFLbak5YN3F9xf5kTXfV34OGdEPdss3aMthVrfz7CKdY/PlMES 4K4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MxaEYqVsuB5/u2/Dkh0X0Zq3QOSqxAKbgtZE2l6H4ns=; b=XRvrhhw/Ma4+bBqiPcKFb8d1yotcWATe8T3hvaQxaB0MSpg3YFkwebQUgbBzXOLPO/ fCY93BsCKY8VMKSWnm9oHgkU+MnHjqwgUTZ2rmqxi8vgrv5QnEE/IT6jiD0njpF4MPw7 CODomC1oCj0chRhrO9uAcrs/jPjFzeWUnwJMRG/V7hT2rZTC9RxINMlB9sGMBIxIyWJW Wl3hPaSLGIBfHF23hGZxzrXTmrTPFbvMS3zwLeudNLEscDVAQSoT0xqtzkOyvmpLAH+E xvy7DlvymCnS8traBZzM7NsqOgDhQPMwKeB1Mdyl3lPN7WCVVbjwxmwt2hCG8rGF7zHq MRPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=G0FMv9qL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gr23-20020a170906e2d700b0071576eb9e6bsi6901717ejb.211.2022.08.15.06.32.43; Mon, 15 Aug 2022 06:33:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=G0FMv9qL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242962AbiHONXR (ORCPT + 99 others); Mon, 15 Aug 2022 09:23:17 -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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Level: 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 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 -- 2.37.1