Hi guys:
Does anyone know how to change the clock of I2C in the BBB, i am using kernel 3.8, thanks in advance.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi IvanLai,
Are you working with device tree? If so then for every I2C device note you have a clock-frequency defined, as bellow:
i2c1: i2c@4802a000 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
status = "okay";
clock-frequency = <100000>;
You can change the setting of clock-frequency parameter here.
Best Regards,
Yordan
Hi Ivan,
Are you using board file or dts file ?
If board file,
100 -> 100KHz of I2C1
omap_register_i2c_bus(1, 100, am335x_i2c0_boardinfo, ARRAY_SIZE(am335x_i2c0_boardinfo));
Hi,
As Titus said, you should only call the register_i2c_bus function with appropriate clock rate. the header is already included <i2c.h>.
Best Regards,
Yordan
Refer to the following files.
./arch/arm/plat-omap/i2c.c
./arch/arm/plat-omap/include/plat/i2c.h