From: "João Loureiro" <joaofl@gmail.com>
To: u-boot@lists.denx.de
Cc: "Tom Rini" <trini@konsulko.com>, "Simon Glass" <sjg@chromium.org>,
"João Loureiro" <joaofl@gmail.com>
Subject: [PATCH v3 0/2] spi: Introduce initial EEPROM driver mode support
Date: Thu, 11 Jun 2026 00:11:58 +0200 [thread overview]
Message-ID: <20260610221200.167711-1-joaofl@gmail.com> (raw)
In-Reply-To: <AM9P122MB0281B24BE5B8A8E6A3F2D343F2CB2@AM9P122MB0281.EURP122.PROD.OUTLOOK.COM>
This series introduces an initial SPI EEPROM driver model uclass,
analogous to the existing I2C EEPROM support, currently providing
read-only access.
v2 was deferred mainly because of the large number of checkpatch
issues. This v3 reworks the driver from scratch to be checkpatch
clean, drops dead code and the misleading no-op write stub, fixes the
read bounds checking, and corrects the AT25160 geometry. It is rebased
on current master.
In addition, and to address the "new uclass needs a sandbox driver and
a test" request, patch 2 adds a sandbox SPI EEPROM emulator and a
test/dm test. To make that possible the sandbox SPI controller now lets
a slave select its emulator through a "sandbox,emul" phandle (mirroring
the sandbox I2C bus), while still defaulting to the SPI flash emulator
so existing behaviour is unchanged.
Note: this work was originally submitted from a Philips address which I
no longer have; it is resent from my personal address.
Tested on sandbox: "ut dm spi_eeprom" passes, and the existing
"ut dm spi*" tests still pass.
João Loureiro (2):
spi: Introduce initial EEPROM driver mode support
sandbox: spi: Add SPI EEPROM emulator and DM test
MAINTAINERS | 8 ++
arch/sandbox/dts/test.dts | 13 ++-
configs/sandbox_defconfig | 1 +
drivers/misc/Kconfig | 6 ++
drivers/misc/Makefile | 2 +
drivers/misc/spi_eeprom.c | 185 +++++++++++++++++++++++++++++++++
drivers/misc/spi_eeprom_emul.c | 118 +++++++++++++++++++++
drivers/spi/sandbox_spi.c | 31 +++++-
include/dm/uclass-id.h | 1 +
include/spi_eeprom.h | 91 ++++++++++++++++
test/dm/Makefile | 1 +
test/dm/spi_eeprom.c | 45 ++++++++
12 files changed, 500 insertions(+), 2 deletions(-)
create mode 100644 drivers/misc/spi_eeprom.c
create mode 100644 drivers/misc/spi_eeprom_emul.c
create mode 100644 include/spi_eeprom.h
create mode 100644 test/dm/spi_eeprom.c
--
2.54.0
next prev parent reply other threads:[~2026-06-11 2:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 11:38 [PATCH] SPI: Introduce initial EEPROM driver mode support Loureiro, Joao
2025-02-24 11:43 ` [PATCH] spi: Introduce initial eeprom " Loureiro, Joao
2025-03-04 17:47 ` Tom Rini
2025-03-05 12:26 ` [PATCH v2] spi: Introduce initial EEPROM " Loureiro, Joao
2026-06-10 22:11 ` João Loureiro [this message]
2026-06-10 22:11 ` [PATCH v3 1/2] " João Loureiro
2026-06-10 22:12 ` [PATCH v3 2/2] sandbox: spi: Add SPI EEPROM emulator and DM test João Loureiro
2026-06-14 12:18 ` Simon Glass
2026-06-15 17:51 ` [PATCH v4 0/2] spi: Introduce initial EEPROM driver mode support João Loureiro
2026-06-15 17:51 ` [PATCH v4 1/2] " João Loureiro
2026-07-13 13:03 ` Simon Glass
2026-09-05 10:14 ` João Loureiro
2026-06-15 17:51 ` [PATCH v4 2/2] sandbox: spi: Add SPI EEPROM emulator and DM test João Loureiro
2026-09-05 10:24 ` [PATCH v5 0/3] spi: Introduce driver-model support for SPI EEPROMs João Loureiro
2026-09-10 14:30 ` Simon Glass
2026-09-05 10:24 ` [PATCH v5 1/3] test: dm: sf: Get the emulator attached to the flash slave João Loureiro
2026-09-05 10:24 ` [PATCH v5 2/3] spi: Introduce initial driver-model support for SPI EEPROMs João Loureiro
2026-09-05 10:24 ` [PATCH v5 3/3] sandbox: spi: Add SPI EEPROM emulator and DM test João Loureiro
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=20260610221200.167711-1-joaofl@gmail.com \
--to=joaofl@gmail.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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 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.