Hi,
changelog
v4:
coding patch & add a new DTS for randomizer enabled.
v3:
To enable randomizer by specific DT property in children nodes,
mxic,enable-randomizer-otp;
v2:
To enable randomizer by checking chip options NAND_NO_SUBPAGE_WRITE
v1:
To enable randomizer by sys-fs
thanks for your time & review.
Mason
Mason Yang (2):
mtd: rawnand: Add support for Macronix NAND randomizer
dt-bindings: mtd: Document Macronix NAND device bindings
.../devicetree/bindings/mtd/nand-macronix.txt | 20 +++++++
drivers/mtd/nand/raw/nand_macronix.c | 69 ++++++++++++++++++++++
2 files changed, 89 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mtd/nand-macronix.txt
--
1.9.1
Document the bindings used by the Macronix NAND device.
Signed-off-by: Mason Yang <[email protected]>
---
.../devicetree/bindings/mtd/nand-macronix.txt | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mtd/nand-macronix.txt
diff --git a/Documentation/devicetree/bindings/mtd/nand-macronix.txt b/Documentation/devicetree/bindings/mtd/nand-macronix.txt
new file mode 100644
index 0000000..cb60358
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/nand-macronix.txt
@@ -0,0 +1,20 @@
+Macronix NANDs Device Tree Bindings
+-----------------------------------
+
+Macronix NANDs support randomizer operation for user data scrambled,
+which can be enabled with a SET_FEATURE. The penalty of randomizer
+is subpage accesses prohibited. By adding a new specific property
+in children nodes to enable randomizer function.
+
+Required NAND chip properties in children mode:
+- randomizer enable: should be "mxic,enable-randomizer-otp"
+
+Example:
+
+ nand: nand-controller@unit-address {
+
+ nand@0 {
+ reg = <0>;
+ mxic,enable-randomizer-otp;
+ };
+ };
--
1.9.1
On Thu, 24 Oct 2019 15:40:07 +0800, Mason Yang wrote:
> Document the bindings used by the Macronix NAND device.
>
> Signed-off-by: Mason Yang <[email protected]>
> ---
> .../devicetree/bindings/mtd/nand-macronix.txt | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mtd/nand-macronix.txt
>
Reviewed-by: Rob Herring <[email protected]>
Hi Mason,
Mason Yang <[email protected]> wrote on Thu, 24 Oct 2019 15:40:07
+0800:
> Document the bindings used by the Macronix NAND device.
>
> Signed-off-by: Mason Yang <[email protected]>
> ---
> .../devicetree/bindings/mtd/nand-macronix.txt | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mtd/nand-macronix.txt
>
> diff --git a/Documentation/devicetree/bindings/mtd/nand-macronix.txt b/Documentation/devicetree/bindings/mtd/nand-macronix.txt
> new file mode 100644
> index 0000000..cb60358
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/nand-macronix.txt
> @@ -0,0 +1,20 @@
> +Macronix NANDs Device Tree Bindings
> +-----------------------------------
> +
> +Macronix NANDs support randomizer operation for user data scrambled,
> +which can be enabled with a SET_FEATURE. The penalty of randomizer
> +is subpage accesses prohibited. By adding a new specific property
> +in children nodes to enable randomizer function.
You don't mention the performance penalty nor the benefits of such
operation.
Please also insist on the fact that this is a one time persistent, non
reversible operation and the use should use this property only if they
know what they are doing!
> +
> +Required NAND chip properties in children mode:
> +- randomizer enable: should be "mxic,enable-randomizer-otp"
> +
> +Example:
> +
> + nand: nand-controller@unit-address {
> +
> + nand@0 {
> + reg = <0>;
> + mxic,enable-randomizer-otp;
> + };
> + };
Thanks,
Miquèl