]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mtd: rawnand: arasan: Leverage additional GPIO CS
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 26 May 2021 09:32:42 +0000 (11:32 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 26 May 2021 14:26:36 +0000 (16:26 +0200)
commitacbd3d0945f9cca4622f45e477793c5922bd6605
tree7ae45d71efb29b02efd5b7dbbff6533ad95fd8ae
parentb5437c7b682c9a505065b4ab4716cdc951dc3c7c
mtd: rawnand: arasan: Leverage additional GPIO CS

Make use of the cs-gpios DT property as well as the core helper to parse
it so that the Arasan controller driver can now assert many more chips
than natively.

The Arasan controller has an internal limitation: RB0 is tied to CS0 and
RB1 is tied to CS1. Hence, it is possible to use external GPIOs as long
as one or the other native CS is not used (or configured to be driven as
a GPIO) and that all additional CS are physically wired on its
corresponding RB line. Eg. CS0 is used as a native CS, CS1 is not used
as native CS and may be used as a GPIO CS, CS2 is an additional GPIO
CS. Then the target asserted by CS0 should also be wired to RB0, while
the targets asserted by CS1 and CS2 should be wired to RB1.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210526093242.183847-5-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/arasan-nand-controller.c