The 23LCV1024 is a 1 Mbit serial SRAM with battery backup on an SPI
bus, used as non volatile scratch storage. This adds a driver for it,
plus a sandbox emulation and a unit test.

The emulation implements all three operating modes of the device and
advances the address counter as the data sheet describes for each of
them, so the test can tell whether the driver puts the device into the
mode it needs. Reaching the emulation means going through the hook of
the sandbox SPI bus, which so far bound the SPI NOR flash emulator for
every slave, hence the second patch.

Patch 2 and 3 touch sandbox and the tests not the SPI NOR subsystem.

Azure build:
https://dev.azure.com/hs0298/hs/_build/results?buildId=213&view=results
is fine.


Heiko Schocher (2):
  sandbox: spi: let a slave name the driver that emulates it
  test: dm: add a test for the Microchip 23LCV1024 SPI SRAM

Stefan Bigler (1):
  mtd: spi: add driver for the Microchip 23LCV1024 SPI SRAM

 arch/sandbox/dts/test.dts         |  14 ++
 arch/sandbox/include/asm/test.h   |   8 +
 configs/sandbox_defconfig         |   2 +
 drivers/mtd/spi/Kconfig           |  20 +++
 drivers/mtd/spi/Makefile          |   2 +
 drivers/mtd/spi/sandbox.c         |  25 ++-
 drivers/mtd/spi/spi_ram.c         | 280 ++++++++++++++++++++++++++++++
 drivers/mtd/spi/spi_ram_sandbox.c | 189 ++++++++++++++++++++
 drivers/spi/Kconfig               |   2 +-
 test/dm/Makefile                  |   1 +
 test/dm/spi_ram.c                 |  96 ++++++++++
 11 files changed, 636 insertions(+), 3 deletions(-)
 create mode 100644 drivers/mtd/spi/spi_ram.c
 create mode 100644 drivers/mtd/spi/spi_ram_sandbox.c
 create mode 100644 test/dm/spi_ram.c

---
base-commit: 75df64103873fac09642860cedadaffb8cf6b2c7
branch: spi-ram-v1

-- 
2.55.0

Reply via email to