public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] mtd: spi-nand: Add support for randomizer feature
@ 2026-02-11 10:05 Cheng Ming Lin
  2026-02-11 10:05 ` [PATCH v5 1/3] dt-bindings: mtd: spinand: Add randomizer enable/disable properties Cheng Ming Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Cheng Ming Lin @ 2026-02-11 10:05 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Tudor Ambarus, Mikhail Kshevetskiy, Pablo Martin-Gomez,
	Tianling Shen, Pratyush Yadav, linux-mtd, devicetree,
	linux-kernel, alvinzhou, Cheng Ming Lin

From: Cheng Ming Lin <chengminglin@mxic.com.tw>

This patch series introduces randomizer support for SPI NAND devices.

- Patch 1: add the nand-randomizer-enable and nand-randomizer-disable
           boolean properties to the generic nand-chip.yaml bindings.
- Patch 2: add the initialization logic and the set_randomizer callback
           to the core framework. The core will now parse the device tree
           properties and enable or disable the randomizer accordingly
           during spinand_init.
- Patch 3: implement the set_randomizer callback specifically for Macronix
           chips (MX35LF/UF series) to handle the vendor-specific register
           operations.

v5:
* Promoted the randomizer configuration to use generic NAND properties
  (nand-randomizer-enable and nand-randomizer-disable) instead of
  vendor-specific bindings.
* Refactored the initialization architecture in core.c. The core framework
  is now responsible for parsing the device tree properties and deciding
  whether to enable or disable the randomizer.

v4:
* Fix a build error in spinand_randomizer_init() where a value was
  returned from a void function. (Reported by kernel test robot)
* Update the return type to int.

v3:
* Revert the device tree property to the vendor-specific
  "mxic,randomizer-enable" to strictly follow vendor-specific bindings.

* Update the 'set_randomizer' callback signature to accept a boolean
  'enable' argument, allowing the feature to be explicitly enabled or
  disabled.

* Switch the implementation to use the standard SET_FEATURE command
  to modify the Configuration Register (0x10), replacing the previous
  special program command method.

v2:
* Create a global NAND DT property
Cheng Ming Lin (3):
  dt-bindings: mtd: spinand: Add randomizer enable/disable properties
  mtd: spi-nand: Add support for randomizer
  mtd: spi-nand: macronix: Enable randomizer support

 .../devicetree/bindings/mtd/nand-chip.yaml    |  8 ++++
 drivers/mtd/nand/spi/core.c                   | 27 +++++++++++
 drivers/mtd/nand/spi/macronix.c               | 46 ++++++++++++++-----
 include/linux/mtd/spinand.h                   |  9 ++++
 4 files changed, 79 insertions(+), 11 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2026-02-23  5:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 10:05 [PATCH v5 0/3] mtd: spi-nand: Add support for randomizer feature Cheng Ming Lin
2026-02-11 10:05 ` [PATCH v5 1/3] dt-bindings: mtd: spinand: Add randomizer enable/disable properties Cheng Ming Lin
2026-02-12  7:33   ` Krzysztof Kozlowski
2026-02-23  5:49     ` Cheng Ming Lin
2026-02-11 10:05 ` [PATCH v5 2/3] mtd: spi-nand: Add support for randomizer Cheng Ming Lin
2026-02-11 10:05 ` [PATCH v5 3/3] mtd: spi-nand: macronix: Enable randomizer support Cheng Ming Lin
2026-02-12 10:55   ` Miquel Raynal
2026-02-23  5:50     ` Cheng Ming Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox