Hi I am seeing Jetson Xavier I2C speed to be capped at 400kHz. I am using i2c-8 and I was able to adjust speed from i2c-dev, bus_clk_rate file. However, if i put anything higher than 400kHz the clock cut back to 100kHz by default. Is it possible to run i2c at higher speed setting? Thanks.
Please modify the clock-frequency in DT to 400000 to try.
i2c@31e0000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
iommus = <0x2 0x20>;
dma-coherent;
compatible = "nvidia,tegra194-i2c";
reg = <0x0 0x31e0000 0x0 0x100>;
nvidia,hw-instance-id = <0x8>;
interrupts = <0x0 0x21 0x4>;
status = "okay";
clock-frequency = 400000;
clean,
i2c-8 supports FM+ mode of operation or 1MHz. The i2c bus speeds cannot be customized to any values. You need to enter the values which the mode of operation supports, else the frequency is set to the default value.
You can have 100KHz, 400KHz, 1MHz as bus rates. Try setting the rate to any of these.
Where do I find I2C configuration? I need to communicate with slave device at 400kHz. Pins 3 and 5 are used, so /dev/i2c-8 should be working. But I can’t get any response from it. I’m using Xavier L4T 32.1. And there’s not much information how to work with I2C
I have the same question but did not see a response. Where is this information from the 12/04/2018 post?
Also, can the i2c clock speed be changed using a user application(C or C++). I’ve found multiple examples of user application that perform read/write operations but can’t find one that actually adjusts the speed of the i2c. Can you provide an example?
Could you try below command to check if can set the clock as request.
sudo echo 1 > /sys/kernel/debug/bpmp/debug/clk/i2c8/mrq_rate_locked
sudo echo xxxx > /sys/kernel/debug/bpmp/debug/clk/i2c8/rate
It won’t allow me to modified either of these two settings. I receive a Permission Denied and the device remains at 100kHz.
Any feedback?
Please have a try
sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/i2c8/mrq_rate_locked
echo xxxx > /sys/kernel/debug/bpmp/debug/clk/i2c8/rate