From patchwork Sun Apr 3 13:11:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuanhong Guo X-Patchwork-Id: 12799573 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 711C9C433F5 for ; Sun, 3 Apr 2022 13:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=einQ30hhHeQJrMA9ZGMZTYxHY3sV8S/FEMMEt8GAH4I=; b=r4+CiezOyG1Llk 5G5hTZxTplqcVCarDx5FHxPMGyzVhQ9pfQg4gSbS0N73YQTdEzontEwY4RIAMY/H2mTfXSIz1rQfu WdF+b7KPCnAfKBRaE7HXkmoYeI3+NtvvBIKWd8r66hx+AWAxp2TPfcKzDhTkZDitFjh4Wt5LvlKAR FgZWfyuy83k9fvr+aJdzBtnJ8mdCrJu0+MM54hXX8gH4r+EKE4RbgvoLJd2lP0fnNC2lN3kdJQd5K KmyKc2wxNkGtxGq5xVNBlE4Jttbgvu13mlehm+uI8W5jmSVNEaHN/Oodv3qQlT/HPf80y/WUQKHLI B7OiDQ3xCiYpFA1eAjCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nb04G-00BQu3-Ci; Sun, 03 Apr 2022 13:14:56 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nb02R-00BPzq-3l; Sun, 03 Apr 2022 13:13:06 +0000 Received: by mail-pg1-x536.google.com with SMTP id q142so4413589pgq.9; Sun, 03 Apr 2022 06:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/KKxa3qfvCVRnTRZ4freu2hqQtZPY0z6h6IaQVcQg/k=; b=dugHyQtseLH9JljgoEtCYnigEgJBPF1GzRq77Blwr5VwydDlIgm7zgdfv5mhL8QBQW ErRlsVna50fxWxVAuT6fQ2oOoPzBymTcbRjit0dPvjwPM47NxwNikGe3qaZ2oBrR2q7W llftZ1RmN33+8o2OqaGjaO4S6DbXKiT0rSIXxO3RL2fcIvD71cYUtvc9gT5IzpVHs+Mh W1sYPEKQt4T6OW0oLKDsqs2H2gjOnByViZ2+IT/7xymv0uy5v2bFheahUIVDUfvPmRks GGqQ93oWuLkmj4N7yOKWsqFEg7XA1NOvRf2ytvKFgXS+wxsvt4HI4xhxDyp2oiEiyVxl p9Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/KKxa3qfvCVRnTRZ4freu2hqQtZPY0z6h6IaQVcQg/k=; b=1i5Ca31IeR8cjS/oCpaWIV40/0xu6PS8lvASFjeHt4kiVm4W6vzl9zmFYrmzHygxAe IFEIBxP1GPgj1QZRnt2t/PIqeAOG+xRH8Lsuqo8cZR+Y88uBsOzzGuFvUaPlY2Ml8E1O /0QnqbbCyynMgxz09BWobAE4zYsSM9WB2nvDNWxhXwK0v/0641CZBqFUSHbkzB0+IAA/ l3NvLuG4AonSc+D7fGy4Fl50HecG8gTZAFWrbYUIisN4E9kIzHyibQHtGE9wLqV2fTKB DYIHZviuStcySGvQgimUxRuYPjUV1W1r4LXOxitWWTTk4SWpYLnxhJ7Xd3ZrJmQ+Lp+c oZgw== X-Gm-Message-State: AOAM5333X5M+/44FsodNgJv5tAWGBIBaIz73M4D85li9HqyAptaqM4Pk arouebNA5F910RSZMJrucM+fkJDaUvHUhidSbF8= X-Google-Smtp-Source: ABdhPJwhx9fr9yzvmrdeEe1YToKKzbD6LhENwF6p9LuKBg7aFviHBI1YFdOHrSc6eBYZBZwDH1K5sA== X-Received: by 2002:a63:c45:0:b0:399:2629:7743 with SMTP id 5-20020a630c45000000b0039926297743mr645219pgm.24.1648991581722; Sun, 03 Apr 2022 06:13:01 -0700 (PDT) Received: from guoguo-omen.lan ([222.201.153.219]) by smtp.gmail.com with ESMTPSA id x123-20020a623181000000b004fdf99d25f6sm1554857pfx.80.2022.04.03.06.12.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Apr 2022 06:13:01 -0700 (PDT) From: Chuanhong Guo To: linux-spi@lists.infradead.org Cc: Chuanhong Guo , Mark Brown , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Roger Quadros , Thomas Bogendoerfer , Cai Huoqing , Florian Fainelli , Colin Ian King , Wolfram Sang , Paul Cercueil , Pratyush Yadav , Yu Kuai , linux-spi@vger.kernel.org (open list:SPI SUBSYSTEM), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-mediatek@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-kernel@vger.kernel.org (open list), linux-mtd@lists.infradead.org (open list:NAND FLASH SUBSYSTEM) Subject: [PATCH 3/4] dt-bindings: spi: add binding doc for spi-mtk-snfi Date: Sun, 3 Apr 2022 21:11:53 +0800 Message-Id: <20220403131154.1267887-4-gch981213@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220403131154.1267887-1-gch981213@gmail.com> References: <20220403131154.1267887-1-gch981213@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220403_061303_196720_F2FB53D5 X-CRM114-Status: GOOD ( 14.03 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add device-tree binding documentation for Mediatek SPI-NAND Flash Interface. Signed-off-by: Chuanhong Guo --- .../bindings/spi/mediatek,spi-mtk-snfi.yaml | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml new file mode 100644 index 000000000000..166c6b50b9d1 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/mediatek,spi-mtk-snfi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SPI-NAND flash controller for MediaTek ARM SoCs + +maintainers: + - Chuanhong Guo + +description: | + The Mediatek SPI-NAND flash controller is an extended version of + the Mediatek NAND flash controller. It can perform standard SPI + instructions with one continuous write and one read for up-to 0xa0 + bytes. It also supports typical SPI-NAND page cache operations + in single, dual or quad IO mode with piplined ECC encoding/decoding + using the accompanying ECC engine. There should be only one spi + slave device following generic spi bindings. + +allOf: + - $ref: /schemas/spi/spi-controller.yaml# + +properties: + compatible: + enum: + - mediatek,mt7622-snand + - mediatek,mt7629-snand + reg: + items: + - description: core registers + + interrupts: + items: + - description: NFI interrupt + + clocks: + items: + - description: clock used for the controller + - description: clock used for the SPI bus + + clock-names: + items: + - const: nfi_clk + - const: pad_clk + + ecc-engine: + description: device-tree node of the accompanying ECC engine. + $ref: /schemas/types.yaml#/definitions/phandle + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - ecc-engine + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + soc { + #address-cells = <2>; + #size-cells = <2>; + snfi: spi@1100d000 { + compatible = "mediatek,mt7622-snand"; + reg = <0 0x1100d000 0 0x1000>; + interrupts = ; + clocks = <&pericfg CLK_PERI_NFI_PD>, <&pericfg CLK_PERI_SNFI_PD>; + clock-names = "nfi_clk", "pad_clk"; + ecc-engine = <&bch>; + #address-cells = <1>; + #size-cells = <0>; + + flash@0 { + compatible = "spi-nand"; + reg = <0>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + nand-ecc-engine = <&snfi>; + }; + }; + };