From patchwork Fri Jun 26 07:13:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1317595 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=AFezHs1Q; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=A3FNdNaL; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49tZsC5By2z9sRN for ; Fri, 26 Jun 2020 21:48:31 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=zq8cbZm4U5BlqSaDLfYkdwXZWG7R+YtXkaAFclwfVl4=; b=AFezHs1Q+5Nnhnt7CN614H7jE mGlPPCX/u+uPX4975uNDSMIE2jmhPXmvn28df+N4baZrCe7DItMef/v9nPfKxhgOZKsq8x6B0ROHX 75xHDEyez+0HkpjWQ61Qn+FABAw/RpIBKlG4ruV8DDmW9PCUs8R91ma58tSVvbpBGtuvWpnADdmr1 eRnp+XNS/0v2Vx98Qy19s/Pv4XAKYytFHA6y15IdrFU9dk+5YaD8kuanV3YA7Aq1P0J+P17EZb4G/ 6Yc6r8rryeHah1kC7ZONOZUuea+/nq1K9lCqzlaCqI4sgXvMIOUGUzGD5ZwjIjITP21w+QFe8TrZN Noyjou9XA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jompS-00045A-MU; Fri, 26 Jun 2020 11:47:34 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolN3-0000z2-BF for linux-mtd@merlin.infradead.org; Fri, 26 Jun 2020 10:14:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=xZ5cS/N7SHedICeFNBwAGyNAl/iRa57XO1VaKJMwBrg=; b=A3FNdNaLKTpdveUKi2uJ8/DsCd je2s8XmHibEWy7Wgx7eH9HqKvmUsMZ/4ro53QgfD0qSqw9I7EHLg96X/49DmKtt65Gb/nYbQfzg4P WdqLH2MyXerQqPuOOWcAPu3MtYt9cQTh8DLkJVkQ17pAjNWFu2MNUxoj1/h0s5we/6lYlw7DL0IvQ ov6p6AkMtyrOAR84ExyH+2YdG/y3UT3AbuqhHrr94oG1U86qY8qX9UUyQxt8UJQ2byxfJnGYQKVE7 s7sxWk8/QEMDzzDS/Dt834PQ4a5YCbJV0Ce7iHK5kyMQv6ZVSQUJvYmgmWxc+DMZ6ia8Dq8L7RXgN 26iOz0Cg==; Received: from relay11.mail.gandi.net ([217.70.178.231]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joiZB-0003Ul-HT for linux-mtd@lists.infradead.org; Fri, 26 Jun 2020 07:14:31 +0000 Received: from localhost.localdomain (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 8C557100003; Fri, 26 Jun 2020 07:14:06 +0000 (UTC) From: Miquel Raynal To: Rob Herring , Mark Rutland , Subject: [PATCH v11 1/2] dt-bindings: mtd: Document nand-ecc-engine Date: Fri, 26 Jun 2020 09:13:56 +0200 Message-Id: <20200626071357.21421-2-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626071357.21421-1-miquel.raynal@bootlin.com> References: <20200626071357.21421-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200626_081429_724096_0BFF5CFF X-CRM114-Status: GOOD ( 11.51 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.178.231 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.178.231 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: Vignesh Raghavendra , Tudor Ambarus , juliensu@mxic.com.tw, Richard Weinberger , Boris Brezillon , linux-mtd@lists.infradead.org, Thomas Petazzoni , Miquel Raynal , masonccyang@mxic.com.tw Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This property is needed to precisely point to the hardware ECC engine to use when there are several of them available. Here, hardware also refers to the on-die possibility. Signed-off-by: Miquel Raynal --- .../devicetree/bindings/mtd/nand-controller.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml index 4a0798247d2d..0969d2e6720b 100644 --- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml +++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml @@ -56,6 +56,18 @@ patternProperties: (Linux will handle the calculations). soft_bch is deprecated and should be replaced by soft and nand-ecc-algo. + nand-ecc-engine: + maxItems: 1 + description: + A phandle on the hardware ECC engine if any. There are + basically three possibilities: + 1/ The ECC engine is part of the NAND controller, in this + case the phandle should reference the parent node. + 2/ The ECC engine is part of the NAND part (on-die), in this + case the phandle should reference the node itself. + 3/ The ECC engine is external, in this case the phandle should + reference the specific ECC engine node. + nand-ecc-placement: allOf: - $ref: /schemas/types.yaml#/definitions/string From patchwork Fri Jun 26 07:13:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1317585 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=J0gBfh3Z; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=mHyj/HuP; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49tZYW6fZ6z9sPF for ; Fri, 26 Jun 2020 21:34:55 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=EWABEUVOgHNmzQvGmlxv9PDXvaZfAP5e47rJd2neH4k=; b=J0gBfh3ZGaH/KDtrRjRXkxRO8 8ext7lUrtK+YuG4Wbr4sq7dnm0olJYksTDiP3aIGE1Cu99ZLZMt4zNBtvQ56x69SHsi/TpR8q+Y3v pgIiRehnzA4gIGi6da4EFqMNys/4+vBBOm+5Tt+iFEOxLdJjKjmoHobCZYNYrNb3HTLzClMh4nTDm uyssTF4WbhqYj8tDkWDN3pPiLFxtRnK2eeWHuiT7N7xklOqgxtBNpFKVfDbBqcDZ6th8NDvhH7vMx bRrzyu5nM60HpZlGhU/ldYNIJb+DHXDi9lNliHcGBoE+VriYMWbfRKYd9WEQDDbnfV9dmRvt5yNy8 98EVz8lhA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jomcN-0005mn-Sq; Fri, 26 Jun 2020 11:34:04 +0000 Received: from casper.infradead.org ([90.155.50.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolK9-0000aR-1C for linux-mtd@merlin.infradead.org; Fri, 26 Jun 2020 10:11:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=ehNcOAfR0CpPLFOm/6VeaNXYrqC7A4/FyIt0Ypob2UQ=; b=mHyj/HuPbda3NJk7CweSuhls15 qAu6zZwe5DJrG0/lnpgubQHB2d67HjItzuDFMMIv3sotuVCM4UwrzkD786mx4GRhErESAPMrXcovc 1j6RQyDCdKcRQOV2O/OW5gC1oLDuHarBtbxXm+uPTgvtV6cD3TPfudg5FRGGWeQgqsYAkRSsu6H2O nbN12IpaW9ANcd2EYfejsLzVl5fEHQpLI8TvX12Qo384HbEPtIFsVNpFOnIeYBhn+pPltme/etSGK Smao545rIVUTq8oq3S+i7vFd/CeGOt+gSacHCO1SW0dRmg06TQMzLB8Ewni2dPGLUw7EKNv8gWN89 nCQpWVwg==; Received: from relay11.mail.gandi.net ([217.70.178.231]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joiZE-0003V6-St for linux-mtd@lists.infradead.org; Fri, 26 Jun 2020 07:14:35 +0000 Received: from localhost.localdomain (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 7C767100008; Fri, 26 Jun 2020 07:14:08 +0000 (UTC) From: Miquel Raynal To: Rob Herring , Mark Rutland , Subject: [PATCH v11 2/2] dt-bindings: mtd: Document boolean NAND ECC properties Date: Fri, 26 Jun 2020 09:13:57 +0200 Message-Id: <20200626071357.21421-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626071357.21421-1-miquel.raynal@bootlin.com> References: <20200626071357.21421-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200626_081433_510742_8614C59F X-CRM114-Status: GOOD ( 10.36 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.178.231 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.178.231 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: Vignesh Raghavendra , Tudor Ambarus , juliensu@mxic.com.tw, Richard Weinberger , Boris Brezillon , linux-mtd@lists.infradead.org, Thomas Petazzoni , Miquel Raynal , masonccyang@mxic.com.tw Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Document nand-use-soft-ecc-engine and nand-no-ecc-engine properties. The former is here to force software correction, the latter prevents any correction to happen. These properties (along with nand-ecc-engine) are supposed to be more accurate than the current nand-ecc-modes wich is very misleading and very often people think it is mandatory while the core should be relied upon to decide which correction to handle. nand-ecc-mode was already inacurate, but it becomes totally problematic with setups where there are several hardware engines. Signed-off-by: Miquel Raynal --- Documentation/devicetree/bindings/mtd/nand-controller.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml index 0969d2e6720b..a3750978ebb8 100644 --- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml +++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml @@ -68,6 +68,12 @@ patternProperties: 3/ The ECC engine is external, in this case the phandle should reference the specific ECC engine node. + nand-use-soft-ecc-engine: true + description: Use a software ECC engine. + + nand-no-ecc-engine: true + description: Do not use any ECC correction. + nand-ecc-placement: allOf: - $ref: /schemas/types.yaml#/definitions/string