ARM: omap-common: Add standard access for board description EEPROM
Several TI EVMs have EEPROM that can contain board description information
such as revision, DDR definition, serial number, etc. In just about all
cases, these EEPROM are on the I2C bus and provides us the opportunity
to centralize the generic operations involved.
The on-board EEPROM on the BeagleBone Black, BeagleBone, AM335x EVM,
AM43x GP EVM, AM57xx-evm, BeagleBoard-X15 share the same format.
However, DRA-7* EVMs, OMAP4SDP use a modified format.
We hence introduce logic which is generic between these platforms
without enforcing any specific format. This allows the boards to use the
relevant format for operations that they might choose.
This module will compile for all TI SoC based boards when
CONFIG_TI_I2C_BOARD_DETECT is enabled to have optimal build times for
platforms that require this support.
It is important to note that this logic is fundamental to the board
configuration process such as DDR configuration which is needed in
SPL, hence cannot be part of the standard u-boot driver model (which
is available later in the process). Hence, to aid efficiency, the
eeprom contents are copied over to SRAM scratchpad memory area at the
first invocation to retrieve data.
To prevent churn with cases such as DRA7, where eeprom format maybe
incompatible, we introduce a generic common format in eeprom which
is made available over accessor functions for usage.
Special handling for BBG1 EEPROM had to be introduced thanks to the
weird eeprom rev contents used.
The follow on patches introduce the use of this library for AM335x,
AM437x, and AM57xx.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-02-24 18:30:54 +00:00
|
|
|
config TI_I2C_BOARD_DETECT
|
|
|
|
bool "Support for Board detection for TI platforms"
|
|
|
|
help
|
|
|
|
Support for detection board information on Texas Instrument's
|
|
|
|
Evaluation Boards which have I2C based EEPROM detection
|
2017-03-13 13:04:31 +00:00
|
|
|
|
|
|
|
config EEPROM_BUS_ADDRESS
|
|
|
|
int "Board EEPROM's I2C bus address"
|
|
|
|
range 0 8
|
|
|
|
default 0
|
|
|
|
|
|
|
|
config EEPROM_CHIP_ADDRESS
|
|
|
|
hex "Board EEPROM's I2C chip address"
|
|
|
|
range 0 0xff
|
|
|
|
default 0x50
|
2017-04-27 10:13:58 +00:00
|
|
|
|
|
|
|
config TI_COMMON_CMD_OPTIONS
|
|
|
|
bool "Enable cmd options on TI platforms"
|
|
|
|
imply CMD_ASKENV
|
|
|
|
imply CMD_BOOTZ
|
2017-05-19 16:26:58 +00:00
|
|
|
imply CRC32_VERIFY if ARCH_KEYSTONE
|
2017-04-27 10:13:58 +00:00
|
|
|
imply CMD_DFU if USB_GADGET_DOWNLOAD
|
|
|
|
imply CMD_DHCP
|
2017-05-17 09:25:10 +00:00
|
|
|
imply CMD_EEPROM
|
2017-04-27 10:13:58 +00:00
|
|
|
imply CMD_EXT2
|
|
|
|
imply CMD_EXT4
|
|
|
|
imply CMD_EXT4_WRITE
|
|
|
|
imply CMD_FAT
|
2017-06-02 12:24:04 +00:00
|
|
|
imply FAT_WRITE if CMD_FAT
|
2017-04-27 10:13:58 +00:00
|
|
|
imply CMD_FS_GENERIC
|
|
|
|
imply CMD_GPIO
|
|
|
|
imply CMD_GPT
|
|
|
|
imply CMD_I2C
|
|
|
|
imply CMD_MII
|
|
|
|
imply CMD_MMC
|
|
|
|
imply CMD_PART
|
|
|
|
imply CMD_PING
|
|
|
|
imply CMD_PMIC if DM_PMIC
|
|
|
|
imply CMD_REGULATOR if DM_REGULATOR
|
|
|
|
imply CMD_SF if SPI_FLASH
|
|
|
|
imply CMD_SPI
|
|
|
|
imply CMD_TIME
|
|
|
|
imply CMD_USB if USB
|