Burn exact MAC address to eFuse in imx6

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

Burn exact MAC address to eFuse in imx6

5,827 Views
davidyu
Contributor I

I know one can use "echo" command to write MAC address to HW_OCOTP_MAC0 via sysfs.

But another question is :   MAC address is 48-bit ,however,  each fuse block is 32 bit.

All examples that we found is "echo 0x10234567 > /sys/fsl_otp/HW_OCOTP_MAC0" , cannot found 48-bit version.

Is separate MAC address to two part, first part (i.e. first 16bit) burn to HW_OCOTP_MAC0 and rest part burn to HW_OCOTP_MAC1 ?

Thanks for kindly help!

Tags (3)
0 Kudos
Reply
1 Reply

1,978 Views
Yuri
NXP Employee
NXP Employee

For the 48bits on the MAC ADDR there are two mac registers: HW_OCOTP_MAC0 and HW_OCOTP_MAC1

The order is a follows

    HW_OCOTP_MAC1 = (((mac_data[0] & 0xFF) << 8) | (mac_data[1] & 0xFF));

    HW_OCOTP_MAC0 = (((mac_data[2] & 0xFF) << 24) | ((mac_data[3] & 0xFF) << 16) | ((mac_data[4] & 0xFF) << 8) | (mac_data[5] & 0xFF));


Have a great day,
Yuri

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

0 Kudos
Reply