From: Pratyush Yadav <p.yadav@ti.com>
To: Tudor Ambarus <tudor.ambarus@microchip.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Mark Brown <broonie@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: Pratyush Yadav <p.yadav@ti.com>, <linux-mtd@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
Sekhar Nori <nsekhar@ti.com>
Subject: [PATCH v3 00/12] mtd: spi-nor: add xSPI Octal DTR support
Date: Fri, 13 Mar 2020 21:16:33 +0530 [thread overview]
Message-ID: <20200313154645.29293-1-p.yadav@ti.com> (raw)
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.
This series assumes that the flash is handed to the kernel in Legacy SPI
mode. That is why there is no tracking of the state the flash is in.
Ability to detect the flash mode and then run the SFDP procedure in that
mode will be added as a follow up series.
Tested on TI J721e EVM with 1-bit ECC on the Cypress flash.
v1 can be found at [0]. v2 can be found at [1].
[0] https://lore.kernel.org/linux-mtd/20200211133348.15558-1-p.yadav@ti.com/
[1] https://lore.kernel.org/linux-mtd/20200226093703.19765-1-p.yadav@ti.com/
Changes in v3:
- Drop the DT properties "spi-rx-dtr" and "spi-tx-dtr". Instead, if
later a need is felt to disable DTR in case someone has a board with
Octal DTR capable flash but does not support DTR transactions for some
reason, a property like "spi-no-dtr" can be added.
- Remove mode bits SPI_RX_DTR and SPI_TX_DTR.
- Remove the Cadence Quadspi controller patch to un-block this series. I
will submit it as a separate patch.
- Rebase on latest 'master' and fix merge conflicts.
- Update read and write dirmap templates to use DTR.
- Rename 'is_dtr' to 'dtr'.
- Make 'dtr' a bitfield.
- Reject DTR ops in spi_mem_default_supports_op().
- Update atmel-quadspi to reject DTR ops. All other controller drivers
call spi_mem_default_supports_op() so they will automatically reject
DTR ops.
- Add support for both enabling and disabling DTR modes.
- Perform a Software Reset on flashes that support it when shutting
down.
- Disable Octal DTR mode on suspend, and re-enable it on resume.
- Drop enum 'spi_mem_cmd_ext' and make command opcode u16 instead.
Update spi-nor to use the 2-byte command instead of the command
extension. Since we still need a "extension type", mode that enum to
spi-nor and name it 'spi_nor_cmd_ext'.
- Default variable address width to 3 to fix SMPT parsing.
- Drop non-volatile change to uniform sector mode and rely on parsing
SMPT.
Pratyush Yadav (12):
spi: spi-mem: allow specifying whether an op is DTR or not
spi: atmel-quadspi: reject DTR ops
spi: spi-mem: allow specifying a command's extension
mtd: spi-nor: add support for DTR protocol
mtd: spi-nor: default to address width of 3 for configurable widths
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: perform a Soft Reset on shutdown
mtd: spi-nor: Disable Octal DTR mode on suspend.
mtd: spi-nor: add support for Cypress Semper flash
drivers/mtd/spi-nor/spi-nor.c | 692 ++++++++++++++++++++++++++++++----
drivers/spi/atmel-quadspi.c | 4 +
drivers/spi/spi-mem.c | 3 +
include/linux/mtd/spi-nor.h | 73 +++-
include/linux/spi/spi-mem.h | 13 +-
5 files changed, 702 insertions(+), 83 deletions(-)
--
2.25.0
next reply other threads:[~2020-03-13 15:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 15:46 Pratyush Yadav [this message]
2020-03-13 15:46 ` [PATCH v3 01/12] spi: spi-mem: allow specifying whether an op is DTR or not Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 02/12] spi: atmel-quadspi: reject DTR ops Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 03/12] spi: spi-mem: allow specifying a command's extension Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 04/12] mtd: spi-nor: add support for DTR protocol Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 05/12] mtd: spi-nor: default to address width of 3 for configurable widths Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 06/12] mtd: spi-nor: get command opcode extension type from BFPT Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 07/12] mtd: spi-nor: parse xSPI Profile 1.0 table Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 08/12] mtd: spi-nor: use dummy cycle and address width info from SFDP Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 09/12] mtd: spi-nor: enable octal DTR mode when possible Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 10/12] mtd: spi-nor: perform a Soft Reset on shutdown Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 11/12] mtd: spi-nor: Disable Octal DTR mode on suspend Pratyush Yadav
2020-03-13 15:46 ` [PATCH v3 12/12] mtd: spi-nor: add support for Cypress Semper flash Pratyush Yadav
2020-03-13 15:50 ` [PATCH v3 00/12] mtd: spi-nor: add xSPI Octal DTR support Pratyush Yadav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200313154645.29293-1-p.yadav@ti.com \
--to=p.yadav@ti.com \
--cc=alexandre.belloni@bootlin.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=miquel.raynal@bootlin.com \
--cc=nicolas.ferre@microchip.com \
--cc=nsekhar@ti.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®