Read Unique ID on i.MX7

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Read Unique ID on i.MX7

跳至解决方案
2,334 次查看
adriansapio
Contributor II

Has anyone been able to read the 64-bit Unique ID of the i.MX7 from Linux?

I see the fusemap documentation in the i.MX7 Reference Manual. It's not clear to me what to do with that or how to access those registers.

In my linux distro:

1) There is no serial number in /cat/cpuinfo:

# cat /proc/cpuinfo | grep Serial
Serial : 0000000000000000

2) I see some HW_OCOTP files in /sys/fsl_otp, but its not clear what to do with them. 

Can anyone provide guidance or info on this? 

If I could read the Unique ID in uboot, that would be a good start also, but I just generally don't see any documentation anywhere at all as to how to do this. 

Thanks!

标签 (4)
0 项奖励
1 解答
1,614 次查看
marius_grigoras
NXP Employee
NXP Employee

Hi,

Accordingly with the fuse map for iMX7D, the UNIQUE_ID (64bits) is covered by bank 0, word 1 and word 2. 

Accordingly with the SoC Reference Manual, the OCOTPs for these are OCOTP_TESTER0 and OCOTP_TESTER1.

Using echo and cat commands can write/read to these.

Regards,

Marius

在原帖中查看解决方案

2 回复数
1,615 次查看
marius_grigoras
NXP Employee
NXP Employee

Hi,

Accordingly with the fuse map for iMX7D, the UNIQUE_ID (64bits) is covered by bank 0, word 1 and word 2. 

Accordingly with the SoC Reference Manual, the OCOTPs for these are OCOTP_TESTER0 and OCOTP_TESTER1.

Using echo and cat commands can write/read to these.

Regards,

Marius

1,614 次查看
adriansapio
Contributor II

Hello Marius,

Thanks for your reply. I have tested this and it does appear correct. On three separate processors:

Processor #1:

cat /sys/fsl_otp/HW_OCOTP_TESTER0
0xac98b953
cat /sys/fsl_otp/HW_OCOTP_TESTER1
0x67
Processor #2:
cat /sys/fsl_otp/HW_OCOTP_TESTER0
0xc98b953
cat /sys/fsl_otp/HW_OCOTP_TESTER1
0x2d7
Processor #3:
cat /sys/fsl_otp/HW_OCOTP_TESTER0
0x4c98b953
cat /sys/fsl_otp/HW_OCOTP_TESTER1
0x97
So, I am interpreting these cat responses to imply the following:
Processor #1: 64-bit Unique ID = 0x00000067AC98B953
Processor #2: 64-bit Unique ID = 0x000002D70C98B953
Processor #3: 64-bit Unique ID = 0x000000974C98B953
Let me know if any of this looks incorrect or any assumptions are off. 
Thanks