* [PATCH v1 1/2] devicetree: bindings: improve description for GPIO assisted NAND flash @ 2014-08-05 8:37 Gerhard Sittig [not found] ` <1407227846-3257-1-git-send-email-gsi-ynQEQJNshbs@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Gerhard Sittig @ 2014-08-05 8:37 UTC (permalink / raw) To: devicetree-u79uwXL29TY76Z2rM5mHXA, Jamie Iles, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mike Rapoport, Alexander Shiyan Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, David Woodhouse, Brian Norris, Gerhard Sittig Expand the description of the 'gpios' property in the GPIO assisted NAND flash binding, to explicitly list the required GPIO pin references and their order. Update the example section to individually bracket the GPIO references, and capitalize the signal names for improved readability. Signed-off-by: Gerhard Sittig <gsi-ynQEQJNshbs@public.gmane.org> --- .../devicetree/bindings/mtd/gpio-control-nand.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt index 36ef07d3c90f..af8915b41ccf 100644 --- a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt +++ b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt @@ -11,8 +11,8 @@ Required properties: are made in native endianness. - #address-cells, #size-cells : Must be present if the device has sub-nodes representing partitions. -- gpios : specifies the gpio pins to control the NAND device. nwp is an - optional gpio and may be set to 0 if not present. +- gpios : Specifies the GPIO pins to control the NAND device. The order of + GPIO references is: RDY, nCE, ALE, CLE, and an optional nWP. Optional properties: - bank-width : Width (in bytes) of the device. If not present, the width @@ -35,11 +35,11 @@ gpio-nand@1,0 { reg = <1 0x0000 0x2>; #address-cells = <1>; #size-cells = <1>; - gpios = <&banka 1 0 /* rdy */ - &banka 2 0 /* nce */ - &banka 3 0 /* ale */ - &banka 4 0 /* cle */ - 0 /* nwp */>; + gpios = <&banka 1 0>, /* RDY */ + <&banka 2 0>, /* nCE */ + <&banka 3 0>, /* ALE */ + <&banka 4 0>, /* CLE */ + <0>; /* nWP */ partition@0 { ... -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1407227846-3257-1-git-send-email-gsi-ynQEQJNshbs@public.gmane.org>]
* [PATCH v1 2/2] mtd: nand: gpio: improve comments about GPIO assisted operation [not found] ` <1407227846-3257-1-git-send-email-gsi-ynQEQJNshbs@public.gmane.org> @ 2014-08-05 8:37 ` Gerhard Sittig 2014-11-05 7:56 ` [PATCH v1 1/2] devicetree: bindings: improve description for GPIO assisted NAND flash Brian Norris 1 sibling, 0 replies; 3+ messages in thread From: Gerhard Sittig @ 2014-08-05 8:37 UTC (permalink / raw) To: devicetree-u79uwXL29TY76Z2rM5mHXA, Jamie Iles, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mike Rapoport, Alexander Shiyan Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, David Woodhouse, Brian Norris, Gerhard Sittig The drivers/mtd/nand/gpio.c driver does not GPIO bitbang the complete NAND protocol, but instead is GPIO _assisted_ -- a memory mapped interface communicates commands and data, and only few control signals are connected to GPIO pins. Expand comments in the driver source and in the Kconfig description to better reflect the very nature of the driver. The previous text could be mistaken for complete GPIO bitbanging. Signed-off-by: Gerhard Sittig <gsi-ynQEQJNshbs@public.gmane.org> --- drivers/mtd/nand/Kconfig | 6 ++++-- drivers/mtd/nand/gpio.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index f1cf503517fd..0ef8b35b459f 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -75,10 +75,12 @@ config MTD_NAND_DENALI_SCRATCH_REG_ADDR boards, the scratch register is at 0xFF108018. config MTD_NAND_GPIO - tristate "GPIO NAND Flash driver" + tristate "GPIO assisted NAND Flash driver" depends on GPIOLIB help - This enables a GPIO based NAND flash driver. + This enables a NAND flash driver where control signals are + connected to GPIO pins, and commands and data are communicated + via a memory mapped interface. config MTD_NAND_AMS_DELTA tristate "NAND Flash device on Amstrad E3" diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c index 117ce333fdd4..226eda6f2eee 100644 --- a/drivers/mtd/nand/gpio.c +++ b/drivers/mtd/nand/gpio.c @@ -8,7 +8,9 @@ * * © 2004 Simtec Electronics * - * Device driver for NAND connected via GPIO + * Device driver for NAND flash that uses a memory mapped interface to + * read/write the NAND commands and data, and GPIO pins for control signals + * (the DT binding refers to this as "GPIO assisted NAND flash") * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/2] devicetree: bindings: improve description for GPIO assisted NAND flash [not found] ` <1407227846-3257-1-git-send-email-gsi-ynQEQJNshbs@public.gmane.org> 2014-08-05 8:37 ` [PATCH v1 2/2] mtd: nand: gpio: improve comments about GPIO assisted operation Gerhard Sittig @ 2014-11-05 7:56 ` Brian Norris 1 sibling, 0 replies; 3+ messages in thread From: Brian Norris @ 2014-11-05 7:56 UTC (permalink / raw) To: Gerhard Sittig Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Jamie Iles, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mike Rapoport, Alexander Shiyan, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, David Woodhouse On Tue, Aug 05, 2014 at 10:37:25AM +0200, Gerhard Sittig wrote: > Expand the description of the 'gpios' property in the GPIO assisted > NAND flash binding, to explicitly list the required GPIO pin references > and their order. > > Update the example section to individually bracket the GPIO references, > and capitalize the signal names for improved readability. > > Signed-off-by: Gerhard Sittig <gsi-ynQEQJNshbs@public.gmane.org> Applied both to l2-mtd.git. Brian -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-05 7:56 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-08-05 8:37 [PATCH v1 1/2] devicetree: bindings: improve description for GPIO assisted NAND flash Gerhard Sittig [not found] ` <1407227846-3257-1-git-send-email-gsi-ynQEQJNshbs@public.gmane.org> 2014-08-05 8:37 ` [PATCH v1 2/2] mtd: nand: gpio: improve comments about GPIO assisted operation Gerhard Sittig 2014-11-05 7:56 ` [PATCH v1 1/2] devicetree: bindings: improve description for GPIO assisted NAND flash Brian Norris
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).