pitft: Add basic support for PiTFT

Add basic support for PiTFT display by using device-trees.

In order get it working below configurations must be active in
local.conf:

MACHINE_FEATURES += "pitft"
 - This will enable SPI bus and i2c device-trees, it will also setup
   framebuffer for console and x server on PiTFT.

[Support #70]

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
This commit is contained in:
Petter Mabäcker
2016-02-28 14:46:12 +01:00
committed by Andrei Gherzan
parent 52671faf4f
commit 0d5aff5161
5 changed files with 36 additions and 5 deletions
+4 -2
View File
@@ -15,6 +15,8 @@ S = "${WORKDIR}/git"
PR = "r4"
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
inherit deploy
do_deploy() {
@@ -71,12 +73,12 @@ do_deploy() {
fi
# SPI bus support
if [ -n "${ENABLE_SPI_BUS}" ]; then
if [ -n "${ENABLE_SPI_BUS}" ] || [ "${PITFT}" = "1" ]; then
echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${ENABLE_I2C}" ]; then
if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then
echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt