Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3528421pxb; Mon, 4 Apr 2022 20:02:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOFDJyQImHEsJTT5Y/cIbZem/EZ7C6VEb5EAOW7qKbe/L+knIlCyh9dYm5GS2DmyWccvbH X-Received: by 2002:a17:902:a981:b0:156:229d:6834 with SMTP id bh1-20020a170902a98100b00156229d6834mr1222024plb.128.1649127764850; Mon, 04 Apr 2022 20:02:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649127764; cv=none; d=google.com; s=arc-20160816; b=OuspbJyyrXvbjJaaYfncVTzHitF48vKnN5X3cnfC3ZO/vVbQZ6Meqdq+SU6rEoZiK1 UG8Z/2cfZ7mLkS3UBCEt8ASJfiM+1qL9mJhRbQpYhBcGKB17OkSoIRB3I3QUn/hdRcLC zSMfK+OxHRKqD+vjbNU5cnb1mshu49Jke2K+BeLrRfE3QMyu5abj0aGmdKr+mpLwymWI wXiT9Wg9MZA7Rd9zUJYlxsZNe1FT2S/MBFSlKoYuvzRtS48qAzT7CY/85BwhjaOaQSto tVu1NzjUn+SYHSzjOxx1dp6EdoIgOYm5EC2MSLASoU52nX1rrtmjHtVfCsidxu7gxwz2 K7Jg== 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=/KKxa3qfvCVRnTRZ4freu2hqQtZPY0z6h6IaQVcQg/k=; b=r44MdNRD54DnN8ChSHLBn2c7qucTj5o3mVSHCk4MbSdLD6txtwb6V2CDpwCkdsh3g6 1DjNO5x9Mq5WSGGnwlJ08GfEGHCX0Bu6o6qfj1ZP3b3ZBX2ncMyV0gRm3s6lZza6Itok 2MRm+wXian1T30DMf34SfNqA49I/zze/ca9OsaEEySiNUg8X72LDLSZM4AsgWHbbqYlx YAvtBTXNHBuF5XW/kKn3VOAA1BZI0qSoi0mwyvKp5Q7SOaYGGMMNbnoXZdRMS/53mhq/ oAQrzEaI/joIkl5TSVgsSepOrFhUI/E2ar1zgd7k0nwoBMWi+nE4d2gxnkF1BZn+xn44 a4/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="m/vENM9l"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id me2-20020a17090b17c200b001bd3fc48d31si862262pjb.43.2022.04.04.20.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 20:02:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="m/vENM9l"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 43F1F314B1F; Mon, 4 Apr 2022 18:27:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358348AbiDCNSg (ORCPT + 99 others); Sun, 3 Apr 2022 09:18:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358805AbiDCNRr (ORCPT ); Sun, 3 Apr 2022 09:17:47 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC735E54; Sun, 3 Apr 2022 06:15:53 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id y6so6138921plg.2; Sun, 03 Apr 2022 06:15:53 -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=m/vENM9lvhogRoIDlbupYgq5rx0p0TaAeNuLAb4TO7miAG2u+gYAWrM0TdgdKKH4wW CjOo2kI3Hh3/B1zKZri9bq7YmKARrXX+Ns7NDHfrOuRkluAzL7G2J3SkJcm01NS9QhuS lVv2KOITKHKEGckXA+DkfR5Oh1L4vrRTDWrqWF2j9WySVKHZvv/z8hiCz/oFufZn2Fet OinBXy5286a0MW++V4c+++x+CGX8V5vy7+Ng+6XlydVquBCsc+DNJVhYJ60WjYUtxBC/ 7g+Y4AJi+OU5ljLKfHEO4cBWCrdufx6a0te3MXj2HP5j61wLClEWHEVAT0atyDv4npGW fVXg== 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=rOErjhnDQuNiI/s56SCtgpvU7czvD94dEm4dlBJJv0M8nxI5NQhdpyhafB1DGqNeBA gpYvZW0KIqLVb5p/oPIQHGwDCh1ivXLqetXngCHEJxmDNs75DZqhbQgQRXxWL8fbRLpP ceWCOPcOGMhdMoESprVcpCIiTfJqZZsTMeEniEFus9zIUN/hJOtRKY9To53wNYFPQvYj yJQemyuQtpAAbuvkiyrLXYAN9tpLRCAddgznMqQnJ7jHzwlleEYlL4AtcvC0Lv2OUhTN 5TLp86P9YaQ5vcwwmV4XXhoTr32c52BZZ6Aa15IUcKrz5dmnX2q9oJTF4WZG9tTOjFr8 lnSg== X-Gm-Message-State: AOAM53241wlQ28noryGvU2QIZ4hhO3ep+f+XkOHpbbu8nYNsc9JvLGFY cmtBjznieXPE8MQx4oEefZejH82XSFaFj8zJMnQ= X-Received: by 2002:a17:90a:af86:b0:1c7:db8e:8589 with SMTP id w6-20020a17090aaf8600b001c7db8e8589mr21369924pjq.94.1648991753046; Sun, 03 Apr 2022 06:15:53 -0700 (PDT) Received: from guoguo-omen.lan ([2001:250:3000:7000:7978:d40d:86ff:591d]) by smtp.gmail.com with ESMTPSA id w19-20020a056a0014d300b004fae5e3970csm9272416pfu.35.2022.04.03.06.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Apr 2022 06:15:52 -0700 (PDT) From: Chuanhong Guo To: linux-spi@vger.kernel.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 , 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 resend 3/4] dt-bindings: spi: add binding doc for spi-mtk-snfi Date: Sun, 3 Apr 2022 21:14:52 +0800 Message-Id: <20220403131453.1269229-4-gch981213@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220403131453.1269229-1-gch981213@gmail.com> References: <20220403131453.1269229-1-gch981213@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 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 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>; + }; + }; + }; -- 2.35.1