[lkml]   [2020]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v2 00/11] mtd: spi-nor: add xSPI Octal DTR support

This series adds support for octal DTR flashes in the spi-nor framework,
and then adds hooks for the Cypress Semper flash which is an xSPI
compliant Octal DTR flash.

The Cadence QSPI controller driver is also updated to run in Octal DTR

Tested on TI J721e EVM with 1-bit ECC on the Cypress flash.

This series depends on [0]. v1 can be found at [1].


Changes in v2:
- Add DT properties "spi-rx-dtr" and "spi-tx-dtr" to allow expressing
DTR capabilities.

- Set the mode bits SPI_RX_DTR and SPI_TX_DTR when we discover the DT
properties "spi-rx-dtr" and spi-tx-dtr".

- spi_nor_cypress_octal_enable() was updating nor->[] with
the intention of setting the correct number of dummy cycles. But this
function is called _after_ selecting the read so setting
nor->[] will have no effect. So, update nor->read_dummy

- Fix spi_nor_spimem_check_readop() and spi_nor_spimem_check_pp()
passing nor->read_proto and nor->write_proto to
spi_nor_spimem_setup_op() instead of read->proto and pp->proto

- Move the call to cqspi_setup_opcode_ext() inside cqspi_enable_dtr().
This avoids repeating the 'if (f_pdata->is_dtr)
cqspi_setup_opcode_ext()...` snippet multiple times.

- Call the default 'supports_op()' from cqspi_supports_mem_op(). This
makes sure the buswidth requirements are also enforced along with the
DTR requirements.

- Drop the 'is_dtr' argument from spi_check_dtr_req(). We only call it
when a phase is DTR so it is redundant.

Pratyush Yadav (11):
dt-bindings: spi: allow expressing DTR capability
spi: set mode bits for "spi-rx-dtr" and "spi-tx-dtr"
spi: spi-mem: allow specifying whether an op is DTR or not
spi: spi-mem: allow specifying a command's extension
spi: cadence-quadspi: Add support for octal DTR flashes
mtd: spi-nor: add support for DTR protocol
mtd: spi-nor: get command opcode extension type from BFPT
mtd: spi-nor: parse xSPI Profile 1.0 table
mtd: spi-nor: use dummy cycle and address width info from SFDP
mtd: spi-nor: enable octal DTR mode when possible
mtd: spi-nor: add support for Cypress Semper flash

.../bindings/spi/spi-controller.yaml | 10 +
drivers/mtd/spi-nor/spi-nor.c | 594 ++++++++++++++++--
drivers/spi/spi-cadence-quadspi.c | 247 +++++++-
drivers/spi/spi-mem.c | 46 ++
drivers/spi/spi.c | 10 +-
include/linux/mtd/spi-nor.h | 55 +-
include/linux/spi/spi-mem.h | 32 +
include/linux/spi/spi.h | 2 +
8 files changed, 891 insertions(+), 105 deletions(-)


 \ /
  Last update: 2020-02-26 10:39    [W:0.109 / U:10.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site