OSDN Git Service

mtd: spi-nor: add support for DTR protocol
authorPratyush Yadav <p.yadav@ti.com>
Mon, 5 Oct 2020 15:31:26 +0000 (21:01 +0530)
committerVignesh Raghavendra <vigneshr@ti.com>
Mon, 9 Nov 2020 06:26:16 +0000 (11:56 +0530)
commit0e30f47232ab57c685258aa91adc3a3e67bd023e
tree81fd5cdadd13f4a44625876a76517a75bf537655
parent6e1bf55d7207aa360c8d1960dfac6af1940bd32e
mtd: spi-nor: add support for DTR protocol

Double Transfer Rate (DTR) is SPI protocol in which data is transferred
on each clock edge as opposed to on each clock cycle. Make
framework-level changes to allow supporting flashes in DTR mode.

Right now, mixed DTR modes are not supported. So, for example a mode
like 4S-4D-4D will not work. All phases need to be either DTR or STR.

The xSPI spec says that "The program commands provide SPI backward
compatible commands for programming data...". So 8D-8D-8D page program
opcodes are populated with using 1S-1S-1S opcodes.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20201005153138.6437-4-p.yadav@ti.com
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/core.h
drivers/mtd/spi-nor/sfdp.c
include/linux/mtd/spi-nor.h