Changing Dragonboard 820c I2C speed?

It looks like I2C is default to running at 100 kHz. I would like to run I2C-1 at 400 kHz or 1 MHz.
How can I do that?
I looked at this doc for 410c, but couldn’t figure out how to do it for 820c.

So… it looks like 400 kHz works. I added “clock-frequency” in msm8996.dtsi:

		blsp2_i2c1: i2c@075b6000 { // This is i2c-1
		compatible = "qcom,i2c-qup-v2.2.1";
		clock-frequency = <400000>;            <-- Set to 400 kHz.

and data transfer got faster.

I also tried <1000000>, and I also had to change the code in i2c-qup.c:

/* We support frequencies up to FAST Mode (400KHz) */
if (!clk_freq || clk_freq > 400000) ...

to 1000000.

Even though the comment says 400KHz, it seems to work.
Is it safe to do?

It seems safe, actually upstream driver has been recently patched [1][2] to support fast mode plus.


1 Like

Thanks for confirming!