Skip to contentSkip to conversation

board: ti: am64x: Parse MAC address from board EEPROM

PATCH New Vignesh Raghavendra 2 participants 2 messages May 10, 2021 – May 12, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: ti: am64x: Parse MAC address from board EEPROM

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.

---
 board/ti/am64x/evm.c | 9 +++++++++
 1 file changed, 9 insertions(+)
board/ti/am64x/evm.c +9 -0
index a1ffcb929c..35cd9e027c 100644
@@ -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;
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/1 board: ti: am64x: Parse MAC address from board EEPROM

Quoted 4 lines · Vignesh Raghavendra

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.

Applied to u-boot-ti/for-rc

Thanks and regards,
Lokesh