mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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: Thu, 8 Jan 2015 12:12:20 -0300	[thread overview]
Message-ID: <54AE9E54.2010506@imgtec.com> (raw)
In-Reply-To: <87F60714EC601C4C83DFF1D2E3D390A04AB4EA@NTXXIAMBX02.xacn.micron.com>



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

  reply	other threads:[~2015-01-08 15:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 15:12     ` Ezequiel Garcia [this message]
2015-01-12  1:57       ` Peter Pan 潘栋 (peterpandong)
2015-01-20 10:59         ` Ezequiel Garcia
2015-01-08 14:35 ` Mark Rutland

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=54AE9E54.2010506@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome