diff options
author | Petter Mabäcker <petter@technux.se> | 2016-02-28 14:46:13 +0100 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2016-03-01 21:56:56 +0100 |
commit | a42a1706de91ed03ae8798c7f9e70c30cebcf7de (patch) | |
tree | 507887a5f4c0a856713bc3df22a6d407609333b9 /recipes-kernel | |
parent | 249cb544e0630645e6ed7267e3ea4aa91fff1471 (diff) | |
download | meta-raspberrypi-a42a1706de91ed03ae8798c7f9e70c30cebcf7de.tar.gz |
pitft: Add PiTFT22 support
- 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"
This patch also includes restructuring of kernel patches per kernel version
specific directories.
[Support #70]
Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Diffstat (limited to 'recipes-kernel')
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi-3.14/0001-ASoC-Add-BCM2708-fixes.patch (renamed from recipes-kernel/linux/linux-raspberrypi/0001-ASoC-Add-BCM2708-fixes.patch) | 0 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi-3.14/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch (renamed from recipes-kernel/linux/linux-raspberrypi/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch) | 0 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi-3.18/0001-dts-add-overlay-for-pitft22.patch | 110 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi-4.1/0001-dts-add-overlay-for-pitft22.patch | 110 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi_3.14.bb | 2 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi_3.18.bb | 7 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi_4.1.bb | 6 |
7 files changed, 232 insertions, 3 deletions
diff --git a/recipes-kernel/linux/linux-raspberrypi/0001-ASoC-Add-BCM2708-fixes.patch b/recipes-kernel/linux/linux-raspberrypi-3.14/0001-ASoC-Add-BCM2708-fixes.patch index 26c71b8..26c71b8 100644 --- a/recipes-kernel/linux/linux-raspberrypi/0001-ASoC-Add-BCM2708-fixes.patch +++ b/recipes-kernel/linux/linux-raspberrypi-3.14/0001-ASoC-Add-BCM2708-fixes.patch | |||
diff --git a/recipes-kernel/linux/linux-raspberrypi/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch b/recipes-kernel/linux/linux-raspberrypi-3.14/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch index 907ed7b..907ed7b 100644 --- a/recipes-kernel/linux/linux-raspberrypi/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch +++ b/recipes-kernel/linux/linux-raspberrypi-3.14/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch | |||
diff --git a/recipes-kernel/linux/linux-raspberrypi-3.18/0001-dts-add-overlay-for-pitft22.patch b/recipes-kernel/linux/linux-raspberrypi-3.18/0001-dts-add-overlay-for-pitft22.patch new file mode 100644 index 0000000..fa73599 --- /dev/null +++ b/recipes-kernel/linux/linux-raspberrypi-3.18/0001-dts-add-overlay-for-pitft22.patch | |||
@@ -0,0 +1,110 @@ | |||
1 | From 2f44861e2a2d651a9aa62a75343a032fee33e93b Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se> | ||
3 | Date: Fri, 8 Jan 2016 09:02:44 +0100 | ||
4 | Subject: [PATCH] dts: add overlay for pitft22 in linux 3.18 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo: | ||
12 | https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic | ||
13 | |||
14 | Signed-off-by: Petter Mabäcker <petter@technux.se> | ||
15 | --- | ||
16 | arch/arm/boot/dts/overlays/Makefile | 1 + | ||
17 | arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++ | ||
18 | 2 files changed, 70 insertions(+) | ||
19 | create mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts | ||
20 | |||
21 | diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile | ||
22 | index c766616..1eaaf81 100644 | ||
23 | --- a/arch/arm/boot/dts/overlays/Makefile | ||
24 | +++ b/arch/arm/boot/dts/overlays/Makefile | ||
25 | @@ -27,6 +27,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb | ||
26 | dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb | ||
27 | dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb | ||
28 | dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb | ||
29 | +dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb | ||
30 | dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb | ||
31 | dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb | ||
32 | dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb | ||
33 | diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts | ||
34 | new file mode 100755 | ||
35 | index 0000000..894ba22 | ||
36 | --- /dev/null | ||
37 | +++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts | ||
38 | @@ -0,0 +1,69 @@ | ||
39 | +/* | ||
40 | + * Device Tree overlay for pitft by Adafruit | ||
41 | + * | ||
42 | + */ | ||
43 | + | ||
44 | +/dts-v1/; | ||
45 | +/plugin/; | ||
46 | + | ||
47 | +/ { | ||
48 | + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; | ||
49 | + | ||
50 | + fragment@0 { | ||
51 | + target = <&spi0>; | ||
52 | + __overlay__ { | ||
53 | + status = "okay"; | ||
54 | + | ||
55 | + spidev@0{ | ||
56 | + status = "disabled"; | ||
57 | + }; | ||
58 | + | ||
59 | + spidev@1{ | ||
60 | + status = "disabled"; | ||
61 | + }; | ||
62 | + }; | ||
63 | + }; | ||
64 | + | ||
65 | + fragment@1 { | ||
66 | + target = <&gpio>; | ||
67 | + __overlay__ { | ||
68 | + pitft_pins: pitft_pins { | ||
69 | + brcm,pins = <25>; | ||
70 | + brcm,function = <1>; /* out */ | ||
71 | + brcm,pull = <0>; /* none */ | ||
72 | + }; | ||
73 | + }; | ||
74 | + }; | ||
75 | + | ||
76 | + fragment@2 { | ||
77 | + target = <&spi0>; | ||
78 | + __overlay__ { | ||
79 | + /* needed to avoid dtc warning */ | ||
80 | + #address-cells = <1>; | ||
81 | + #size-cells = <0>; | ||
82 | + | ||
83 | + pitft: pitft@0{ | ||
84 | + compatible = "ilitek,ili9340"; | ||
85 | + reg = <0>; | ||
86 | + pinctrl-names = "default"; | ||
87 | + pinctrl-0 = <&pitft_pins>; | ||
88 | + | ||
89 | + spi-max-frequency = <32000000>; | ||
90 | + rotate = <90>; | ||
91 | + fps = <25>; | ||
92 | + bgr; | ||
93 | + buswidth = <8>; | ||
94 | + dc-gpios = <&gpio 25 0>; | ||
95 | + debug = <0>; | ||
96 | + }; | ||
97 | + | ||
98 | + }; | ||
99 | + }; | ||
100 | + | ||
101 | + __overrides__ { | ||
102 | + speed = <&pitft>,"spi-max-frequency:0"; | ||
103 | + rotate = <&pitft>,"rotate:0"; | ||
104 | + fps = <&pitft>,"fps:0"; | ||
105 | + debug = <&pitft>,"debug:0"; | ||
106 | + }; | ||
107 | +}; | ||
108 | -- | ||
109 | 1.9.1 | ||
110 | |||
diff --git a/recipes-kernel/linux/linux-raspberrypi-4.1/0001-dts-add-overlay-for-pitft22.patch b/recipes-kernel/linux/linux-raspberrypi-4.1/0001-dts-add-overlay-for-pitft22.patch new file mode 100644 index 0000000..e6e0a84 --- /dev/null +++ b/recipes-kernel/linux/linux-raspberrypi-4.1/0001-dts-add-overlay-for-pitft22.patch | |||
@@ -0,0 +1,110 @@ | |||
1 | From a28bd410022b32a64e208f04b45add6326990332 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se> | ||
3 | Date: Fri, 8 Jan 2016 09:02:44 +0100 | ||
4 | Subject: [PATCH] dts: add overlay for pitft22 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo: | ||
12 | https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic | ||
13 | |||
14 | Signed-off-by: Petter Mabäcker <petter@technux.se> | ||
15 | --- | ||
16 | arch/arm/boot/dts/overlays/Makefile | 1 + | ||
17 | arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++ | ||
18 | 2 files changed, 70 insertions(+) | ||
19 | create mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts | ||
20 | |||
21 | diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile | ||
22 | index 1a60e9c..a2535a2 100644 | ||
23 | --- a/arch/arm/boot/dts/overlays/Makefile | ||
24 | +++ b/arch/arm/boot/dts/overlays/Makefile | ||
25 | @@ -37,6 +37,7 @@ dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb | ||
26 | dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb | ||
27 | dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb | ||
28 | dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb | ||
29 | +dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb | ||
30 | dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb | ||
31 | dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb | ||
32 | dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb | ||
33 | diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts | ||
34 | new file mode 100755 | ||
35 | index 0000000..894ba22 | ||
36 | --- /dev/null | ||
37 | +++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts | ||
38 | @@ -0,0 +1,69 @@ | ||
39 | +/* | ||
40 | + * Device Tree overlay for pitft by Adafruit | ||
41 | + * | ||
42 | + */ | ||
43 | + | ||
44 | +/dts-v1/; | ||
45 | +/plugin/; | ||
46 | + | ||
47 | +/ { | ||
48 | + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; | ||
49 | + | ||
50 | + fragment@0 { | ||
51 | + target = <&spi0>; | ||
52 | + __overlay__ { | ||
53 | + status = "okay"; | ||
54 | + | ||
55 | + spidev@0{ | ||
56 | + status = "disabled"; | ||
57 | + }; | ||
58 | + | ||
59 | + spidev@1{ | ||
60 | + status = "disabled"; | ||
61 | + }; | ||
62 | + }; | ||
63 | + }; | ||
64 | + | ||
65 | + fragment@1 { | ||
66 | + target = <&gpio>; | ||
67 | + __overlay__ { | ||
68 | + pitft_pins: pitft_pins { | ||
69 | + brcm,pins = <25>; | ||
70 | + brcm,function = <1>; /* out */ | ||
71 | + brcm,pull = <0>; /* none */ | ||
72 | + }; | ||
73 | + }; | ||
74 | + }; | ||
75 | + | ||
76 | + fragment@2 { | ||
77 | + target = <&spi0>; | ||
78 | + __overlay__ { | ||
79 | + /* needed to avoid dtc warning */ | ||
80 | + #address-cells = <1>; | ||
81 | + #size-cells = <0>; | ||
82 | + | ||
83 | + pitft: pitft@0{ | ||
84 | + compatible = "ilitek,ili9340"; | ||
85 | + reg = <0>; | ||
86 | + pinctrl-names = "default"; | ||
87 | + pinctrl-0 = <&pitft_pins>; | ||
88 | + | ||
89 | + spi-max-frequency = <32000000>; | ||
90 | + rotate = <90>; | ||
91 | + fps = <25>; | ||
92 | + bgr; | ||
93 | + buswidth = <8>; | ||
94 | + dc-gpios = <&gpio 25 0>; | ||
95 | + debug = <0>; | ||
96 | + }; | ||
97 | + | ||
98 | + }; | ||
99 | + }; | ||
100 | + | ||
101 | + __overrides__ { | ||
102 | + speed = <&pitft>,"spi-max-frequency:0"; | ||
103 | + rotate = <&pitft>,"rotate:0"; | ||
104 | + fps = <&pitft>,"fps:0"; | ||
105 | + debug = <&pitft>,"debug:0"; | ||
106 | + }; | ||
107 | +}; | ||
108 | -- | ||
109 | 1.9.1 | ||
110 | |||
diff --git a/recipes-kernel/linux/linux-raspberrypi_3.14.bb b/recipes-kernel/linux/linux-raspberrypi_3.14.bb index 2edba32..f6e6291 100644 --- a/recipes-kernel/linux/linux-raspberrypi_3.14.bb +++ b/recipes-kernel/linux/linux-raspberrypi_3.14.bb | |||
@@ -1,3 +1,5 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" | ||
2 | |||
1 | LINUX_VERSION ?= "3.14.28" | 3 | LINUX_VERSION ?= "3.14.28" |
2 | 4 | ||
3 | SRCREV = "e294028d7733a30f3befacc41d473c251096a515" | 5 | SRCREV = "e294028d7733a30f3befacc41d473c251096a515" |
diff --git a/recipes-kernel/linux/linux-raspberrypi_3.18.bb b/recipes-kernel/linux/linux-raspberrypi_3.18.bb index a1fe6b4..1110b71 100644 --- a/recipes-kernel/linux/linux-raspberrypi_3.18.bb +++ b/recipes-kernel/linux/linux-raspberrypi_3.18.bb | |||
@@ -1,8 +1,11 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" | ||
2 | |||
1 | LINUX_VERSION ?= "3.18.16" | 3 | LINUX_VERSION ?= "3.18.16" |
2 | 4 | ||
3 | SRCREV = "1bb18c8f721ef674a447f3622273f2e2de7a205c" | 5 | SRCREV = "1bb18c8f721ef674a447f3622273f2e2de7a205c" |
4 | SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y" | 6 | SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y \ |
5 | 7 | file://0001-dts-add-overlay-for-pitft22.patch \ | |
8 | " | ||
6 | require linux-raspberrypi.inc | 9 | require linux-raspberrypi.inc |
7 | 10 | ||
8 | # Create missing out of tree 'overlays' directory prior to install step | 11 | # 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 d5bfa45..e26019e 100644 --- a/recipes-kernel/linux/linux-raspberrypi_4.1.bb +++ b/recipes-kernel/linux/linux-raspberrypi_4.1.bb | |||
@@ -1,6 +1,10 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" | ||
2 | |||
1 | LINUX_VERSION ?= "4.1.17" | 3 | LINUX_VERSION ?= "4.1.17" |
2 | 4 | ||
3 | SRCREV = "cb2f10196a9b718a2d94bb4ac0887c2ea14988ae" | 5 | SRCREV = "cb2f10196a9b718a2d94bb4ac0887c2ea14988ae" |
4 | SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y" | 6 | SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y \ |
7 | file://0001-dts-add-overlay-for-pitft22.patch \ | ||
8 | " | ||
5 | 9 | ||
6 | require linux-raspberrypi.inc | 10 | require linux-raspberrypi.inc |