From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luis Araneda Date: Mon, 9 Jul 2018 01:00:03 -0400 Subject: [U-Boot] [PATCH 1/4] drivers/misc: add options to read MAC address from EEPROM In-Reply-To: <20180709050006.30056-1-luaraneda@gmail.com> References: <20180709050006.30056-1-luaraneda@gmail.com> Message-ID: <20180709050006.30056-2-luaraneda@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add generic kconfig options to read MAC address(es) from an EEPROM connected to an I2C bus The SYS_I2C_EEPROM_* options can't be used because they depend on I2C_EEPROM, which requires a DM driver, and not all boards have DM I2C drivers yet Signed-off-by: Luis Araneda --- drivers/misc/Kconfig | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 17b3a805a2..ff694871bf 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -272,6 +272,32 @@ config SYS_I2C_EEPROM_ADDR_OVERFLOW endif +config MAC_ADDR_IN_I2C_EEPROM + bool "MAC address in I2C EEPROM" + help + Read MAC address(es) from an EEPROM + connected to an I2C bus + +if MAC_ADDR_IN_I2C_EEPROM + +config MAC_ADDR_I2C_EEPROM_BUS + int "I2C bus connected to the EEPROM device" + default 0 + +config MAC_ADDR_I2C_EEPROM_CHIP_ADDR + hex "Chip address of the EEPROM device" + default 0 + +config MAC_ADDR_I2C_EEPROM_DATA_ADDR_LEN + int "Length in bytes of EEPROM data addresses" + default 1 + +config MAC_ADDR_I2C_EEPROM_DATA_ADDR_START + hex "Start address of MAC data in EEPROM" + default 0 + +endif + config GDSYS_RXAUI_CTRL bool "Enable gdsys RXAUI control driver" depends on MISC -- 2.18.0