Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2581142rwb; Mon, 19 Sep 2022 07:09:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5IXQTB5uSqi/fSerx6rsqJhAr9wolSd6bvuCoCqFXRdNbeb4KonHznbV3dw/qVEnr66CTy X-Received: by 2002:a17:906:7952:b0:781:8378:f52c with SMTP id l18-20020a170906795200b007818378f52cmr1429939ejo.200.1663596554864; Mon, 19 Sep 2022 07:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663596554; cv=none; d=google.com; s=arc-20160816; b=f1VJ3Ya7Upf3KM1nr/EmDflc5GwGlYt7fDITYpPA+f0IikiH5Z6ua2quggVOtdaLjv azbkIU8Pg9YGVFzIv/EZjWBgeVVMb1L0NTN7wdQqsJ9/xj+QlmsWe+tJI+wvpW2f3PU/ 9keju0meZnQc6xdr5B5LDBDmXASv2YMAiDFpGrWAnjcmmwDB2LvtuZ8YVGmxw5s3Ucs3 TPfQNd7DIwJnyDMVTC7Zj8K5iq5Np/4IRot8RQzEEE0eT+3+X8r3Aw9B5vnMvJbWAAQH zrU/9xTv082tElIG4rMDzrTkqtlCSmzFqr0GuGl306o7Wr1p4SqvXq+Hd5a4YE4IN5eM meFQ== 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=HYTZLRp4QOj00AQlvCq3lgNbWAGmrS5gXCygx0bsNCBRlwiWR/3OZAVs3lvHaWozD8 yr57Bc8FaeaVtCBk84euo08IM01L3o778XqXJ0oPg4YhZSuSvxkuazxDYbqgdI3Ov+I1 ar49U6dIPOC60Oi7jLedhtta0E8diTHhItaJjVhf+V+3Gw91uaBCPDh4iRvODctrAnUZ qXEjvQZIfsfzWEZTWOcd+UHvtUZ2EKF/6Q2uMctOZYrFbxkHB8oP9nMs5yfp/p4E673t 8pcI1WVieFjQucwvEd+BF4Ec+DTnG8IUFJ0HxsP6FRIS3fCixvGgSixii3doYKiePzgg HjIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=d3btCep1; 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 hd42-20020a17090796aa00b0072f1c8d0e62si29993967ejc.95.2022.09.19.07.08.49; Mon, 19 Sep 2022 07:09:14 -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=d3btCep1; 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 S231136AbiISNth (ORCPT + 99 others); Mon, 19 Sep 2022 09:49:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbiISNtb (ORCPT ); Mon, 19 Sep 2022 09:49:31 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E3AD2C650; Mon, 19 Sep 2022 06:49:20 -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=d3btCep1Cc1NeTJBNhIARli1t53lbEQSnd6rznhDrRvHP5FPnvTxr9XTT7b7/PnstVtjtxQb59tyS L9K81D3CGPAeEJv0QuT1yuTJwV0RXdtPn9oa+L5zqgSYFwsndGczSpjXtBNthYQLmpGJDJeYx8cllV 3eIPoNQAspQDGqn8WulyS1X+RUBgAeIuPE+sgfmJ3KCiL2djOWSKDsr/8mVL9MalJtB44+b+baaPx5 7cRQ9SMajPT4xhlbndwhG3EerXCw7WmJ1Y4JTPCGpWheg0jM7yKRwkT77UuoKnnOc6rBT3PBHFlBDb UiiK27zSVnvb+PmaYlhMF8tvTM9XBLQ== X-Kerio-Anti-Spam: Build: [Engines: 2.16.4.1445, Stamp: 3], Multi: [Enabled, t: (0.000013,0.013009)], BW: [Enabled, t: (0.000018,0.000001)], RTDA: [Enabled, t: (0.135779), Hit: No, Details: v2.41.0; Id: 15.52k9ij.1gdb057vj.3chm; 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, 19 Sep 2022 16:49:15 +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 v12 2/2] dt-bindings: fpga: document Lattice sysCONFIG FPGA manager Date: Mon, 19 Sep 2022 16:47:50 +0300 Message-Id: <20220919134750.25197-3-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220919134750.25197-1-i.bornyakov@metrotek.ru> References: <20220919134750.25197-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