Skip to content

Commit 2400b3d

Browse files
committed
Update touch PiTFT overlays
Signed-off-by: Melissa LeBlanc-Williams <[email protected]>
1 parent 1cdbd99 commit 2400b3d

File tree

5 files changed

+168
-120
lines changed

5 files changed

+168
-120
lines changed

arch/arm/boot/dts/overlays/README

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3526,6 +3526,10 @@ Params: speed Display SPI bus speed
35263526

35273527
debug Debug output level {0-7}
35283528

3529+
drm Force the use of the mi0283qt DRM driver (by
3530+
default the ili9340 framebuffer driver will
3531+
be used in preference if available)
3532+
35293533

35303534
Name: pitft28-capacitive
35313535
Info: Adafruit PiTFT 2.8" capacitive touch screen
@@ -3538,6 +3542,10 @@ Params: speed Display SPI bus speed
35383542

35393543
debug Debug output level {0-7}
35403544

3545+
drm Force the use of the mi0283qt DRM driver (by
3546+
default the ili9340 framebuffer driver will
3547+
be used in preference if available)
3548+
35413549
touch-sizex Touchscreen size x (default 240)
35423550

35433551
touch-sizey Touchscreen size y (default 320)
@@ -3564,6 +3572,16 @@ Params: speed Display SPI bus speed
35643572
default the ili9340 framebuffer driver will
35653573
be used in preference if available)
35663574

3575+
touch-sizex Touchscreen size x (default 240)
3576+
3577+
touch-sizey Touchscreen size y (default 320)
3578+
3579+
touch-invx Touchscreen inverted x axis
3580+
3581+
touch-invy Touchscreen inverted y axis
3582+
3583+
touch-swapxy Touchscreen swapped x y axis
3584+
35673585

35683586
Name: pitft35-resistive
35693587
Info: Adafruit PiTFT 3.5" resistive touch screen
@@ -3580,6 +3598,16 @@ Params: speed Display SPI bus speed
35803598
default the fb_hx8357d framebuffer driver will
35813599
be used in preference if available)
35823600

3601+
touch-sizex Touchscreen size x (default 240)
3602+
3603+
touch-sizey Touchscreen size y (default 320)
3604+
3605+
touch-invx Touchscreen inverted x axis
3606+
3607+
touch-invy Touchscreen inverted y axis
3608+
3609+
touch-swapxy Touchscreen swapped x y axis
3610+
35833611

35843612
Name: pps-gpio
35853613
Info: Configures the pps-gpio (pulse-per-second time signal via GPIO).

arch/arm/boot/dts/overlays/pitft22-overlay.dts

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,65 @@
77
/plugin/;
88

