Jump to content

Recommended Posts

Posted

I've been trying to change the I2C clock frequency on a NanoPi Duo doing the following:

  • cd /boot/dtb
  • sudo cp sun8i-h2-plus-nanopi-duo.dtb sun8i-h2-plus-nanopi-duo.dtb.old
  • sudo dtc -I dtb -O dts -o sun8i-h2-plus-nanopi-duo.dts sun8i-h2-plus-nanopi-duo.dtb
  • sudo nano sun8i-h2-plus-nanopi-duo.dts in i2c@01f02400 section change clock-frequency = <0x186a0> to clock-frequency = <0x30d40> (200 KHz)
  • sudo dtc -I dts -O dtb -o sun8i-h2-plus-nanopi-duo.dtb sun8i-h2-plus-nanopi-duo.dts
  • reboot

Looking in armbianEnv.txt I have overlay_prefix=sun8i-h3 and cat /proc/device-tree/model shows FriendlyARM NanoPi DUO. The issue is that no matter what I change clock-frequency to it stays the same i.e. 100 KHz. Either I'm changing the wrong value or I have the wrong template?

Posted

You can ask dtc to scan the tree and produce textual representation of the state.

dtc -I fs /sys/firmware/devicetree/base/

If the output from above command includes the change you intended then it must be something else that prevents it from working.

Posted

Try also to set clock-frequency = <0x61a80>, since 200KHz is a non-standard value, maybe any value between 100KHz and 400KHz will fallback to 100KHz.

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines