From patchwork Sat Feb 22 14:19:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 183743 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp3207296ile; Sat, 22 Feb 2020 06:20:34 -0800 (PST) X-Google-Smtp-Source: APXvYqxbL+cXM+i5xbCruHACFCPeh77xewLJ8RDZq7x3+0zjmZaF5Ix3/jO2BqJ2eG3n1c+V7UIN X-Received: by 2002:a17:902:82c9:: with SMTP id u9mr41279566plz.264.1582381234466; Sat, 22 Feb 2020 06:20:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582381234; cv=none; d=google.com; s=arc-20160816; b=g2BRO8T5nVfh4N7Nf1fX8wuTvNQh/9GcQE8INaH7JI4mc/kp6l/zDJlgsSzjyZDS5i BY02bGw3Y5avevwzg8SDhaATkK8NFzlDaSoRlbFEwOUCKr+xSCN67ASZZpTw6YAU1Ume wP/v2qOXBiBsus9YYxXHMdePTDAaQt2WHv188cj/wDbpP7WSGLHhfF2py34kBjM0WaDE jOC/lfTXgyd8PkypqgOxIYdazuNGygvsku0lJS42LIyEKueSz8b0GEhU5Iz3pltAI0R8 JDT0H8rC17eVlwNeCwzrnpCqt5sT7/gRB9YmYFNtvhgcZc6YQAXA8lIExZDVi7TD6p1Z 2QAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature :dkim-filter:dkim-signature; bh=86j+8FcO2ylTH6Rdxm3nBobCeei6z3wVgCuBaye3wns=; b=Z9FzB3sn3fPXZ3S8TpKc3lOp55bSm/XLD4kqPVyxFkulWR8K/W4yJRV+Ib+zzTkWWO 6MY+aKKD+wGguaQwKty+G8vXK7iaQNbnuWldBhfmfcvt7VFh9I+9QteIEXulcvv1h+a0 wSil9ozpbo2KZLDfkmC8HDAtqI0fh1e2yRLJIVn1cOxn9PhNi/Edg7BrxCGInJ747BbH NALC8afjt+zgat/2ScbaT11gYM+l8VHdX1H3hs7YHTmUJRjFLKE17IVnuWIhTKoKkzzb NDw64jf4OJzyPSln4e56Tj8HrqzHUpXsWpjkRhGtDv0HN8h7MlYxwZOAQm4sqNZcoQ+s 7NLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=eZuOUspr; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=Z1nJarhy; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id t13si6175056ply.215.2020.02.22.06.20.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Feb 2020 06:20:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=eZuOUspr; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=Z1nJarhy; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=86j+8FcO2ylTH6Rdxm3nBobCeei6z3wVgCuBaye3wns=; b=eZu OUsprToLLPXzyCTbMjXnWOgzldQY3c440ddSTWDun1YRpe8oGENDZQBwYxytIL8mOX5823DPJwfJ3 xTUnWZ43h1u2IZDLkpjNkRutpzykwqlzi3tlHy9YecqbgPh+7OUFv1BgW69lTYhuGGlnxCxlpSnUc b8ISOhkfWq1cp9moLkd35AlY1/lbmwn7hBpOYHpxXPg8KghmCdmRAF0Ex29HoR45LUSqAUsgdO3uZ VOiLmODsr10q1MKG3kc7bXtJ/2LwZbGv/n+ChmvCvxrX3ZFLnl1529AYwRbPBxNvGeTT3WFfWwROu OVq32gS8It/hY3BfedeG0pUwX0Ccncw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j5Vde-0006mf-Ma; Sat, 22 Feb 2020 14:20:14 +0000 Received: from conuserg-09.nifty.com ([210.131.2.76]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j5VdY-0006H1-U5 for linux-mtd@lists.infradead.org; Sat, 22 Feb 2020 14:20:11 +0000 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-09.nifty.com with ESMTP id 01MEJTnM022196; Sat, 22 Feb 2020 23:19:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 01MEJTnM022196 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1582381170; bh=xLfxSqfVKee2lu25Ls16f9ofw1JrrI1YOJYCrR/A9ww=; h=From:To:Cc:Subject:Date:From; b=Z1nJarhyQa+8kEp+a50668sXTKIeHbOUmeuxpWJ/7laBumpVZcf+lDWSop49+cqCL qLY0tyHCynquHJyXhA2fsJvqOgIEj1CJFrWu53DfXy64pWwGYTUjEc6WODhrSTPGyP Zhygi0xH/SqMQn/Uo+cpmHhNdenVoKB0onH1HqtgKf6vyD8J/RSi4F5vLeVAOw+vCo TRcszV/r0DbaezK3gSZzXoH9NfxHYtDe8dmwXFKzHf5V9R5NdBqA2XgP5e8B15E/gk kzwopZb9AsYUMQxpc1eDX64kM6+F3k++0w6peC1nqJuu9Dg9O8QAojyz97oLIurv+S DeFSuzD5wIVnQ== X-Nifty-SrcIP: [126.93.102.113] From: Masahiro Yamada To: Rob Herring , devicetree@vger.kernel.org Subject: [PATCH] dt-bindings: mtd: Convert Denali NAND controller to json-schema Date: Sat, 22 Feb 2020 23:19:26 +0900 Message-Id: <20200222141927.3868-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200222_062009_317768_AFC36C38 X-CRM114-Status: GOOD ( 10.26 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [210.131.2.76 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [210.131.2.76 listed in wl.mailspike.net] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Vignesh Raghavendra , Richard Weinberger , masahiroy@kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , linux-mtd@lists.infradead.org, Miquel Raynal MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Convert the Denali NAND controller binding to DT schema format. Signed-off-by: Masahiro Yamada --- .../devicetree/bindings/mtd/denali,nand.yaml | 149 ++++++++++++++++++ .../devicetree/bindings/mtd/denali-nand.txt | 61 ------- 2 files changed, 149 insertions(+), 61 deletions(-) create mode 100644 Documentation/devicetree/bindings/mtd/denali,nand.yaml delete mode 100644 Documentation/devicetree/bindings/mtd/denali-nand.txt -- 2.17.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/Documentation/devicetree/bindings/mtd/denali,nand.yaml b/Documentation/devicetree/bindings/mtd/denali,nand.yaml new file mode 100644 index 000000000000..b41b7e4bfe78 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/denali,nand.yaml @@ -0,0 +1,149 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/denali,nand.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Denali NAND controller + +maintainers: + - Masahiro Yamada + +properties: + compatible: + description: version 2.91, 3.1, 3.1.1, respectively + enum: + - altr,socfpga-denali-nand + - socionext,uniphier-denali-nand-v5a + - socionext,uniphier-denali-nand-v5b + + reg-names: + description: | + There are two register regions: + nand_data: host data/command interface + denali_reg: register interface + items: + - const: nand_data + - const: denali_reg + + reg: + minItems: 2 + maxItems: 2 + + interrupts: + maxItems: 1 + + clock-names: + description: | + There are three clocks: + nand: controller core clock + nand_x: bus interface clock + ecc: ECC circuit clock + items: + - const: nand + - const: nand_x + - const: ecc + + clocks: + minItems: 3 + maxItems: 3 + + reset-names: + description: | + There are two optional resets: + nand: controller core reset + reg: register reset + oneOf: + - items: + - const: nand + - const: reg + - const: nand + - const: reg + + resets: + minItems: 1 + maxItems: 2 + +allOf: + - $ref: nand-controller.yaml + + - if: + properties: + compatible: + contains: + const: altr,socfpga-denali-nand + then: + patternProperties: + "^nand@[a-f0-9]$": + type: object + properties: + nand-ecc-strength: + enum: + - 8 + - 15 + nand-ecc-step-size: + enum: + - 512 + + - if: + properties: + compatible: + contains: + const: socionext,uniphier-denali-nand-v5a + then: + patternProperties: + "^nand@[a-f0-9]$": + type: object + properties: + nand-ecc-strength: + enum: + - 8 + - 16 + - 24 + nand-ecc-step-size: + enum: + - 1024 + + - if: + properties: + compatible: + contains: + const: socionext,uniphier-denali-nand-v5b + then: + patternProperties: + "^nand@[a-f0-9]$": + type: object + properties: + nand-ecc-strength: + enum: + - 8 + - 16 + nand-ecc-step-size: + enum: + - 1024 + +required: + - compatible + - reg + - interrupts + - clock-names + - clocks + +examples: + - | + nand-controller@ff900000 { + compatible = "altr,socfpga-denali-nand"; + reg-names = "nand_data", "denali_reg"; + reg = <0xff900000 0x20>, <0xffb80000 0x1000>; + interrupts = <0 144 4>; + clock-names = "nand", "nand_x", "ecc"; + clocks = <&nand_clk>, <&nand_x_clk>, <&nand_ecc_clk>; + reset-names = "nand", "reg"; + resets = <&nand_rst>, <&nand_reg_rst>; + #address-cells = <1>; + #size-cells = <0>; + + nand@0 { + reg = <0>; + }; + }; diff --git a/Documentation/devicetree/bindings/mtd/denali-nand.txt b/Documentation/devicetree/bindings/mtd/denali-nand.txt deleted file mode 100644 index 98916a84bbf6..000000000000 --- a/Documentation/devicetree/bindings/mtd/denali-nand.txt +++ /dev/null @@ -1,61 +0,0 @@ -* Denali NAND controller - -Required properties: - - compatible : should be one of the following: - "altr,socfpga-denali-nand" - for Altera SOCFPGA - "socionext,uniphier-denali-nand-v5a" - for Socionext UniPhier (v5a) - "socionext,uniphier-denali-nand-v5b" - for Socionext UniPhier (v5b) - - reg : should contain registers location and length for data and reg. - - reg-names: Should contain the reg names "nand_data" and "denali_reg" - - #address-cells: should be 1. The cell encodes the chip select connection. - - #size-cells : should be 0. - - interrupts : The interrupt number. - - clocks: should contain phandle of the controller core clock, the bus - interface clock, and the ECC circuit clock. - - clock-names: should contain "nand", "nand_x", "ecc" - -Optional properties: - - resets: may contain phandles to the controller core reset, the register - reset - - reset-names: may contain "nand", "reg" - -Sub-nodes: - Sub-nodes represent available NAND chips. - - Required properties: - - reg: should contain the bank ID of the controller to which each chip - select is connected. - - Optional properties: - - nand-ecc-step-size: see nand-controller.yaml for details. - If present, the value must be - 512 for "altr,socfpga-denali-nand" - 1024 for "socionext,uniphier-denali-nand-v5a" - 1024 for "socionext,uniphier-denali-nand-v5b" - - nand-ecc-strength: see nand-controller.yaml for details. Valid values are: - 8, 15 for "altr,socfpga-denali-nand" - 8, 16, 24 for "socionext,uniphier-denali-nand-v5a" - 8, 16 for "socionext,uniphier-denali-nand-v5b" - - nand-ecc-maximize: see nand-controller.yaml for details - -The chip nodes may optionally contain sub-nodes describing partitions of the -address space. See partition.txt for more detail. - -Examples: - -nand: nand@ff900000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "altr,socfpga-denali-nand"; - reg = <0xff900000 0x20>, <0xffb80000 0x1000>; - reg-names = "nand_data", "denali_reg"; - clocks = <&nand_clk>, <&nand_x_clk>, <&nand_ecc_clk>; - clock-names = "nand", "nand_x", "ecc"; - resets = <&nand_rst>, <&nand_reg_rst>; - reset-names = "nand", "reg"; - interrupts = <0 144 4>; - - nand@0 { - reg = <0>; - } -};