* [meta-raspberrypi][PATCH v3 1/6] README: Add SPI bus chapter to content
2016-02-28 13:46 [meta-raspberrypi][PATCH v3 0/6] Various upgrade/fixes from Technux Petter Mabäcker
@ 2016-02-28 13:46 ` Petter Mabäcker
2016-03-01 13:28 ` Andrei Gherzan
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 2/6] .gitignore: Ignore .swp files Petter Mabäcker
` (4 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Petter Mabäcker @ 2016-02-28 13:46 UTC (permalink / raw)
To: yocto
The optional SPI bus chapter was missing in the content list.
While at it also place it together with the other "optional" chapters,
instead of in the end.
Signed-off-by: Petter Mabäcker <petter@technux.se>
---
README | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/README b/README
index 16ac1cb..a168692 100644
--- a/README
+++ b/README
@@ -20,10 +20,11 @@ Contents:
2.F. Optional - Video camera support with V4L2 drivers
2.G. Optional - Enable offline compositing support
2.H. Optional - Enable kgdb over console support
- 2.I. Images
- 2.J. Boot to U-Boot
- 2.K. Image with Initramfs
- 2.L. Device tree support
+ 2.I. Optional - Enable SPI bus
+ 2.J. Images
+ 2.K. Boot to U-Boot
+ 2.L. Image with Initramfs
+ 2.M. Device tree support
3. Extra apps
3.A. omxplayer
4. Source code and mirrors
@@ -145,7 +146,13 @@ To add the kdbg over console (kgdboc) parameter to the kernel command line,
set this variable in local.conf:
ENABLE_KGDB = "1"
-2.I. Images
+2.I. Optional - Enable SPI bus
+==============================
+When using device tree kernels, set this variable to enable the SPI bus
+ENABLE_SPI_BUS = "1"
+
+
+2.J. Images
===========
* rpi-hwup-image
Hardware up image
@@ -155,7 +162,7 @@ ENABLE_KGDB = "1"
Image based on rpi-basic-image which includes most of the packages in this
layer and some media samples.
-2.J. Boot to U-Boot
+2.K. Boot to U-Boot
===================
To have u-boot load kernel image, set in your local.conf
KERNEL_IMAGETYPE = "uImage"
@@ -163,7 +170,7 @@ KERNEL_IMAGETYPE = "uImage"
This will make kernel.img be u-boot image which will load uImage.
By default, kernel.img is the actual kernel image (ex. Image).
-2.K. Image with Initramfs
+2.L. Image with Initramfs
=========================
To build an initramfs image :
* Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@@ -176,7 +183,7 @@ To build an initramfs image :
* Set the meta-rasberrypi variable (in raspberrypi.conf for example)
- KERNEL_INITRAMFS = "-initramfs"
-2.L. Device tree support
+2.M. Device tree support
=========================
Device tree for RPi is only supported when using linux-raspberrypi 3.18+
kernels.
@@ -189,11 +196,6 @@ kernels.
NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for
older kernel versions.
-2.M. Optional - enable SPI bus
-==============================
-When using device tree kernels, set this variable to enable the SPI bus
-ENABLE_SPI_BUS = "1"
-
3. Extra apps
=============
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [meta-raspberrypi][PATCH v3 1/6] README: Add SPI bus chapter to content
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 1/6] README: Add SPI bus chapter to content Petter Mabäcker
@ 2016-03-01 13:28 ` Andrei Gherzan
0 siblings, 0 replies; 15+ messages in thread
From: Andrei Gherzan @ 2016-03-01 13:28 UTC (permalink / raw)
To: Petter Mabäcker; +Cc: yocto
On Sun, Feb 28, 2016 at 02:46:08PM +0100, Petter Mabäcker wrote:
> The optional SPI bus chapter was missing in the content list.
>
> While at it also place it together with the other "optional" chapters,
> instead of in the end.
>
> Signed-off-by: Petter Mabäcker <petter@technux.se>
> ---
> README | 28 +++++++++++++++-------------
> 1 file changed, 15 insertions(+), 13 deletions(-)
>
> diff --git a/README b/README
> index 16ac1cb..a168692 100644
> --- a/README
> +++ b/README
> @@ -20,10 +20,11 @@ Contents:
> 2.F. Optional - Video camera support with V4L2 drivers
> 2.G. Optional - Enable offline compositing support
> 2.H. Optional - Enable kgdb over console support
> - 2.I. Images
> - 2.J. Boot to U-Boot
> - 2.K. Image with Initramfs
> - 2.L. Device tree support
> + 2.I. Optional - Enable SPI bus
> + 2.J. Images
> + 2.K. Boot to U-Boot
> + 2.L. Image with Initramfs
> + 2.M. Device tree support
> 3. Extra apps
> 3.A. omxplayer
> 4. Source code and mirrors
> @@ -145,7 +146,13 @@ To add the kdbg over console (kgdboc) parameter to the kernel command line,
> set this variable in local.conf:
> ENABLE_KGDB = "1"
>
> -2.I. Images
> +2.I. Optional - Enable SPI bus
> +==============================
> +When using device tree kernels, set this variable to enable the SPI bus
> +ENABLE_SPI_BUS = "1"
> +
> +
> +2.J. Images
> ===========
> * rpi-hwup-image
> Hardware up image
> @@ -155,7 +162,7 @@ ENABLE_KGDB = "1"
> Image based on rpi-basic-image which includes most of the packages in this
> layer and some media samples.
>
> -2.J. Boot to U-Boot
> +2.K. Boot to U-Boot
> ===================
> To have u-boot load kernel image, set in your local.conf
> KERNEL_IMAGETYPE = "uImage"
> @@ -163,7 +170,7 @@ KERNEL_IMAGETYPE = "uImage"
> This will make kernel.img be u-boot image which will load uImage.
> By default, kernel.img is the actual kernel image (ex. Image).
>
> -2.K. Image with Initramfs
> +2.L. Image with Initramfs
> =========================
> To build an initramfs image :
> * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
> @@ -176,7 +183,7 @@ To build an initramfs image :
> * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
> - KERNEL_INITRAMFS = "-initramfs"
>
> -2.L. Device tree support
> +2.M. Device tree support
> =========================
> Device tree for RPi is only supported when using linux-raspberrypi 3.18+
> kernels.
> @@ -189,11 +196,6 @@ kernels.
> NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for
> older kernel versions.
>
> -2.M. Optional - enable SPI bus
> -==============================
> -When using device tree kernels, set this variable to enable the SPI bus
> -ENABLE_SPI_BUS = "1"
> -
> 3. Extra apps
> =============
>
I restructured a little the readme and included a similar change. It is master.
Thanks.
--
Andrei Gherzan
^ permalink raw reply [flat|nested] 15+ messages in thread
* [meta-raspberrypi][PATCH v3 2/6] .gitignore: Ignore .swp files
2016-02-28 13:46 [meta-raspberrypi][PATCH v3 0/6] Various upgrade/fixes from Technux Petter Mabäcker
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 1/6] README: Add SPI bus chapter to content Petter Mabäcker
@ 2016-02-28 13:46 ` Petter Mabäcker
2016-02-29 21:26 ` Andrei Gherzan
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 3/6] rpi-config: I2C support Petter Mabäcker
` (3 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Petter Mabäcker @ 2016-02-28 13:46 UTC (permalink / raw)
To: yocto
Signed-off-by: Petter Mabäcker <petter@technux.se>
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 1677b58..f235765 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
build*
*~
+.*.swp
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [meta-raspberrypi][PATCH v3 3/6] rpi-config: I2C support
2016-02-28 13:46 [meta-raspberrypi][PATCH v3 0/6] Various upgrade/fixes from Technux Petter Mabäcker
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 1/6] README: Add SPI bus chapter to content Petter Mabäcker
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 2/6] .gitignore: Ignore .swp files Petter Mabäcker
@ 2016-02-28 13:46 ` Petter Mabäcker
2016-02-28 17:02 ` Leon Anavi
2016-03-01 13:23 ` Andrei Gherzan
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 4/6] rpi-base.inc: Allow MACHINE_FEATURES appends Petter Mabäcker
` (2 subsequent siblings)
5 siblings, 2 replies; 15+ messages in thread
From: Petter Mabäcker @ 2016-02-28 13:46 UTC (permalink / raw)
To: yocto
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>
---
README | 21 +++++++++++++--------
recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/README b/README
index a168692..8ef4e7a 100644
--- a/README
+++ b/README
@@ -21,10 +21,11 @@ Contents:
2.G. Optional - Enable offline compositing support
2.H. Optional - Enable kgdb over console support
2.I. Optional - Enable SPI bus
- 2.J. Images
- 2.K. Boot to U-Boot
- 2.L. Image with Initramfs
- 2.M. Device tree support
+ 2.J. Optional - Enable I2C
+ 2.K. Images
+ 2.L. Boot to U-Boot
+ 2.M. Image with Initramfs
+ 2.N. Device tree support
3. Extra apps
3.A. omxplayer
4. Source code and mirrors
@@ -151,8 +152,12 @@ ENABLE_KGDB = "1"
When using device tree kernels, set this variable to enable the SPI bus
ENABLE_SPI_BUS = "1"
+2.J. Optional - Enable I2C
+==========================
+When using device tree kernels, set this variable to enable I2C
+ENABLE_I2C = "1"
-2.J. Images
+2.K. Images
===========
* rpi-hwup-image
Hardware up image
@@ -162,7 +167,7 @@ ENABLE_SPI_BUS = "1"
Image based on rpi-basic-image which includes most of the packages in this
layer and some media samples.
-2.K. Boot to U-Boot
+2.L. Boot to U-Boot
===================
To have u-boot load kernel image, set in your local.conf
KERNEL_IMAGETYPE = "uImage"
@@ -170,7 +175,7 @@ KERNEL_IMAGETYPE = "uImage"
This will make kernel.img be u-boot image which will load uImage.
By default, kernel.img is the actual kernel image (ex. Image).
-2.L. Image with Initramfs
+2.M. Image with Initramfs
=========================
To build an initramfs image :
* Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@@ -183,7 +188,7 @@ To build an initramfs image :
* Set the meta-rasberrypi variable (in raspberrypi.conf for example)
- KERNEL_INITRAMFS = "-initramfs"
-2.M. Device tree support
+2.N. Device tree support
=========================
Device tree for RPi is only supported when using linux-raspberrypi 3.18+
kernels.
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
index aa11b25..ccb9b7f 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -72,6 +72,12 @@ do_deploy() {
echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
+
+ if [ -n "${ENABLE_I2C}" ]; 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
+ fi
}
addtask deploy before do_package after do_install
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [meta-raspberrypi][PATCH v3 3/6] rpi-config: I2C support
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 3/6] rpi-config: I2C support Petter Mabäcker
@ 2016-02-28 17:02 ` Leon Anavi
2016-03-01 13:23 ` Andrei Gherzan
1 sibling, 0 replies; 15+ messages in thread
From: Leon Anavi @ 2016-02-28 17:02 UTC (permalink / raw)
To: Petter Mabäcker; +Cc: yocto
Hi Petter,
On 2016-02-28 15:46, Petter Mabäcker wrote:
> 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
Nice, this is exactly what I needed. Actually, yesterday I was searching
how to enable I2C through local.conf on rpi. I hope your patch will be
soon merged.
Thanks, Leon
>
> Signed-off-by: Petter Mabäcker <petter@technux.se>
> ---
> README | 21 +++++++++++++--------
> recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
> 2 files changed, 19 insertions(+), 8 deletions(-)
>
> diff --git a/README b/README
> index a168692..8ef4e7a 100644
> --- a/README
> +++ b/README
> @@ -21,10 +21,11 @@ Contents:
> 2.G. Optional - Enable offline compositing support
> 2.H. Optional - Enable kgdb over console support
> 2.I. Optional - Enable SPI bus
> - 2.J. Images
> - 2.K. Boot to U-Boot
> - 2.L. Image with Initramfs
> - 2.M. Device tree support
> + 2.J. Optional - Enable I2C
> + 2.K. Images
> + 2.L. Boot to U-Boot
> + 2.M. Image with Initramfs
> + 2.N. Device tree support
> 3. Extra apps
> 3.A. omxplayer
> 4. Source code and mirrors
> @@ -151,8 +152,12 @@ ENABLE_KGDB = "1"
> When using device tree kernels, set this variable to enable the SPI
> bus
> ENABLE_SPI_BUS = "1"
>
> +2.J. Optional - Enable I2C
> +==========================
> +When using device tree kernels, set this variable to enable I2C
> +ENABLE_I2C = "1"
>
> -2.J. Images
> +2.K. Images
> ===========
> * rpi-hwup-image
> Hardware up image
> @@ -162,7 +167,7 @@ ENABLE_SPI_BUS = "1"
> Image based on rpi-basic-image which includes most of the packages
> in this
> layer and some media samples.
>
> -2.K. Boot to U-Boot
> +2.L. Boot to U-Boot
> ===================
> To have u-boot load kernel image, set in your local.conf
> KERNEL_IMAGETYPE = "uImage"
> @@ -170,7 +175,7 @@ KERNEL_IMAGETYPE = "uImage"
> This will make kernel.img be u-boot image which will load uImage.
> By default, kernel.img is the actual kernel image (ex. Image).
>
> -2.L. Image with Initramfs
> +2.M. Image with Initramfs
> =========================
> To build an initramfs image :
> * Set this 3 kernel variables (in linux-raspberrypi.inc for
> example)
> @@ -183,7 +188,7 @@ To build an initramfs image :
> * Set the meta-rasberrypi variable (in raspberrypi.conf for
> example)
> - KERNEL_INITRAMFS = "-initramfs"
>
> -2.M. Device tree support
> +2.N. Device tree support
> =========================
> Device tree for RPi is only supported when using linux-raspberrypi
> 3.18+
> kernels.
> diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb
> b/recipes-bsp/bootfiles/rpi-config_git.bb
> index aa11b25..ccb9b7f 100644
> --- a/recipes-bsp/bootfiles/rpi-config_git.bb
> +++ b/recipes-bsp/bootfiles/rpi-config_git.bb
> @@ -72,6 +72,12 @@ do_deploy() {
> echo "# Enable SPI bus"
> >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> echo "dtparam=spi=on"
> >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> fi
> +
> + if [ -n "${ENABLE_I2C}" ]; 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
> + fi
> }
>
> addtask deploy before do_package after do_install
> --
> 1.9.1
--
http://anavi.org/
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [meta-raspberrypi][PATCH v3 3/6] rpi-config: I2C support
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 3/6] rpi-config: I2C support Petter Mabäcker
2016-02-28 17:02 ` Leon Anavi
@ 2016-03-01 13:23 ` Andrei Gherzan
1 sibling, 0 replies; 15+ messages in thread
From: Andrei Gherzan @ 2016-03-01 13:23 UTC (permalink / raw)
To: Petter Mabäcker; +Cc: yocto
On Sun, Feb 28, 2016 at 02:46:10PM +0100, Petter Mabäcker wrote:
> 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>
> ---
> README | 21 +++++++++++++--------
> recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
> 2 files changed, 19 insertions(+), 8 deletions(-)
>
> diff --git a/README b/README
> index a168692..8ef4e7a 100644
> --- a/README
> +++ b/README
> @@ -21,10 +21,11 @@ Contents:
> 2.G. Optional - Enable offline compositing support
> 2.H. Optional - Enable kgdb over console support
> 2.I. Optional - Enable SPI bus
> - 2.J. Images
> - 2.K. Boot to U-Boot
> - 2.L. Image with Initramfs
> - 2.M. Device tree support
> + 2.J. Optional - Enable I2C
> + 2.K. Images
> + 2.L. Boot to U-Boot
> + 2.M. Image with Initramfs
> + 2.N. Device tree support
> 3. Extra apps
> 3.A. omxplayer
> 4. Source code and mirrors
> @@ -151,8 +152,12 @@ ENABLE_KGDB = "1"
> When using device tree kernels, set this variable to enable the SPI bus
> ENABLE_SPI_BUS = "1"
>
> +2.J. Optional - Enable I2C
> +==========================
> +When using device tree kernels, set this variable to enable I2C
> +ENABLE_I2C = "1"
>
> -2.J. Images
> +2.K. Images
> ===========
> * rpi-hwup-image
> Hardware up image
> @@ -162,7 +167,7 @@ ENABLE_SPI_BUS = "1"
> Image based on rpi-basic-image which includes most of the packages in this
> layer and some media samples.
>
> -2.K. Boot to U-Boot
> +2.L. Boot to U-Boot
> ===================
> To have u-boot load kernel image, set in your local.conf
> KERNEL_IMAGETYPE = "uImage"
> @@ -170,7 +175,7 @@ KERNEL_IMAGETYPE = "uImage"
> This will make kernel.img be u-boot image which will load uImage.
> By default, kernel.img is the actual kernel image (ex. Image).
>
> -2.L. Image with Initramfs
> +2.M. Image with Initramfs
> =========================
> To build an initramfs image :
> * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
> @@ -183,7 +188,7 @@ To build an initramfs image :
> * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
> - KERNEL_INITRAMFS = "-initramfs"
>
> -2.M. Device tree support
> +2.N. Device tree support
> =========================
> Device tree for RPi is only supported when using linux-raspberrypi 3.18+
> kernels.
> diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
> index aa11b25..ccb9b7f 100644
> --- a/recipes-bsp/bootfiles/rpi-config_git.bb
> +++ b/recipes-bsp/bootfiles/rpi-config_git.bb
> @@ -72,6 +72,12 @@ do_deploy() {
> echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> fi
> +
> + if [ -n "${ENABLE_I2C}" ]; 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
> + fi
> }
>
> addtask deploy before do_package after do_install
I rebased this on current master and merged to master. Thanks.
--
Andrei Gherzan
^ permalink raw reply [flat|nested] 15+ messages in thread
* [meta-raspberrypi][PATCH v3 4/6] rpi-base.inc: Allow MACHINE_FEATURES appends
2016-02-28 13:46 [meta-raspberrypi][PATCH v3 0/6] Various upgrade/fixes from Technux Petter Mabäcker
` (2 preceding siblings ...)
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 3/6] rpi-config: I2C support Petter Mabäcker
@ 2016-02-28 13:46 ` Petter Mabäcker
2016-03-01 13:26 ` Andrei Gherzan
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 5/6] pitft: Add basic support for PiTFT Petter Mabäcker
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 6/6] pitft: Add PiTFT22 support Petter Mabäcker
5 siblings, 1 reply; 15+ messages in thread
From: Petter Mabäcker @ 2016-02-28 13:46 UTC (permalink / raw)
To: yocto
Ensure that it's possible to add MACHINE_FEATURES from places that will
be executed before rpi-base.inc (like e.g. local.conf), without having
them overrided.
Signed-off-by: Petter Mabäcker <petter@technux.se>
---
conf/machine/include/rpi-base.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index e097702..c8f6cd6 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -37,7 +37,7 @@ KERNEL_DEVICETREE ?= " \
"
KERNEL_IMAGETYPE ?= "Image"
-MACHINE_FEATURES = "kernel26 apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
+MACHINE_FEATURES += "kernel26 apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
# Raspberry Pi has no hardware clock
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [meta-raspberrypi][PATCH v3 4/6] rpi-base.inc: Allow MACHINE_FEATURES appends
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 4/6] rpi-base.inc: Allow MACHINE_FEATURES appends Petter Mabäcker
@ 2016-03-01 13:26 ` Andrei Gherzan
0 siblings, 0 replies; 15+ messages in thread
From: Andrei Gherzan @ 2016-03-01 13:26 UTC (permalink / raw)
To: Petter Mabäcker; +Cc: yocto
On Sun, Feb 28, 2016 at 02:46:11PM +0100, Petter Mabäcker wrote:
> Ensure that it's possible to add MACHINE_FEATURES from places that will
> be executed before rpi-base.inc (like e.g. local.conf), without having
> them overrided.
>
> Signed-off-by: Petter Mabäcker <petter@technux.se>
> ---
> conf/machine/include/rpi-base.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
> index e097702..c8f6cd6 100644
> --- a/conf/machine/include/rpi-base.inc
> +++ b/conf/machine/include/rpi-base.inc
> @@ -37,7 +37,7 @@ KERNEL_DEVICETREE ?= " \
> "
> KERNEL_IMAGETYPE ?= "Image"
>
> -MACHINE_FEATURES = "kernel26 apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
> +MACHINE_FEATURES += "kernel26 apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
>
> # Raspberry Pi has no hardware clock
> MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
Merged to master. Thanks.
--
Andrei Gherzan
^ permalink raw reply [flat|nested] 15+ messages in thread
* [meta-raspberrypi][PATCH v3 5/6] pitft: Add basic support for PiTFT
2016-02-28 13:46 [meta-raspberrypi][PATCH v3 0/6] Various upgrade/fixes from Technux Petter Mabäcker
` (3 preceding siblings ...)
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 4/6] rpi-base.inc: Allow MACHINE_FEATURES appends Petter Mabäcker
@ 2016-02-28 13:46 ` Petter Mabäcker
2016-03-01 13:39 ` Andrei Gherzan
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 6/6] pitft: Add PiTFT22 support Petter Mabäcker
5 siblings, 1 reply; 15+ messages in thread
From: Petter Mabäcker @ 2016-02-28 13:46 UTC (permalink / raw)
To: yocto
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>
---
README | 29 ++++++++++++++++------
recipes-bsp/bootfiles/rpi-config_git.bb | 6 +++--
.../rpi/xorg.conf.d/99-pitft.conf | 5 ++++
.../xorg-xserver/xserver-xf86-config_0.1.bbappend | 11 ++++++--
recipes-kernel/linux/linux-raspberrypi.inc | 6 ++++-
5 files changed, 44 insertions(+), 13 deletions(-)
create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
diff --git a/README b/README
index 8ef4e7a..6a6c398 100644
--- a/README
+++ b/README
@@ -22,10 +22,11 @@ Contents:
2.H. Optional - Enable kgdb over console support
2.I. Optional - Enable SPI bus
2.J. Optional - Enable I2C
- 2.K. Images
- 2.L. Boot to U-Boot
- 2.M. Image with Initramfs
- 2.N. Device tree support
+ 2.K. Optional - Enable PiTFT support
+ 2.L. Images
+ 2.M. Boot to U-Boot
+ 2.N. Image with Initramfs
+ 2.O. Device tree support
3. Extra apps
3.A. omxplayer
4. Source code and mirrors
@@ -157,7 +158,19 @@ ENABLE_SPI_BUS = "1"
When using device tree kernels, set this variable to enable I2C
ENABLE_I2C = "1"
-2.K. Images
+2.K. Optional - Enable PiTFT support
+====================================
+Basic support for using PiTFT screens can be enabled by adding
+below 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.
+
+NOTE: To get this working the overlay for the PiTFT model must be build,
+ added and specified as well (dtoverlay=<driver> in config.txt)
+
+2.L. Images
===========
* rpi-hwup-image
Hardware up image
@@ -167,7 +180,7 @@ ENABLE_I2C = "1"
Image based on rpi-basic-image which includes most of the packages in this
layer and some media samples.
-2.L. Boot to U-Boot
+2.M. Boot to U-Boot
===================
To have u-boot load kernel image, set in your local.conf
KERNEL_IMAGETYPE = "uImage"
@@ -175,7 +188,7 @@ KERNEL_IMAGETYPE = "uImage"
This will make kernel.img be u-boot image which will load uImage.
By default, kernel.img is the actual kernel image (ex. Image).
-2.M. Image with Initramfs
+2.N. Image with Initramfs
=========================
To build an initramfs image :
* Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@@ -188,7 +201,7 @@ To build an initramfs image :
* Set the meta-rasberrypi variable (in raspberrypi.conf for example)
- KERNEL_INITRAMFS = "-initramfs"
-2.N. Device tree support
+2.O. Device tree support
=========================
Device tree for RPi is only supported when using linux-raspberrypi 3.18+
kernels.
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
index ccb9b7f..236a359 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -15,6 +15,8 @@ S = "${WORKDIR}/git"
PR = "r4"
+PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
+
inherit deploy
do_deploy() {
@@ -68,12 +70,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
diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
new file mode 100644
index 0000000..0d2b36b
--- /dev/null
+++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
@@ -0,0 +1,5 @@
+Section "Device"
+ Identifier "Adafruit PiTFT"
+ Driver "fbdev"
+ Option "fbdev" "/dev/fb1"
+EndSection
diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
index 2cf40f8..0ae2ee0 100644
--- a/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ b/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
@@ -1,10 +1,17 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-SRC_URI_append_rpi = " file://xorg.conf.d/10-evdev.conf "
+SRC_URI_append_rpi = " file://xorg.conf.d/10-evdev.conf \
+ file://xorg.conf.d/99-pitft.conf \
+ "
do_install_append_rpi () {
install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
- install -m 0644 ${WORKDIR}/xorg.conf.d/* ${D}/${sysconfdir}/X11/xorg.conf.d/
+ install -m 0644 ${WORKDIR}/xorg.conf.d/10-evdev.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
+
+ PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
+ if [ "${PITFT}" = "1" ]; then
+ install -m 0644 ${WORKDIR}/xorg.conf.d/99-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
+ fi
}
FILES_${PN}_rpi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*"
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc
index 8c7c46c..e31270d 100644
--- a/recipes-kernel/linux/linux-raspberrypi.inc
+++ b/recipes-kernel/linux/linux-raspberrypi.inc
@@ -53,7 +53,11 @@ do_install_prepend() {
do_deploy_append() {
# Deploy cmdline.txt
install -d ${DEPLOYDIR}/bcm2835-bootfiles
- echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
+ PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
+ if [ ${PITFT} = "1" ]; then
+ PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8"
+ fi
+ echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
}
do_rpiboot_mkimage() {
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [meta-raspberrypi][PATCH v3 5/6] pitft: Add basic support for PiTFT
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 5/6] pitft: Add basic support for PiTFT Petter Mabäcker
@ 2016-03-01 13:39 ` Andrei Gherzan
0 siblings, 0 replies; 15+ messages in thread
From: Andrei Gherzan @ 2016-03-01 13:39 UTC (permalink / raw)
To: Petter Mabäcker; +Cc: yocto
On Sun, Feb 28, 2016 at 02:46:12PM +0100, Petter Mabäcker wrote:
> 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>
> ---
> README | 29 ++++++++++++++++------
> recipes-bsp/bootfiles/rpi-config_git.bb | 6 +++--
> .../rpi/xorg.conf.d/99-pitft.conf | 5 ++++
> .../xorg-xserver/xserver-xf86-config_0.1.bbappend | 11 ++++++--
> recipes-kernel/linux/linux-raspberrypi.inc | 6 ++++-
> 5 files changed, 44 insertions(+), 13 deletions(-)
> create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
>
> diff --git a/README b/README
> index 8ef4e7a..6a6c398 100644
> --- a/README
> +++ b/README
> @@ -22,10 +22,11 @@ Contents:
> 2.H. Optional - Enable kgdb over console support
> 2.I. Optional - Enable SPI bus
> 2.J. Optional - Enable I2C
> - 2.K. Images
> - 2.L. Boot to U-Boot
> - 2.M. Image with Initramfs
> - 2.N. Device tree support
> + 2.K. Optional - Enable PiTFT support
> + 2.L. Images
> + 2.M. Boot to U-Boot
> + 2.N. Image with Initramfs
> + 2.O. Device tree support
> 3. Extra apps
> 3.A. omxplayer
> 4. Source code and mirrors
> @@ -157,7 +158,19 @@ ENABLE_SPI_BUS = "1"
> When using device tree kernels, set this variable to enable I2C
> ENABLE_I2C = "1"
>
> -2.K. Images
> +2.K. Optional - Enable PiTFT support
> +====================================
> +Basic support for using PiTFT screens can be enabled by adding
> +below 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.
> +
> +NOTE: To get this working the overlay for the PiTFT model must be build,
> + added and specified as well (dtoverlay=<driver> in config.txt)
> +
> +2.L. Images
> ===========
> * rpi-hwup-image
> Hardware up image
> @@ -167,7 +180,7 @@ ENABLE_I2C = "1"
> Image based on rpi-basic-image which includes most of the packages in this
> layer and some media samples.
>
> -2.L. Boot to U-Boot
> +2.M. Boot to U-Boot
> ===================
> To have u-boot load kernel image, set in your local.conf
> KERNEL_IMAGETYPE = "uImage"
> @@ -175,7 +188,7 @@ KERNEL_IMAGETYPE = "uImage"
> This will make kernel.img be u-boot image which will load uImage.
> By default, kernel.img is the actual kernel image (ex. Image).
>
> -2.M. Image with Initramfs
> +2.N. Image with Initramfs
> =========================
> To build an initramfs image :
> * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
> @@ -188,7 +201,7 @@ To build an initramfs image :
> * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
> - KERNEL_INITRAMFS = "-initramfs"
>
> -2.N. Device tree support
> +2.O. Device tree support
> =========================
> Device tree for RPi is only supported when using linux-raspberrypi 3.18+
> kernels.
> diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
> index ccb9b7f..236a359 100644
> --- a/recipes-bsp/bootfiles/rpi-config_git.bb
> +++ b/recipes-bsp/bootfiles/rpi-config_git.bb
> @@ -15,6 +15,8 @@ S = "${WORKDIR}/git"
>
> PR = "r4"
>
> +PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
> +
> inherit deploy
>
> do_deploy() {
> @@ -68,12 +70,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
> diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
> new file mode 100644
> index 0000000..0d2b36b
> --- /dev/null
> +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
> @@ -0,0 +1,5 @@
> +Section "Device"
> + Identifier "Adafruit PiTFT"
> + Driver "fbdev"
> + Option "fbdev" "/dev/fb1"
> +EndSection
> diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
> index 2cf40f8..0ae2ee0 100644
> --- a/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
> +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
> @@ -1,10 +1,17 @@
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>
> -SRC_URI_append_rpi = " file://xorg.conf.d/10-evdev.conf "
> +SRC_URI_append_rpi = " file://xorg.conf.d/10-evdev.conf \
> + file://xorg.conf.d/99-pitft.conf \
> + "
>
> do_install_append_rpi () {
> install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
> - install -m 0644 ${WORKDIR}/xorg.conf.d/* ${D}/${sysconfdir}/X11/xorg.conf.d/
> + install -m 0644 ${WORKDIR}/xorg.conf.d/10-evdev.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
> +
> + PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
> + if [ "${PITFT}" = "1" ]; then
> + install -m 0644 ${WORKDIR}/xorg.conf.d/99-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
> + fi
> }
>
> FILES_${PN}_rpi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*"
> diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc
> index 8c7c46c..e31270d 100644
> --- a/recipes-kernel/linux/linux-raspberrypi.inc
> +++ b/recipes-kernel/linux/linux-raspberrypi.inc
> @@ -53,7 +53,11 @@ do_install_prepend() {
> do_deploy_append() {
> # Deploy cmdline.txt
> install -d ${DEPLOYDIR}/bcm2835-bootfiles
> - echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
> + PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
> + if [ ${PITFT} = "1" ]; then
> + PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8"
> + fi
> + echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
> }
>
> do_rpiboot_mkimage() {
Merged to master.
--
Andrei Gherzan
^ permalink raw reply [flat|nested] 15+ messages in thread
* [meta-raspberrypi][PATCH v3 6/6] pitft: Add PiTFT22 support
2016-02-28 13:46 [meta-raspberrypi][PATCH v3 0/6] Various upgrade/fixes from Technux Petter Mabäcker
` (4 preceding siblings ...)
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 5/6] pitft: Add basic support for PiTFT Petter Mabäcker
@ 2016-02-28 13:46 ` Petter Mabäcker
2016-03-01 23:50 ` Andrei Gherzan
5 siblings, 1 reply; 15+ messages in thread
From: Petter Mabäcker @ 2016-02-28 13:46 UTC (permalink / raw)
To: yocto
- Add support to build overlays for PiTFT22 in the kernel.
- Setup a basic configuration for the driver
The PiTFT22 support is optional and can be enabled by adding below in
local.conf:
MACHINE_FEATURES += "pitft pitft22"
[Support #70]
Signed-off-by: Petter Mabäcker <petter@technux.se>
---
README | 9 ++
conf/machine/include/rpi-base.inc | 1 +
recipes-bsp/bootfiles/rpi-config_git.bb | 7 ++
...dts-add-overlay-for-pitft22-in-linux-3.18.patch | 110 +++++++++++++++++++++
.../0001-dts-add-overlay-for-pitft22.patch | 110 +++++++++++++++++++++
recipes-kernel/linux/linux-raspberrypi_3.18.bb | 5 +-
recipes-kernel/linux/linux-raspberrypi_4.1.bb | 4 +-
7 files changed, 243 insertions(+), 3 deletions(-)
create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
diff --git a/README b/README
index 6a6c398..4114ccc 100644
--- a/README
+++ b/README
@@ -170,6 +170,15 @@ MACHINE_FEATURES += "pitft"
NOTE: To get this working the overlay for the PiTFT model must be build,
added and specified as well (dtoverlay=<driver> in config.txt)
+Below is a list of currently supported PiTFT models in meta-raspberrypi,
+the modelname should be added as a MACHINE_FEATURES in local.conf like below:
+
+ - MACHINE_FEATURES += "pitft <modelname>"
+
+List of currently supported models
+-----------------------------------
+pitft22
+
2.L. Images
===========
* rpi-hwup-image
diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index c8f6cd6..27f09ad 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -31,6 +31,7 @@ KERNEL_DEVICETREE ?= " \
overlays/iqaudio-dac-overlay.dtb \
overlays/iqaudio-dacplus-overlay.dtb \
overlays/lirc-rpi-overlay.dtb \
+ overlays/pitft22-overlay.dtb \
overlays/pps-gpio-overlay.dtb \
overlays/w1-gpio-overlay.dtb \
overlays/w1-gpio-pullup-overlay.dtb \
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
index 236a359..631ff42 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -16,6 +16,7 @@ S = "${WORKDIR}/git"
PR = "r4"
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
+PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
inherit deploy
@@ -80,6 +81,12 @@ do_deploy() {
echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
+
+ # PiTFT22 display support
+ if [ "${PITFT22}" = "1" ]; then
+ echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ fi
}
addtask deploy before do_package after do_install
diff --git a/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
new file mode 100644
index 0000000..fa73599
--- /dev/null
+++ b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
@@ -0,0 +1,110 @@
+From 2f44861e2a2d651a9aa62a75343a032fee33e93b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
+Date: Fri, 8 Jan 2016 09:02:44 +0100
+Subject: [PATCH] dts: add overlay for pitft22 in linux 3.18
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo:
+https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic
+
+Signed-off-by: Petter Mabäcker <petter@technux.se>
+---
+ arch/arm/boot/dts/overlays/Makefile | 1 +
+ arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++
+ 2 files changed, 70 insertions(+)
+ create mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts
+
+diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
+index c766616..1eaaf81 100644
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -27,6 +27,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
++dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb
+diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
+new file mode 100755
+index 0000000..894ba22
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
+@@ -0,0 +1,69 @@
++/*
++ * Device Tree overlay for pitft by Adafruit
++ *
++ */
++
++/dts-v1/;
++/plugin/;
++
++/ {
++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
++
++ fragment@0 {
++ target = <&spi0>;
++ __overlay__ {
++ status = "okay";
++
++ spidev@0{
++ status = "disabled";
++ };
++
++ spidev@1{
++ status = "disabled";
++ };
++ };
++ };
++
++ fragment@1 {
++ target = <&gpio>;
++ __overlay__ {
++ pitft_pins: pitft_pins {
++ brcm,pins = <25>;
++ brcm,function = <1>; /* out */
++ brcm,pull = <0>; /* none */
++ };
++ };
++ };
++
++ fragment@2 {
++ target = <&spi0>;
++ __overlay__ {
++ /* needed to avoid dtc warning */
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ pitft: pitft@0{
++ compatible = "ilitek,ili9340";
++ reg = <0>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pitft_pins>;
++
++ spi-max-frequency = <32000000>;
++ rotate = <90>;
++ fps = <25>;
++ bgr;
++ buswidth = <8>;
++ dc-gpios = <&gpio 25 0>;
++ debug = <0>;
++ };
++
++ };
++ };
++
++ __overrides__ {
++ speed = <&pitft>,"spi-max-frequency:0";
++ rotate = <&pitft>,"rotate:0";
++ fps = <&pitft>,"fps:0";
++ debug = <&pitft>,"debug:0";
++ };
++};
+--
+1.9.1
+
diff --git a/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
new file mode 100644
index 0000000..e6e0a84
--- /dev/null
+++ b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
@@ -0,0 +1,110 @@
+From a28bd410022b32a64e208f04b45add6326990332 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
+Date: Fri, 8 Jan 2016 09:02:44 +0100
+Subject: [PATCH] dts: add overlay for pitft22
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo:
+https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic
+
+Signed-off-by: Petter Mabäcker <petter@technux.se>
+---
+ arch/arm/boot/dts/overlays/Makefile | 1 +
+ arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++
+ 2 files changed, 70 insertions(+)
+ create mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts
+
+diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
+index 1a60e9c..a2535a2 100644
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -37,6 +37,7 @@ dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb
++dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
+ dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
+diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
+new file mode 100755
+index 0000000..894ba22
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
+@@ -0,0 +1,69 @@
++/*
++ * Device Tree overlay for pitft by Adafruit
++ *
++ */
++
++/dts-v1/;
++/plugin/;
++
++/ {
++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
++
++ fragment@0 {
++ target = <&spi0>;
++ __overlay__ {
++ status = "okay";
++
++ spidev@0{
++ status = "disabled";
++ };
++
++ spidev@1{
++ status = "disabled";
++ };
++ };
++ };
++
++ fragment@1 {
++ target = <&gpio>;
++ __overlay__ {
++ pitft_pins: pitft_pins {
++ brcm,pins = <25>;
++ brcm,function = <1>; /* out */
++ brcm,pull = <0>; /* none */
++ };
++ };
++ };
++
++ fragment@2 {
++ target = <&spi0>;
++ __overlay__ {
++ /* needed to avoid dtc warning */
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ pitft: pitft@0{
++ compatible = "ilitek,ili9340";
++ reg = <0>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pitft_pins>;
++
++ spi-max-frequency = <32000000>;
++ rotate = <90>;
++ fps = <25>;
++ bgr;
++ buswidth = <8>;
++ dc-gpios = <&gpio 25 0>;
++ debug = <0>;
++ };
++
++ };
++ };
++
++ __overrides__ {
++ speed = <&pitft>,"spi-max-frequency:0";
++ rotate = <&pitft>,"rotate:0";
++ fps = <&pitft>,"fps:0";
++ debug = <&pitft>,"debug:0";
++ };
++};
+--
+1.9.1
+
diff --git a/recipes-kernel/linux/linux-raspberrypi_3.18.bb b/recipes-kernel/linux/linux-raspberrypi_3.18.bb
index a1fe6b4..9234f70 100644
--- a/recipes-kernel/linux/linux-raspberrypi_3.18.bb
+++ b/recipes-kernel/linux/linux-raspberrypi_3.18.bb
@@ -1,8 +1,9 @@
LINUX_VERSION ?= "3.18.16"
SRCREV = "1bb18c8f721ef674a447f3622273f2e2de7a205c"
-SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y"
-
+SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y \
+ file://0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch \
+ "
require linux-raspberrypi.inc
# Create missing out of tree 'overlays' directory prior to install step
diff --git a/recipes-kernel/linux/linux-raspberrypi_4.1.bb b/recipes-kernel/linux/linux-raspberrypi_4.1.bb
index 3a3cf40..b657c85 100644
--- a/recipes-kernel/linux/linux-raspberrypi_4.1.bb
+++ b/recipes-kernel/linux/linux-raspberrypi_4.1.bb
@@ -1,6 +1,8 @@
LINUX_VERSION ?= "4.1.10"
SRCREV = "b74df9228c27f55361c065bc5dbfba88861cc771"
-SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y"
+SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y \
+ file://0001-dts-add-overlay-for-pitft22.patch \
+ "
require linux-raspberrypi.inc
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [meta-raspberrypi][PATCH v3 6/6] pitft: Add PiTFT22 support
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 6/6] pitft: Add PiTFT22 support Petter Mabäcker
@ 2016-03-01 23:50 ` Andrei Gherzan
2016-03-02 5:35 ` Petter Mabäcker
0 siblings, 1 reply; 15+ messages in thread
From: Andrei Gherzan @ 2016-03-01 23:50 UTC (permalink / raw)
To: Petter Mabäcker; +Cc: yocto
On Sun, Feb 28, 2016 at 02:46:13PM +0100, Petter Mabäcker wrote:
> - Add support to build overlays for PiTFT22 in the kernel.
> - Setup a basic configuration for the driver
>
> The PiTFT22 support is optional and can be enabled by adding below in
> local.conf:
>
> MACHINE_FEATURES += "pitft pitft22"
>
> [Support #70]
>
> Signed-off-by: Petter Mabäcker <petter@technux.se>
> ---
> README | 9 ++
> conf/machine/include/rpi-base.inc | 1 +
> recipes-bsp/bootfiles/rpi-config_git.bb | 7 ++
> ...dts-add-overlay-for-pitft22-in-linux-3.18.patch | 110 +++++++++++++++++++++
> .../0001-dts-add-overlay-for-pitft22.patch | 110 +++++++++++++++++++++
> recipes-kernel/linux/linux-raspberrypi_3.18.bb | 5 +-
> recipes-kernel/linux/linux-raspberrypi_4.1.bb | 4 +-
> 7 files changed, 243 insertions(+), 3 deletions(-)
> create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
> create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
>
> diff --git a/README b/README
> index 6a6c398..4114ccc 100644
> --- a/README
> +++ b/README
> @@ -170,6 +170,15 @@ MACHINE_FEATURES += "pitft"
> NOTE: To get this working the overlay for the PiTFT model must be build,
> added and specified as well (dtoverlay=<driver> in config.txt)
>
> +Below is a list of currently supported PiTFT models in meta-raspberrypi,
> +the modelname should be added as a MACHINE_FEATURES in local.conf like below:
> +
> + - MACHINE_FEATURES += "pitft <modelname>"
> +
> +List of currently supported models
> +-----------------------------------
> +pitft22
> +
> 2.L. Images
> ===========
> * rpi-hwup-image
> diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
> index c8f6cd6..27f09ad 100644
> --- a/conf/machine/include/rpi-base.inc
> +++ b/conf/machine/include/rpi-base.inc
> @@ -31,6 +31,7 @@ KERNEL_DEVICETREE ?= " \
> overlays/iqaudio-dac-overlay.dtb \
> overlays/iqaudio-dacplus-overlay.dtb \
> overlays/lirc-rpi-overlay.dtb \
> + overlays/pitft22-overlay.dtb \
> overlays/pps-gpio-overlay.dtb \
> overlays/w1-gpio-overlay.dtb \
> overlays/w1-gpio-pullup-overlay.dtb \
> diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
> index 236a359..631ff42 100644
> --- a/recipes-bsp/bootfiles/rpi-config_git.bb
> +++ b/recipes-bsp/bootfiles/rpi-config_git.bb
> @@ -16,6 +16,7 @@ S = "${WORKDIR}/git"
> PR = "r4"
>
> PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
> +PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
>
> inherit deploy
>
> @@ -80,6 +81,12 @@ do_deploy() {
> echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> fi
> +
> + # PiTFT22 display support
> + if [ "${PITFT22}" = "1" ]; then
> + echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> + echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> + fi
> }
>
> addtask deploy before do_package after do_install
> diff --git a/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
> new file mode 100644
> index 0000000..fa73599
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
> @@ -0,0 +1,110 @@
> +From 2f44861e2a2d651a9aa62a75343a032fee33e93b Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
> +Date: Fri, 8 Jan 2016 09:02:44 +0100
> +Subject: [PATCH] dts: add overlay for pitft22 in linux 3.18
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Upstream-Status: Pending
> +
> +Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo:
> +https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic
> +
> +Signed-off-by: Petter Mabäcker <petter@technux.se>
> +---
> + arch/arm/boot/dts/overlays/Makefile | 1 +
> + arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++
> + 2 files changed, 70 insertions(+)
> + create mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts
> +
> +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
> +index c766616..1eaaf81 100644
> +--- a/arch/arm/boot/dts/overlays/Makefile
> ++++ b/arch/arm/boot/dts/overlays/Makefile
> +@@ -27,6 +27,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
> ++dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb
> +diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
> +new file mode 100755
> +index 0000000..894ba22
> +--- /dev/null
> ++++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
> +@@ -0,0 +1,69 @@
> ++/*
> ++ * Device Tree overlay for pitft by Adafruit
> ++ *
> ++ */
> ++
> ++/dts-v1/;
> ++/plugin/;
> ++
> ++/ {
> ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
> ++
> ++ fragment@0 {
> ++ target = <&spi0>;
> ++ __overlay__ {
> ++ status = "okay";
> ++
> ++ spidev@0{
> ++ status = "disabled";
> ++ };
> ++
> ++ spidev@1{
> ++ status = "disabled";
> ++ };
> ++ };
> ++ };
> ++
> ++ fragment@1 {
> ++ target = <&gpio>;
> ++ __overlay__ {
> ++ pitft_pins: pitft_pins {
> ++ brcm,pins = <25>;
> ++ brcm,function = <1>; /* out */
> ++ brcm,pull = <0>; /* none */
> ++ };
> ++ };
> ++ };
> ++
> ++ fragment@2 {
> ++ target = <&spi0>;
> ++ __overlay__ {
> ++ /* needed to avoid dtc warning */
> ++ #address-cells = <1>;
> ++ #size-cells = <0>;
> ++
> ++ pitft: pitft@0{
> ++ compatible = "ilitek,ili9340";
> ++ reg = <0>;
> ++ pinctrl-names = "default";
> ++ pinctrl-0 = <&pitft_pins>;
> ++
> ++ spi-max-frequency = <32000000>;
> ++ rotate = <90>;
> ++ fps = <25>;
> ++ bgr;
> ++ buswidth = <8>;
> ++ dc-gpios = <&gpio 25 0>;
> ++ debug = <0>;
> ++ };
> ++
> ++ };
> ++ };
> ++
> ++ __overrides__ {
> ++ speed = <&pitft>,"spi-max-frequency:0";
> ++ rotate = <&pitft>,"rotate:0";
> ++ fps = <&pitft>,"fps:0";
> ++ debug = <&pitft>,"debug:0";
> ++ };
> ++};
> +--
> +1.9.1
> +
> diff --git a/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
> new file mode 100644
> index 0000000..e6e0a84
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
> @@ -0,0 +1,110 @@
> +From a28bd410022b32a64e208f04b45add6326990332 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
> +Date: Fri, 8 Jan 2016 09:02:44 +0100
> +Subject: [PATCH] dts: add overlay for pitft22
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Upstream-Status: Pending
> +
> +Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo:
> +https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic
> +
> +Signed-off-by: Petter Mabäcker <petter@technux.se>
> +---
> + arch/arm/boot/dts/overlays/Makefile | 1 +
> + arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++
> + 2 files changed, 70 insertions(+)
> + create mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts
> +
> +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
> +index 1a60e9c..a2535a2 100644
> +--- a/arch/arm/boot/dts/overlays/Makefile
> ++++ b/arch/arm/boot/dts/overlays/Makefile
> +@@ -37,6 +37,7 @@ dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb
> ++dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
> + dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
> +diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
> +new file mode 100755
> +index 0000000..894ba22
> +--- /dev/null
> ++++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
> +@@ -0,0 +1,69 @@
> ++/*
> ++ * Device Tree overlay for pitft by Adafruit
> ++ *
> ++ */
> ++
> ++/dts-v1/;
> ++/plugin/;
> ++
> ++/ {
> ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
> ++
> ++ fragment@0 {
> ++ target = <&spi0>;
> ++ __overlay__ {
> ++ status = "okay";
> ++
> ++ spidev@0{
> ++ status = "disabled";
> ++ };
> ++
> ++ spidev@1{
> ++ status = "disabled";
> ++ };
> ++ };
> ++ };
> ++
> ++ fragment@1 {
> ++ target = <&gpio>;
> ++ __overlay__ {
> ++ pitft_pins: pitft_pins {
> ++ brcm,pins = <25>;
> ++ brcm,function = <1>; /* out */
> ++ brcm,pull = <0>; /* none */
> ++ };
> ++ };
> ++ };
> ++
> ++ fragment@2 {
> ++ target = <&spi0>;
> ++ __overlay__ {
> ++ /* needed to avoid dtc warning */
> ++ #address-cells = <1>;
> ++ #size-cells = <0>;
> ++
> ++ pitft: pitft@0{
> ++ compatible = "ilitek,ili9340";
> ++ reg = <0>;
> ++ pinctrl-names = "default";
> ++ pinctrl-0 = <&pitft_pins>;
> ++
> ++ spi-max-frequency = <32000000>;
> ++ rotate = <90>;
> ++ fps = <25>;
> ++ bgr;
> ++ buswidth = <8>;
> ++ dc-gpios = <&gpio 25 0>;
> ++ debug = <0>;
> ++ };
> ++
> ++ };
> ++ };
> ++
> ++ __overrides__ {
> ++ speed = <&pitft>,"spi-max-frequency:0";
> ++ rotate = <&pitft>,"rotate:0";
> ++ fps = <&pitft>,"fps:0";
> ++ debug = <&pitft>,"debug:0";
> ++ };
> ++};
> +--
> +1.9.1
> +
> diff --git a/recipes-kernel/linux/linux-raspberrypi_3.18.bb b/recipes-kernel/linux/linux-raspberrypi_3.18.bb
> index a1fe6b4..9234f70 100644
> --- a/recipes-kernel/linux/linux-raspberrypi_3.18.bb
> +++ b/recipes-kernel/linux/linux-raspberrypi_3.18.bb
> @@ -1,8 +1,9 @@
> LINUX_VERSION ?= "3.18.16"
>
> SRCREV = "1bb18c8f721ef674a447f3622273f2e2de7a205c"
> -SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y"
> -
> +SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y \
> + file://0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch \
> + "
> require linux-raspberrypi.inc
>
> # Create missing out of tree 'overlays' directory prior to install step
> diff --git a/recipes-kernel/linux/linux-raspberrypi_4.1.bb b/recipes-kernel/linux/linux-raspberrypi_4.1.bb
> index 3a3cf40..b657c85 100644
> --- a/recipes-kernel/linux/linux-raspberrypi_4.1.bb
> +++ b/recipes-kernel/linux/linux-raspberrypi_4.1.bb
> @@ -1,6 +1,8 @@
> LINUX_VERSION ?= "4.1.10"
>
> SRCREV = "b74df9228c27f55361c065bc5dbfba88861cc771"
> -SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y"
> +SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y \
> + file://0001-dts-add-overlay-for-pitft22.patch \
> + "
>
> require linux-raspberrypi.inc
Cheers Peter!
Based on this patch I pushed a v4:
- resolve conflicts
- use patches specific for a certain kernel version in separate directories -
easier to visualize
What do you think?
--
Andrei Gherzan
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [meta-raspberrypi][PATCH v3 6/6] pitft: Add PiTFT22 support
2016-03-01 23:50 ` Andrei Gherzan
@ 2016-03-02 5:35 ` Petter Mabäcker
0 siblings, 0 replies; 15+ messages in thread
From: Petter Mabäcker @ 2016-03-02 5:35 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 11318 bytes --]
2016-03-02 00:50 skrev Andrei Gherzan:
> On Sun, Feb 28, 2016 at
02:46:13PM +0100, Petter Mabäcker wrote:
>
>> - Add support to build
overlays for PiTFT22 in the kernel. - Setup a basic configuration for
the driver The PiTFT22 support is optional and can be enabled by adding
below in local.conf: MACHINE_FEATURES += "pitft pitft22" [Support #70]
Signed-off-by: Petter Mabäcker <petter@technux.se> --- README | 9 ++
conf/machine/include/rpi-base.inc | 1 +
recipes-bsp/bootfiles/rpi-config_git.bb | 7 ++
...dts-add-overlay-for-pitft22-in-linux-3.18.patch | 110
+++++++++++++++++++++ .../0001-dts-add-overlay-for-pitft22.patch | 110
+++++++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_3.18.bb | 5
+- recipes-kernel/linux/linux-raspberrypi_4.1.bb | 4 +- 7 files changed,
243 insertions(+), 3 deletions(-) create mode 100644
recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
create mode 100644
recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
diff --git a/README b/README index 6a6c398..4114ccc 100644 --- a/README
+++ b/README @@ -170,6 +170,15 @@ MACHINE_FEATURES += "pitft" NOTE: To
get this working the overlay for the PiTFT model must be build, added
and specified as well (dtoverlay=<driver> in config.txt) +Below is a
list of currently supported PiTFT models in meta-raspberrypi, +the
modelname should be added as a MACHINE_FEATURES in local.conf like
below: + + - MACHINE_FEATURES += "pitft <modelname>" + +List of
currently supported models +----------------------------------- +pitft22
+ 2.L. Images =========== * rpi-hwup-image diff --git
a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index c8f6cd6..27f09ad 100644 --- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc @@ -31,6 +31,7 @@
KERNEL_DEVICETREE ?= " overlays/iqaudio-dac-overlay.dtb
overlays/iqaudio-dacplus-overlay.dtb overlays/lirc-rpi-overlay.dtb +
overlays/pitft22-overlay.dtb overlays/pps-gpio-overlay.dtb
overlays/w1-gpio-overlay.dtb overlays/w1-gpio-pullup-overlay.dtb diff
--git a/recipes-bsp/bootfiles/rpi-config_git.bb
b/recipes-bsp/bootfiles/rpi-config_git.bb index 236a359..631ff42 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb +++
b/recipes-bsp/bootfiles/rpi-config_git.bb @@ -16,6 +16,7 @@ S =
"${WORKDIR}/git" PR = "r4"
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
+PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0",
d)}" inherit deploy @@ -80,6 +81,12 @@ do_deploy() { echo
"dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo
"dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt fi + +
# PiTFT22 display support + if [ "${PITFT22}" = "1" ]; then + echo "#
Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt +
echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768"
>>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi } addtask deploy before
do_package after do_install diff --git
a/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
new file mode 100644 index 0000000..fa73599 --- /dev/null +++
b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
@@ -0,0 +1,110 @@ +From 2f44861e2a2d651a9aa62a75343a032fee33e93b Mon
Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petter=20Mab=C3=A4cker?=
<petter@technux.se> +Date: Fri, 8 Jan 2016 09:02:44 +0100 +Subject:
[PATCH] dts: add overlay for pitft22 in linux 3.18 +MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding:
8bit + +Upstream-Status: Pending + +Add the pitft22 overlay from
adafruit Adafruit-Pi-Kernel-o-Matic repo:
+https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic [1] +
+Signed-off-by: Petter Mabäcker <petter@technux.se> +--- +
arch/arm/boot/dts/overlays/Makefile | 1 + +
arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69
++++++++++++++++++++++++++ + 2 files changed, 70 insertions(+) + create
mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts + +diff --git
a/arch/arm/boot/dts/overlays/Makefile
b/arch/arm/boot/dts/overlays/Makefile +index c766616..1eaaf81 100644
+--- a/arch/arm/boot/dts/overlays/Makefile ++++
b/arch/arm/boot/dts/overlays/Makefile +@@ -27,6 +27,7 @@
dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb +
dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) +=
mz61581-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
++dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb + dtb-$(RPI_DT_OVERLAYS)
+= pitft28-resistive-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) +=
pps-gpio-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb
+diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts
b/arch/arm/boot/dts/overlays/pitft22-overlay.dts +new file mode 100755
+index 0000000..894ba22 +--- /dev/null ++++
b/arch/arm/boot/dts/overlays/pitft22-overlay.dts +@@ -0,0 +1,69 @@ ++/*
++ * Device Tree overlay for pitft by Adafruit ++ * ++ */ ++ ++/dts-v1/;
++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708",
"brcm,bcm2709"; ++ ++ fragment@0 { ++ target = <&spi0>; ++ __overlay__ {
++ status = "okay"; ++ ++ spidev@0{ ++ status = "disabled"; ++ }; ++ ++
spidev@1{ ++ status = "disabled"; ++ }; ++ }; ++ }; ++ ++ fragment@1 {
++ target = <&gpio>; ++ __overlay__ { ++ pitft_pins: pitft_pins { ++
brcm,pins = <25>; ++ brcm,function = <1>; /* out */ ++ brcm,pull = <0>;
/* none */ ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&spi0>; ++
__overlay__ { ++ /* needed to avoid dtc warning */ ++ #address-cells =
<1>; ++ #size-cells = <0>; ++ ++ pitft: pitft@0{ ++ compatible =
"ilitek,ili9340"; ++ reg = <0>; ++ pinctrl-names = "default"; ++
pinctrl-0 = <&pitft_pins>; ++ ++ spi-max-frequency = <32000000>; ++
rotate = <90>; ++ fps = <25>; ++ bgr; ++ buswidth = <8>; ++ dc-gpios =
<&gpio 25 0>; ++ debug = <0>; ++ }; ++ ++ }; ++ }; ++ ++ __overrides__ {
++ speed = <&pitft>,"spi-max-frequency:0"; ++ rotate =
<&pitft>,"rotate:0"; ++ fps = <&pitft>,"fps:0"; ++ debug =
<&pitft>,"debug:0"; ++ }; ++}; +-- +1.9.1 + diff --git
a/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
new file mode 100644 index 0000000..e6e0a84 --- /dev/null +++
b/recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
@@ -0,0 +1,110 @@ +From a28bd410022b32a64e208f04b45add6326990332 Mon
Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petter=20Mab=C3=A4cker?=
<petter@technux.se> +Date: Fri, 8 Jan 2016 09:02:44 +0100 +Subject:
[PATCH] dts: add overlay for pitft22 +MIME-Version: 1.0 +Content-Type:
text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +
+Upstream-Status: Pending + +Add the pitft22 overlay from adafruit
Adafruit-Pi-Kernel-o-Matic repo:
+https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic [1] +
+Signed-off-by: Petter Mabäcker <petter@technux.se> +--- +
arch/arm/boot/dts/overlays/Makefile | 1 + +
arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69
++++++++++++++++++++++++++ + 2 files changed, 70 insertions(+) + create
mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts + +diff --git
a/arch/arm/boot/dts/overlays/Makefile
b/arch/arm/boot/dts/overlays/Makefile +index 1a60e9c..a2535a2 100644
+--- a/arch/arm/boot/dts/overlays/Makefile ++++
b/arch/arm/boot/dts/overlays/Makefile +@@ -37,6 +37,7 @@
dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) +=
mz61581-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb +
dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb
++dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb + dtb-$(RPI_DT_OVERLAYS)
+= pitft28-capacitive-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) +=
pitft28-resistive-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) +=
pps-gpio-overlay.dtb +diff --git
a/arch/arm/boot/dts/overlays/pitft22-overlay.dts
b/arch/arm/boot/dts/overlays/pitft22-overlay.dts +new file mode 100755
+index 0000000..894ba22 +--- /dev/null ++++
b/arch/arm/boot/dts/overlays/pitft22-overlay.dts +@@ -0,0 +1,69 @@ ++/*
++ * Device Tree overlay for pitft by Adafruit ++ * ++ */ ++ ++/dts-v1/;
++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708",
"brcm,bcm2709"; ++ ++ fragment@0 { ++ target = <&spi0>; ++ __overlay__ {
++ status = "okay"; ++ ++ spidev@0{ ++ status = "disabled"; ++ }; ++ ++
spidev@1{ ++ status = "disabled"; ++ }; ++ }; ++ }; ++ ++ fragment@1 {
++ target = <&gpio>; ++ __overlay__ { ++ pitft_pins: pitft_pins { ++
brcm,pins = <25>; ++ brcm,function = <1>; /* out */ ++ brcm,pull = <0>;
/* none */ ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&spi0>; ++
__overlay__ { ++ /* needed to avoid dtc warning */ ++ #address-cells =
<1>; ++ #size-cells = <0>; ++ ++ pitft: pitft@0{ ++ compatible =
"ilitek,ili9340"; ++ reg = <0>; ++ pinctrl-names = "default"; ++
pinctrl-0 = <&pitft_pins>; ++ ++ spi-max-frequency = <32000000>; ++
rotate = <90>; ++ fps = <25>; ++ bgr; ++ buswidth = <8>; ++ dc-gpios =
<&gpio 25 0>; ++ debug = <0>; ++ }; ++ ++ }; ++ }; ++ ++ __overrides__ {
++ speed = <&pitft>,"spi-max-frequency:0"; ++ rotate =
<&pitft>,"rotate:0"; ++ fps = <&pitft>,"fps:0"; ++ debug =
<&pitft>,"debug:0"; ++ }; ++}; +-- +1.9.1 + diff --git
a/recipes-kernel/linux/linux-raspberrypi_3.18.bb
b/recipes-kernel/linux/linux-raspberrypi_3.18.bb index a1fe6b4..9234f70
100644 --- a/recipes-kernel/linux/linux-raspberrypi_3.18.bb +++
b/recipes-kernel/linux/linux-raspberrypi_3.18.bb @@ -1,8 +1,9 @@
LINUX_VERSION ?= "3.18.16" SRCREV =
"1bb18c8f721ef674a447f3622273f2e2de7a205c" -SRC_URI =
"git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y"
- +SRC_URI =
"git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y +
file://0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch [2] + "
require linux-raspberrypi.inc # Create missing out of tree 'overlays'
directory prior to install step diff --git
a/recipes-kernel/linux/linux-raspberrypi_4.1.bb
b/recipes-kernel/linux/linux-raspberrypi_4.1.bb index 3a3cf40..b657c85
100644 --- a/recipes-kernel/linux/linux-raspberrypi_4.1.bb +++
b/recipes-kernel/linux/linux-raspberrypi_4.1.bb @@ -1,6 +1,8 @@
LINUX_VERSION ?= "4.1.10" SRCREV =
"b74df9228c27f55361c065bc5dbfba88861cc771" -SRC_URI =
"git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y"
+SRC_URI =
"git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y +
file://0001-dts-add-overlay-for-pitft22.patch [3] + " require
linux-raspberrypi.inc
>
> Cheers Peter!
>
> Based on this patch I
pushed a v4:
> - resolve conflicts
> - use patches specific for a
certain kernel version in separate directories -
> easier to visualize
>
> What do you think?
>
> --
> Andrei Gherzan
Hi Andrei,
I think it
makes sense. Please go ahead with these changes.
BR Petter
Petter
Mabäcker
Technux <petter@technux.se>
www.technux.se
Links:
------
[1]
https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic
[2]
file://0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
[3]
file://0001-dts-add-overlay-for-pitft22.patch
[-- Attachment #2: Type: text/html, Size: 12389 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread