1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2016 Rockchip Electronics Co., Ltd
9 #include <environment.h>
10 #include <i2c_eeprom.h>
13 static int get_ethaddr_from_eeprom(u8 *addr)
18 ret = uclass_first_device_err(UCLASS_I2C_EEPROM, &dev);
22 return i2c_eeprom_read(dev, 0, addr, 6);
25 int rk3288_board_late_init(void)
29 if (get_ethaddr_from_eeprom(ethaddr))
32 if (is_valid_ethaddr(ethaddr))
33 eth_env_set_enetaddr("ethaddr", ethaddr);