Changes

Jump to: navigation, search

DESK-MX8M-L/Deployment/MAC Address programming

1,217 bytes added, 09:18, 21 June 2022
no edit summary
In other cases, an external permanent storage device can be used for storing permanent settings like the MAC address: for the i.MX SoC product family, DAVE proposes to use the ''General Purposes eFuses'' (OTP blocks) on SoC itself for storing permanently the MAC address(es).
=== MAC address programming on i.MX8M family ===
==== MAC address configuration in u-boot====
u-boot=>
==== eFuse bank registers ====i.MX8M family uses the Bank9 Word0, Word1 and Word2 (if the SoC has two ethernet interfaces) for storing the MAC addresses. The MAC values should be properly divided into the three registers for correct programming. The related HW_OCOTP_MAC_ADDR0, HW_OCOTP_MAC_ADDR1, HW_OCOTP_MAC_ADDR2 OTP registers will be used for the purposes illustrated in this AN. ==== eth0 eFuse programming ====U-Boot uses the <code>fuse prog</code> command for writing the MAC address into the eFuse. The MAC address should be divided in high 16 bit and low 32 bits, for example MAC address <code>AB:CD:12:34:56:78</code>for eth0 is then divided into :
<pre>
u-boot=> saveenv
</pre>
 
==== eth1 eFuse programming ====
For the second ethernet interface, the above procedure should be repeated in a similar way, except of ''the correct ''eFuse register should be used'':
 
The MAC address should be divided in ''low'' 16 bit and ''high'' 32 bits, for example MAC address <code>00:50:c2:1e:af:ce</code> is stored in the i.MX8M SOM using:
 
<pre>
fuse prog -y 9 1 afce0000
fuse prog -y 9 2 0050c21e
</pre>
 
{{ImportantMessage|text='''Be Careful!!''' Register <code>bank:9 word:1</code> is shared between first and second interface, so the lowest 16-bits in the register should be set to <code>0000</code> avoiding to change the ''eth0'' MAC settings}}
 
The <code>eth1addr</code> U-Boot variable is then used for the second ethernet interface MAC address management.
=== Linux kernel MAC address ===
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth1 Link encap:Ethernet HWaddr 00:50:c2:1e:af:ccce
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
8,160
edits

Navigation menu