All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/13] Add support for NVMEM API
@ 2022-04-18 19:36 Sean Anderson
  2022-04-18 19:36 ` [PATCH v3 01/13] sandbox: net: Add aliases for ethernet devices Sean Anderson
                   ` (12 more replies)
  0 siblings, 13 replies; 22+ messages in thread
From: Sean Anderson @ 2022-04-18 19:36 UTC (permalink / raw)
  To: u-boot, Simon Glass
  Cc: Mario Six, Ramon Fried, Heinrich Schuchardt, Tom Rini,
	Joe Hershberger, Sean Anderson, Marek Behún

This adds support for the nvmem-cells properties cropping up in manyb
device trees. This is an easy way to load configuration, version
information, or calibration data from a non-volatile memory source. For
more information, refer to patch 6 ("misc: Add support for nvmem
cells").

For the moment I have only added some integration tests using the
ethernet addresses. This hits the main code paths (looking up nvmem
cells) but doesn't test writing. I can add a few stand-alone tests if
desired.

The patches are structured in the following manner:
1-7:   These are general cleanups, and may be applied independently of
       the rest of the series.
8-9:   Add NVMEM support
10-13: Support reading ethernet addresses using the NVMEM API and add
       some tests.

Changes in v3:
- Add aliases for ethernet devices
- Add mac address for eth8 to environment
- Move patch adding test earlier in the series
- Add test for eth8 as well

Changes in v2:
- Call the appropriate API functions directly from
  nvmem_cell_(read|write). This means we can drop the nvmem_interface
  machinery.

Sean Anderson (13):
  sandbox: net: Add aliases for ethernet devices
  sandbox: net: Add mac address for eth8 to environment
  test: eth: Add test for ethernet addresses
  sandbox: net: Remove fake-host-hwaddr
  sandbox: Remove eth2addr from environment
  sandbox: Move some mac addresses to device tree
  misc: i2c_eeprom: Make i2c_eeprom_write use a const buf
  misc: Add support for nvmem cells
  sandbox: Enable NVMEM
  net: Add support for reading mac addresses from nvmem cells
  test: Load mac address with i2c eeprom
  test: Load mac address using RTC
  test: Load mac address using misc device

 MAINTAINERS                        |   7 ++
 arch/sandbox/dts/sandbox.dts       |   1 -
 arch/sandbox/dts/sandbox64.dts     |   1 -
 arch/sandbox/dts/test.dts          |  34 +++++--
 board/sandbox/sandbox.env          |   4 -
 configs/sandbox64_defconfig        |   1 +
 configs/sandbox_defconfig          |   1 +
 configs/sandbox_flattree_defconfig |   1 +
 configs/sandbox_noinst_defconfig   |   1 +
 configs/sandbox_spl_defconfig      |   1 +
 doc/api/index.rst                  |   1 +
 doc/api/nvmem.rst                  |   7 ++
 drivers/misc/Kconfig               |  16 +++
 drivers/misc/Makefile              |   1 +
 drivers/misc/i2c_eeprom.c          |   3 +-
 drivers/misc/i2c_eeprom_emul.c     |   4 +
 drivers/misc/misc_sandbox.c        |   3 +
 drivers/misc/nvmem.c               | 142 +++++++++++++++++++++++++++
 drivers/net/sandbox.c              |  10 +-
 drivers/rtc/i2c_rtc_emul.c         |  10 ++
 include/i2c_eeprom.h               |   3 +-
 include/nvmem.h                    | 151 +++++++++++++++++++++++++++++
 net/eth-uclass.c                   |  13 ++-
 test/dm/eth.c                      |  29 ++++++
 24 files changed, 419 insertions(+), 26 deletions(-)
 create mode 100644 doc/api/nvmem.rst
 create mode 100644 drivers/misc/nvmem.c
 create mode 100644 include/nvmem.h

-- 
2.35.1.1320.gc452695387.dirty


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

end of thread, other threads:[~2022-05-05 15:27 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 19:36 [PATCH v3 00/13] Add support for NVMEM API Sean Anderson
2022-04-18 19:36 ` [PATCH v3 01/13] sandbox: net: Add aliases for ethernet devices Sean Anderson
2022-04-29 14:48   ` Tom Rini
2022-04-18 19:36 ` [PATCH v3 02/13] sandbox: net: Add mac address for eth8 to environment Sean Anderson
2022-04-18 19:36 ` [PATCH v3 03/13] test: eth: Add test for ethernet addresses Sean Anderson
2022-04-18 19:36 ` [PATCH v3 04/13] sandbox: net: Remove fake-host-hwaddr Sean Anderson
2022-04-18 19:36 ` [PATCH v3 05/13] sandbox: Remove eth2addr from environment Sean Anderson
2022-04-18 19:36 ` [PATCH v3 06/13] sandbox: Move some mac addresses to device tree Sean Anderson
2022-04-18 19:36 ` [PATCH v3 07/13] misc: i2c_eeprom: Make i2c_eeprom_write use a const buf Sean Anderson
2022-04-18 19:36 ` [PATCH v3 08/13] misc: Add support for nvmem cells Sean Anderson
2022-04-25  5:48   ` Simon Glass
2022-04-25 15:24     ` Sean Anderson
2022-04-29 19:40       ` Sean Anderson
2022-05-03  8:50         ` Simon Glass
2022-05-05 15:26           ` Sean Anderson
2022-04-18 19:36 ` [PATCH v3 09/13] sandbox: Enable NVMEM Sean Anderson
2022-04-18 19:36 ` [PATCH v3 10/13] net: Add support for reading mac addresses from nvmem cells Sean Anderson
2022-04-29 14:48   ` Tom Rini
2022-04-18 19:36 ` [PATCH v3 11/13] test: Load mac address with i2c eeprom Sean Anderson
2022-04-18 19:36 ` [PATCH v3 12/13] test: Load mac address using RTC Sean Anderson
2022-04-29 14:48   ` Tom Rini
2022-04-18 19:36 ` [PATCH v3 13/13] test: Load mac address using misc device Sean Anderson

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.