You are here: Digi Embedded Yocto > System development > Linux v3.14 Board Support Package > Devices and interfaces > One-Time Programmable (OTP)

One-Time Programmable (OTP)

The NXP i.MX6 CPU provides a set of one-time programmable bits (e-fuses) structured as 16 banks. Each bank is composed of eight words of 32 bits each.

These 4096 reserved bits can be blown just once. Programming them is an irreversible operation.

Kernel configuration

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

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

This option is disabled on the default ConnectCore 6 SBC kernel configuration file for security reasons and gives you write access to the OTP bits.

Platform driver mapping

The OTP driver for the i.MX6 is located at drivers/char/fsl-otp.c.

Device tree bindings

The device tree node for the OTP driver is defined in the common i.MX6 device tree file:

Common i.MX6 device tree
ocotp-fuse@021bc000 {
    compatible = "fsl,imx6q-ocotp";
    reg = <0x021bc000 0x4000>;
    clocks = <&clks IMX6QDL_CLK_IIM>;
};

OTP user space usage

The OTP words are accessible through the sysfs at /sys/fsl_otp.

Read access

Each word can be read using cat command:

root@ccimx6sbc:# cat HW_OCOTP_MAC1
0x450

Write access

In order to program a word to the OTP bits, you must enable the kernel option CONFIG_FSL_OTP_WRITE.

Programming the OTP bits is an irreversible operation that could potentially brick your module. Do not program the OTP bits unless you are sure of what you are doing. For more information, see the ConnectCore for i.MX6 Hardware Reference Manual.

The OTP words can be programmed using echo command followed by a 32-bits hexadecimal number prefixed by 0x:

root@ccimx6sbc:/sys/fsl_otp# echo 0xBA987654 > HW_OCOTP_MAC0

Additional considerations

 

 

© 2017 Digi International Inc. All rights reserved.
One-Time Programmable (OTP) updated on 24 April 2017 11:48:26 PM