-
Notifications
You must be signed in to change notification settings - Fork 19
Enabling I2C on Raspberry Pi Yocto
Rishab Shah edited this page Dec 7, 2021
·
4 revisions
-
Motivation:
I2C module was a new component which was unexplored for the yocto as per wikipage.
This would serve as a reusable component for projects which use I2C based sensor and help to dedicate time to develop user-space application for the same. -
Implementation:
Please refer Pull Request:https://github.com/cu-ecen-aeld/yocto-assignments-base/pull/3
Following configurations are verified for Raspberry-pi 3b+
- To enable I2C module, add
ENABLE_I2C = 1
to local.conf - To autoload I2C module, add
KERNEL_MODULE_AUTOLOAD:rpi += i2c-dev i2c-bcm2708
to local.conf
i2c-bcm2708
will vary for hardware based upon the chip supported for the hardware device. - To add i2c tools support add
IMAGE_INSTALL_append = i2c-tools
in local.conf file.
- Testing:
After successful boot, following verifications would pass
- Run
lsmod | grep i2c
to verify if I2C module is loaded.
- Run
i2c-detect -y 1
to verify that the I2C device connected to I2C bus is in good condition.