Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / piscreen-overlay.dts
1 /*
2  * Device Tree overlay for PiScreen 3.5" display shield by Ozzmaker
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 = <&spidev1>;
28                 __overlay__ {
29                         status = "disabled";
30                 };
31         };
32
33         fragment@3 {
34                 target = <&gpio>;
35                 __overlay__ {
36                         piscreen_pins: piscreen_pins {
37                                 brcm,pins = <17 25 24 22>;
38                                 brcm,function = <0 1 1 1>; /* in out out out */
39                         };
40                 };
41         };
42
43         fragment@4 {
44                 target = <&spi0>;
45                 __overlay__ {
46                         /* needed to avoid dtc warning */
47                         #address-cells = <1>;
48                         #size-cells = <0>;
49
50                         piscreen: piscreen@0{
51                                 compatible = "ilitek,ili9486";
52                                 reg = <0>;
53                                 pinctrl-names = "default";
54                                 pinctrl-0 = <&piscreen_pins>;
55
56                                 spi-max-frequency = <24000000>;
57                                 rotate = <270>;
58                                 bgr;
59                                 fps = <30>;
60                                 buswidth = <8>;
61                                 regwidth = <16>;
62                                 reset-gpios = <&gpio 25 1>;
63                                 dc-gpios = <&gpio 24 0>;
64                                 led-gpios = <&gpio 22 0>;
65                                 debug = <0>;
66
67                                 init = <0x10000b0 0x00
68                                         0x1000011
69                                         0x20000ff
70                                         0x100003a 0x55
71                                         0x1000036 0x28
72                                         0x10000c2 0x44
73                                         0x10000c5 0x00 0x00 0x00 0x00
74                                         0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00
75                                         0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
76                                         0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
77                                         0x1000011
78                                         0x1000029>;
79                         };
80
81                         piscreen_ts: piscreen-ts@1 {
82                                 compatible = "ti,ads7846";
83                                 reg = <1>;
84
85                                 spi-max-frequency = <2000000>;
86                                 interrupts = <17 2>; /* high-to-low edge triggered */
87                                 interrupt-parent = <&gpio>;
88                                 pendown-gpio = <&gpio 17 0>;
89                                 ti,swap-xy;
90                                 ti,x-plate-ohms = /bits/ 16 <100>;
91                                 ti,pressure-max = /bits/ 16 <255>;
92                         };
93                 };
94         };
95         __overrides__ {
96                 speed =         <&piscreen>,"spi-max-frequency:0";
97                 rotate =        <&piscreen>,"rotate:0";
98                 fps =           <&piscreen>,"fps:0";
99                 debug =         <&piscreen>,"debug:0";
100                 xohms =         <&piscreen_ts>,"ti,x-plate-ohms;0";
101         };
102 };