![Phytec L-1017e.A3 i.MX 8M Plus Manual Download Page 78](http://html1.mh-extra.com/html/phytec/l-1017e-a3-i-mx-8m-plus/l-1017e-a3-i-mx-8m-plus_manual_1554092078.webp)
L-1017e.A3 i.MX 8M Plus BSP Manual
Reference Manual). The following list is an abstract from the i.MX 8M Plus Reference Manual and includes some
useful registers in the OCOTP_CTRL (at base address 0x30350000):
Name
Ba
nk
Word
Memory
offset to
0x303500
00
Description
OCOTP_MAC_A
DDR0
9
0
0x640
contains lower 32 bits of ENET0 MAC address
OCOTP_MAC_A
DDR1
9
1
0x650
contains upper 16 bits of ENET0 MAC address and the lower 16
bits of ENET1 MAC address
OCOTP_MAC_A
DDR2
9
2
0x660
contains upper 32 bits of ENET1 MAC address
A complete list and a detailed mapping between the fuses in the OCOTP_CTRL and the boot/mac/... configuration
are available in the section "Fuse Map" of the i.MX 8M Plus Security Reference Manual.
Reading Fuse Values in uBoot
You can read the content of a fuse using memory-mapped shadow registers. To calculate the memory address, use
the fuse Bank and Word in the following formula:
OCOTP_MAC_ADDR:
u-boot=> fuse read
9
0
Reading Fuse Values in Linux
To access the content of the fuses in Linux NXP provides the
NVMEM_IMX_OCOTP
module. All fuse content of the
memory-mapped shadow registers is accessible via
sysfs
:
target$ hexdump /sys/devices/platform/soc
@0
/
30000000
.bus/
30350000
.efuse/imx-ocotp0/
nvmem
Reading the registers using
/dev/mem
will cause the system to hang unless the
ocotp_root_clk
is enabled. To enable
this clock permanent, add to the device tree:
&clk {
init-on-array = <IMX8MP_CLK_OCOTP_ROOT>;
};