Re: [RFC-PATCH] mtd: spi-nor: add conditional 4B opcodes

From: Daniel Walker (danielwa)
Date: Thu May 07 2020 - 14:14:04 EST






On Thu, May 07, 2020 at 11:33:46PM +0530, Pratyush Yadav wrote:
> On 07/05/20 09:20AM, Daniel Walker wrote:
> > Some chips have 4B opcodes, but there is no way to know if they have
> > them. This device tree option allows platform owners to force enable 4b
> > opcodes when they know their chips support it even when it can be
> > automatically identified.
>
> Do you mean that two chips might have the same ID but one of them can
> support 4B opcodes and the other can not? Is it possible to detect this
> in a fixup hook? I think it would be better to do something like this in
> a fixup hook instead of via device tree.

Yes. The chip I added the option for is an example of this, it's n25q256a. I'm not familiar with the
fixup hook mechanism, but I would assume you need some way to tell between the 4B
opcode chips and the non-4B opcode chips. For n25q256a, we have not found a way
to do that.

Daniel