summaryrefslogtreecommitdiff
path: root/board/ti/j721s2/evm.c
diff options
context:
space:
mode:
authorSinthu Raja <sinthu.raja@ti.com>2023-01-10 21:17:51 +0530
committerTom Rini <trini@konsulko.com>2023-01-27 12:51:26 -0500
commitad45a17578a6fa4f8cbd77dec9cea0c55fef7a89 (patch)
tree9977d2c144a9e7391eb26e43c3931f8d1d70cb27 /board/ti/j721s2/evm.c
parent24bbe09a91a1594a58cb059696b4e4e591945506 (diff)
board: ti: j721s2: Enable support for reading EEPROM at next alternate address
J721S2 EVM has EEPROM populated at 0x50. AM68 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> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/ti/j721s2/evm.c')
-rw-r--r--board/ti/j721s2/evm.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c
index 063fc8c688..db69aa1507 100644
--- a/board/ti/j721s2/evm.c
+++ b/board/ti/j721s2/evm.c
@@ -113,9 +113,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;
}