u-boot/board/ti
Neha Malcom Francis 9f393a2d7a board: ti: common: board_detect: Fix EEPROM read quirk for 2-byte
EEPROM detection logic in ti_i2c_eeprom_get() involves figuring out
whether addressing is 1-byte or 2-byte. There are currently different
behaviours seen across boards as documented in commit bf6376642f
("board: ti: common: board_detect: Fix EEPROM read quirk"). Adding to
the list, we see that there are 2-byte EEPROMs that read properly
with 1-byte addressing with no offset.

For ti_i2c_eeprom_am6_get where eeprom parse operation is dynamic, the
earlier commit d2ab2a2baf ("board: ti: common: board_detect: Fix
EEPROM read quirk for AM6 style data") tried to resolve this by running
ti_i2c_eeprom_get() twice. However this commit along with its former
commit fails on J7 platforms where EEPROM successfully return back the
header on 1-byte addressing and continues to do so until an offset is
introduced. So the second read incorrectly determines the EEPROM as
1-byte addressing.

A more generic solution is introduced here to solve
this issue: 1-byte read without offset and 1-byte read with offset. If
both passes, it follows 1-byte addressing else we proceed with 2-byte
addressing check.

Tested on J721E, J7200, DRA7xx, AM64x

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Fixes: d2ab2a2baf (board: ti: common: board_detect: Fix EEPROM read quirk for AM6 style data)
Fixes: bf6376642f (board: ti: common: board_detect: Fix EEPROM read quirk)
Tested-By: Matwey V. Kornilov <matwey.kornilov@gmail.com>
2023-01-02 16:06:07 -05:00
..
am43xx arm: mach-omap2: Move common image process functions out of board files 2022-12-12 14:03:11 -05:00
am57xx arm: mach-omap2: Move common image process functions out of board files 2022-12-12 14:03:11 -05:00
am62ax board: ti: introduce the basic files needed to support the am62a 2022-12-09 14:10:28 -05:00
am62x board: ti: am62x: Account for DDR size fixups if ECC is enabled 2022-07-06 14:30:08 -04:00
am64x spl: Move SPL_LDSCRIPT defaults to one place 2022-06-28 17:03:31 -04:00
am65x global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_* 2022-12-05 16:06:07 -05:00
am335x arm: mach-omap2: Move common image process functions out of board files 2022-12-12 14:03:11 -05:00
beagle ARM: omap3_beagle: Power on MMC when setting up PMIC 2022-03-10 13:49:57 -05:00
common board: ti: common: board_detect: Fix EEPROM read quirk for 2-byte 2023-01-02 16:06:07 -05:00
dra7xx global: Migrate CONFIG_MAX_MEM_MAPPED to CFG 2022-12-23 10:14:51 -05:00
evm treewide: Remove the unnecessary space before semicolon 2022-11-02 13:58:17 -04:00
j721e global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_* 2022-12-05 16:06:07 -05:00
j721s2 global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_* 2022-12-05 16:06:07 -05:00
ks2_evm global: Migrate CONFIG_MAX_RAM_BANK_SIZE to CFG 2022-12-23 10:14:51 -05:00
omap5_uevm global: Move remaining CONFIG_SYS_* to CFG_SYS_* 2022-12-05 16:06:08 -05:00
panda doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
sdp4430 doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
ti816x global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_* 2022-12-05 16:06:07 -05:00