-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Problem Description
The NVMEM subsystem currently only has support for EEPROM devices. In an effort to add support for efuse/One-Time-Programming (OTP) devices it has become clear that there are multiple solutions to tackle this.
This RFC gathers information from the different proposals.
Proposed Change (Summary)
There's a need to be able to describe NVMEM cells in the device tree, that are located in efuse/OTP devices, for example:
efuse: efuse {
compatible = "vendor,efuse";
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cell0: cell@0 {
reg = <0x0 0x1>;
#nvmem-cell-cells = <0>;
read-only;
};
};
};
And NVMEM consumers should be able to read from and optionally write to those devices.
Proposed Change (Detailed)
These are some of the current proposals that were brought up in different PR/comments (order does not indicate any preference):
ntroduce a genericnvmemdriver API [PoC] Add nvmem device driver model #98369- Introduce a
fusedriver API drivers: fuse: add fuse driver subsystem with STM32 Ethernet MAC adress loading #98149 Use thesysconAPI drivers: syscon: Preparation for NVMEM usage #98140- Introduce an
nvmemprovider API main...teslabs:zephyr:sf32lb-hwinfo Rework NVMEM subsystem to become a driver [PoC] Rework NVMEM subsystem to become a driver #98285
Dependencies
Moving forward it should be possible for other subsystems to turn into NVMEM consumers and leverage the NVMEM providers for accessing efuse/OTP data.
Concerns and Unresolved Questions
Listing concerns raised from various places:
- A new API vs re-using an existing one (
eeprom,syscon, ...) https://github.com/zephyrproject-rtos/zephyr/pull/98149/files#r2455488653 - Programming efuse/OTP data is critical and can't be undone, writing is not as trivial like with EEPROM drivers: fuse: add fuse driver subsystem with STM32 Ethernet MAC adress loading #98149 (comment)
- The driver should have clear purpose drivers: syscon: Preparation for NVMEM usage #98140 (review)
Alternatives Considered
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status