From patchwork Tue Oct 25 05:39:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Bornyakov X-Patchwork-Id: 10501 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp823354wru; Mon, 24 Oct 2022 22:42:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+l09+J1lSqo0Gl45/B1xBJPEo5u6W2AfbWFJRy/qQdcFQv4b89hwq+VTYKHqRw374NbRF X-Received: by 2002:a17:907:31c1:b0:742:28a3:5d08 with SMTP id xf1-20020a17090731c100b0074228a35d08mr30663464ejb.112.1666676518393; Mon, 24 Oct 2022 22:41:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666676518; cv=none; d=google.com; s=arc-20160816; b=o1cb/gqOE9FhEDyh5G92HaaIBo/D3L7OHRPYqBeyWuBhXlZHcKlMbSdeYPcQsGO9W5 iSBEwb5B5BZfp++Rt4S/CQk1qit2fMH2A5FBBlrMRP+xx5KE2dcenFeVMymBPBuRFh9m DvzbV8exC7fNeLHtaPnAjFNhidxtcry467Td6o1Hdzi2rTaE/507Adjm0SAD44BDnJGe MQ4D9M5LFWy2eIhxgDpf10+itdmn2F/MQk9tg2DS+TmosmhxiCesfzZh1NpstwVNp3M5 a8LsupYOe8ItSgzKrs4hLau/bY6HzKsf2Y7tbUmIVCzBjpuscsfac9HwoGjETrxAlXYl Ck9Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OP1TNyEqAY9ZTvJ0oxypA9UFCFDh/b/FHHvGnRV02ac=; b=y/Js3mHK3xhMSE2vome/rcN6uV6ATzfWLAjpqmwgd35BECMNZljT7HCxjWXDNUhaYx hhaXaWXYQaddpmvRonOgNvQatTPIPgbQzyFvoEWYm0Yu5WGDLP87jjAyDx9S/01Xk7TP 7tKhR2AxFlFpuHqMjR9Seu6ZRKU7IMFdHN14EulJFLHuYhS1jKrvNaW72gIetE9HDauq eNS8ThxhFCUj/SIMnUHfN4P7awYeVFfASQWOYMSq2Bdmw76J3o4OD6vB9zu7JstX3oQZ FzdnEGRSLSlovpwrYlXoJ1Pm0fafBusYoq23liZ1B13v01CAQTW5Dn4nHld6U+GUl33C ScoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=n7XrF2z8; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a24-20020a170906469800b00783d1a13d69si1597487ejr.231.2022.10.24.22.41.34; Mon, 24 Oct 2022 22:41:58 -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=n7XrF2z8; 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 S230438AbiJYFjr (ORCPT + 99 others); Tue, 25 Oct 2022 01:39:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230285AbiJYFjo (ORCPT ); Tue, 25 Oct 2022 01:39:44 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAF27DF2; Mon, 24 Oct 2022 22:39:31 -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: in-reply-to:references; bh=R+ShOV9WxeOs2LS2LVmHjwVARc6cq4RZzqDvKF0eUvo=; b=n7XrF2z8A57Ho9F7WQQje4je3h8WQn1KqW2SpiwZqo9MSxtefLObABF+2pIxwEySheU+3Szo7BzS/ eJCF5GTWEPsZuKEdJvUgjsYc5ilOKaPqWran2l73uUPanUm6Nn8bELcuhGBQW/b+9tXR3eU9gDdsv5 yuSDRxvKdi2SsaTytgFXAnoQac5vcSrF43Rg/eFWe26T6cSuQL3+o5duKMbdo/dQ2aOyDZ5NpsRqUG CQmGmP2XV4LgFmQTEoZoLANIdZe2Gyw2qJJ2XaEGlwfSsL6fDL757Qw6z3LNC0qjJwFiea48VLvTzU i3XO2hKZtQUB2sWWjZOKysdQy+z9QAA== X-Kerio-Anti-Spam: Build: [Engines: 2.16.4.1445, Stamp: 3], Multi: [Enabled, t: (0.000010,0.013250)], BW: [Enabled, t: (0.000024,0.000001)], RTDA: [Enabled, t: (0.201393), Hit: No, Details: v2.42.0; Id: 15.52k68g.1gg6qe7uf.g6g; 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, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Level: X-Footer: bWV0cm90ZWsucnU= Received: from localhost.localdomain ([92.100.86.33]) (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)); Tue, 25 Oct 2022 08:39:26 +0300 From: Ivan Bornyakov To: mdf@kernel.org, hao.wu@intel.com, yilun.xu@intel.com, trix@redhat.com, dg@emlix.com, j.zink@pengutronix.de, 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, kernel@pengutronix.de, system@metrotek.ru, Krzysztof Kozlowski Subject: [PATCH v20 2/2] dt-bindings: fpga: document Lattice sysCONFIG FPGA manager Date: Tue, 25 Oct 2022 08:39:47 +0300 Message-Id: <20221025053947.2737-3-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221025053947.2737-1-i.bornyakov@metrotek.ru> References: <20221025053947.2737-1-i.bornyakov@metrotek.ru> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747636996856882367?= X-GMAIL-MSGID: =?utf-8?q?1747636996856882367?= Add Device Tree Binding doc for configuring Lattice ECP5 FPGA over Slave SPI sysCONFIG interface. Signed-off-by: Ivan Bornyakov Reviewed-by: Krzysztof Kozlowski --- .../bindings/fpga/lattice,sysconfig.yaml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/fpga/lattice,sysconfig.yaml diff --git a/Documentation/devicetree/bindings/fpga/lattice,sysconfig.yaml b/Documentation/devicetree/bindings/fpga/lattice,sysconfig.yaml new file mode 100644 index 000000000000..4fb05eb84e2a --- /dev/null +++ b/Documentation/devicetree/bindings/fpga/lattice,sysconfig.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/fpga/lattice,sysconfig.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Lattice Slave SPI sysCONFIG FPGA manager + +maintainers: + - Ivan Bornyakov + +description: | + Lattice sysCONFIG port, which is used for FPGA configuration, among others, + have Slave Serial Peripheral Interface. Only full reconfiguration is + supported. + + Programming of ECP5 is done by writing uncompressed bitstream image in .bit + format into FPGA's SRAM configuration memory. + +properties: + compatible: + enum: + - lattice,sysconfig-ecp5 + + reg: + maxItems: 1 + + program-gpios: + description: + A GPIO line connected to PROGRAMN (active low) pin of the device. + Initiates configuration sequence. + maxItems: 1 + + init-gpios: + description: + A GPIO line connected to INITN (active low) pin of the device. + Indicates that the FPGA is ready to be configured. + maxItems: 1 + + done-gpios: + description: + A GPIO line connected to DONE (active high) pin of the device. + Indicates that the configuration sequence is complete. + maxItems: 1 + +required: + - compatible + - reg + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml + + - if: + properties: + compatible: + contains: + const: lattice,sysconfig-ecp5 + then: + properties: + spi-max-frequency: + maximum: 60000000 + +unevaluatedProperties: false + +examples: + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + fpga-mgr@0 { + compatible = "lattice,sysconfig-ecp5"; + reg = <0>; + spi-max-frequency = <20000000>; + program-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>; + init-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>; + done-gpios = <&gpio3 2 GPIO_ACTIVE_HIGH>; + }; + };