99
/ {
10-
compatible = "brcm,bcm2835";
10+
compatible = "brcm,bcm2835";
1111

12-
fragment@0 {
13-
target = <&spidev0>;
14-
__overlay__ {
15-
status = "disabled";
16-
};
12+
fragment@0 {
13+
target = <&spidev0>;
14+
__overlay__ {
15+
status = "disabled";
16+
};
1717
};
1818

19-
fragment@1 {
20-
target = <&spidev1>;
21-
__overlay__ {
22-
status = "disabled";
23-
};
24-
};
19+
fragment@1 {
20+
target = <&spidev1>;
21+
__overlay__ {
22+
status = "disabled";
23+
};
24+
};
2525

26-
fragment@2 {
27-
target = <&gpio>;
28-
__overlay__ {
29-
pitft_pins: pitft_pins {
30-
brcm,pins = <25>;
31-
brcm,function = <1>; /* out */
32-
brcm,pull = <0>; /* none */
33-
};
34-
};
35-
};
26+
fragment@2 {
27+
target = <&gpio>;
28+
__overlay__ {
29+
pitft_pins: pitft_pins {
30+
brcm,pins = <25>;
31+
brcm,function = <1>; /* out */
32+
brcm,pull = <0>; /* none */
33+
};
34+
};
35+
};
3636

37-
fragment@3 {
38-
target = <&spi0>;
39-
__overlay__ {
40-
/* needed to avoid dtc warning */
41-
#address-cells = <1>;
42-
#size-cells = <0>;
43-
status = "okay";
37+
fragment@3 {
38+
target = <&spi0>;
39+
__overlay__ {
40+
/* needed to avoid dtc warning */
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
status = "okay";
4444

45-
pitft: pitft@0{
46-
compatible = "ilitek,ili9340";
47-
reg = <0>;
48-
pinctrl-names = "default";
49-
pinctrl-0 = <&pitft_pins>;
45+
pitft: pitft@0{
46+
compatible = "ilitek,ili9340";
47+
reg = <0>;
48+
pinctrl-names = "default";
49+
pinctrl-0 = <&pitft_pins>;
5050

51-
spi-max-frequency = <32000000>;
52-
rotate = <90>;
53-
fps = <25>;
54-
bgr;
55-
buswidth = <8>;
56-
dc-gpios = <&gpio 25 0>;
57-
debug = <0>;
58-
};
51+
spi-max-frequency = <32000000>;
52+
rotate = <90>;
53+
fps = <25>;
54+
bgr;
55+
buswidth = <8>;
56+
dc-gpios = <&gpio 25 0>;
57+
debug = <0>;
58+
};
5959

60-
};
61-
};
60+
};
61+
};
6262

63-
__overrides__ {
64-
speed = <&pitft>,"spi-max-frequency:0";
65-
rotate = <&pitft>,"rotate:0";
66-
fps = <&pitft>,"fps:0";
67-
debug = <&pitft>,"debug:0";
68-
};
63+
__overrides__ {
64+
speed = <&pitft>,"spi-max-frequency:0";
65+
rotate = <&pitft>,"rotate:0", /* fbtft */
66+
<&pitft>,"rotation:0"; /* drm */
67+
fps = <&pitft>,"fps:0";
68+
debug = <&pitft>,"debug:0";
69+
drm = <&pitft>,"compatible=adafruit,yx240qv29";
70+
};
6971
};

arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts

Lines changed: 67 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
/plugin/;
88

99
/ {
10-
compatible = "brcm,bcm2835";
10+
compatible = "brcm,bcm2835";
1111

12-
fragment@0 {
13-
target = <&spi0>;
14-
__overlay__ {
15-
status = "okay";
16-
};
17-
};
12+
fragment@0 {
13+
target = <&spi0>;
14+
__overlay__ {
15+
status = "okay";
16+
};
17+
};
1818

1919
fragment@1 {
2020
target = <&spidev0>;
@@ -23,69 +23,71 @@
2323
};
2424
};
2525

26-
fragment@2 {
27-
target = <&gpio>;
28-
__overlay__ {
29-
pitft_pins: pitft_pins {
30-
brcm,pins = <24 25>;
31-
brcm,function = <0 1>; /* in out */
32-
brcm,pull = <2 0>; /* pullup none */
33-
};
34-
};
35-
};
26+
fragment@2 {
27+
target = <&gpio>;
28+
__overlay__ {
29+
pitft_pins: pitft_pins {
30+
brcm,pins = <24 25>;
31+
brcm,function = <0 1>; /* in out */
32+
brcm,pull = <2 0>; /* pullup none */
33+
};
34+
};
35+
};
3636

37-
fragment@3 {
38-
target = <&spi0>;
39-
__overlay__ {
40-
/* needed to avoid dtc warning */
41-
#address-cells = <1>;
42-
#size-cells = <0>;
37+
fragment@3 {
38+
target = <&spi0>;
39+
__overlay__ {
40+
/* needed to avoid dtc warning */
41+
#address-cells = <1>;
42+
#size-cells = <0>;
4343

44-
pitft: pitft@0{
45-
compatible = "ilitek,ili9340";
46-
reg = <0>;
47-
pinctrl-names = "default";
48-
pinctrl-0 = <&pitft_pins>;
44+
pitft: pitft@0{
45+
compatible = "ilitek,ili9340";
46+
reg = <0>;
47+
pinctrl-names = "default";
48+
pinctrl-0 = <&pitft_pins>;
4949

50-
spi-max-frequency = <32000000>;
51-
rotate = <90>;
52-
fps = <25>;
53-
bgr;
54-
buswidth = <8>;
55-
dc-gpios = <&gpio 25 0>;
56-
debug = <0>;
57-
};
58-
};
59-
};
50+
spi-max-frequency = <32000000>;
51+
rotate = <90>;
52+
fps = <25>;
53+
bgr;
54+
buswidth = <8>;
55+
dc-gpios = <&gpio 25 0>;
56+
debug = <0>;
57+
};
58+
};
59+
};
6060

61-
fragment@4 {
62-
target = <&i2c1>;
63-
__overlay__ {
64-
/* needed to avoid dtc warning */
65-
#address-cells = <1>;
66-
#size-cells = <0>;
61+
fragment@4 {
62+
target = <&i2c1>;
63+
__overlay__ {
64+
/* needed to avoid dtc warning */
65+
#address-cells = <1>;
66+
#size-cells = <0>;
6767

68-
ft6236: ft6236@38 {
69-
compatible = "focaltech,ft6236";
70-
reg = <0x38>;
68+
ft6236: ft6236@38 {
69+
compatible = "focaltech,ft6236";
70+
reg = <0x38>;
7171

72-
interrupt-parent = <&gpio>;
73-
interrupts = <24 2>;
74-
touchscreen-size-x = <240>;
75-
touchscreen-size-y = <320>;
76-
};
77-
};
78-
};
72+
interrupt-parent = <&gpio>;
73+
interrupts = <24 2>;
74+
touchscreen-size-x = <240>;
75+
touchscreen-size-y = <320>;
76+
};
77+
};
78+
};
7979

80-
__overrides__ {
81-
speed = <&pitft>,"spi-max-frequency:0";
82-
rotate = <&pitft>,"rotate:0";
83-
fps = <&pitft>,"fps:0";
84-
debug = <&pitft>,"debug:0";
85-
touch-sizex = <&ft6236>,"touchscreen-size-x?";
86-
touch-sizey = <&ft6236>,"touchscreen-size-y?";
87-
touch-invx = <&ft6236>,"touchscreen-inverted-x?";
88-
touch-invy = <&ft6236>,"touchscreen-inverted-y?";
89-
touch-swapxy = <&ft6236>,"touchscreen-swapped-x-y?";
90-
};
80+
__overrides__ {
81+
speed = <&pitft>,"spi-max-frequency:0";
82+
rotate = <&pitft>,"rotate:0", /* fbtft */
83+
<&pitft>,"rotation:0"; /* drm */
84+
fps = <&pitft>,"fps:0";
85+
debug = <&pitft>,"debug:0";
86+
drm = <&pitft>,"compatible=adafruit,yx240qv29";
87+
touch-sizex = <&ft6236>,"touchscreen-size-x?";
88+
touch-sizey = <&ft6236>,"touchscreen-size-y?";
89+
touch-invx = <&ft6236>,"touchscreen-inverted-x?";
90+
touch-invy = <&ft6236>,"touchscreen-inverted-y?";
91+
touch-swapxy = <&ft6236>,"touchscreen-swapped-x-y?";
92+
};
9193
};

arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#size-cells = <0>;
5050

5151
pitft: pitft@0{
52-
compatible = "ilitek,ili9340", "multi-inno,mi0283qt";
52+
compatible = "ilitek,ili9340";
5353
reg = <0>;
5454
pinctrl-names = "default";
5555
pinctrl-0 = <&pitft_pins>;
@@ -64,6 +64,9 @@
6464
};
6565

6666
pitft_ts@1 {
67+
/* needed to avoid dtc warning */
68+
#address-cells = <1>;
69+
#interrupt-cells = <1>;
6770
compatible = "st,stmpe610";
6871
reg = <1>;
6972

@@ -72,7 +75,7 @@
7275
interrupt-parent = <&gpio>;
7376
interrupt-controller;
7477

75-
stmpe_touchscreen {
78+
stmpe_touchscreen: stmpe_touchscreen {
7679
compatible = "st,stmpe-ts";
7780
st,sample-time = <4>;
7881
st,mod-12b = <1>;
@@ -115,6 +118,11 @@
115118
<&pitft>,"rotation:0"; /* drm */
116119
fps = <&pitft>,"fps:0";
117120
debug = <&pitft>,"debug:0";
118-
drm = <&pitft>,"compatible=multi-inno,mi0283qt";
121+
drm = <&pitft>,"compatible=adafruit,yx240qv29";
122+
touch-sizex = <&stmpe_touchscreen>,"touchscreen-size-x?";
123+
touch-sizey = <&stmpe_touchscreen>,"touchscreen-size-y?";
124+
touch-invx = <&stmpe_touchscreen>,"touchscreen-inverted-x?";
125+
touch-invy = <&stmpe_touchscreen>,"touchscreen-inverted-y?";
126+
touch-swapxy = <&stmpe_touchscreen>,"touchscreen-swapped-x-y?";
119127
};
120128
};

0 commit comments

Comments
 (0)