Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp511357rwe; Thu, 25 Aug 2022 04:39:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR5TaO+EkuQjTM/Kzqrwu6wR2stQBMtrO+Jz1koWSB8zuJxUJ09G+pvIanHkYrOmlOSKHVc+ X-Received: by 2002:a63:90c9:0:b0:42a:306e:5e2b with SMTP id a192-20020a6390c9000000b0042a306e5e2bmr2905924pge.380.1661427595591; Thu, 25 Aug 2022 04:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661427595; cv=none; d=google.com; s=arc-20160816; b=HqBWCdY60xjzu9OpdK08+W2aw084LOlCTwpEQ0njUldUB07vJiIZeqvunKwxtktSs1 ZEv3wBXWoULHIEyE8qIg5S8V2F/ddY2zj3CqNUT0eE+D56jAZv2hVyGlUtwMtivY/k2V 7V+ZXmjaynTLOIqFzXn8ZeRNGwOJyDzmmOxhWCKnsJn4Wj8yXWvHf1Lg/COlQY+E8RZX lYUk31bzQ0bAMMP3Qu0sd2u/W4oRXIWw1aEbgZzdyBYLNPa8kSNyA7XVwW5aNZkqYvtv H9f9VdVon3jmIwuF7NmAJpgk9tblrHHdmnv+PH2iuxnbC25GPYDbUHUaV/Cv73xjOdvJ uAbA== 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=q3rBWG+LNJ5ijZzFW9ygsaCTbtsiKXHmlSrAx8F/C2o=; b=Im7VGeJjIVn4AjmvMy1cxWsojOZKUUKqJIHkVk+VnZmyF2xKEDodrIjRFq0/DcTzKE QmQNko57yl+XIZGDmoiyKwaTQa2iCrgZf7+E7F0rHiY95kjCFnFm1Gfe5lsBMWtmOUdy miQ6tqgsnxJPM1ps6u+NhGXbf8vYM/nVlv9Qby2MKkSTjimipcMbD61WvuJICaEYkZht bquOrwen416YXsZbdmVzXj929N6fFjXqp4tA2evUanevvm8FICKavjR0b/x7RIZR+sZB MrGHZOhQlR+iDUbcH534u50xzCrf991Y7FrKwMza+CCAyUm6AwlXfRjIRmQFiOMmXzCZ ZoBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=BA35LFrT; 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 i1-20020a170902cf0100b0016ef089881bsi19726691plg.252.2022.08.25.04.39.44; Thu, 25 Aug 2022 04:39:55 -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=BA35LFrT; 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 S241583AbiHYL03 (ORCPT + 99 others); Thu, 25 Aug 2022 07:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241548AbiHYL0Z (ORCPT ); Thu, 25 Aug 2022 07:26:25 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 959886BD53; Thu, 25 Aug 2022 04:26:18 -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=K3VpJkw9tEa+HvAMHqXTLzBe8mZdLAZPPmOrPYfRi5w=; b=BA35LFrTyCY/ChguZvkx78iWYyF1KyFWpbxhBencG3JvOjeKUHYHtmU045W33E18TGRyJpF1n3peQ CTIE6ZWWNC9kAr6/qQmzIOII/xsI9W63kd6YaJtdPOKKWgBbAuzUgZw4z1bvB5+3d+0LnN5XJNJOWS afRAG7L9dobiqxBvPdsifZhJFxwc9/sMmJa7mgISxblezCxQTvE2NmTf6xJ+mYsfCp8N/OhoiQGzTF kx6Sq16Q5zJXTOxIn4P+hBkI7b7GlUiVAwx2MBXnHZNM107C7EKIPn2a4/2892dDR+7clkxR1l5jWW 7T45Klr+I2rO4yFfrcSz538m1fFGL4g== X-Kerio-Anti-Spam: Build: [Engines: 2.16.4.1445, Stamp: 3], Multi: [Enabled, t: (0.000012,0.014863)], BW: [Enabled, t: (0.000016,0.000001)], RTDA: [Enabled, t: (0.085401), Hit: No, Details: v2.41.0; Id: 15.52k4qu.1gbac0kml.7isp; 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, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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)); Thu, 25 Aug 2022 14:25:49 +0300 From: Ivan Bornyakov To: mdf@kernel.org, hao.wu@intel.com, yilun.xu@intel.com, trix@redhat.com, dg@emlix.com, 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, system@metrotek.ru Subject: [PATCH v8 2/2] dt-bindings: fpga: document Lattice sysCONFIG FPGA manager Date: Thu, 25 Aug 2022 14:24:33 +0300 Message-Id: <20220825112433.14583-3-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220825112433.14583-1-i.bornyakov@metrotek.ru> References: <20220825112433.14583-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 and MachXO2 FPGAs over Slave SPI sysCONFIG interface. Signed-off-by: Ivan Bornyakov --- .../bindings/fpga/lattice,sysconfig.yaml | 109 ++++++++++++++++++ 1 file changed, 109 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..3ea338a05bb5 --- /dev/null +++ b/Documentation/devicetree/bindings/fpga/lattice,sysconfig.yaml @@ -0,0 +1,109 @@ +# 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. + + Programming of MachXO2 is done by writing configuration data into device's + internal non-volatile Flash memory, then Self-Download of data from Flash + into SRAM is issued. + +properties: + compatible: + enum: + - lattice,ecp5-fpga-mgr + - lattice,machxo2-fpga-mgr + + 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,machxo2-fpga-mgr + then: + properties: + spi-max-frequency: + maximum: 66000000 + program-gpios: false + init-gpios: false + done-gpios: false + + - if: + properties: + compatible: + contains: + const: lattice,ecp5-fpga-mgr + then: + properties: + spi-max-frequency: + maximum: 60000000 + required: + - program-gpios + - init-gpios + - done-gpios + +unevaluatedProperties: false + +examples: + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + fpga-mgr@0 { + compatible = "lattice,ecp5-fpga-mgr"; + 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>; + }; + + fpga-mgr@1 { + compatible = "lattice,machxo2-fpga-mgr"; + reg = <1>; + spi-max-frequency = <20000000>; + }; + }; -- 2.37.2