]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: ti: am64x: Parse MAC address from board EEPROM
authorVignesh Raghavendra <vigneshr@ti.com>
Mon, 10 May 2021 18:14:22 +0000 (23:44 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Wed, 12 May 2021 11:06:38 +0000 (16:36 +0530)
Parse MAC addresses from EEPROM and set them in the env. This is needed
to get MAC address for additional ethernet ports on the EVM.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
board/ti/am64x/evm.c

index a1ffcb929ceb1e3a0e3b30447b377afb8deaefcc..35cd9e027c041e5389f545b8963e1d15c4545f00 100644 (file)
@@ -136,8 +136,17 @@ static void setup_serial(void)
 int board_late_init(void)
 {
        if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
+               struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
+
                setup_board_eeprom_env();
                setup_serial();
+               /*
+                * The first MAC address for ethernet a.k.a. ethernet0 comes from
+                * efuse populated via the am654 gigabit eth switch subsystem driver.
+                * All the other ones are populated via EEPROM, hence continue with
+                * an index of 1.
+                */
+               board_ti_am6_set_ethaddr(1, ep->mac_addr_cnt);
        }
 
        return 0;