devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
To: Scott Wood <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Artem Bityutskiy
	<dedekind1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCHv3] mtd: gpio-nand: add device tree bindings
Date: Mon, 1 Aug 2011 20:33:16 +0100	[thread overview]
Message-ID: <20110801193316.GA2648@pulham.picochip.com> (raw)
In-Reply-To: <20110801133825.0b4fff24-1MYqz8GpK7RekFaExTCHk1jVikpgYyvb5NbjCUgZEJk@public.gmane.org>

Hi Scott,

On Mon, Aug 01, 2011 at 01:38:25PM -0500, Scott Wood wrote:
> On Mon, 1 Aug 2011 15:02:54 +0100
> Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org> wrote:
> 
> > diff --git a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt
> > new file mode 100644
> > index 0000000..2dc52de
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt
> > @@ -0,0 +1,40 @@
> > +GPIO assisted NAND flash
> > +
> > +The GPIO assisted NAND flash uses a memory mapped interface to
> > +read/write the NAND commands and data and GPIO pins for the control
> > +signals.
> > +
> > +Required properties:
> > +- compatible : "gpio-control-nand"
> > +- reg : should specify localbus chip select and size used for the chip.  For
> > +  ARM platforms where a dummy read is needed to provide synchronisation with
> > +  regards to bus reordering, an optional second resource describes the
> > +  location to read from.
> 
> Specify how the reg regions behave, such as "The first reg resource is a
> byte or word that represents the NAND chip's data lines.  The io-sync
> resource should be read when...".  What about endianness?

OK, fair points.  I'm not sure what to say about endianness though.  
Host byte order accesses are used in the driver so can I just specify 
this?  We could add a property later to support endianess swapping, but 
I don't want to add too much that I can't test.

> What if some other binding wants to add additional reg resources, while
> still being backwards compatible with this binding?  Might be better to
> move the sync into its own property -- something like "gpio-nand-io-sync =
> <1>" indicating that it's in reg resource #1.  And maybe it should require
> some PXA-specific compatible if io-sync is needed.  Even if another chip
> requires some sort of sync hack, would it necessarily work the same?

Hmm, I'm not convinced there - the sync is to protect against bus 
ordering, and a read from the right region does that.  I'm working on 
another ARM platform (not PXA) that needs this sync so sure it's not PXA 
specific.

The alternative is to not have this specified in the binding and have 
the platform attach the resource.  On my platform for example I need to 
read from the GPIO controller registers and I can't find a way to 
express this when using ranges...

> > +- #address-cells, #size-cells : Must be present if the device has sub-nodes
> > +  representing partitions.  In this case, both #address-cells and #size-cells
> > +  must be equal to 1.
> 
> No support for NAND chips >= 4GiB?

OK, I guess this can be relaxed to any value.

> > +Optional properties:
> > +- bank-width : Width (in bytes) of the device.
> > +- chip-delay : chip dependent delay for transferring data from array to
> > +  read registers (tR).
> 
> Why optional?  If there's a default assumption, document it.

OK.

> > +Examples:
> > +
> > +gpio-nand@1,0 {
> > +	compatible = "gpio-control-nand";
> > +	reg = <1 0x0000 0x1000>;
> 
> 4K seems a bit large for what I'm assuming this region is for.

OK, not the best example, it just needs to be at least 2 bytes.  I'll 
update it with a better one.

Jamie

  parent reply	other threads:[~2011-08-01 19:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 14:02 [PATCHv3] mtd: gpio-nand: add device tree bindings Jamie Iles
     [not found] ` <1312207374-14760-1-git-send-email-jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
2011-08-01 18:38   ` Scott Wood
     [not found]     ` <20110801133825.0b4fff24-1MYqz8GpK7RekFaExTCHk1jVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2011-08-01 19:33       ` Jamie Iles [this message]
2011-08-01 20:12         ` Scott Wood
     [not found]           ` <20110801151209.7b904320-1MYqz8GpK7RekFaExTCHk1jVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2011-08-01 20:25             ` Jamie Iles
     [not found]               ` <20110801202536.GB2648-apL1N+EY0C9YtYNIL7UdTEEOCMrvLtNR@public.gmane.org>
2011-08-01 20:39                 ` Scott Wood
2011-08-01 20:43                   ` Scott Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110801193316.GA2648@pulham.picochip.com \
    --to=jamie-wmlquqddiekakbo8gow8eq@public.gmane.org \
    --cc=dedekind1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).