1 From 1c2a93ce0e1cf6d278cf565346183d7592cfbb24 Mon Sep 17 00:00:00 2001
2 From: Melissa LeBlanc-Williams <melissa@adafruit.com>
3 Date: Fri, 26 Jan 2024 14:41:42 -0800
4 Subject: [PATCH 1262/1295] Update touch PiTFT overlays
6 Expose the invert and swap touch parameters on 2.8" and 3.5" resistive touchscreens. Add
7 the DRM parameter to the PiTFT 2.2" and 2.8" Capacitive overlay in the same
8 way it is on the resistive overlays. Change the DRM driver to `adafruit,yx240qv29`
9 because the rotations are consistent with the FBTFT Driver. Fix the override size parameters
10 on the 2.8" capacitive PiTFT.
12 Signed-off-by: Melissa LeBlanc-Williams <melissa@adafruit.com>
14 arch/arm/boot/dts/overlays/README | 20 +++
15 .../arm/boot/dts/overlays/pitft22-overlay.dts | 102 +++++++-------
16 .../overlays/pitft28-capacitive-overlay.dts | 132 +++++++++---------
17 .../overlays/pitft28-resistive-overlay.dts | 12 +-
18 .../overlays/pitft35-resistive-overlay.dts | 10 +-
19 5 files changed, 156 insertions(+), 120 deletions(-)
21 --- a/arch/arm/boot/dts/overlays/README
22 +++ b/arch/arm/boot/dts/overlays/README
23 @@ -3526,6 +3526,10 @@ Params: speed Display
25 debug Debug output level {0-7}
27 + drm Force the use of the mi0283qt DRM driver (by
28 + default the ili9340 framebuffer driver will
29 + be used in preference if available)
32 Name: pitft28-capacitive
33 Info: Adafruit PiTFT 2.8" capacitive touch screen
34 @@ -3538,6 +3542,10 @@ Params: speed Display
36 debug Debug output level {0-7}
38 + drm Force the use of the mi0283qt DRM driver (by
39 + default the ili9340 framebuffer driver will
40 + be used in preference if available)
42 touch-sizex Touchscreen size x (default 240)
44 touch-sizey Touchscreen size y (default 320)
45 @@ -3564,6 +3572,12 @@ Params: speed Display
46 default the ili9340 framebuffer driver will
47 be used in preference if available)
49 + touch-invx Touchscreen inverted x axis
51 + touch-invy Touchscreen inverted y axis
53 + touch-swapxy Touchscreen swapped x y axis
56 Name: pitft35-resistive
57 Info: Adafruit PiTFT 3.5" resistive touch screen
58 @@ -3580,6 +3594,12 @@ Params: speed Display
59 default the fb_hx8357d framebuffer driver will
60 be used in preference if available)
62 + touch-invx Touchscreen inverted x axis
64 + touch-invy Touchscreen inverted y axis
66 + touch-swapxy Touchscreen swapped x y axis
70 Info: Configures the pps-gpio (pulse-per-second time signal via GPIO).
71 --- a/arch/arm/boot/dts/overlays/pitft22-overlay.dts
72 +++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
77 - compatible = "brcm,bcm2835";
78 + compatible = "brcm,bcm2835";
81 - target = <&spidev0>;
83 - status = "disabled";
86 + target = <&spidev0>;
88 + status = "disabled";
93 - target = <&spidev1>;
95 - status = "disabled";
102 - pitft_pins: pitft_pins {
104 - brcm,function = <1>; /* out */
105 - brcm,pull = <0>; /* none */
113 - /* needed to avoid dtc warning */
114 - #address-cells = <1>;
119 - compatible = "ilitek,ili9340";
121 - pinctrl-names = "default";
122 - pinctrl-0 = <&pitft_pins>;
124 - spi-max-frequency = <32000000>;
129 - dc-gpios = <&gpio 25 0>;
137 - speed = <&pitft>,"spi-max-frequency:0";
138 - rotate = <&pitft>,"rotate:0";
139 - fps = <&pitft>,"fps:0";
140 - debug = <&pitft>,"debug:0";
143 + target = <&spidev1>;
145 + status = "disabled";
152 + pitft_pins: pitft_pins {
154 + brcm,function = <1>; /* out */
155 + brcm,pull = <0>; /* none */
163 + /* needed to avoid dtc warning */
164 + #address-cells = <1>;
169 + compatible = "ilitek,ili9340";
171 + pinctrl-names = "default";
172 + pinctrl-0 = <&pitft_pins>;
174 + spi-max-frequency = <32000000>;
179 + dc-gpios = <&gpio 25 0>;
187 + speed = <&pitft>,"spi-max-frequency:0";
188 + rotate = <&pitft>,"rotate:0", /* fbtft */
189 + <&pitft>,"rotation:0"; /* drm */
190 + fps = <&pitft>,"fps:0";
191 + debug = <&pitft>,"debug:0";
192 + drm = <&pitft>,"compatible=adafruit,yx240qv29";
195 --- a/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts
196 +++ b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts
201 - compatible = "brcm,bcm2835";
202 + compatible = "brcm,bcm2835";
226 - pitft_pins: pitft_pins {
227 - brcm,pins = <24 25>;
228 - brcm,function = <0 1>; /* in out */
229 - brcm,pull = <2 0>; /* pullup none */
237 - /* needed to avoid dtc warning */
238 - #address-cells = <1>;
242 - compatible = "ilitek,ili9340";
244 - pinctrl-names = "default";
245 - pinctrl-0 = <&pitft_pins>;
247 - spi-max-frequency = <32000000>;
252 - dc-gpios = <&gpio 25 0>;
261 - /* needed to avoid dtc warning */
262 - #address-cells = <1>;
265 - ft6236: ft6236@38 {
266 - compatible = "focaltech,ft6236";
269 - interrupt-parent = <&gpio>;
270 - interrupts = <24 2>;
271 - touchscreen-size-x = <240>;
272 - touchscreen-size-y = <320>;
278 - speed = <&pitft>,"spi-max-frequency:0";
279 - rotate = <&pitft>,"rotate:0";
280 - fps = <&pitft>,"fps:0";
281 - debug = <&pitft>,"debug:0";
282 - touch-sizex = <&ft6236>,"touchscreen-size-x?";
283 - touch-sizey = <&ft6236>,"touchscreen-size-y?";
284 - touch-invx = <&ft6236>,"touchscreen-inverted-x?";
285 - touch-invy = <&ft6236>,"touchscreen-inverted-y?";
286 - touch-swapxy = <&ft6236>,"touchscreen-swapped-x-y?";
291 + pitft_pins: pitft_pins {
292 + brcm,pins = <24 25>;
293 + brcm,function = <0 1>; /* in out */
294 + brcm,pull = <2 0>; /* pullup none */
302 + /* needed to avoid dtc warning */
303 + #address-cells = <1>;
307 + compatible = "ilitek,ili9340";
309 + pinctrl-names = "default";
310 + pinctrl-0 = <&pitft_pins>;
312 + spi-max-frequency = <32000000>;
317 + dc-gpios = <&gpio 25 0>;
326 + /* needed to avoid dtc warning */
327 + #address-cells = <1>;
330 + ft6236: ft6236@38 {
331 + compatible = "focaltech,ft6236";
334 + interrupt-parent = <&gpio>;
335 + interrupts = <24 2>;
336 + touchscreen-size-x = <240>;
337 + touchscreen-size-y = <320>;
343 + speed = <&pitft>,"spi-max-frequency:0";
344 + rotate = <&pitft>,"rotate:0", /* fbtft */
345 + <&pitft>,"rotation:0"; /* drm */
346 + fps = <&pitft>,"fps:0";
347 + debug = <&pitft>,"debug:0";
348 + drm = <&pitft>,"compatible=adafruit,yx240qv29";
349 + touch-sizex = <&ft6236>,"touchscreen-size-x:0";
350 + touch-sizey = <&ft6236>,"touchscreen-size-y:0";
351 + touch-invx = <&ft6236>,"touchscreen-inverted-x?";
352 + touch-invy = <&ft6236>,"touchscreen-inverted-y?";
353 + touch-swapxy = <&ft6236>,"touchscreen-swapped-x-y?";
356 --- a/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts
357 +++ b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts
362 - compatible = "ilitek,ili9340", "multi-inno,mi0283qt";
363 + compatible = "ilitek,ili9340";
365 pinctrl-names = "default";
366 pinctrl-0 = <&pitft_pins>;
371 + /* needed to avoid dtc warning */
372 + #address-cells = <1>;
373 + #interrupt-cells = <1>;
374 compatible = "st,stmpe610";
378 interrupt-parent = <&gpio>;
379 interrupt-controller;
381 - stmpe_touchscreen {
382 + stmpe_touchscreen: stmpe_touchscreen {
383 compatible = "st,stmpe-ts";
384 st,sample-time = <4>;
387 <&pitft>,"rotation:0"; /* drm */
388 fps = <&pitft>,"fps:0";
389 debug = <&pitft>,"debug:0";
390 - drm = <&pitft>,"compatible=multi-inno,mi0283qt";
391 + drm = <&pitft>,"compatible=adafruit,yx240qv29";
392 + touch-invx = <&stmpe_touchscreen>,"touchscreen-inverted-x?";
393 + touch-invy = <&stmpe_touchscreen>,"touchscreen-inverted-y?";
394 + touch-swapxy = <&stmpe_touchscreen>,"touchscreen-swapped-x-y?";
397 --- a/arch/arm/boot/dts/overlays/pitft35-resistive-overlay.dts
398 +++ b/arch/arm/boot/dts/overlays/pitft35-resistive-overlay.dts
403 - compatible = "himax,hx8357d", "adafruit,yx350hv15";
404 + compatible = "himax,hx8357d";
406 pinctrl-names = "default";
407 pinctrl-0 = <&pitft_pins>;
412 + /* needed to avoid dtc warning */
413 + #address-cells = <1>;
414 + #interrupt-cells = <1>;
415 compatible = "st,stmpe610";
419 interrupt-parent = <&gpio>;
420 interrupt-controller;
422 - stmpe_touchscreen {
423 + stmpe_touchscreen: stmpe_touchscreen {
424 compatible = "st,stmpe-ts";
425 st,sample-time = <4>;
428 debug = <&pitft>,"debug:0";
429 drm = <&pitft>,"compatible=adafruit,yx350hv15",
430 <&pitft>,"backlight:0=",<&backlight>;
431 + touch-invx = <&stmpe_touchscreen>,"touchscreen-inverted-x?";
432 + touch-invy = <&stmpe_touchscreen>,"touchscreen-inverted-y?";
433 + touch-swapxy = <&stmpe_touchscreen>,"touchscreen-swapped-x-y?";