
On 05/28/2012 11:25 PM, Fabio Estevam wrote:
I need to provide a get_board_rev() function that depends on I2C probe of a PMIC to decide between the board revision.
I2C is only available after relocation, so what is the correct way to "delay" get_board_rev, so that it gets called only at a time when I2C is ready?
I2C is usually available earlier, as it is used to read the SPD on memory modules.
When I last did it, I had to change U-Boot slightly to support a second I2C bus, as the bus selection variable was located in flash before relocation (very old version of U-Boot, so may not apply still).
I've only had a problem using I2C very early in the boot sequence, like before the system clocks have been setup, then the solution to that was to just use a GPIO strapping instead for clock selection.