nvmem: rockchip-efuse: add RK3399 OTP write support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | dt-bindings: nvmem: rockchip-efuse: add rockchip,efuse-write-enable propertyDocumentation/ | +11 | 3 replies | |
| 2/2 | nvmem: rockchip-efuse: add write support for RK3399drivers/ | +124 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] nvmem: rockchip-efuse: add RK3399 OTP write support
This series adds write (OTP programming) support for the RK3399 eFuse controller, gated behind an explicit devicetree opt-in property.
eFuse bits are one-time-programmable (OTP): once set, they cannot be cleared. Enabling write access unconditionally for any board using the rockchip,rk3399-efuse compatible would be a significant safety risk. This series therefore:
1. Adds a new boolean DT property, rockchip,efuse-write-enable, which must be explicitly declared in the board's device tree to enable OTP programming from userspace.
2. Implements rockchip_rk3399_efuse_write() using the Array Program Mode (A_PGM) as described in the RK3399 TRM section 21. Each bit is programmed individually using a software-controlled STROBE pulse of 15 us. The SoC-specific callbacks are managed via a new struct rockchip_efuse_soc_data, and nvmem_config is moved to the probe stack so read_only can be set per-device.
Hardware precondition: The VQPS programming supply (1.8V to 1.98V per RK3399 TRM) must be present and correctly sequenced during writes. The driver assumes the board power design guarantees this when the DT property is present. Future work may add an optional regulator reference to enforce this in software.
Tested on RK3399 board with rockchip,efuse-write-enable set in the device tree. Read-back after programming confirmed correct bit patterns.
Hrushiraj Gandhi (2):
dt-bindings: nvmem: rockchip-efuse: add rockchip,efuse-write-enable
property
nvmem: rockchip-efuse: add write support for RK3399
.../bindings/nvmem/rockchip-efuse.yaml | 11 ++ drivers/nvmem/rockchip-efuse.c | 152 +++++++++++++++--- 2 files changed, 138 insertions(+), 25 deletions(-)
Signature · 1 line
2.47.3