This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi TI Expert,
I am developing on an AM62x SKEVM and an AM64x EVM and I'm planning on using Ethernet. Where do the MAC addresses associated with the Ethernet interfaces on these EVMs originate from? How do I change the MAC addresses?
Where do the MAC addresses associated with the Ethernet interfaces for AM62x SKEVM and AM64x EVM come from?
AM62x SKEVM has 2 Ethernet interfaces by default: eth0 and eth1.
AM64x EVM has 3 Ethernet interfaces by default: eth0, eth1, and eth2.
The eth0 MAC address for both EVMs are efused on the SoC at the MAC_ID register. The MAC_ID address can be found in the TRM for AM62x and AM64x devices respectively.
One way to read the lower 4 bytes of the MAC address for eth0 from the MAC_ID address is to use the devmem2 command in Linux. See below as an example of what you might run to read the lower 4 bytes of the eth0 MAC address.
$ dev2mem 0x43000200 0x491AD8AA #AM64x EVM 0x490F61EB #AM62x SKEVM
AM62x SKEVM:
AM64x EVM:
The MAC addresses for the other interfaces, eth1 for AM62x SKEVMs, eth1 and eth2 for AM64x EVMs, are stored in the EEPROM.
The EEPROM can be accessed via i2c tools in both U-boot and Linux.
The full list of MAC addresses belonging to TI can be found here: https://aruljohn.com/mac/vendor/texas%20instruments
How to Access EEPROM from U-boot Environment to read MAC addresses?
In U-boot, a list of MAC addresses stored in the EEPROM can be read using the following commands. 192 bytes (or 0xC0) of storage in the EEPROM is allocated for MAC address storage in the EVMs.
=> i2c bus => i2c dev 0 => i2c probe => i2c md 0x50 0x42.2 0xC0 #for AM64x EVMs => i2c md 0x51 0x42.2 0xC0 #for AM62x SKEVMs
As an example on the AM64x EVM, checking with the MAC address listed in ifconfig, the first two MAC addresses in the list matches with eth1 and eth2 for AM64x EVM.
AM64x EVM:
How to Change the default MAC Addresses?
NOTE: While https://aruljohn.com/mac/vendor/texas%20instruments lists the range of MAC addresses reserved for TI products, for custom boards designed by customers, production MAC addresses end system manufacturer needs to use their own since 1. Looking up the MAC address will show it belongs to Texas Instruments rather than the customer's company and 2. Those MAC addresses might already be used for existing TI products.
One method to change the default MAC addresses for Ethernet interfaces that are not eth0 is to overwrite the existing MAC address in the EEPROM.
The general process to do this in the U-boot environment for eth1 on the AM62x SKEVM as an example is as follows.
1. Change each byte of the default MAC address with i2c write in U-boot. The below is an example where only the last byte of the default MAC address is replaced with the last byte of the new MAC address is given below.
=> i2c dev 0 => i2c md 0x51 0x42.2 0x6 #read the default MAC address => i2c mw 0x51 0x47 0x43 #overwrite the last byte of the default MAC address
2. Complete a FULL reboot of the board. Just booting into Linux from the U-boot environment right after you overwrote the MAC address will not be reflected in ifconfig.
3. Verify that the MAC address has changed.