[v1,0/2] Meson NAND: waiting w/o wired ready/busy pin

Message ID 20230607145026.2899547-1-AVKrasnov@sberdevices.ru
Headers
Series Meson NAND: waiting w/o wired ready/busy pin |

Message

Arseniy Krasnov June 7, 2023, 2:50 p.m. UTC
  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.

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      |  7 ++
 drivers/mtd/nand/raw/meson_nand.c             | 82 ++++++++++++++++++-
 2 files changed, 85 insertions(+), 4 deletions(-)
  

Comments

Arseniy Krasnov June 7, 2023, 3:18 p.m. UTC | #1
On 07.06.2023 17:50, Arseniy Krasnov wrote:
> 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.
> 
> 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      |  7 ++
>  drivers/mtd/nand/raw/meson_nand.c             | 82 ++++++++++++++++++-
>  2 files changed, 85 insertions(+), 4 deletions(-)
> 

Changelog:
* 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.

Thanks, Arseniy
  
Krzysztof Kozlowski June 7, 2023, 6:48 p.m. UTC | #2
On 07/06/2023 17:18, Arseniy Krasnov wrote:
> 
> 
> On 07.06.2023 17:50, Arseniy Krasnov wrote:
>> 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.
>>
>> 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      |  7 ++
>>  drivers/mtd/nand/raw/meson_nand.c             | 82 ++++++++++++++++++-
>>  2 files changed, 85 insertions(+), 4 deletions(-)
>>
> 
> Changelog:
> * 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.

Version your patchsets. This is v2, not v1.

Best regards,
Krzysztof
  
Arseniy Krasnov June 7, 2023, 6:58 p.m. UTC | #3
On 07.06.2023 21:48, Krzysztof Kozlowski wrote:
> On 07/06/2023 17:18, Arseniy Krasnov wrote:
>>
>>
>> On 07.06.2023 17:50, Arseniy Krasnov wrote:
>>> 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.
>>>
>>> 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      |  7 ++
>>>  drivers/mtd/nand/raw/meson_nand.c             | 82 ++++++++++++++++++-
>>>  2 files changed, 85 insertions(+), 4 deletions(-)
>>>
>>
>> Changelog:
>> * 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.
> 
> Version your patchsets. This is v2, not v1.

Ack, next will be v3

Thanks, Arseniy

> 
> Best regards,
> Krzysztof
>