eFuses for MAC Addresses and Serial Numbers

Hi @Terry,

I was looking into how to program MAC addresses and serial numbers so that they can survive complete firmware upgrades.

I’ve found this thread:

What was the rationale for this commit?

MAC addresses usually use 6 bytes, and UIDs 128 bits, so why did you change that to assign 12 bytes to all the keys?

Do you know why mac, mac_bt, mac_wifi, and usid are in both efuse and unifykey? In unifykey, they are in the normal key-device, and not in efuse. Does it mean that these efuses are not used?

Where are the normal and secure key-devices physically located? Are they OTP memories like the efuses, or rewritable? Does a firmware ugrade erase or overwrite these memories?

You can refer to the efuse usage on uboot command.

efuse - efuse commands

efuse [read/write offset size [data]]
  [read/wirte]  - read or write 'size' data from
                  'offset' from efuse user data ;
  [offset]      - the offset byte from the beginning
                  of efuse user data zone;
  [size]        - data size
  [data]        - the optional argument for 'write',
                  data is treated as characters
  examples: efuse write 0xc 0xd abcdABCD1234
[amlogic_set addr]

I write the mac address 98:3E:2B:23:34:56 into OTP with efuse command. The data size is 12.

kvim2#efuse write 0x0 0xc 983E2B233456

Yes, the efuse is for old amlogic serial CPU. But we can use it to save mac address.

The OTP(CPU Ram) can only be written once. You should write the key into emmc when you want to erase or overwrite these memories.