linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/11] mtd: spi-nor: add xSPI Octal DTR support
@ 2020-02-26  9:36 Pratyush Yadav
  2020-02-26  9:36 ` [PATCH v2 01/11] dt-bindings: spi: allow expressing DTR capability Pratyush Yadav
                   ` (6 more replies)
  0 siblings, 7 replies; 32+ messages in thread
From: Pratyush Yadav @ 2020-02-26  9:36 UTC (permalink / raw)
  To: Tudor Ambarus, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Mark Brown, Rob Herring, Mark Rutland
  Cc: Pratyush Yadav, linux-mtd, linux-kernel, linux-spi, devicetree,
	Sekhar Nori

Hi,

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
mode.

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

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

[0] https://patchwork.kernel.org/patch/11355593/
[1] https://lore.kernel.org/linux-mtd/20200211133348.15558-1-p.yadav@ti.com/

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->params.read[] with
  the intention of setting the correct number of dummy cycles. But this
  function is called _after_ selecting the read so setting
  nor->params.read[] will have no effect. So, update nor->read_dummy
  directly.

- 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
  respectively.

- 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(-)

--
2.25.0

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2020-03-02 10:20 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-26  9:36 [PATCH v2 00/11] mtd: spi-nor: add xSPI Octal DTR support Pratyush Yadav
2020-02-26  9:36 ` [PATCH v2 01/11] dt-bindings: spi: allow expressing DTR capability Pratyush Yadav
     [not found]   ` <20200226093703.19765-2-p.yadav-l0cyMroinI0@public.gmane.org>
2020-02-27 16:11     ` Boris Brezillon
     [not found]       ` <20200227171147.32cc6fcf-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2020-02-27 16:28         ` Mark Brown
     [not found]           ` <20200227162842.GE4062-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2020-02-27 16:40             ` Geert Uytterhoeven
     [not found]               ` <CAMuHMdWMCDzQm0tjpybJZyHy4imbC9NqRXP5d4C0xgxQx-Pf8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-27 16:44                 ` Mark Brown
     [not found]                   ` <20200227164425.GF4062-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2020-02-27 17:03                     ` Geert Uytterhoeven
2020-03-02  9:53                       ` Pratyush Yadav
2020-02-27 17:06                     ` Boris Brezillon
2020-02-27 16:29     ` Geert Uytterhoeven
2020-02-28  9:46       ` Pratyush Yadav
2020-02-26  9:36 ` [PATCH v2 02/11] spi: set mode bits for "spi-rx-dtr" and "spi-tx-dtr" Pratyush Yadav
     [not found]   ` <20200226093703.19765-3-p.yadav-l0cyMroinI0@public.gmane.org>
2020-02-27 16:23     ` Boris Brezillon
2020-03-02  9:48       ` Pratyush Yadav
     [not found]         ` <20200302094829.opazalwldrdn4s7y-l0cyMroinI0@public.gmane.org>
2020-03-02 10:20           ` Boris Brezillon
2020-02-26  9:36 ` [PATCH v2 03/11] spi: spi-mem: allow specifying whether an op is DTR or not Pratyush Yadav
     [not found]   ` <20200226093703.19765-4-p.yadav-l0cyMroinI0@public.gmane.org>
2020-02-27 16:36     ` Boris Brezillon
2020-02-26  9:36 ` [PATCH v2 04/11] spi: spi-mem: allow specifying a command's extension Pratyush Yadav
     [not found]   ` <20200226093703.19765-5-p.yadav-l0cyMroinI0@public.gmane.org>
2020-02-27 16:44     ` Boris Brezillon
2020-02-28  9:41       ` Pratyush Yadav
     [not found] ` <20200226093703.19765-1-p.yadav-l0cyMroinI0@public.gmane.org>
2020-02-26  9:36   ` [PATCH v2 05/11] spi: cadence-quadspi: Add support for octal DTR flashes Pratyush Yadav
2020-02-26  9:36   ` [PATCH v2 06/11] mtd: spi-nor: add support for DTR protocol Pratyush Yadav
2020-02-27 16:58     ` Boris Brezillon
     [not found]       ` <20200227175841.51435e3f-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2020-02-28  9:36         ` Pratyush Yadav
     [not found]           ` <20200228093658.zc3uifqg4zruokq3-l0cyMroinI0@public.gmane.org>
2020-02-28 10:53             ` Boris Brezillon
     [not found]               ` <20200228115355.5033798f-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2020-02-28 12:07                 ` Pratyush Yadav
     [not found]                   ` <20200228120750.hstohetdnqja2g2p-l0cyMroinI0@public.gmane.org>
2020-02-28 13:18                     ` Boris Brezillon
2020-02-26  9:37   ` [PATCH v2 09/11] mtd: spi-nor: use dummy cycle and address width info from SFDP Pratyush Yadav
2020-02-26  9:37   ` [PATCH v2 10/11] mtd: spi-nor: enable octal DTR mode when possible Pratyush Yadav
2020-02-26  9:37   ` [PATCH v2 11/11] mtd: spi-nor: add support for Cypress Semper flash Pratyush Yadav
2020-02-26  9:36 ` [PATCH v2 07/11] mtd: spi-nor: get command opcode extension type from BFPT Pratyush Yadav
2020-02-26  9:37 ` [PATCH v2 08/11] mtd: spi-nor: parse xSPI Profile 1.0 table Pratyush Yadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).