[PATCH v7 1/3] dt-bindings: mtd: spinand: Add randomizer enable/disable properties
From: Cheng Ming Lin
Date: Tue Feb 24 2026 - 21:16:10 EST
From: Cheng Ming Lin <chengminglin@xxxxxxxxxxx>
Add "nand-randomizer-enable" and "nand-randomizer-disable" boolean
properties.
These properties allow enabling or disabling the randomizer feature
via the device tree.
According to JEDEC standard JESD22-A117E, no single data pattern
represents a universal worst-case for all NAND flash failure mechanisms.
Different patterns, such as fully programmed, checkerboard, or mostly
erased, can disproportionately stress specific cells (e.g., programmed,
erased, or those influenced by adjacent states).
Given that no fixed pattern can cover all scenarios, the use of a
randomized data pattern is a practical and effective mitigation strategy.
Our hardware implements a randomizer feature that scrambles user data
before it is written to the flash and restores the original data upon read.
This ensures the data stored on the media is more evenly distributed,
thus reducing pattern-dependent degradation. This is especially crucial
for preventing errors caused by unbalanced data (e.g., all zeros or
all ones) in blocks with high program/erase (P/E) cycle counts.
Ultimately, the randomizer improves the long-term reliability and
endurance of the flash device.
Please refer to the following link for randomizer feature:
Link: https://www.mxic.com.tw/Lists/ApplicationNote/Attachments/2151/AN1051V1-The%20Introduction%20of%20Randomizer%20Feature%20on%20MX30xFxG28AD_MX35xFxG24AD.
Signed-off-by: Cheng Ming Lin <chengminglin@xxxxxxxxxxx>
---
.../devicetree/bindings/mtd/nand-chip.yaml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/nand-chip.yaml b/Documentation/devicetree/bindings/mtd/nand-chip.yaml
index 609d4a4ddd80..2559cd97ccc5 100644
--- a/Documentation/devicetree/bindings/mtd/nand-chip.yaml
+++ b/Documentation/devicetree/bindings/mtd/nand-chip.yaml
@@ -67,6 +67,24 @@ properties:
the secure regions present.
$ref: /schemas/types.yaml#/definitions/uint64-matrix
+ nand-randomizer-enable:
+ description:
+ Enable the randomizer feature. This property is mutually-exclusive
+ with nand-randomizer-disable.
+ type: boolean
+
+ nand-randomizer-disable:
+ description:
+ Disable the randomizer feature. This property is mutually-exclusive
+ with nand-randomizer-enable.
+ type: boolean
+
+dependencies:
+ nand-randomizer-enable:
+ not:
+ required:
+ - nand-randomizer-disable
+
required:
- reg
--
2.25.1