Changing i2c clock speed permanently


Iam controlling 2 i2c oled displays from jetson nano using 2 seperate i2c busses (i2c-0 and i2c-1).

The clock speed was slow so i increased it by doing cd /sys/bus/i2c/devices/i2c-0 and i2c-1 and a
sudo nano bus_clk_rate and change it to 1000000.

And it works fine, but the problem is every time i reboot the system the value in bus_clk_rate returns to its orginial value.
How can i make it permanent?

Thank you

Try to modify the clock-frequency under the i2c@xxxx scope in the device tree.

You mean the clock rate in bus_clk_rate under i2c-xx folder?
Because i did that and it works but when i reboot the jetson nano it resets to its initial values

No, it’s define in the kernel device tree.