Request for Guidance on MAC Address Fusing in Kernel for i.MX8MP

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

Request for Guidance on MAC Address Fusing in Kernel for i.MX8MP

Jump to solution
1,180 Views
Dheeraj_8
Contributor I

Dear NXP Support Team,

I am currently working with an i.MX8MP board and would like to fuse MAC addresses directly in the kernel, similar to the process used in U-Boot.

In U-Boot, the following commands are used to fuse the MAC addresses:
fuse prog 9 0 33445567
fuse prog 9 1 55661122
fuse prog 9 2 11223344

These commands set the MAC addresses for Ethernet interfaces eth0 and eth1. I would like to achieve the same functionality in the Linux kernel, specifically in the context of the i.MX8MP.

Could you please provide guidance on how to fuse MAC addresses in the kernel using the One-Time Programmable (OCOTP) memory, and how to program the specific fuses for eth0 and eth1 in a similar manner as the U-Boot commands listed above?

I would appreciate any kernel-specific commands or examples to help me achieve this.

Thank you for your assistance.

Labels (1)
0 Kudos
Reply
1 Solution
1,098 Views
joanxie
NXP TechSupport
NXP TechSupport

already give the example in the user guide, you can read and write the mac address according to this address and offset,

0x640 (offset 0x90): MAC1[2:5]

0x650 (offset 0x94): MAC2[4:5] + MAC1[0:1]

0x660 (offset 0x98): MAC2[0:3]

this is from my board,

joanxie_0-1736601044964.png

joanxie_1-1736601061587.png

 

View solution in original post

0 Kudos
Reply
4 Replies
1,152 Views
joanxie
NXP TechSupport
NXP TechSupport

one can refer to the link as below:

https://www.digi.com/resources/documentation/digidocs/embedded/dey/3.0/cc6/bsp_r_otp_cc6cc6qp

and also can refer to the chapter 13.4 Examples to read/write the raw NVMEM file in user space of linux user guide

0 Kudos
Reply
1,138 Views
Dheeraj_8
Contributor I

Hello,

Thank you for the reference you have shared regarding the process. It was helpful in understanding the basics. However, I still have some doubts that I would like to clarify.
Specifically, in the provided Python script, the following line is unclear:

f.write(pack('<L', 0x30445011))

Since this involves fusing data into OTP memor a process that is irreversibl I want to proceed cautiously. Could you please clarify the following:

  • What exactly is being written in the script?
  • If the MAC address is split, how should we correctly write the full 48-bit MAC addresses for eth0 and eth1 to their respective locations?
  • Are there any specific examples or guidelines for handling this properly?

    Waiting for your reply,

    Regards
0 Kudos
Reply
1,099 Views
joanxie
NXP TechSupport
NXP TechSupport

already give the example in the user guide, you can read and write the mac address according to this address and offset,

0x640 (offset 0x90): MAC1[2:5]

0x650 (offset 0x94): MAC2[4:5] + MAC1[0:1]

0x660 (offset 0x98): MAC2[0:3]

this is from my board,

joanxie_0-1736601044964.png

joanxie_1-1736601061587.png

 

0 Kudos
Reply
1,076 Views
Dheeraj_8
Contributor I
Thank You For your guidance

Regards
0 Kudos
Reply