On Thu, Jan 30, 2025 at 01:08:14PM +0100, Oleksij Rempel wrote: > Provide an overview of OTP support in Barebox. > > Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> > --- > Documentation/user/otp.rst | 199 +++++++++++++++++++++++++++++ > Documentation/user/user-manual.rst | 1 + > 2 files changed, 200 insertions(+) > create mode 100644 Documentation/user/otp.rst > > diff --git a/Documentation/user/otp.rst b/Documentation/user/otp.rst ... > + bsec0.permanent_write_enable=1 > + > + # Write directly to an OTP register (bypasses shadow) > + mw -l -d /dev/stm32-bsec 0x00000170+4 0x12345678 > + > + # Disable OTP write mode (future writes go to shadow, if available) > + bsec0.permanent_write_enable=0 > + > +Example 2: Using Shadow Memory Without Committing > +:: > + > + # Ensure shadow writes are enabled > + bsec0.permanent_write_enable=0 > + > + # Write to shadow memory (not permanent yet) > + mw -l -d /dev/imx-ocotp 0x20+4 0xAABBCCDD Please drop the '+4' from the mw commands. The length is detected from the number of words written and the '+4' has no meaning for mw. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |