Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / pitft28-capacitive-overlay.dts
1 /*
2  * Device Tree overlay for Adafruit PiTFT 2.8" capacitive touch screen
3  *
4  */
5
6 /dts-v1/;
7 /plugin/;
8
9 / {
10         compatible = "brcm,bcm2835";
11
12         fragment@0 {
13                 target = <&spi0>;
14                 __overlay__ {
15                         status = "okay";
16                 };
17         };
18
19         fragment@1 {
20                 target = <&spidev0>;
21                 __overlay__ {
22                         status = "disabled";
23                 };
24         };
25
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         };
36
37         fragment@3 {
38                 target = <&spi0>;
39                 __overlay__ {
40                         /* needed to avoid dtc warning */
41                         #address-cells = <1>;
42                         #size-cells = <0>;
43
44                         pitft: pitft@0{
45                                 compatible = "ilitek,ili9340";
46                                 reg = <0>;
47                                 pinctrl-names = "default";
48                                 pinctrl-0 = <&pitft_pins>;
49
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         };
60
61         fragment@4 {
62                 target = <&i2c1>;
63                 __overlay__ {
64                         /* needed to avoid dtc warning */
65                         #address-cells = <1>;
66                         #size-cells = <0>;
67
68                         ft6236: ft6236@38 {
69                                 compatible = "focaltech,ft6236";
70                                 reg = <0x38>;
71
72                                 interrupt-parent = <&gpio>;
73                                 interrupts = <24 2>;
74                                 touchscreen-size-x = <240>;
75                                 touchscreen-size-y = <320>;
76                         };
77                 };
78         };
79
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         };
91 };