[PATCH 2/2] mtd: spi-nor: disable 16-bit-sr for macronix

David Bauer mail at david-bauer.net
Wed Jan 19 12:36:01 PST 2022


Hi Michael,

On 1/19/22 16:49, Michael Walle wrote:
> Am 2021-12-31 10:10, schrieb Nick:
>> I looked now through all datasheets I found and the sizes of the
>> status register. However, I did not find any datasheet for the
>> "mx66l1g55g".
>> However, I am not sure if I maybe miss something to see if
>> "SNOR_F_HAS_16BIT_SR" is supported. I only looked at the status
>> register size.
> 
> How did you check that?
> 
> random example:
>> mx66u51235f: 8bit
>> https://www.macronix.com/Lists/Datasheet/Attachments/7674/MX66U51235F,%201.8V,%20512Mb,%20v1.1.pdf
>> (slide 34)
> 
> Figure 23:
> WRSR takes both status register and configuration register.
> 
> That being said. I'd prefer to have a sane default for that
> flag - which is to _not_ set it by default. For now, we can
> just remove the flag from spi_nor_init_default_params() and
> move it into the manufacturer default init. Then we can
> go through the flashes and remove the flag there.

I was working on a similar series in parallel - and i just want to
confirm this before i submit it. [0]

Your take would be to remove the flag from spi_nor_init_default_params
and place it in all vendor init-calls, right?

My current take would be to add a new flag which denotes flashes that
only have a single 8-bit SR, no second SR / CR.

This would require minimal changes, although after your E-Mail i would
rename it so it becomes clear it is rather for denoting flashes which
only support writing a single 8-bit register with a WRSR command.

What do you think?

[0] https://github.com/blocktrron/linux/commits/spi-not-8sr-flag

Best
David

> 
> This is mainly because it seems to be a legacy feature. To
> quote the datasheet of the Winbond W25Q32FW [1]:
> 
> | The W25Q32FW is also backward compatible to Winbond’s previous
> | generations of serial flash memories, in which the Status
> | Register-1&2 can be written using a single “Write Status
> | Register-1 (01h)” command.
> 
> -michael
> 
> [1] https://www.winbond.com/resource-files/w25q32fw%20revj%2004242018%20sfdp.pdf



More information about the linux-mtd mailing list