configuration of the I2C bus frequency

Started by m.naserddin, October 16, 2014, 05:51:15 PM

Previous topic - Next topic

how to configure the i2c frequence

mm
1 (100%)
mm
0 (0%)

Total Members Voted: 1

m.naserddin

Hello everybody,
i have the A20-OlinuXino-Micro and im using the i2c device with the standard frequency of 100 khz. I need  a higher frequency like 400 khz. can i configure that and how ?.

I would be thankfull for your help.

best reguards
Moataz

soenke

You have to modify the kernel source and compile your own kernel. Look at the tutorials to find out how to do this. For higher i2c-speed, you have to change:

arch/arm/plat-sunxi/include/plat/i2c.h line 196 ff

#define I2C2_TRANSFER_SPEED (400000) //400kHz

You can get up to 400kHz with the current hardware configuration.
If you add 1.8kOhm resistors in parallel to the current 2.2kOhm pullups you can go easily up to 1MHz and it still runs stable as rock.

You should not increase the i2c-clock connected to AXP or RTC clock above 400kHz.