Greetings,
I am dealing with a custom hardware based on RPI3B running kernel 4.19
(or 4.20).
My device has 2 slaves on I2C bus: codec WM8731 (on address 0x1a) and
clock generator si5351a (on 0x60).
It has been a lot of time for me fighting with an I2C issue which does
not allow the two I2C devices work correctly together: I2C bus hangs up
at kernel boot. The issue happens in 50-70% boot cases and the fail
percentage noticeably depends on the bus clock set in DTS: the more
frequency set the less fail percentage.
The kernel itself loads successfully, I can ssh to the RPI in order to
issue "i2cdetect -y 0" and make sure that I2C bus is locked completely
and not responding.
So far I have found the only way to make it work : to compile si5351a
driver into kernel and use wm8731 driver as a module.
This probably makes the clock driver load 100% before the codec and I2C
bus does not hang up.
Since it can be fixed this way the problem really looks like a "race
condition" in I2C bus/driver.
Would be really nice to know your opinion and possible ways to fix this.
Best regards,
Sergey