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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
1,185件の閲覧回数
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.

ラベル(1)
0 件の賞賛
返信
1 解決策
1,103件の閲覧回数
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 件の賞賛
返信
4 返答(返信)
1,157件の閲覧回数
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 件の賞賛
返信
1,143件の閲覧回数
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 件の賞賛
返信
1,104件の閲覧回数
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 件の賞賛
返信
1,081件の閲覧回数
Dheeraj_8
Contributor I
Thank You For your guidance

Regards
0 件の賞賛
返信