diff options
author | Sinthu Raja <sinthu.raja@ti.com> | 2022-02-09 15:06:49 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-02-16 14:19:30 -0500 |
commit | a46c5289b72f549ca037be155a48c2bfde970f58 (patch) | |
tree | 68fa49cf8e523222d2d7d4842de490147498250c | |
parent | d948fc4e664a0e40870d7c4e2fc7e41179d99253 (diff) | |
download | u-boot-a46c5289b72f549ca037be155a48c2bfde970f58.zip u-boot-a46c5289b72f549ca037be155a48c2bfde970f58.tar.gz u-boot-a46c5289b72f549ca037be155a48c2bfde970f58.tar.bz2 |
board: ti: j721e: Enable support for reading EEPROM at next alternate address
J721E EVM has EEPROM populated at 0x50. J721E SK has EEPROM populated
at next address 0x51 in order to be compatible with RPi. So start
looking for TI specific EEPROM at 0x50, if not found look for EEPROM at
0x51.
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
-rw-r--r-- | board/ti/j721e/evm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index e15ab76..301afe1 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -152,9 +152,15 @@ int do_board_detect(void) ret = ti_i2c_eeprom_am6_get_base(CONFIG_EEPROM_BUS_ADDRESS, CONFIG_EEPROM_CHIP_ADDRESS); - if (ret) - pr_err("Reading on-board EEPROM at 0x%02x failed %d\n", - CONFIG_EEPROM_CHIP_ADDRESS, ret); + if (ret) { + printf("EEPROM not available at 0x%02x, trying to read at 0x%02x\n", + CONFIG_EEPROM_CHIP_ADDRESS, CONFIG_EEPROM_CHIP_ADDRESS + 1); + ret = ti_i2c_eeprom_am6_get_base(CONFIG_EEPROM_BUS_ADDRESS, + CONFIG_EEPROM_CHIP_ADDRESS + 1); + if (ret) + pr_err("Reading on-board EEPROM at 0x%02x failed %d\n", + CONFIG_EEPROM_CHIP_ADDRESS + 1, ret); + } return ret; } |