Skip to content

Add QEMU model for ASPEED OTP memory and integrate with SoC

Kane Chen via qemu-arm qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 of 3 patches 6 repliesIn review
  2. v22 of 3 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- Switched to object_property_set_int() for setting "size"
- Simplified qdev_realize() error handling by passing errp directly
- Added "drive" property to OTP model for future extensibility

2 of 3 patches are in this archive. The cover letter announces 3.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3hw/misc/aspeed_otp: Add OTP device model with fallback RAM storagehw/nvram/aspeed_otp.c hw/nvram/meson.build include/hw/nvram/aspeed_otp.h+150 -04 replies
2/3hw/misc/aspeed_sbc: Connect ASPEED OTP memory device to SBChw/misc/aspeed_sbc.c hw/misc/trace-events include/hw/misc/aspeed_sbc.h+121 -01 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchCédric Le Goater
SeriesR-b
1/3
2/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] Add QEMU model for ASPEED OTP memory and integrate with SoC

From: Kane-Chen-AS <[email protected]>

This patch series introduces a QEMU model for the ASPEED OTP (One-Time Programmable) memory, along with its integration into the Secure Boot Controller (SBC) and supported SoC (AST2600).

The OTP model emulates a simple fuse array used for secure boot or device configuration, implemented with internal buffers; external file/device support not included in this version. It exposes an AddressSpace to support transaction-based access from controllers like the SBC.

This series includes:
- OTP memory device implementation
- SBC integration with command decoding (READ/PROG)
- Direct integration in AST2600 SoC without requiring user parameters

Any feedback or suggestions are appreciated!

Kane
---

ChangeLog
---------
v3:
- Switched to object_property_set_int() for setting "size"
- Simplified qdev_realize() error handling by passing errp directly
- Added "drive" property to OTP model for future extensibility

v2:
- Rename device from 'aspeed_otpmem' to 'aspeed_otp' and move it to hw/nvram/
- Move OTP device realization from instance_init to the realize function
- Improve error logging with qemu_log_mask() and remove unused error propagation

v1:
- Initial version

---

Kane-Chen-AS (3):
hw/misc/aspeed_otp: Add OTP device model with fallback RAM storage hw/misc/aspeed_sbc: Connect ASPEED OTP memory device to SBC hw/arm: Integrate ASPEED OTP memory support into AST2600 SoCs

 include/hw/misc/aspeed_sbc.h  |   5 ++
 include/hw/nvram/aspeed_otp.h |  33 ++++++++++
 hw/arm/aspeed_ast2600.c       |   2 +-
 hw/misc/aspeed_sbc.c          | 113 ++++++++++++++++++++++++++++++++++
 hw/nvram/aspeed_otp.c         | 113 ++++++++++++++++++++++++++++++++++
 hw/misc/trace-events          |   5 ++
 hw/nvram/meson.build          |   4 ++
 7 files changed, 274 insertions(+), 1 deletion(-)
 create mode 100644 include/hw/nvram/aspeed_otp.h
 create mode 100644 hw/nvram/aspeed_otp.c
Signature · 1 line
2.43.0