All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] mtd: spi-nor: Add support for Octal 8D-8D-8D mode
@ 2020-04-21  6:39 ` Mason Yang
  0 siblings, 0 replies; 57+ messages in thread
From: Mason Yang @ 2020-04-21  6:39 UTC (permalink / raw)
  To: broonie, tudor.ambarus, miquel.raynal, richard, vigneshr,
	boris.brezillon
  Cc: juliensu, linux-kernel, linux-mtd, linux-spi, Mason Yang

Hello,

This is repost of patchset from Boris Brezillon's
[RFC,00/18] mtd: spi-nor: Proposal for 8-8-8 mode support [1].

Background from cover letter for RFC[1].

The trend has been around Octal NOR Flash lately and the latest mainline
already supports 1-1-8 and 1-8-8 modes.

Boris opened a discussion on how we should support stateful modes (X-X-X
and XD-XD-XD, where X is the bus width and D means Double Transfer Rate).

JESD216C has defined specification for Octal 8S-8S-8S and 8D-8D-8D.
Based on JEDEC216C Basic Flash Parameter Table (BFPT) driver extract:
DWORD-18: command and command extension type.
DWORD-19: enable 8S-8S-8S/8D-8D-8D mode sequences by two instructions or
	  write CFG Reg 2.
DWORD-20: Maximum operation speed of device in Octal mode.

and xSPI profile 1.0 table:
DWORD-1: Read Fast command, the number of dummy cycles and address nbytes
	 for Read Status Register command.
DWORD-2: Read/Write volatile Register command for CFG Reg2.
DWORD-4 and DWORD-5: dummy cycles used for various frequencies.

The first set of patches is according to JESD216C adding Double Transfer
Rate(DTR) fields, extension command and command bytes number to the
spi_mem_op struct. This is from Boris patchset.

The second set of patches parse the xSPI profile 1.0 table for parameters
needed in Octal 8D-8D-8D mode. 

The third set of patches extract BFPT DWORD018,19,20 and define the 
relevant macros and enum in spi-nor layer for Octal 8S-8S-8S and 
8D-8D-8D mode operation. Parts of these are refer to Boris patchset but
we enable Octal 8D-8D-8D mode in spi_nor_late_init_params() rather than
Boris's adding a change_mode() call-back function.

The last set of patches in the series support Macronix mx25uw51245g
to tweak flash parameters a correct dummy cycles set for various frequency.

Also patched spi-mxic driver for testing on Macronix's Zynq PicoZed board
with Macronix's SPI controller (spi-mxic.c) and mx25uw51245g Octal flash.

[1] https://patchwork.ozlabs.org/cover/982926/


Summary of change log
---------------------
v2: 
Parse BFPT & xSPI table for Octal 8D-8D-8D mode parameters and enable Octal
mode in spi_nor_late_init_params().
Using Macros in spi_nor_spimem_read_data, spi_nor_spimem_write_data and
so on by Vignesh comments.

v1:
Without parsing BFPT & xSPI profile 1.0 table and enter Octal 8D-8D-8D
mode directly in spi_nor_fixups hooks.


thnaks for your time and review.
best regards,
Mason

Mason Yang (5):
  mtd: spi-nor: Add support for Octal 8D-8D-8D mode
  mtd: spi-nor: sfdp: Add support for xSPI profile 1.0 table
  mtd: spi-nor: Parse BFPT DWORD-18,19 and 20 for Octal 8D-8D-8D mode
  mtd: spi-nor: macronix: Add Octal 8D-8D-8D supports for Macronix
    mx25uw51245g
  spi: mxic: Patch for Octal 8D-8D-8D mode support

 drivers/mtd/spi-nor/core.c     | 220 ++++++++++++++++++++++++++++++++++++++--
 drivers/mtd/spi-nor/core.h     |  31 ++++++
 drivers/mtd/spi-nor/macronix.c |  41 ++++++++
 drivers/mtd/spi-nor/sfdp.c     | 222 ++++++++++++++++++++++++++++++++++++++++-
 drivers/mtd/spi-nor/sfdp.h     |  16 ++-
 drivers/spi/spi-mem.c          |   8 +-
 drivers/spi/spi-mxic.c         | 101 +++++++++++++------
 include/linux/mtd/spi-nor.h    |  51 +++++++++-
 include/linux/spi/spi-mem.h    |  13 +++
 9 files changed, 654 insertions(+), 49 deletions(-)

-- 
1.9.1


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

end of thread, other threads:[~2020-05-15  6:55 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21  6:39 [PATCH v2 0/5] mtd: spi-nor: Add support for Octal 8D-8D-8D mode Mason Yang
2020-04-21  6:39 ` Mason Yang
2020-04-21  6:39 ` [PATCH v2 1/5] " Mason Yang
2020-04-21  6:39   ` Mason Yang
2020-04-21  6:39 ` [PATCH v2 2/5] mtd: spi-nor: sfdp: Add support for xSPI profile 1.0 table Mason Yang
2020-04-21  6:39   ` Mason Yang
2020-04-21  6:39 ` [PATCH v2 3/5] mtd: spi-nor: Parse BFPT DWORD-18,19 and 20 for Octal 8D-8D-8D mode Mason Yang
2020-04-21  6:39   ` [PATCH v2 3/5] mtd: spi-nor: Parse BFPT DWORD-18, 19 " Mason Yang
2020-04-21  6:39 ` [PATCH v2 4/5] mtd: spi-nor: macronix: Add Octal 8D-8D-8D supports for Macronix mx25uw51245g Mason Yang
2020-04-21  6:39   ` Mason Yang
2020-04-21  6:39 ` [PATCH v2 5/5] spi: mxic: Patch for Octal 8D-8D-8D mode support Mason Yang
2020-04-21  6:39   ` Mason Yang
2020-04-24 15:41   ` kbuild test robot
2020-04-24 15:41     ` kbuild test robot
2020-04-24 15:41     ` kbuild test robot
2020-04-21  7:23 ` [PATCH v2 0/5] mtd: spi-nor: Add support for Octal 8D-8D-8D mode Boris Brezillon
2020-04-21  7:23   ` Boris Brezillon
2020-04-21  9:35   ` Vignesh Raghavendra
2020-04-21  9:35     ` Vignesh Raghavendra
2020-04-21 12:17     ` Boris Brezillon
2020-04-21 12:17       ` Boris Brezillon
2020-04-27 17:55   ` Pratyush Yadav
2020-04-27 17:55     ` Pratyush Yadav
2020-04-28  6:14     ` masonccyang
2020-04-28  6:14       ` masonccyang
2020-04-28  6:34       ` Boris Brezillon
2020-04-28  6:34         ` Boris Brezillon
2020-04-28  8:35         ` Pratyush Yadav
2020-04-28  8:35           ` Pratyush Yadav
2020-04-29  5:59         ` masonccyang
2020-04-29  5:59           ` masonccyang
2020-04-28  8:54       ` Pratyush Yadav
2020-04-28  8:54         ` Pratyush Yadav
2020-04-29  7:31         ` masonccyang
2020-04-29  7:31           ` masonccyang
2020-04-29  8:37           ` Boris Brezillon
2020-04-29  8:37             ` Boris Brezillon
2020-04-29 18:18           ` Pratyush Yadav
2020-04-29 18:18             ` Pratyush Yadav
2020-05-05  9:31             ` masonccyang
2020-05-05  9:31               ` masonccyang
2020-05-05  9:44               ` Boris Brezillon
2020-05-05  9:44                 ` Boris Brezillon
2020-05-05 10:01                 ` Boris Brezillon
2020-05-05 10:01                   ` Boris Brezillon
2020-05-11  6:54                   ` masonccyang
2020-05-11  6:54                     ` masonccyang
2020-05-06  9:40               ` Pratyush Yadav
2020-05-06  9:40                 ` Pratyush Yadav
2020-05-15  2:26                 ` masonccyang
2020-05-15  2:26                   ` masonccyang
2020-05-15  6:55                   ` Pratyush Yadav
2020-05-15  6:55                     ` Pratyush Yadav
2020-04-30  8:21           ` Vignesh Raghavendra
2020-04-30  8:21             ` Vignesh Raghavendra
2020-05-11  3:23             ` masonccyang
2020-05-11  3:23               ` masonccyang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.