]> git.dujemihanovic.xyz Git - linux.git/commit
i3c/master: cmd_v1: Fix the rule for getting i3c mode
authorBilly Tsai <billy_tsai@aspeedtech.com>
Mon, 26 Aug 2024 03:38:21 +0000 (11:38 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 6 Sep 2024 15:36:02 +0000 (17:36 +0200)
commit061dd21ca712cd7103c26ed77bb4a04d98930981
treec084ce5ee8f719ccdcb2d6fc23d3ae0b783261ee
parent133f67bea5e03134b4b388a884e59a052809403d
i3c/master: cmd_v1: Fix the rule for getting i3c mode

Based on the I3C TCRI specification, the rules for determining the I3C
mode are as follows:
I3C SCL rate > 8MHz: use SDR0, as SDR1 has a maximum data rate of 8MHz
I3C SCL rate > 6MHz: use SDR1, as SDR2 has a maximum data rate of 6MHz
I3C SCL rate > 4MHz: use SDR2, as SDR3 has a maximum data rate of 4MHz
I3C SCL rate > 2MHz: use SDR3, as SDR4 has a maximum data rate of 2MHz
Otherwise, use SDR4

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Link: https://lore.kernel.org/r/20240826033821.175591-1-billy_tsai@aspeedtech.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/mipi-i3c-hci/cmd_v1.c