nuttx/arch
Marco Casaroli 7fc26fd50c
Some checks are pending
Build Documentation / build-html (push) Waiting to run
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
rp23xx: Add an OTP driver on the efuse interface.
The rp2350 holds 4096 rows of 24 bit one-time-programmable memory, which
the port did not expose at all.  This adds a driver on the NuttX efuse
interface, registered by the common board bringup as /dev/efuse.

The driver uses the ECC interpretation of a row, in which 16 bits carry
data and the remaining 8 carry a Hamming code, so the OTP appears as a
flat space of 4096 * 16 bits for the efuse field descriptors to index: a
descriptor at bit offset N refers to bit N % 16 of row N / 16.  That
matches the row numbers already listed in hardware/rp23xx_otp_data.h.

Reads come from the chip's ECC-translated window and have no side
effects.  Rows are locked in pages of 64; a page locked against reads
would raise a bus fault, so the lock is checked first and reported as an
error instead.

Programming needs the separate RP23XX_OTP_WRITE option, which defaults to
off; without it a write returns EPERM and no programming code is built at
all.  When enabled, a row is programmed as a whole through the bootrom,
since the ECC bits cover the whole row.  For the same reason a row that
already holds data cannot be modified, and such a write is rejected
rather than left to corrupt the row's ECC.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-07-27 10:33:13 +08:00
..
arm rp23xx: Add an OTP driver on the efuse interface. 2026-07-27 10:33:13 +08:00
arm64 arch/arm64: nxstyle fix Relative files path 2026-07-27 09:44:30 +08:00
avr
ceva
dummy
hc
mips arch/mips/jz4780: Add USB host and display controller drivers 2026-07-24 12:17:35 +08:00
misoc
or1k
renesas drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
risc-v arch/rp23xx: Fix six register/bit macro name clashes. 2026-07-26 21:13:07 -03:00
sim sim/alsa: Use bundled codec headers. 2026-07-26 22:35:30 +08:00
sparc
tricore arch/tricore: nxstyle fix Relative files path 2026-07-27 09:44:30 +08:00
x86 drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
x86_64
xtensa fs/hostfs: Return ENOTTY for unsupported ioctl 2026-07-23 08:30:29 +02:00
z16
z80
CMakeLists.txt
Kconfig