From patchwork Wed Oct 19 09:10:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Bornyakov X-Patchwork-Id: 5491 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp334655wrs; Wed, 19 Oct 2022 06:43:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Yv14U2W095j1rrLMo2VxuamIxqDiI3gAiZ4Yi5h7IEimt3/BeqIkpU1MJvc1vWH/Fn4kW X-Received: by 2002:a17:907:2bda:b0:78d:9144:fb6d with SMTP id gv26-20020a1709072bda00b0078d9144fb6dmr6821234ejc.238.1666186996916; Wed, 19 Oct 2022 06:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666186996; cv=none; d=google.com; s=arc-20160816; b=v65bAHZ7GgaKcpNDq9Uwi6+4p+7DnVwjWmWnLe8d7bTYw57Yw2LFYiU7HlU+DSpyeu LaT4vXBZZRXgzgfvlc3cln6+hUerHSxyPKggq+2JeixUQkno+/tQehS7gQTGE/0Qc3s6 WvzgamLJEWhZQNCkjDytbyJmXjZ1rN2FLgWLe+EZWjpZGHk0MI5Rljc04AgknP6TlyuX aHGDtNVnBdzTJOSKFB1oltU8fmGehL9H2Z/zYhdmsXNoX1lixjLDVL2agKMN+EgYDfh+ Mzxp6GfcP/Gy4asIAO/88XsSUcf2NUdtBCVSo5EnyZGp+mWuBwfxVnRur+unkSKqYNrF wy7g== 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=21ygn6+yZZ0BofSWAZDIGCE8hb0F5HeQqh8lI6YUzCs=; b=H0ZqvTBnh5/5nR4rjnTFYc/bIhzIzNs0lset47Ye3XVhzbLi7on82HFYbau04rCc87 TVooGbylgV62wdDXHqIM/mvwal5F8QFrf9fy/k4OWLR7H8vcLRVhw1eB4sHMexYePUCf cr2CItzq39Xavsiuav0XLeKxD+HlY2qUuJBJ444dwNXmrhrgeeZk5e7POO8kjzYcCmy2 +3dAO1M9ayEB6U3v5KzhUbSd+ktiYNdj61iIobxO2ePz5+Zq7a9ubeQexsgUPHcLOkzh Sp6xpsvqsP5bHrrLxDCMQ4Ew/HCl0AqIEpU4fLybt7xf38LDV72gKfYxZk1cJ0YxuwUP 8LyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=NG1w7H1b; 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 dn15-20020a17090794cf00b007919a242731si6110910ejc.95.2022.10.19.06.42.51; Wed, 19 Oct 2022 06:43:16 -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=NG1w7H1b; 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 S232776AbiJSNjn (ORCPT + 99 others); Wed, 19 Oct 2022 09:39:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232936AbiJSNjH (ORCPT ); Wed, 19 Oct 2022 09:39:07 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 676EBAF191; Wed, 19 Oct 2022 06:26:44 -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=M4xO9IqxnWbsC4nyc5lGTD297hCkmftCcGG9wBbB0gQ=; b=NG1w7H1bb+6y43ggC7JnX+EtdHOpMvWZFIwn5lf9mr3nUj8Nn7wGQd1vlnu3dWSXKUlpflOt1EgLM GX1VuYoKWj+AY6iOU53cnbnHpD/zf18ylstXBb38blc5bw0Xb9U1VZChJa66zv73zNR81S8YtXUKEM sBbCF3Y1w7mV/0WivSH0Jwdf3LAEBYe887kzFMeGP6vpi0yGvX9YXTHiHgeCxiKmiAV07cpJqjq3Az TauU2KkviN17OojfOr8oyCmM2x22FO02KamMIJwb7ZeTqQpntXcD+n8oaJC7ByVpCSm8t1BQfpSIFx SwFBLTJ1xZapNNAmtYSvXBOrBaxRQ+Q== X-Kerio-Anti-Spam: Build: [Engines: 2.16.4.1445, Stamp: 3], Multi: [Enabled, t: (0.000011,0.012720)], BW: [Enabled, t: (0.000020,0.000001)], RTDA: [Enabled, t: (0.081212), Hit: No, Details: v2.42.0; Id: 15.52k3ar.1gfnpodth.71d; mclb], total: 0(700) X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLACK autolearn=no 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)); Wed, 19 Oct 2022 12:38:51 +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 v19 2/2] dt-bindings: fpga: document Lattice sysCONFIG FPGA manager Date: Wed, 19 Oct 2022 12:10:15 +0300 Message-Id: <20221019091015.22678-3-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221019091015.22678-1-i.bornyakov@metrotek.ru> References: <20221019091015.22678-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?1747123696623438031?= X-GMAIL-MSGID: =?utf-8?q?1747123696623438031?= 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>; + }; + };