NAND ECC engine binding changes
Subsystems (2)
Miquel Raynal
maintainerv12 cover NAND ECC engine binding changes
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(+)
Signature · 1 line
2.20.1
Miquel Raynal
maintainerPATCH v12 1/2 dt-bindings: mtd: Document nand-ecc-engine
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.
--- .../devicetree/bindings/mtd/nand-controller.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+)
Documentation/devicetree/bindings/mtd/nand-controller.yaml +13 -0
@@ -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
Signature · 1 line
2.20.1
Re: [PATCH v12 1/2] dt-bindings: mtd: Document nand-ecc-engine
Quoted 9 lines · Miquel Raynal
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 <[email protected]>--- .../devicetree/bindings/mtd/nand-controller.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+)
Miquel Raynal
maintainerPATCH v12 2/2 dt-bindings: mtd: Document boolean NAND ECC properties
In reply to Miquel RaynalDocument 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.
--- .../devicetree/bindings/mtd/nand-controller.yaml | 8 ++++++++ 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/mtd/nand-controller.yaml +8 -0
@@ -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
Signature · 1 line
2.20.1
Re: [PATCH v12 2/2] dt-bindings: mtd: Document boolean NAND ECC properties
Quoted 9 lines · Miquel Raynal
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.
Quoted 8 lines
nand-ecc-mode was already inacurate, but it becomes totally problematic with setups where there are several hardware engines.
Signed-off-by Miquel Raynal <[email protected]>--- .../devicetree/bindings/mtd/nand-controller.yaml | 8 ++++++++ 1 file changed, 8 insertions(+)