From patchwork Fri Oct 14 20:27:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Bornyakov X-Patchwork-Id: 2836 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp382596wrs; Fri, 14 Oct 2022 14:24:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7EU4rSDmR4FQ7wtfMONuG9yhjk7KVCQK8B367700+h5/ZeCpxVYsP8htX6OBNL4HxvDw9r X-Received: by 2002:aa7:dcc5:0:b0:45c:7613:65f6 with SMTP id w5-20020aa7dcc5000000b0045c761365f6mr6090441edu.142.1665782693606; Fri, 14 Oct 2022 14:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665782693; cv=none; d=google.com; s=arc-20160816; b=TIQWDRFkpK2zG571+zpcKABi98Cc9cIqZorJTvlfyO+7EOgAV4qEWgWpmoNFRpb52H cCuSf4Tn9LIGORLNsNgFM3CEy19aVRbrm604V/OM0xByFPUYjjDkp14QuSZ0nBzPqb6V ERLGdqk01RNCPkFQGMTaabE0ImTzUkaTjge2C9u/nYTa9QC78goKe+W4rpqZzcinFV1l gVtvqLuNF3rPgyPR/X/s0z9ztLs2BMa0KuEuG5A9J1gGojjJGtPwDNhPh4HRgW80H4av TeGlcx/LMqoRIAiylStY7v8Ya1Md3jC+siLSxQ/YqEORstNy++09WBlAAyHeJ7w/80mg K8pg== 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=GL8bZTwkNWYLOKhZuHY1QKQ5yUTDxKDpfSMdO2Gi/+wQBjuRpL9+xD5wvckMzsrpQe A5PsSHWSH/Tk9DgQ7duOzzrSsVrnhzNWbCUSJgllhetOulO5Ti04h92dMZ2sUB05WP+U UZ0G2OloMQyTnme7tnhQgekWaYbvpTJNs/wEk+TFKfJCyH9fRJmrQRSHg720AYdZTcn3 z7o3yNTQDmR2Sghb0JlHA/wEXFtxNNqY2gtHtn55GPLFxqsevXdwlcaH+5eLuvcZq6MO 5sHore89Pm84pK6BwFpnbDyJUcL4NWU5oCtKMtVHuuhdo0QUvuwqUAXbdPMvM2Y83FWR rcKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=QxwQD16o; 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 w7-20020a056402268700b00459563e2c60si3717385edd.329.2022.10.14.14.24.29; Fri, 14 Oct 2022 14:24:53 -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=QxwQD16o; 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 S229785AbiJNU4c (ORCPT + 99 others); Fri, 14 Oct 2022 16:56:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbiJNU41 (ORCPT ); Fri, 14 Oct 2022 16:56:27 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3811E1C4937; Fri, 14 Oct 2022 13:56:22 -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=QxwQD16oQxSgWiS4dBEwovO8aRRBuIfCf7uinDvySG6SOi61PGq2eACf4BwagJr/0Jm3wDLpAExWt HhpnBLPJRAf81bZHybDUalA2GcoUalzJp3VNQkUuR9KB5Z7pQLdvOB0B0Ekje9XyWDoBXEhmf0vBkK NCFuxC2oWI4Wuu7BfMfUXSF14NjYLq9iqSA4XoOB+1Z289ZxgEzjDiuvc+oCgn37PN4YvAVv8lSkzq ZqNwl1TwbAT01RRJVoDf1+bbfJ94PpFnD0LN3DhHqarSIVIcXKPXQ57Jo8281Tjx+Gk53pK0foQGFd O8VpyskYXWGKqnalxuYbREqwLyTGRRQ== X-Kerio-Anti-Spam: Build: [Engines: 2.16.4.1445, Stamp: 3], Multi: [Enabled, t: (0.000011,0.012807)], BW: [Enabled, t: (0.000019,0.000001)], RTDA: [Enabled, t: (0.082592), Hit: No, Details: v2.42.0; Id: 15.52ka0b.1gfc4h48j.cdus; 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)); Fri, 14 Oct 2022 23:56:14 +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 v18 2/2] dt-bindings: fpga: document Lattice sysCONFIG FPGA manager Date: Fri, 14 Oct 2022 23:27:50 +0300 Message-Id: <20221014202750.20542-3-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221014202750.20542-1-i.bornyakov@metrotek.ru> References: <20221014202750.20542-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?1746699753540388834?= X-GMAIL-MSGID: =?utf-8?q?1746699753540388834?= 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>; + }; + };