Page 1 of 1

Anyway to change I2C speed on Nano Pi Neo2

Posted: Fri Jun 29, 2018 4:59 am
by iamseer
Hi,

I'm adding an I2C sensor to my Nano Pi that driving LED screen. However, my logic analyzer shows the I2C is operating at 100Khz,

Are there ways to set the I2C speed to 400Khz?

Thanks

Re: Anyway to change I2C speed on Nano Pi Neo2

Posted: Fri Jun 29, 2018 6:54 am
by iamseer
OK, answering my own question.

I referred to https://michaelfranzl.com/2016/11/10/se ... pberry-pi/

I ran this fdtdump to get the device tree

fdtdump /boot/sun50i-h5-nanopi-neo2.dtb

found "i2c@01c2ac00", although I didn't find clock-frequency parameter under it, I still tried fdtput.

sudo fdtput --type u /boot/sun50i-h5-nanopi-neo2.dtb /soc/i2c@01c2ac00 clock-frequency 400000

After reboot, I2C speed boosted to 363K.