mtd: spi-nor: spansion: add support for Cypress Semper flash
authorPratyush Yadav <p.yadav@ti.com>
Mon, 5 Oct 2020 15:31:37 +0000 (21:01 +0530)
committerVignesh Raghavendra <vigneshr@ti.com>
Mon, 9 Nov 2020 13:30:01 +0000 (19:00 +0530)
commitc3266af101f28e87505c976fad8db96c68f8afe4
treeeecf9169f43836585c1c7caea84ced6709da482d
parent1b65c43f7078eb6e4c2c0231c543a88c272bcb0c
mtd: spi-nor: spansion: add support for Cypress Semper flash

The Cypress Semper flash is an xSPI compliant octal DTR flash. Add
support for using it in octal DTR mode.

The flash by default boots in a hybrid sector mode. But the sector map
table on the part I had was programmed incorrectly and the SMPT values
on the flash don't match the public datasheet. Specifically, in some
places erase type 3 was used instead of 4. In addition, the region sizes
were incorrect in some places. So, for testing I set CFR3N[3] to enable
uniform sector sizes. Since the uniform sector mode bit is a
non-volatile bit, this series does not change it to avoid making any
permanent changes to the flash configuration. The correct data to
implement a fixup is not available right now and will be done in a
follow-up patch if needed.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
[vigneshr@ti.com: Drop unnecessary sleep in Octal DTR switch sequence]
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20201005153138.6437-15-p.yadav@ti.com
drivers/mtd/spi-nor/spansion.c