[PATCH 0/7] spi-nor: Add parallel and stacked memories support

Ashok Reddy Soma ashok.reddy.soma at amd.com
Fri Aug 18 06:21:12 CEST 2023


This series adds support for Xilinx qspi parallel and stacked memeories.

In parallel mode, the current implementation assumes that a maximum of
two flashes are connected. The QSPI controller splits the data evenly
between both the flashes so, both the flashes that are connected in
parallel mode should be identical.
During each operation SPI-NOR sets 0th bit for CS0 & 1st bit for CS1 in
nor->flags.

In stacked mode the current implementation assumes that a maximum of two
flashes are connected and both the flashes are of same make but can
differ in sizes. So, except the sizes all other flash parameters of both
the flashes are identical

Spi-nor will pass on the appropriate flash select flag to low level
driver, and it will select pass all the data to that particular flash.

Write operation in parallel mode are performed in page size * 2 chunks as
each write operation results in writing both the flashes. For doubling
the address space each operation is performed at addr/2 flash offset,
where addr is the address specified by the user.

Similarly for read and erase operations it will read from both flashes,
so size and offset are divided by 2 and send to flash.



Ashok Reddy Soma (7):
  dm: core: support reading a single indexed u64 value
  mtd: spi-nor: Add parallel and stacked memories support
  mtd: spi-nor: Add parallel memories support for read_sr and read_fsr
  mtd: spi-nor: Add parallel and stacked memories support in read_bar
    and write_bar
  spi: spi-uclass: Read chipselect and restrict capabilities
  spi: zynqmp_gqspi: Add parallel memories support in GQSPI driver
  spi: zynq_qspi: Add parallel memories support in QSPI driver

 drivers/core/of_access.c       |  22 ++
 drivers/core/ofnode.c          |  30 +++
 drivers/mtd/spi/spi-nor-core.c | 385 ++++++++++++++++++++++++++++-----
 drivers/spi/spi-uclass.c       |  21 +-
 drivers/spi/xilinx_spi.c       |   4 +-
 drivers/spi/zynq_qspi.c        | 145 +++++++++++--
 drivers/spi/zynq_spi.c         |   6 +-
 drivers/spi/zynqmp_gqspi.c     | 146 +++++++++++--
 include/dm/of_access.h         |  19 ++
 include/dm/ofnode.h            |  12 +
 include/linux/mtd/spi-nor.h    |  13 ++
 include/spi.h                  |  29 ++-
 12 files changed, 737 insertions(+), 95 deletions(-)

-- 
2.17.1



More information about the U-Boot mailing list