3.1.2.7. Programming user OTP fuses

This guide describes how to read and write User One Time Programmable (OTP) fuses and boot-mode fuses by using U-Boot’s fuse commands.

Caution

Programming fuses is an irreversible operation. Once an OTP fuse is programmed, it cannot be undone. Please verify all values carefully before programming.

3.1.2.7.1. Commands overview

See U-Boot fuse command documentation

3.1.2.7.2. Reading fuses

Read is only permitted from bank 0.

Below example shows reading 4 x 32-bit words starting from bank 0, offset 5:

=> fuse read 0 5 4

3.1.2.7.3. Programming fuses

Warning

Before programming fuses, apply proper voltage to the Vpp pin. The Key Writer Lite document explains how to control Vpp voltage.

The fuse prog command programs two types of OTP bits:

  • Bank 0 - General Purpose User defined OTP bits.

  • Bank 0xFF - Reduced pin boot-mode related OTP bits.

3.1.2.7.3.1. Programming sequence

Programming fuses requires applying a voltage to a specific pin (Vpp). Refer to device data sheet for more details.

On TI AM62L Evaluation Module, an I2C-based IO expander controls the Vpp pin. Follow these steps to enable or disable Vpp:

  1. Select and probe the I2C bus:

    # Select i2c bus 2 (chip 22 is connected to it)
    => i2c dev 2
    
    # Probe the chip
    => i2c probe 22
    
  2. Configure and enable Vpp:

    # Turn off Vpp initially
    => i2c mw 0x22 0x04 0x00
    
    # Configure Vpp (port 04) as output
    => i2c mw 0x22 0xC 0xEF
    
    # Turn on Vpp
    => i2c mw 0x22 0x04 0x10
    
  3. Run fuse prog command

    # Programs word 15 to 0x1234 (each word is 25-bit)
    => fuse prog 0 15 0x1234
    
  4. Disable Vpp after programming:

    # Turn off Vpp
    => i2c mw 0x22 0x04 0x00
    
  5. Power cycle the device for changes to take effect

Note

  • Bank and word numbers are device-specific

  • Changes to fuses only become visible after a full power cycle

For programming many fuses and keys in one-shot using a binary blob (fuse writebuff), see the Key Writer Lite document.

3.1.2.7.4. Programming boot-mode fuses

Caution

Programming boot-mode fuses is an irreversible operation. Once an OTP fuse is programmed, it cannot be undone. boot-mode fuses lock on first write, so multi-pass programming is not possible

The boot-mode pin fuses allow configuration of the boot sequence without requiring physical pin strapping. The following provides an example of programming boot-mode pin related fuses. AM62LX supports reduced boot-mode configuration by a combination of fuse and boot-mode pins. When set to fuse boot-mode, the boot-mode pins decode the corresponding fuse into a 16-bit boot-mode value. Refer to AM62LX Technical Reference Manual (TRM) for more details. Enable Vpp before programming these fuses, similar to other fuses.

3.1.2.7.4.1. Programming example

The document here explains how to derive the fuse boot-mode value.

  1. Find the raw boot-mode value. For example, to program fuse slot-1 with GPMC NAND as primary and USB-DFU as backup, full pin count strapping would be 0x45B (25MHz Oscillator) based on Section 5.2.3 of the TRM.

  2. Convert this to 25-bit value based on table here So, 0x45B translates to 0x18045B.

  3. XOR the value with SoC and slot specific bit-mask value here. For slot 1, 0x18045B xor 0x012007B gives 0xA0420.

  4. Reversing the bits in the 25-bit value gives 0x840A0.

    => fuse prog 0xFF 1 0x840A0
    

Note

  • Bank 0xFF stores boot-mode pin fuses.

  • Each word in the bank can store one pin configuration.

  • The number of available words depends on the device.

  • Refer to your device’s TRM for the valid pin numbers.

  • New boot-mode settings take affect post a power-cycle

Caution

Currently there is no support to read-back the boot-mode related fuses.