About otp and efuse

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

About otp and efuse

2,614 Views
jameshe1
Contributor II

I enable the fsl_otp feature in the kernel. and i can find /sys/fsl_otp/

I can cat the items under dir /sys/fsl_otp/. such as 

cat /sys/fsl_otp/HW_OCOTP_LOCK

cat /sys/fsl_otp/HW_OCOTP_CFG0

cat /sys/fsl_otp/HW_OCOTP_CFG1

i want to use  "echo 0x12345678 > /sys/fsl_otp/HW_OCOTP_CFG4"    (fusemap: 0x450, boot config) to burn the efuse register. is it ok? 

is it one register can be programed once?  if then, i should program it bit by bit because i don't konw clearly what's the right value for some bits now. 

How can i program the ocotp register by bit, not 4-bytes?  i means i should mask some bit while program.

thanks.

Labels (2)
4 Replies

1,420 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Your understanding regarding fsl_otp feature in the kernel is correct. 

The fuses are once programmable. It is needed first to read the fuse and
set only the burning bits : this may be considered as manual bitwise operation. 

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,420 Views
jameshe1
Contributor II

"It is needed first to read the fuse and set only the burning bits"

Do you mean if i write the bit 0, i can write many times. only 0b1 is really programed?

the following case:

I read back cat /sys/fsl_otp/HW_OCOTP_CFG4

0x0

My board is almost same as imx6qp-sabreauto board but the boot config. i need use ECSPI1 and the SS2 pin to boot from SPI NOR flash? 

i want to

   set HW_OCOTP_CFG4[7:0] to 0x30    change only bit[5:4]

   set HW_OCOTP_CFG4[15:8] to 0x00   don't change

   set HW_OCOTP_CFG4[23:16] to 0x00   don't change

   set HW_OCOTP_CFG4[15:8] to 0x00   don't change

pastedImage_1.png

0 Kudos

1,419 Views
Yuri
NXP Employee
NXP Employee

Hello,

1.

 > ... if i write the bit 0, i can write many times. only 0b1 is really programed?

 

  Yes.

2.

  Correct, it is needed to write  0x28000030 to  HW_OCOTP_CFG4.

Regards,

Yuri.

0 Kudos

1,419 Views
jameshe1
Contributor II

Continued...

    set HW_OCOTP_CFG4[31:24] to 0x28   I use ECSPI1_SS2 and use S25FL256(24-bit address).

then i write 0x28000030 to  HW_OCOTP_CFG4 , is it write? 

in fact i don't understand HW_OCOTP_CFG4[23:16], now i write it as 0, can i re-program as 1 at some time i know the right value? Could you please give me the right values for the efuse registers can be used on imx6qp-sabreauto board?  i want to modify it for my board. thanks.

0 Kudos