IMX8MP Ethernet Interface not using MAC Fuses

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

IMX8MP Ethernet Interface not using MAC Fuses

437 Views
Matthew6
Contributor I

Hello,

We are using an IMX8MP in a product that is ready to go into production and I am trying to work out fusing the MAC address.  I am accomplishing this with a UUU script and it appears that the non-volatile memory was written to correctly, but the Ethernet Interface is not using the fuse values and continues to use random values.  Interestingly, I don't see a debug message anymore about a random MAC address being generated.

I would like to burn the fuses for MAC0 and MAC1 with the following.  Note, that we are only using the first Ethernet Interface.

MAC0 70:B3:D5:03:41:73
MAC1 01:02:03:04:05:06

My UUU file looks like the following.

uuu.s3pro_program_mac
# UUU Script to blow MAC0 and MAC1 fuses
# Usages: uuu -b uuu.s3pro_program_mac

# load U-BOOT into RAM

SDPS: boot -f SW00012_v1_imx-boot-imx8mp-s3pro-sd.bin-flash_evk

# Burn fuses
# MAC0 70:B3:D5:03:41:73
# MAC1 01:02:03:04:05:06

FB: ucmd fuse prog -y 9 0 0xD5034173
FB: ucmd fuse prog -y 9 1 0x050670B3
FB: ucmd fuse prog -y 9 2 0x01020304
FB: done

UBOOT fuse sense confirms values were blown correctly.

UBOOT
u-boot=> fuse sense 9 0
Sensing bank 9:

Word 0x00000000: d5034173
u-boot=> fuse sense 9 1
Sensing bank 9:

Word 0x00000001: 050670b3
u-boot=> fuse sense 9 2
Sensing bank 9:

Word 0x00000002: 01020304

The hexdump from nvmem also seems to look good.  Address 0000090 has the MAC0 and MAC1 values.

/sys/devices/platform/soc@0/30000000.bus/30350000.efuse/imx-ocotp0/nvmem 0000000 a9eb ffaf aaff 0002 3707 30bf 8800 0715
0000010 4591 2002 0000 0100 007f 0000 0000 8800
0000020 0000 0000 0000 0000 0000 0000 0000 0000
*
0000040 bada bada bada bada bada bada bada bada
*
0000060 0000 0000 0000 0000 0000 0000 0000 0000
*
0000080 0000 0000 0000 0000 0000 0000 0004 0000
0000090 4173 d503 70b3 0506 0304 0102 0000 0000
00000a0 bada bada bada bada bada bada bada bada
*
00000c0 f672 b8ff 506f c061 f92b 55df 48d5 9552
00000d0 b347 d7ff 1239 8d8e f73a 19a6 3ef5 a09f
00000e0 0000 0000 0000 0000 0000 0000 0000 0000
00000f0 bada bada 0000 0000 0000 0000 bada bada
0000100 bada bada bada bada bada bada bada bada
*
0000250 bada bada bada bada bada bada 121b 0002
0000260 1100 0000 0000 a800 6919 f253 5666 256b
0000270 4672 00b7 0000 0000 0000 0000 0000 0000
0000280 aa10 3d4b 6f04 4696 0000 0000 0000 0000
0000290 0000 0000 0000 0000 0000 0000 0000 0000
*
00002d0 bada bada bada bada bada bada bada bada
*
00002f0 0801 5500 73a8 0001 201f d503 0000 0000
0000300 0000 0000 0000 0000 0000 0000 0000 0000
*
00005f0 0000 0000 0000 0000 0001 0001 5bb6 8002
0000600

When using command ip a the MAC address is random after each boot.

root@imx8mp-s3pro:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 32:8e:6c:62:ab:b2 brd ff:ff:ff:ff:ff:ff

0 Kudos
Reply
8 Replies

197 Views
Matthew6
Contributor I

Hi Joseph,  do you have any further feedback on my UUU script modifications based on your last comments?

0 Kudos
Reply

341 Views
Matthew6
Contributor I

u-boot=> fuse sense 0 0
Sensing bank 0:

Word 0x00000000: ffafa9eb

MAC_ADDR would therefore be 10'b

10 - OP (Override Protect, the controlled field can be read, sensed or burned, but can't be overridden in
the corresponded OCOTP shadow register)

0 Kudos
Reply

399 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

What is the MAC lock status? I.e. MAC_ADDR_LOCK.

JosephAtNXP_0-1718397461141.png

Regards

0 Kudos
Reply

312 Views
Matthew6
Contributor I

Hello Joseph, I think we are close to the root cause.  Did you see my response to the register values that you requested.  I need just a bit more clarification on what these mean.  Thank you.

0 Kudos
Reply

362 Views
Matthew6
Contributor I

Hello Joseph, thank you for the feeback and support.  I didn't try writing to the 400h or 410h registers so they should have the default value.  After reviewing them in the reference manual it looks like 400h[15:14] can control the write protect to the MAC, but I'm really not understanding how to use it.

Do I need to set 400h[15:14], MAC_ADDR to 00'b before writing the MAC values to address 640h?

Maybe something like this in my UUU script?

# MAC_ADDR[15:14] = 00'b ;; unlock for burning?

FB: ucmd fuse prog -y 0 0 0x00000000

FB: ucmd fuse prog -y 9 0 0xD5034173
FB: ucmd fuse prog -y 9 1 0x050670B3
FB: ucmd fuse prog -y 9 2 0x01020304
FB: done

0 Kudos
Reply

283 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

It's probably due to the fact that upon boot the values are lost,

https://community.nxp.com/t5/i-MX-Processors/What-is-the-different-for-eFuse-MAC-ADDR-LOCK-OP-WP/m-p...

Try with FB: ucmd fuse prog -y 0 0 {masked 15[0] 14[0]}

Regards

268 Views
Matthew6
Contributor I

Hi Joseph,

Thank you for continuing to investigate.

With the uuu script change the board is still randomizing the MAC.

Also strange is that U-BOOT fuse sense still shows the same value for MAC_ADDR[15:14] with the value as 10'b. ffafa9eb is what I previously had.

u-boot=> fuse sense 0 0
Sensing bank 0:

Word 0x00000000: ffafa9eb

Did I do this UUU script wrong?

# UUU Script to blow MAC0 and MAC1 fuses
# Usage: uuu -b uuu.s3pro_program_mac

# load U-BOOT into RAM

SDPS: boot -f SW00012_v1_imx-boot-imx8mp-s3pro-sd.bin-flash_evk

# Burn fuses
# MAC0 70:B3:D5:03:41:73
# MAC1 01:02:03:04:05:06

# Write Protect
FB: ucmd fuse prog -y 0 0 {masked 15[0] 14[0]}

FB: ucmd fuse prog -y 9 0 0xD5034173
FB: ucmd fuse prog -y 9 1 0x050670B3
FB: ucmd fuse prog -y 9 2 0x01020304
FB: done

IP A command output

root@imx8mp-s3pro:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 0e:0f:42:66:f3:fb brd ff:ff:ff:ff:ff:ff

0 Kudos
Reply

186 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

My suggestion was not very clear, from your results:

Word 0x00000000: ffafa9eb

I meant to mask the result with 15[0] 14[0], i.e.:

FB: ucmd fuse prog -y 0 0 ffaf29eb

Regards,

 

0 Kudos
Reply