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.

AM6442: MAC ID management

Part Number: AM6442


Tool/software:

Hello TI,

Our requirement is to have 5x ethernet that is eth0, eth1, eth2, eth3 and eth4.

We wanted to understand the MAC address management supported.

From the link (+) [FAQ] Where do the MAC addresses for AM62x and AM64x come from? How do I change the MAC addresses? - Processors forum - Processors - TI E2E support forums we understand, for eth0 MAC, it is efused on the SoC at the MAC_ID register and other MAC are managed via EEPROM.

Queries:

1. How can we efuse on the SoC at the MAC_ID register for new Socs, for eth0 MAC

2. How to program new EEPROM for other eth MAC IDs

3. How many MAC IDs can be managed by EEPROM

4. Is there any other alternate way for MAC ID management other than efusing on SoC and programing EEPROM, 

Thank you,

Prathibha

  • Hi Prathibha, 

    1. How can we efuse on the SoC at the MAC_ID register for new Socs, for eth0 MAC

    There is a method to efuse a MAC address in new SoCs that uses the same method for efusing a non-secure SoC to become secure. I'm not the right subject matter expert on this process so I will need some time to ask a colleague on this.

    2. How to program new EEPROM for other eth MAC IDs

    To my knowledge, there is no specific tool we have for programming a new EEPROM. If a customer decides to use an EEPROM on their custom board, the EEPROM part selection is up to the customer to decide on, this includes the communication method between the EEPROM and SoC. For instance, the EEPROM is connected on our TI EVMs via I2C so on TI EVMs, it can be programmed via I2C commands (whether in U-boot or Linux is Linux OS is used).

    3. How many MAC IDs can be managed by EEPROM

    This will depend on the size of the EEPROM you are selecting and what are other information is using up storage on your EEPROM. From my understanding, since your requirement is 5 Ethernet ports per device, the EEPROM just needs to be large enough to contain at most 5 Ethernet MAC addresses... unless there was some other specific reason for needing more MAC IDs for a given device's EEPROM?

    4. Is there any other alternate way for MAC ID management other than efusing on SoC and programing EEPROM, 

    There are many different creative solutions that could be used to avoid needing to efuse a MAC address to the SoC and programming the EEPROM as long as you have a nonvolatile way of storing the MAC addresses you plan to use somewhere and change the U-boot source code (and possibly Linux source code) if you are using Linux OS. If you are using another OS, there may be similar changes needed in the source code.

    Currently, the U-boot source code from the TI SDK is responsible for determining what the MAC addresses are from EEPROM and the efused SoC and passing those MAC addresses to the Linux kernel. If you plan to use another storage location for the MAC addresses (e.g. in the DTB), you may have to modify the U-boot code to look in the proper location to find the MAC addresses. This includes the efused MAC address; this in theory could mean you just don't do any efusing on the SoC for the eth0 MAC address and simply configure U-boot to read the eth0 MAC address from the location you plan to store all your MAC addresses.

    -Daolin

  • Hello TI,

    Thanks for your response, 

    We are using Linux OS to boot the A53 core, and currently u-boot source code from TI, takes the MAC ID for eth0 from efused MAC, and other ethernet MAC from EEPROM.

    For eth0,

    1. Is there a possibility to store MAC on eMMC and fetch from eMMC in uboot? if yes, please let us know the required modifications in the source code

    2. We have i2c EEPROM, Is there a possibility to store MAC on EEPROM and fetch from EEPROM in uboot? if yes, please let us know the required modifications in the source code 

    Thank you,

    Prathibha

  • Hello Prathibha,

    >>>1. Is there a possibility to store MAC on eMMC and fetch from eMMC in uboot? if yes, please let us know the required modifications in the source code

    To my knowledge, we currently don't have an example of how to store and fetch the MAC address of eth0 from eMMC in the uboot source code as our TI EVMs currently take the MAC ID for eth0 from the efused SoC. I will need some time to look into this and converse with the software development team and most likely will not get back to you until Thursday or Friday this week, please kindly ping this thread if you don't hear a response by then. In the mean time, I would suggest you to take a look into the U-boot source code and see how exactly it currently finds the MAC address and passes the MAC address to the Linux kernel. Perhaps it may help you discover a solution.

    2. We have i2c EEPROM, Is there a possibility to store MAC on EEPROM and fetch from EEPROM in uboot? if yes, please let us know the required modifications in the source code 

    I'm assuming this question is also for the MAC address of eth0. As I mentioned in my previous response, there is a possibility to store the MAC ID for eth0 on EEPROM instead of efusing. However, we currently don't have an example of doing this so at this moment in time we cannot advise you on the required modifications in the code. It may take us some time to look into this as well so as mentioned, you could take a look into the U-boot source code directly to see if you could get started with any changes needed.

    What is the end-equipment you are trying to build with AM6442? 

    -Daolin

  • Update:

    Relevant part of the U-boot code that you can probably try modifying to fetch the MAC address from EEPROM: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/drivers/net/ti/am65-cpsw-nuss.c?h=ti-u-boot-2024.04#n559 

    Relevant part of Linux kernel code that obtains the MAC address: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/net/ethernet/ti/am65-cpsw-nuss.c?h=ti-rt-linux-6.6.y#n2638

    Currently, I could not find where in the U-boot code the other eth interfaces obtain its MAC addresses. Additionally, in the Linux kernel, the line that I pointed out implies that the MAC address can be obtained via the DTS ("of_get_mac_address"), if no DTS configuration for MAC address is made, then it will fetch the MAC address from the efuse, else it randomly generates a MAC address.

    The developer was not available to discuss this week there may be updates next week.

    -Daolin