devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Meson NAND: waiting w/o wired ready/busy pin
@ 2023-06-08  4:47 Arseniy Krasnov
  2023-06-08  4:47 ` [PATCH v3 1/2] dt-bindings: nand: meson: Fix 'nand-rb' property Arseniy Krasnov
  2023-06-08  4:47 ` [PATCH v3 2/2] mtd: rawnand: meson: waiting w/o wired ready/busy pin Arseniy Krasnov
  0 siblings, 2 replies; 12+ messages in thread
From: Arseniy Krasnov @ 2023-06-08  4:47 UTC (permalink / raw)
  To: Liang Yang, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Rob Herring, Krzysztof Kozlowski,
	Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl
  Cc: oxffffaa, kernel, Arseniy Krasnov, linux-mtd, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel

Main thing that this patchset adds is support for waiting for command
completion when there is no wired ready/busy pin. This is implemented
by using Meson specific command which operates without wired pin, but
supports interrupt driven waiting (default way for waiting without
hardware pin is 'nand_soft_waitrdy()' which uses software loop instead
of interrupt). To select which mode to use during driver initialization,
common NAND controller property is used - 'nand-rb'. It is described in
'nand-controller.yaml'. But for Meson, its description was missed in
'amlogic,meson-nand.yaml', so this patchset also adds support for it.

Patch for bindings was tested with dt_binding_check and dtbs_check.

Links:
 v1 (as two separate patches):
  https://lore.kernel.org/linux-mtd/20230606193507.35024-1-AVKrasnov@sberdevices.ru/
  https://lore.kernel.org/linux-mtd/20230607073015.1280085-1-AVKrasnov@sberdevices.ru/

 v2 (tagged as v1, but consider it as v2):
  https://lore.kernel.org/linux-mtd/20230607145026.2899547-1-AVKrasnov@sberdevices.ru/

Changelog:
 v1 -> v2:
  * Two separate patches:
    For bindings: https://lore.kernel.org/linux-mtd/20230606193507.35024-1-AVKrasnov@sberdevices.ru/
    For driver: https://lore.kernel.org/linux-mtd/20230607073015.1280085-1-AVKrasnov@sberdevices.ru/
    Now fixed/updated and combined to this patchset with v1 version.
  
  * In binding patch:
    * Invalid type of 'nand-rb' is fixed, it was 'bool', now it is 'uint32 array' as required. Also
      new declaration of 'nand-rb' contains several restrictions like number of elements and min/max
      value of elements.
    * Location of 'nand-rb' is moved from the controller object to the chip object as required.
  
  * In driver patch:
    * Update comment which describes when it is needed to send NAND_CMD_READ0 to
      leave command waiting loop.
    * Change type of 'no_rb_pin' to 'bool' as in v1. Now it is just a flag which selects
      mode to wait for command completion.

 v2 -> v3:
  * In binding patch:
    * 'minimum' property is dropped, because 'nand-rb' is unsigned.

  * In driver patch:
    * Logic of 'no_rb_pin' parsing is reworked a little bit. For example to return error
      code from 'of_property_read_u32()'.

Arseniy Krasnov (2):
  dt-bindings: nand: meson: Fix 'nand-rb' property
  mtd: rawnand: meson: waiting w/o wired ready/busy pin

 .../bindings/mtd/amlogic,meson-nand.yaml      |  6 ++
 drivers/mtd/nand/raw/meson_nand.c             | 77 ++++++++++++++++++-
 2 files changed, 79 insertions(+), 4 deletions(-)

-- 
2.35.0


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

end of thread, other threads:[~2023-07-05  7:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-08  4:47 [PATCH v3 0/2] Meson NAND: waiting w/o wired ready/busy pin Arseniy Krasnov
2023-06-08  4:47 ` [PATCH v3 1/2] dt-bindings: nand: meson: Fix 'nand-rb' property Arseniy Krasnov
2023-06-08 12:01   ` Krzysztof Kozlowski
2023-06-09 15:25   ` Miquel Raynal
2023-06-08  4:47 ` [PATCH v3 2/2] mtd: rawnand: meson: waiting w/o wired ready/busy pin Arseniy Krasnov
2023-06-09 15:24   ` Miquel Raynal
2023-07-04 12:43   ` Miquel Raynal
2023-07-04 12:46     ` Arseniy Krasnov
2023-07-04 13:12       ` Miquel Raynal
2023-07-04 13:07         ` Arseniy Krasnov
2023-07-04 17:32           ` Arseniy Krasnov
2023-07-05  7:07             ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).