public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: boris.brezillon@free-electrons•com (Boris BREZILLON)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 1/9] mtd: nand: define struct nand_timings
Date: Fri, 09 May 2014 17:47:19 +0200	[thread overview]
Message-ID: <536CF887.7020903@free-electrons.com> (raw)
In-Reply-To: <20140508142930.GC5767@lee--X1>


On 08/05/2014 16:29, Lee Jones wrote:
>>> Define a struct containing the standard NAND timings as described in NAND
>>> datasheets.
>>>
>>> Signed-off-by: Boris BREZILLON <b.brezillon.dev@gmail•com>
>>> ---
>>>  include/linux/mtd/nand.h |   49 ++++++++++++++++++++++++++++++++++++++++++++++
>>>  1 file changed, 49 insertions(+)
>>>
>>> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
>>> index 389b3c5..f3ff3a3 100644
>>> --- a/include/linux/mtd/nand.h
>>> +++ b/include/linux/mtd/nand.h
> [...]
>
>>> + * Parameters)
>> Please document the units for these fields here. It looks like you're
>> using picoseconds.
> Can't we leave this open to interpretation?  For instance, it's more
> convenient for our driver to handle these as nano second values.
>
>>> + *
>>> + */
>>> +
>> Extra blank line.
>>
>>> +struct nand_sdr_timings {
>>> +	u32 tALH_min;
>>> +	u32 tADL_min;
>>> +	u32 tALS_min;
>>> +	u32 tAR_min;
>>> +	u32 tCEA_max;
>>> +	u32 tCEH_min;
>>> +	u32 tCH_min;
>>> +	u32 tCHZ_max;
>>> +	u32 tCLH_min;
>>> +	u32 tCLR_min;
>>> +	u32 tCLS_min;
>>> +	u32 tCOH_min;
>>> +	u32 tCS_min;
> 	u32 tCSD_min;

This is related to ddr2 timings, and this structure only define sdr
related timings.

>>> +	u32 tDH_min;
>>> +	u32 tDS_min;
>>> +	u32 tFEAT_max;
>>> +	u32 tIR_min;
>>> +	u32 tITC_max;
> 	u32 tR_max;

Actually this one cannot be retrieved from the ONFI timing mode, you'll
have to read bytes 137 and 138 in the parameter page.
Hence I got rid of it in the first place. Then I considered adding all
those missing timings in another structure (see [1]).

I noticed you posted something similar on the MTD mailing list (and
Lucas was waiting for the feature too).
Could we work together to propose something that fulfills all our needs ?

Here's what I need:
- get detailled timings to be able to configure the sunxi NAND
controller appropriately
- a way to get these timings on non-ONFi NANDs (the proposed solution is
exposing the closest  supported ONFI timing mode in the NAND chip DT
node, but I'm open to any new proposal).


Best Regards,

Boris

[1] http://lists.infradead.org/pipermail/linux-mtd/2014-March/052525.html


-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2014-05-09 15:47 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12 18:07 [PATCH v3 0/9] mtd: nand: add sunxi NAND Flash Controller support Boris BREZILLON
2014-03-12 18:07 ` [PATCH v3 1/9] mtd: nand: define struct nand_timings Boris BREZILLON
2014-04-30 17:51   ` Brian Norris
2014-05-01 17:36     ` Boris BREZILLON
2014-05-08 14:29     ` Lee Jones
2014-05-09 15:47       ` Boris BREZILLON [this message]
2014-05-20 18:13       ` Brian Norris
2014-03-12 18:07 ` [PATCH v3 2/9] mtd: nand: add ONFI timing mode to nand_timings converter Boris BREZILLON
2014-04-30 18:06   ` Brian Norris
2014-07-09 17:25   ` Brian Norris
2014-03-12 18:07 ` [PATCH v3 3/9] of: mtd: add NAND timing mode retrieval support Boris BREZILLON
2014-04-30 18:14   ` Brian Norris
2014-03-12 18:07 ` [PATCH v3 4/9] of: mtd: add documentation for the ONFI NAND timing mode property Boris BREZILLON
2014-03-12 18:27   ` Warner Losh
2014-03-12 18:48     ` Boris BREZILLON
2014-05-20 18:25   ` Brian Norris
2014-05-20 19:30     ` Boris BREZILLON
2014-05-20 19:51       ` Jason Gunthorpe
2014-05-20 19:55         ` Brian Norris
2014-05-20 19:52       ` Brian Norris
2014-05-20 21:32         ` Boris BREZILLON
2014-07-09 17:46           ` Brian Norris
2014-03-12 18:07 ` [PATCH v3 5/9] mtd: nand: add sunxi NAND flash controller support Boris BREZILLON
2014-05-09 16:03   ` Ezequiel Garcia
2014-05-09 16:47     ` Boris BREZILLON
2014-05-09 17:05       ` Ezequiel Garcia
2014-05-20 18:49       ` Brian Norris
2014-05-20 19:21         ` Brian Norris
2014-05-20 19:36           ` Boris BREZILLON
2014-03-12 18:07 ` [PATCH v3 6/9] mtd: nand: add sunxi NFC dt bindings doc Boris BREZILLON
2014-03-12 18:07 ` [PATCH v3 7/9] ARM: dt/sunxi: add NFC node to Allwinner A20 SoC Boris BREZILLON
2014-03-12 18:07 ` [PATCH v3 8/9] ARM: dt/sunxi: add A20 NAND controller pin definitions Boris BREZILLON
2014-03-12 18:07 ` [PATCH v3 9/9] ARM: sunxi/dt: enable NAND on cubietruck board 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=536CF887.7020903@free-electrons.com \
    --to=boris.brezillon@free-electrons$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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