sgjava Posted December 31, 2017 Posted December 31, 2017 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?
esc Posted January 2, 2018 Posted January 2, 2018 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. 2
martinayotte Posted January 2, 2018 Posted January 2, 2018 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.
Recommended Posts