Skip to content

Conversation

jlaitine
Copy link
Contributor

Summary

imx9_lpi2c_reset didn't quite work. It tried to toggle scl line as GPIO, but the line was not even muxed properly.

Instead, set the bus to relaxed mode, and drive address 0 to the bus. This toggles the clock, and also generates start and stop sequences on the bus.

"Relaxed mode" is a new feature on the LPI2C block used in imx93.

Impact

Only imx9 lpspi. Improves i2c bus error recovery.

Testing

Tested on imx93 board with a broken i2c led driver device which causes bus to get stuck occasionally.

imx9_lpi2c_reset didn't quite work. It tried to toggle scl line as GPIO, but the line was not even muxed properly.

Instead, set the bus to relaxed mode, and drive address 0 to the bus. This toggles the clock, and also generates start and stop sequences on the bus.

"Relaxed mode" is a new feature on the LPI2C block used in imx93.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
@github-actions github-actions bot added Arch: arm64 Issues related to ARM64 (64-bit) architecture Size: M The size of the change in this PR is medium labels Aug 25, 2025
@xiaoxiang781216 xiaoxiang781216 merged commit 3cf28dd into apache:master Aug 26, 2025
12 checks passed
@jlaitine jlaitine deleted the imx9_lpi2c_fix_bus_reset branch August 26, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: arm64 Issues related to ARM64 (64-bit) architecture Size: M The size of the change in this PR is medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants