Linux-mtd Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v12 0/2] NAND ECC engine binding changes
@ 2020-06-30  7:28 Miquel Raynal
  2020-06-30  7:28 ` [PATCH v12 1/2] dt-bindings: mtd: Document nand-ecc-engine Miquel Raynal
  2020-06-30  7:28 ` [PATCH v12 2/2] dt-bindings: mtd: Document boolean NAND ECC properties Miquel Raynal
  0 siblings, 2 replies; 5+ messages in thread
From: Miquel Raynal @ 2020-06-30  7:28 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree
  Cc: Vignesh Raghavendra, Tudor Ambarus, juliensu, Richard Weinberger,
	Boris Brezillon, linux-mtd, Thomas Petazzoni, Miquel Raynal,
	masonccyang

As part of a bigger series, I proposed these changes to facilitate the
insertion of a generic ECC engine abstraction, needed specifically for
new SPI-NAND devices not featuring any on-die engine.

The series is almost ready to be merged but the bindings did not pass
the checks. Now it is solved so I am just waiting for Rob's ack on
these two patches to apply the whole series.

Changes in v12:
* Actually send the corrected commits, ie. with a phandle type for the
  ECC engine, a '|' to preserve the description formatting, boolean
  types clearly defined for the two other properties and no more tabs.

Miquel Raynal (2):
  dt-bindings: mtd: Document nand-ecc-engine
  dt-bindings: mtd: Document boolean NAND ECC properties

 .../bindings/mtd/nand-controller.yaml         | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

-- 
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v12 1/2] dt-bindings: mtd: Document nand-ecc-engine
  2020-06-30  7:28 [PATCH v12 0/2] NAND ECC engine binding changes Miquel Raynal
@ 2020-06-30  7:28 ` Miquel Raynal
  2020-07-09 20:02   ` Rob Herring
  2020-06-30  7:28 ` [PATCH v12 2/2] dt-bindings: mtd: Document boolean NAND ECC properties Miquel Raynal
  1 sibling, 1 reply; 5+ messages in thread
From: Miquel Raynal @ 2020-06-30  7:28 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree
  Cc: Vignesh Raghavendra, Tudor Ambarus, juliensu, Richard Weinberger,
	Boris Brezillon, linux-mtd, Thomas Petazzoni, Miquel Raynal,
	masonccyang

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 <miquel.raynal@bootlin.com>
---
 .../devicetree/bindings/mtd/nand-controller.yaml    | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
index 4a0798247d2d..9ee0f3827047 100644
--- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml
+++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
@@ -56,6 +56,19 @@ patternProperties:
           (Linux will handle the calculations). soft_bch is deprecated
           and should be replaced by soft and nand-ecc-algo.
 
+      nand-ecc-engine:
+        allOf:
+          - $ref: /schemas/types.yaml#/definitions/phandle
+        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
-- 
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v12 2/2] dt-bindings: mtd: Document boolean NAND ECC properties
  2020-06-30  7:28 [PATCH v12 0/2] NAND ECC engine binding changes Miquel Raynal
  2020-06-30  7:28 ` [PATCH v12 1/2] dt-bindings: mtd: Document nand-ecc-engine Miquel Raynal
@ 2020-06-30  7:28 ` Miquel Raynal
  2020-07-09 20:03   ` Rob Herring
  1 sibling, 1 reply; 5+ messages in thread
From: Miquel Raynal @ 2020-06-30  7:28 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree
  Cc: Vignesh Raghavendra, Tudor Ambarus, juliensu, Richard Weinberger,
	Boris Brezillon, linux-mtd, Thomas Petazzoni, Miquel Raynal,
	masonccyang

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 <miquel.raynal@bootlin.com>
---
 .../devicetree/bindings/mtd/nand-controller.yaml          | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
index 9ee0f3827047..d0238e9ba3f4 100644
--- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml
+++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
@@ -69,6 +69,14 @@ patternProperties:
           3/ The ECC engine is external, in this case the phandle should
           reference the specific ECC engine node.
 
+      nand-use-soft-ecc-engine:
+        type: boolean
+        description: Use a software ECC engine.
+
+      nand-no-ecc-engine:
+        type: boolean
+        description: Do not use any ECC correction.
+
       nand-ecc-placement:
         allOf:
           - $ref: /schemas/types.yaml#/definitions/string
-- 
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v12 1/2] dt-bindings: mtd: Document nand-ecc-engine
  2020-06-30  7:28 ` [PATCH v12 1/2] dt-bindings: mtd: Document nand-ecc-engine Miquel Raynal
@ 2020-07-09 20:02   ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2020-07-09 20:02 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Mark Rutland, devicetree, Vignesh Raghavendra, Tudor Ambarus,
	juliensu, Richard Weinberger, Rob Herring, linux-mtd,
	Thomas Petazzoni, Boris Brezillon, masonccyang

On Tue, 30 Jun 2020 09:28:21 +0200, Miquel Raynal wrote:
> 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 <miquel.raynal@bootlin.com>
> ---
>  .../devicetree/bindings/mtd/nand-controller.yaml    | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v12 2/2] dt-bindings: mtd: Document boolean NAND ECC properties
  2020-06-30  7:28 ` [PATCH v12 2/2] dt-bindings: mtd: Document boolean NAND ECC properties Miquel Raynal
@ 2020-07-09 20:03   ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2020-07-09 20:03 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Mark Rutland, devicetree, Vignesh Raghavendra, Tudor Ambarus,
	juliensu, Richard Weinberger, Rob Herring, linux-mtd,
	Thomas Petazzoni, Boris Brezillon, masonccyang

On Tue, 30 Jun 2020 09:28:22 +0200, Miquel Raynal wrote:
> 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 <miquel.raynal@bootlin.com>
> ---
>  .../devicetree/bindings/mtd/nand-controller.yaml          | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30  7:28 [PATCH v12 0/2] NAND ECC engine binding changes Miquel Raynal
2020-06-30  7:28 ` [PATCH v12 1/2] dt-bindings: mtd: Document nand-ecc-engine Miquel Raynal
2020-07-09 20:02   ` Rob Herring
2020-06-30  7:28 ` [PATCH v12 2/2] dt-bindings: mtd: Document boolean NAND ECC properties Miquel Raynal
2020-07-09 20:03   ` Rob Herring

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ https://lore.kernel.org/linux-mtd \
		linux-mtd@lists.infradead.org
	public-inbox-index linux-mtd

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git