aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVignesh Raghavendra <vigneshr@ti.com>2021-05-10 23:44:22 +0530
committerLokesh Vutla <lokeshvutla@ti.com>2021-05-12 16:36:38 +0530
commitec658e7ee5459244c9487b4ff23398407b507b0f (patch)
treea3050caeee3877508485be3cd6c6796000710da6
parente0e5374b9160a6e63b9aea23ee47640984106f66 (diff)
downloadu-boot-ec658e7ee5459244c9487b4ff23398407b507b0f.zip
u-boot-ec658e7ee5459244c9487b4ff23398407b507b0f.tar.gz
u-boot-ec658e7ee5459244c9487b4ff23398407b507b0f.tar.bz2
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. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
-rw-r--r--board/ti/am64x/evm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c
index a1ffcb9..35cd9e0 100644
--- a/board/ti/am64x/evm.c
+++ b/board/ti/am64x/evm.c
@@ -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;