Page MenuHomeFreeBSD

rk_i2c bug fix
ClosedPublic

Authored by br on Nov 8 2020, 1:26 PM.
Tags
None
Referenced Files
F106205010: D27139.id89824.diff
Fri, Dec 27, 3:29 AM
F106169315: D27139.diff
Thu, Dec 26, 12:56 PM
Unknown Object (File)
Sun, Dec 8, 5:30 AM
Unknown Object (File)
Nov 15 2024, 2:03 PM
Unknown Object (File)
Nov 7 2024, 4:43 PM
Unknown Object (File)
Nov 7 2024, 4:30 PM
Unknown Object (File)
Nov 7 2024, 4:29 PM
Unknown Object (File)
Oct 26 2024, 4:51 AM
Subscribers

Details

Summary

o Support for transfers > 32 bytes
o Fix slave address setting

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

br requested review of this revision.Nov 8 2020, 1:26 PM
sys/arm64/rockchip/rk_i2c.c
535

Mhm, that should be | LSB I think.

sys/arm64/rockchip/rk_i2c.c
535

yes, but does not matter, since controller sets this bit internally depending on mode

sys/arm64/rockchip/rk_i2c.c
363

That will not work if the transfer is not for a multiple of 32.

sys/arm64/rockchip/rk_i2c.c
363

why?

sys/arm64/rockchip/rk_i2c.c
363

If I understand correctly if you try to do a transfer with a len of 48 bytes the first 32 bytes will be transmitted first (as it's the max length that this controller can support) but on the second transfer instead of setting TXCOUNT to 16 we will set it to 32 as you check sc->msg->len and not taking into account what have been transmitted already.

o Consider amount of bytes already transferred
o Add a small delay (not sure why it is needed, maybe another bug)

fix transfer_len for reading as well. I think eliminate a need of delay

sys/arm64/rockchip/rk_i2c.c
363

You are right, thanks!
I think driver works for me just fine now

This revision is now accepted and ready to land.May 26 2021, 7:11 AM