diff mbox series

[U-Boot,1/4] drivers/misc: add options to read MAC address from EEPROM

Message ID 20180709050006.30056-2-luaraneda@gmail.com
State Rejected
Delegated to: Michal Simek
Headers show
Series arm: zynq: migrate to DM I2C driver | expand

Commit Message

Luis Araneda July 9, 2018, 5 a.m. UTC
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 <luaraneda@gmail.com>
---
 drivers/misc/Kconfig | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
diff mbox series

Patch

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