All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: boris brezillon <b.brezillon@overkiz.com>
Cc: devicetree@vger.kernel.org, Russell King <linux@arm.linux.org.uk>,
	linux-doc@vger.kernel.org, dev@linux-sunxi.org,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	Rob Landley <rob@landley.net>,
	Grant Likely <grant.likely@linaro.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 3/9] of: mtd: add NAND timings retrieval support
Date: Tue, 21 Jan 2014 15:57:40 -0700	[thread overview]
Message-ID: <20140121225740.GP18269@obsidianresearch.com> (raw)
In-Reply-To: <52D6BF45.80407@overkiz.com>

On Wed, Jan 15, 2014 at 06:03:01PM +0100, boris brezillon wrote:

> >>Pick a mode value that fits all the parameters of the connected
> >>non-ONFI flash.
> >>
> >>This would be instead of defining each parameter
> >>individually.. Provide some helpers to convert from a onfi mode number
> >>to all the onfi defined timing parameters so that drivers can
> >>configure the HW..
> >
> >Are you suggesting we should provide a function that converts these
> >modes into a nand_timings struct, or just use the timing modes and
> >let the NAND controller drivers configure its IP accordingly ?

Either seems reasonable to me, but passing the ONFI mode directly from
the NAND core to the driver seems a little safer..

The NAND core can provide a helper function to xlate the mode number
to the timing struct to help drivers that need broken out timing.

> >I found the ONFI timing tables in this document:
> >
> >www.*onfi*.org/~/media/*ONFI*/specs/*onfi*_3_1_spec.pdf‎ (chapter 4.16).
> >
> >I suppose my nand_timings struct should use the names described
> >page 110-111 (at least if we decide to use nand_timings and not
> >nand_timing_modes), right ?

Yah, I think follow the standard. The standard has timing diagrams
that show what all these parameters actually are.

> After taking a closer look at this document, the only parameter
> available in my nand_timings struct that is not defined in the
> standard is tR_max (data transfer from cell to register).

Maybe it can be derived from the other parameters? The ONFI values
seemed pretty comprehensive to me.

I think the mvebu driver was similar, not all of the ONFI values were
used and some translation was needed.

Jason

WARNING: multiple messages have this Message-ID (diff)
From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 3/9] of: mtd: add NAND timings retrieval support
Date: Tue, 21 Jan 2014 15:57:40 -0700	[thread overview]
Message-ID: <20140121225740.GP18269@obsidianresearch.com> (raw)
In-Reply-To: <52D6BF45.80407@overkiz.com>

On Wed, Jan 15, 2014 at 06:03:01PM +0100, boris brezillon wrote:

> >>Pick a mode value that fits all the parameters of the connected
> >>non-ONFI flash.
> >>
> >>This would be instead of defining each parameter
> >>individually.. Provide some helpers to convert from a onfi mode number
> >>to all the onfi defined timing parameters so that drivers can
> >>configure the HW..
> >
> >Are you suggesting we should provide a function that converts these
> >modes into a nand_timings struct, or just use the timing modes and
> >let the NAND controller drivers configure its IP accordingly ?

Either seems reasonable to me, but passing the ONFI mode directly from
the NAND core to the driver seems a little safer..

The NAND core can provide a helper function to xlate the mode number
to the timing struct to help drivers that need broken out timing.

> >I found the ONFI timing tables in this document:
> >
> >www.*onfi*.org/~/media/*ONFI*/specs/*onfi*_3_1_spec.pdf? (chapter 4.16).
> >
> >I suppose my nand_timings struct should use the names described
> >page 110-111 (at least if we decide to use nand_timings and not
> >nand_timing_modes), right ?

Yah, I think follow the standard. The standard has timing diagrams
that show what all these parameters actually are.

> After taking a closer look at this document, the only parameter
> available in my nand_timings struct that is not defined in the
> standard is tR_max (data transfer from cell to register).

Maybe it can be derived from the other parameters? The ONFI values
seemed pretty comprehensive to me.

I think the mvebu driver was similar, not all of the ONFI values were
used and some translation was needed.

Jason

WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: boris brezillon <b.brezillon-ZNYIgs0QAGpBDgjK7y7TUQ@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dev-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Maxime Ripard
	<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [RFC PATCH 3/9] of: mtd: add NAND timings retrieval support
Date: Tue, 21 Jan 2014 15:57:40 -0700	[thread overview]
Message-ID: <20140121225740.GP18269@obsidianresearch.com> (raw)
In-Reply-To: <52D6BF45.80407-ZNYIgs0QAGpBDgjK7y7TUQ@public.gmane.org>

On Wed, Jan 15, 2014 at 06:03:01PM +0100, boris brezillon wrote:

> >>Pick a mode value that fits all the parameters of the connected
> >>non-ONFI flash.
> >>
> >>This would be instead of defining each parameter
> >>individually.. Provide some helpers to convert from a onfi mode number
> >>to all the onfi defined timing parameters so that drivers can
> >>configure the HW..
> >
> >Are you suggesting we should provide a function that converts these
> >modes into a nand_timings struct, or just use the timing modes and
> >let the NAND controller drivers configure its IP accordingly ?

Either seems reasonable to me, but passing the ONFI mode directly from
the NAND core to the driver seems a little safer..

The NAND core can provide a helper function to xlate the mode number
to the timing struct to help drivers that need broken out timing.

> >I found the ONFI timing tables in this document:
> >
> >www.*onfi*.org/~/media/*ONFI*/specs/*onfi*_3_1_spec.pdf‎ (chapter 4.16).
> >
> >I suppose my nand_timings struct should use the names described
> >page 110-111 (at least if we decide to use nand_timings and not
> >nand_timing_modes), right ?

Yah, I think follow the standard. The standard has timing diagrams
that show what all these parameters actually are.

> After taking a closer look at this document, the only parameter
> available in my nand_timings struct that is not defined in the
> standard is tR_max (data transfer from cell to register).

Maybe it can be derived from the other parameters? The ONFI values
seemed pretty comprehensive to me.

I think the mvebu driver was similar, not all of the ONFI values were
used and some translation was needed.

Jason
--
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

  reply	other threads:[~2014-01-21 22:57 UTC|newest]

Thread overview: 120+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08 14:21 [RFC PATCH 0/9] mtd: nand: add sunxi NAND Flash Controller support Boris BREZILLON
2014-01-08 14:21 ` Boris BREZILLON
2014-01-08 14:21 ` Boris BREZILLON
     [not found] ` < 1389190924-26226-4-git-send-email-b.brezillon@overkiz.com>
2014-01-08 14:21 ` [RFC PATCH 1/9] mtd: nand: retrieve ECC requirements from Hynix READ ID byte 4 Boris BREZILLON
2014-01-08 14:21   ` Boris BREZILLON
2014-01-08 14:21   ` Boris BREZILLON
2014-01-23  1:49   ` Brian Norris
2014-01-23  1:49     ` Brian Norris
2014-01-23  1:49     ` Brian Norris
2014-01-29 10:29     ` boris brezillon
2014-01-29 10:29       ` boris brezillon
2014-01-29 10:29       ` boris brezillon
2014-01-29 10:29       ` boris brezillon
2014-02-05 13:53     ` Boris BREZILLON
2014-02-05 13:53       ` Boris BREZILLON
2014-02-05 13:53       ` Boris BREZILLON
2014-02-05 13:53       ` Boris BREZILLON
2014-01-08 14:21 ` [RFC PATCH 2/9] mtd: nand: define struct nand_timings Boris BREZILLON
2014-01-08 14:21   ` Boris BREZILLON
2014-01-08 14:21   ` Boris BREZILLON
2014-01-08 14:21 ` [RFC PATCH 3/9] of: mtd: add NAND timings retrieval support Boris BREZILLON
2014-01-08 14:21   ` Boris BREZILLON
2014-01-08 14:21   ` Boris BREZILLON
2014-01-08 16:30   ` Rob Herring
2014-01-08 16:30     ` Rob Herring
2014-01-08 16:30     ` Rob Herring
2014-01-08 16:36     ` boris brezillon
2014-01-08 16:36       ` boris brezillon
2014-01-08 16:36       ` boris brezillon
2014-01-08 18:34   ` Jason Gunthorpe
2014-01-08 18:34     ` Jason Gunthorpe
2014-01-08 18:34     ` Jason Gunthorpe
2014-01-08 19:00     ` boris brezillon
2014-01-08 19:00       ` boris brezillon
2014-01-08 19:00       ` boris brezillon
2014-01-08 19:00       ` boris brezillon
2014-01-08 19:13       ` Jason Gunthorpe
2014-01-08 19:13         ` Jason Gunthorpe
2014-01-08 19:13         ` Jason Gunthorpe
2014-01-08 19:13         ` Jason Gunthorpe
2014-01-09  8:36         ` boris brezillon
2014-01-09  8:36           ` boris brezillon
2014-01-09  8:36           ` boris brezillon
2014-01-09  8:36           ` boris brezillon
2014-01-09 17:35           ` Jason Gunthorpe
2014-01-09 17:35             ` Jason Gunthorpe
2014-01-09 17:35             ` Jason Gunthorpe
2014-01-15 15:09             ` boris brezillon
2014-01-15 15:09               ` boris brezillon
2014-01-15 15:09               ` boris brezillon
2014-01-15 17:03               ` boris brezillon
2014-01-15 17:03                 ` boris brezillon
2014-01-15 17:03                 ` boris brezillon
2014-01-21 22:57                 ` Jason Gunthorpe [this message]
2014-01-21 22:57                   ` Jason Gunthorpe
2014-01-21 22:57                   ` Jason Gunthorpe
2014-02-04 17:02                   ` Grant Likely
2014-02-04 17:02                     ` Grant Likely
2014-01-08 14:21 ` [RFC PATCH 4/9] of: mtd: add NAND timings bindings documentation Boris BREZILLON
2014-01-08 14:21   ` Boris BREZILLON
2014-01-08 14:21   ` Boris BREZILLON
2014-01-08 14:22 ` [RFC PATCH 5/9] mtd: nand: add sunxi NFC support Boris BREZILLON
2014-01-08 14:22   ` Boris BREZILLON
2014-01-08 14:22   ` Boris BREZILLON
2014-01-08 19:21   ` boris brezillon
2014-01-08 19:21     ` boris brezillon
2014-01-08 19:21     ` boris brezillon
2014-01-08 14:22 ` [RFC PATCH 6/9] mtd: nand: add sunxi NFC dt bindings doc Boris BREZILLON
2014-01-08 14:22   ` Boris BREZILLON
2014-01-08 14:22   ` Boris BREZILLON
2014-01-08 21:28   ` Arnd Bergmann
2014-01-08 21:28     ` Arnd Bergmann
2014-01-08 21:28     ` Arnd Bergmann
2014-01-09  8:31     ` boris brezillon
2014-01-09  8:31       ` boris brezillon
2014-01-09  8:31       ` boris brezillon
2014-01-09 10:00       ` Arnd Bergmann
2014-01-09 10:00         ` Arnd Bergmann
2014-01-09 10:00         ` Arnd Bergmann
2014-01-08 14:22 ` [RFC PATCH 7/9] ARM: dt/sunxi: add NFC node to Allwinner A20 SoC Boris BREZILLON
2014-01-08 14:22   ` Boris BREZILLON
2014-01-08 14:22   ` Boris BREZILLON
2014-01-08 14:22 ` [RFC PATCH 8/9] ARM: dt/sunxi: add NFC pinctrl pin definitions Boris BREZILLON
2014-01-08 14:22   ` Boris BREZILLON
2014-01-08 14:22   ` Boris BREZILLON
2014-01-08 14:22   ` Boris BREZILLON
2014-01-08 15:28 ` [RFC PATCH 9/9] ARM: sunxi/dt: enable NAND on cubietruck board Boris BREZILLON
2014-01-08 15:28   ` Boris BREZILLON
2014-01-08 15:28   ` Boris BREZILLON
2014-01-08 15:28   ` Boris BREZILLON
2014-01-08 15:30   ` boris brezillon
2014-01-08 15:30     ` boris brezillon
2014-01-08 15:30     ` boris brezillon
2014-01-11 13:38 ` [RFC PATCH 0/9] mtd: nand: add sunxi NAND Flash Controller support boris brezillon
2014-01-11 13:38   ` boris brezillon
2014-01-11 13:38   ` boris brezillon
2014-01-11 13:38   ` boris brezillon
     [not found]   ` <1389449230.19197.2.camel@localhost>
     [not found]     ` <52D1541F.4040400@overkiz.com>
     [not found]       ` <1389456075.20989.11.camel@localhost>
     [not found]         ` <1389474709.22660.4.camel@localhost>
2014-01-13  9:02           ` [linux-sunxi] " boris brezillon
2014-01-13  9:02             ` boris brezillon
2014-01-13  9:48             ` Henrik Nordström
2014-01-13  9:48               ` Henrik Nordström
     [not found]               ` <6de6ead1-e437-410b-91c0-74afb37dbf39@googlegroups.com>
2014-01-21 18:13                 ` Henrik Nordström
2014-01-21 18:13                   ` Henrik Nordström
2014-01-21 20:55                   ` Henrik Nordström
2014-01-21 20:55                     ` Henrik Nordström
2014-01-29 15:11             ` Michal Suchanek
2014-01-29 15:11               ` Michal Suchanek
2014-01-29 15:43               ` boris brezillon dev
2014-01-29 15:43                 ` boris brezillon dev
2014-01-29 16:08                 ` Michal Suchanek
2014-01-29 16:08                   ` Michal Suchanek
2014-01-29 16:55                   ` boris brezillon dev
2014-01-29 16:55                     ` boris brezillon dev
2014-01-23 15:22   ` Rob Herring
2014-01-23 15:22     ` Rob Herring
2014-01-23 15:22     ` Rob Herring
2014-01-29 10:20     ` boris brezillon
2014-01-29 10:20       ` boris brezillon
2014-01-29 10:20       ` boris brezillon
2014-01-29 10:20       ` boris brezillon

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=20140121225740.GP18269@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=b.brezillon@overkiz.com \
    --cc=dev@linux-sunxi.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=maxime.ripard@free-electrons.com \
    --cc=rob@landley.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.