The NXP {cpu-family} CPU provides a set of one-time programmable bits (eFuses) organized in a fuse array. The fuse array is available in 1, 2, 4, 8 and 16K bits.

Kernel configuration

You can manage the OTP driver support through the kernel configuration option:

  • i.MX8 SCU On-Chip OTP Controller support (CONFIG_NVMEM_IMX_OCOTP_SCU)

This option gives you read-only access to the OTP bits and is enabled as built-in on the ConnectCore 8X default kernel configuration file.

OTP memory write access is not yet supported on Linux.

Kernel driver

The OTP memory driver is located at:

File Description

drivers/nvmem/imx-ocotp-scu.c

OTP driver for the i.MX8X SCU

Device tree bindings

The OTP bits are managed by the SCU. The device tree bindings for the SCU are documented at Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt.

{cpu-family} device tree
ocotp: imx8qx-ocotp {
	compatible = "fsl,imx8qxp-scu-ocotp";
	#address-cells = <1>;
	#size-cells = <1>;
	read-only;
};

OTP user space usage

The OTP words are accessible (read-only) through the sysfs at /sys/devices/platform/scu/scu\:imx8qx-ocotp/imx-scu-ocotp0/nvmem.

# od -A x -t x4 /sys/devices/platform/scu/scu\:imx8qx-ocotp/imx-scu-ocotp0/nvmem
00000000: 00000000 00000008 0000000a 00000004
00000010: 0000000a 00000000 00000600 00000000
00000020: 00000050 00000000 00000000 00000000
00000030: 00000000 00000000 0000421f 0000002d
00000040: 82964e28 1a1a100e 00000000 00000000
00000050: 00000000 00000000 00000000 00000000
*
00000070: badabada badabada 00000002 1c00003b
00000080: 00000000 00000000 00000000 00000000
*
00000190: 25000000 00000000 2a00002c 00f00000
000001a0: 00000000 00000300 000007cc 00000690
000001b0: 00000000 00000000 00000000 00000000
000001c0: 55003001 0000de28 e0002100 00014c60
000001d0: bf00bf00 00003b34 f1421c81 00003b50
000001e0: f1422400 000066fc 20fffd97 00016888
000001f0: f6480200 55001402 00014de3 2001ff41
00000200: 60004801 4770682e 20018adc 55002c02
00000210: 000087d3 2001ff4d 68004807 01f8f04f
00000220: bf0c4008 6100f04f 6180f04f 6011689a
00000230: 0001f242 47708058 41e63034 55001802
00000240: 00006c89 2001ff71 480268d9 60d94301
00000250: 4770601d 00010530 55003402 000066d9
00000260: 2001ff81 4d09b530 46406b2c 22404651
00000270: 682b0656 464047a0 22504651 47a0692b
00000280: 46514640 6a2b2210 bd3047a0 205318c0
00000290: 55002402 00006765 2001ffad 60d82007
000002a0: 4640b510 22104651 f2464b02 47a0242d
000002b0: 0000bd10 10005026 00000000 00000000
000002c0: 935a2fa2 cef81c0d 28cd135d 4596a944
000002d0: 67e52619 679ffe6b f82af52e cc3ebae3
000002e0: badabada badabada badabada badabada
*
00000320: d0d429d5 1c1b47a0 1ac81db5 e9bfc220
00000330: e92200d6 078a8464 3bd3b3f5 f210aa2c
00000340: 55001402 000026ab 20013f20 48012101
00000350: 47706001 50140004 55000803 e000e418
00000360: 80c0c0c0 55000801 0000002c 000001e3
00000370: 55000801 00003071 46c046c0 55002402
00000380: 00003373 20013f2c 4804b500 28004780
00000390: 4803d001 98014780 bd004780 000019b1
000003a0: 0000131d 55000801 00005088 20013f49
000003b0: 55000801 000050a8 20013f4f 55002803
000003c0: badabada badabada badabada badabada
*
000003e0: 00000000 00000000 00000000 00000000
*
00000400: 390000d2 0380c040 81651e33 28db369b
00000410: 00003b00 00000000 00000000 00000000
00000420: ffffffff e529bb2a 00000000 00000000
00000430: 00008401 08405dc0 80085026 0000622d
00000440: 00000000 00000000 00000000 00000000
*
00000a80: 20013f48 2500b532 b532e001 24802510
00000a90: 230005e4 3248195a 59110092 3301009a
00000aa0: 2b085081 bd31d1f6 55000801 00003be1
00000ab0: 18c33058 00000000 00000000 00000000
00000ac0: 00000000 00000000 00000000 00000000
*
00000b10: 1411e240 0000c090 00000000 00000007
00000b20: 00000000 00000000 00000000 00000000
*
00000c40: badabada 00000000 badabada badabada
00000c50: 54ab2162 badabada 00000000 00000000
00000c60: 00000000 00000000 00000000 00000000
The values showing badabada correspond to OTP words that cannot be read, such as encryption keys.