All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Petter Mabäcker" <petter@technux.se>
To: Andrei Gherzan <andrei@gherzan.ro>
Cc: yocto@yoctoproject.org
Subject: Re: [meta-raspberrypi][PATCH v3 6/6] pitft: Add PiTFT22 support
Date: Wed, 02 Mar 2016 06:35:09 +0100	[thread overview]
Message-ID: <5a0f87a63ea46cf3efd131a7f27cd6e4@technux.se> (raw)
In-Reply-To: <20160301235003.GF21641@resin.home>

[-- 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 --]

      reply	other threads:[~2016-03-02  5:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-03-01 13:28   ` Andrei Gherzan
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 2/6] .gitignore: Ignore .swp files 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
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
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-03-01 13:39   ` Andrei Gherzan
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a0f87a63ea46cf3efd131a7f27cd6e4@technux.se \
    --to=petter@technux.se \
    --cc=andrei@gherzan.ro \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.