summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Mabäcker <petter@technux.se>2016-02-28 14:46:10 +0100
committerAndrei Gherzan <andrei@gherzan.ro>2016-03-01 14:10:21 +0100
commitb3319339387d65ece69f32df050f906cfcef2a4a (patch)
tree8cc7dbddfae2cbd3122c4e748579fbd2067af59e
parent6c6f6cf7b3738ff5f8b321295eddd99a118afd1e (diff)
downloadmeta-raspberrypi-b3319339387d65ece69f32df050f906cfcef2a4a.tar.gz
rpi-config: I2C support
With newer kernels (>=3.18) that supports device-trees I2C should be enabled with device-trees. This is now support by adding: ENABLE_I2C = "1" in local.conf This will enable the dtparams: i2c1 i2c_arm Signed-off-by: Petter Mabäcker <petter@technux.se> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-rw-r--r--README7
-rw-r--r--recipes-bsp/bootfiles/rpi-config_git.bb6
2 files changed, 13 insertions, 0 deletions
diff --git a/README b/README
index 5798e61..3e879dd 100644
--- a/README
+++ b/README
@@ -27,6 +27,7 @@ Contents:
27 3.J. Image with Initramfs 27 3.J. Image with Initramfs
28 3.K. Device tree support 28 3.K. Device tree support
29 3.L. Enable SPI bus 29 3.L. Enable SPI bus
30 3.M. Enable I2C
304. Extra apps 314. Extra apps
31 4.A. omxplayer 32 4.A. omxplayer
325. Board Configuration 335. Board Configuration
@@ -207,6 +208,12 @@ NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disable
207When using device tree kernels, set this variable to enable the SPI bus 208When using device tree kernels, set this variable to enable the SPI bus
208ENABLE_SPI_BUS = "1" 209ENABLE_SPI_BUS = "1"
209 210
2113.M. Enable I2C
212===============
213When using device tree kernels, set this variable to enable I2C
214ENABLE_I2C = "1"
215
216
2104. Extra apps 2174. Extra apps
211============= 218=============
212 219
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
index 4cdffca..138cb37 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -75,6 +75,12 @@ do_deploy() {
75 echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt 75 echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
76 echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt 76 echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
77 fi 77 fi
78
79 if [ -n "${ENABLE_I2C}" ]; then
80 echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
81 echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
82 echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
83 fi
78} 84}
79 85
80addtask deploy before do_package after do_install 86addtask deploy before do_package after do_install