From: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
To: "\"Peter Pan 潘栋 (peterpandong)\"" <peterpandong@micron.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"pawel.moll@arm.com" <pawel.moll@arm.com>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
"galak@codeaurora.org" <galak@codeaurora.org>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"Brian Norris" <computersforpeace@gmail.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"\"Qi Wang 王起 (qiwang)\"" <qiwang@micron.com>,
"\"Frank Liu 刘群 (frankliu)\"" <frankliu@micron.com>,
"\"Melanie Zhang 张燕 (melaniezhang)\"" <melaniezhang@micron.com>
Subject: Re: [PATCH 3/3] mtd: spi-nand: add devicetree binding
Date: Tue, 20 Jan 2015 07:59:41 -0300 [thread overview]
Message-ID: <54BE351D.1080300@imgtec.com> (raw)
In-Reply-To: <87F60714EC601C4C83DFF1D2E3D390A04AC98F@NTXXIAMBX02.xacn.micron.com>
On 01/11/2015 10:57 PM, Peter Pan 潘栋 (peterpandong) wrote:
>> On 01/08/2015 02:04 AM, Peter Pan 潘栋 (peterpandong) wrote:
>>>>> This commit adds the devicetree binding document that specifies the
>>>>> spi nand devices support.
>>>>>
>>>>> Signed-off-by: Peter Pan <peterpandong@micron.com>
>>>>> ---
>>>>> Documentation/devicetree/bindings/mtd/spi-nand.txt | 22
>>>> ++++++++++++++++++++++
>>>>> 1 file changed, 22 insertions(+)
>>>>> create mode 100644 Documentation/devicetree/bindings/mtd/spi-
>>>> nand.txt
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/mtd/spi-nand.txt
>>>> b/Documentation/devicetree/bindings/mtd/spi-nand.txt
>>>>> new file mode 100644
>>>>> index 0000000..9dd3efd
>>>>> --- /dev/null
>>>>> +++ b/Documentation/devicetree/bindings/mtd/spi-nand.txt
>>>>> @@ -0,0 +1,22 @@
>>>>> +* NAND driver for MT29F, GD5F and similar SPI NAND flash chips
>>>>> +
>>>>> +Required properties:
>>>>> +- #address-cells, #size-cells : Must be present if the device has
>>>> sub-nodes
>>>>> + representing partitions.
>>>>> +- compatible : Should be the manufacturer and the name of the chip.
>>>> Bear in mind
>>>>>
>>>>
>>>> Unless I'm mistaken, we don't need the chip ID here, as SPI NAND
>> allows
>>>> to autodetect the device. Any reason why we can't just use a generic
>>>> compatible "spi-nand" here?
>>>> --
>>>> Ezequiel
>>>
>>> In fact, I don't know how to autodetect the SPI NAND device. Micron
>> device and
>>> Gigadevice device have different read ID functions. The Chip ID here
>> is used to
>>> determine which function to use.
>>>
>>
>> Isn't the difference between the Read ID very minor? One of the vendor
>> needs a 2-byte ID read, and the other one needs a 3-byte ID read.
>>
>> So you can just try with 2-byte, and if that fails (no vendor ID is
>> found on the first byte), you can try with the 3-byte command.
>>
>> It's not the most elegant solution, but it's not super awful either.
>> --
>> Ezequiel
>
> I agree with your idea about try different ways to read ID. It is a better way
> to detect the chip if it can work properly.
>
> The difference between the Read ID is that some chips need to send a dummy byte
> or address after opcode then read 2 byte, some chips needn't send any data after
> opcode but read 3 byte.
>
> I'm concerned maybe chip will get into unknown or vendor specified state if we
> send the wrong sequence.
>
Have you seen this happpening? Or this a potential/future problem?
For the latter, we can always fix it when the issue appears.
--
Ezequiel
next prev parent reply other threads:[~2015-01-20 10:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 0:52 [PATCH 3/3] mtd: spi-nand: add devicetree binding Peter Pan 潘栋 (peterpandong)
2015-01-08 0:52 ` Peter Pan 潘栋 (peterpandong)
2015-01-08 3:15 ` Ezequiel Garcia
2015-01-08 5:04 ` Peter Pan 潘栋 (peterpandong)
2015-01-08 5:04 ` Peter Pan 潘栋 (peterpandong)
2015-01-08 15:12 ` Ezequiel Garcia
[not found] ` <54AE9E54.2010506-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-01-12 1:57 ` Peter Pan 潘栋 (peterpandong)
2015-01-12 1:57 ` Peter Pan 潘栋 (peterpandong)
2015-01-20 10:59 ` Ezequiel Garcia [this message]
[not found] ` <87F60714EC601C4C83DFF1D2E3D390A04AB425-xjs9rfTec9KBtk7LW/CC8tTcztV8WXajQQ4Iyu8u01E@public.gmane.org>
2015-01-08 14:35 ` Mark Rutland
2015-01-08 14:35 ` Mark Rutland
-- strict thread matches above, loose matches on Subject: below --
2015-01-08 1:02 Peter Pan 潘栋 (peterpandong)
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=54BE351D.1080300@imgtec.com \
--to=ezequiel.garcia@imgtec.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=frankliu@micron.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=melaniezhang@micron.com \
--cc=pawel.moll@arm.com \
--cc=peterpandong@micron.com \
--cc=qiwang@micron.com \
--cc=robh+dt@kernel.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 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.