Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp82243rwb; Mon, 26 Sep 2022 09:33:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6OxDB+E1DAzHSo90apNDu9JWS0/veyOnS3975ZfNVOo+1lKxgHMSGG+699jGv+Vr9U5hB0 X-Received: by 2002:a17:90b:1d8c:b0:202:c689:fa33 with SMTP id pf12-20020a17090b1d8c00b00202c689fa33mr37665499pjb.58.1664209982233; Mon, 26 Sep 2022 09:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664209982; cv=none; d=google.com; s=arc-20160816; b=UmUdnlL80wt1GP/1gG/um6PwbIKqOHZamByHISEtVs7HmgAfIOJFzKILevOAQHhTGP V1mMG0M9DMJwHCG7/pgyaiuMEQOZ+oFRCgBDQZ85Aurt7m/t539me8rK3AUiSi82guA4 +13lCWuLk/hn4gxeKKYI3W76UQkHb9M+DiiR+ARilmV3ObTIDuyXhMDMULsYyl12Pqu7 pEjeg/9dOjdFhWq29AvGHPL0qT/94YT+PETBRCdxYDcmU3lmxGDEbYxnmCWxhuXuRWlZ WprKsrv5uEZYbjdqLCq14u9JM9RN4jyQQvKVDExA0v5NFOOjs+xUueQb0mf5vDKpXnZk nfzQ== 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=ehKkcne0GYRH1L046Z8fdgaXsMmUsQXbEKKDq3bW6b0U+NEu6brvBRSuhdJBtoY3nw CvYK/DKdHe/9plPucJvt70We7Aj/wUc0MzSM3bjiORTw4XXELlg7NK6lIgGIqnHfIzm3 +VM9umIL1YRueYONdDxcL6nJB/MoHNfcXbf61aHUECnYZSISRbGAX8jvIJby/ppn+wJh hUmg3nYu/0LoKM+JJlXZf5LiqrqCPkhloRScvmN/0xxFGBUgYNjYBUXIyP3sebWoUjjb Cixcwgw5t8FvjzmDSHBetxho2PrVu22sQNc7DOulhRW1MIiDGbL4OSZJGoLFjYpr2xu/ 2Ing== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=jgTQt1c3; 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 pj10-20020a17090b4f4a00b00203430ea6fasi11283034pjb.47.2022.09.26.09.32.08; Mon, 26 Sep 2022 09:33:02 -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=jgTQt1c3; 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 S234153AbiIZPyh (ORCPT + 99 others); Mon, 26 Sep 2022 11:54:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233588AbiIZPxW (ORCPT ); Mon, 26 Sep 2022 11:53:22 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD18B6DAC5; Mon, 26 Sep 2022 07:41:00 -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=jgTQt1c38omyyJzMIiLpCOCaTpwwxDkUdT8O916HIEC9E8naOVpHYg3FvmRz2IsdUJWyWSd4qsHjc 0jdb1Z3vum3Tm6cF1ovwTBcm8J0PSLSFZt3APL7DMj0QZvrqQsLtIkqPPjBI/7pGB5vdiOoqnVr7va 5G66vyHismfTPng7MYR+ZRHiDuginhekKbdvoc7hThHhWGSb7iBtcSdGo+zuO7ncEoOw0f6pb8A7+w Oc0DZe9rWD5IXiWIPn4TdRN3SJIjBQjAKHsz+Fn01srHgkp8qgYGYatrxb2kl/Lo6RvWvrdmeHIixI Wga20S0aSpx9TOmfiHGq1/+LU10y/3A== X-Kerio-Anti-Spam: Build: [Engines: 2.16.4.1445, Stamp: 3], Multi: [Enabled, t: (0.000011,0.014406)], BW: [Enabled, t: (0.000016,0.000001)], RTDA: [Enabled, t: (0.135561), Hit: No, Details: v2.41.0; Id: 15.52k22c.1gdt3srse.56e4e; 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 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, 26 Sep 2022 17:40:53 +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 v13 2/2] dt-bindings: fpga: document Lattice sysCONFIG FPGA manager Date: Mon, 26 Sep 2022 17:39:24 +0300 Message-Id: <20220926143924.11367-3-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926143924.11367-1-i.bornyakov@metrotek.ru> References: <20220926143924.11367-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.37.3