1

I am using linux based kits and I have a problem about changing i2c speed. Do you know how to change in linux which has the version 3.4.39

4
  • i2c speed on what device? Commented Apr 5, 2019 at 12:59
  • ARM-Embedded-S5P4418-Single-Board-Computer Commented Apr 5, 2019 at 13:05
  • Maybe you should ask this question on Electronics SE.. Commented Apr 5, 2019 at 13:24
  • ok, I will also ask in this platform.Thank you for suggestion Commented Apr 5, 2019 at 14:14

1 Answer 1

1

Since you are using ARM, you can define the I2C speed at boot time in the devicetree. I am making some assumptions here (eg. that you are using U-boot as bootloader), but embedded systems tend to look very similar.

  1. Locate your devicetree. It is specified during boot and probably located in /boot/ (You can also type printenv in U-boot shell and look for a variable called devicetree)
  2. Disassemble your devicetree to dts-format (device-tree-source)

  3. Change the i2c-speed parameter (Search for "i2c" and "clock-frequency" clock-frequency = < some_speed_in_HZ >;"

  4. Compile it back to *.dtb (device-tree-blob) and store it as a my_devicetree.dtb in /boot/

on the next reboot, in the bootloader menu choose my_devicetree.dtb as devicetree-file and it should work.

Sign up to request clarification or add additional context in comments.

4 Comments

unfortunately in my /boot/ ,there is nothing and when I type prientenv there is no such as devicetree word.
what about dtb_file or something similar?
in boot ,there is no file . it is empty.What do you think is it possible that dtb file would be in different location.
It could be on another partition or another storage device. The easiest would be to analyse the "printenv"-output from uboot. There will be some information which file is being served the kernel as devicetree and where it is located.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.