Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2244080rwb; Sat, 8 Oct 2022 04:56:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM58N/tX40N0yxl8J1gX8QhU01a3spdbt1L1OqXAi78+GtkVHLgDdkSGXq23tWctEqMn/8Oa X-Received: by 2002:a17:907:c05:b0:73d:6e0a:8d22 with SMTP id ga5-20020a1709070c0500b0073d6e0a8d22mr7603781ejc.646.1665230165173; Sat, 08 Oct 2022 04:56:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665230165; cv=none; d=google.com; s=arc-20160816; b=WnYuLa1WK07whlGzKbDM7VIwpe6XdoPV86hluke5nZgaoguS/Xbrf+vq7nzVR9I0Id N4vv2REns2ouBw6UtnZTdbtXFMMs3dN7vJrQLQhh3RFyAC9jCR8i3pmE710XZfOanViB j4LpmeOoWXpBmsb+3rzbyVscZXWGPyiIeyQil2UKz56ocbX9V7ZFqn+oZox68AYZSRC3 n6fZBZlRf9/gvipjvsg8HqIpJCBdHF6ZHuwUeqcEO2It3g9YFvPXGLJEf0Zv+4hrtvr3 UwoPvbbvBKmzNObmMYrWWIo7GG/0HRRv3BDDBu0yVFl4CdSWB1nGClen5RI1aVvrHLg0 183A== 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=ttGHjztb9+HwlqnRHLmIXNiydXJqXw6sJVdxEonmyPE=; b=SxHbWw1XGhjPgUsrOxkrQDX7KdCjFn2cEmoSWhGs3jCeTXT6rCzY5w070gSMDe5rl1 3T3+H6m6+UXS5w8knEYBYhrW5d7mzCfaf/Nljt7icONOp5LVT+MuhJ6v/lxOeO6JbIg+ iHaEJOmRFXMHUjND3/GuOGQMLHO7TQkk6DG0HwclfSKciMdxOWIEgYcWIA6I24cd81BS 96RqutzZESyIlKKfQ8M5pcaWYTHFAIsZL6ByRUq+X6G9u2IrPe5ArkxfBVRbGzt/KIej c7TdZFgFwTbImBTuMr9JuYgnEx0pkWXvWPbVaA+t95MUj3ZsVM2uwcWeSZKlX7NeMC5I KPgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=l5dAPNgr; 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 d24-20020aa7c1d8000000b0044e9f8ecd96si3953324edp.609.2022.10.08.04.55.38; Sat, 08 Oct 2022 04:56:05 -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=l5dAPNgr; 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 S229725AbiJHLmn (ORCPT + 99 others); Sat, 8 Oct 2022 07:42:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229598AbiJHLmj (ORCPT ); Sat, 8 Oct 2022 07:42:39 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E84E847B85; Sat, 8 Oct 2022 04:42:34 -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=Btkb2gtW6RKewRf9IoFqqlzQlwIj6C4A6/4lF9dHJ4A=; b=l5dAPNgrvCo7vGhGb9h3bk+B2VHAZieU04UEdznvKO91rBBD04NAO9GXWUcZVQfmG6k7TKjJe7JtK +G8R4ZfbqVqbEZ+v8RU/qqBztHZgpFMjRbXYDQxyAVkvjm4KqskzYTXJ3bU6g1HDp3LQRgOHy9RlbG tTN3eSupX5P92/HLLJ0Vw0yUWxjMgUe5vwtzw73PDzz5UOkQ6NZGAyiF8mtHoPgN59FnoteMAskjvW Q/QUaHS5U39KrjGPCJ/tItGDQ9Ry0RbTeoLh17sIWjml3egzZH/1Q1sPj8ttfjFTPZmGYL8pbRby4X 9wNrlKdhl5IOb+8wRMnrBDMSkMAjZ7Q== X-Kerio-Anti-Spam: Build: [Engines: 2.16.4.1445, Stamp: 3], Multi: [Enabled, t: (0.000013,0.013095)], BW: [Enabled, t: (0.000022,0.000001)], RTDA: [Enabled, t: (0.078530), Hit: No, Details: v2.42.0; Id: 15.52k8bv.1germeqff.93rot; 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 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)); Sat, 8 Oct 2022 14:42:27 +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, Ivan Bornyakov , Krzysztof Kozlowski Subject: [PATCH v15 2/2] dt-bindings: fpga: document Lattice sysCONFIG FPGA manager Date: Sat, 8 Oct 2022 14:14:19 +0300 Message-Id: <20221008111419.21245-3-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221008111419.21245-1-i.bornyakov@metrotek.ru> References: <20221008111419.21245-1-i.bornyakov@metrotek.ru> 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 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>; + }; + }; -- 2.35.1