Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / hy28b-2017-overlay.dts
1 /*
2  * Device Tree overlay for HY28b display shield by Texy.
3  * Modified for 2017 version with ILI9325 D chip
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                         hy28b_pins: hy28b_pins {
37                                 brcm,pins = <17 25 18>;
38                                 brcm,function = <0 1 1>; /* in 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                         hy28b: hy28b@0{
51                                 compatible = "ilitek,ili9325";
52                                 reg = <0>;
53                                 pinctrl-names = "default";
54                                 pinctrl-0 = <&hy28b_pins>;
55
56                                 spi-max-frequency = <48000000>;
57                                 spi-cpol;
58                                 spi-cpha;
59                                 rotate = <270>;
60                                 bgr;
61                                 fps = <50>;
62                                 buswidth = <8>;
63                                 startbyte = <0x70>;
64                                 reset-gpios = <&gpio 25 1>;
65                                 led-gpios = <&gpio 18 1>;
66
67                                 init = <0x10000e5 0x78F0
68                                         0x1000001 0x0100
69                                         0x1000002 0x0700
70                                         0x1000003 0x1030
71                                         0x1000004 0x0000
72                                         0x1000008 0x0207
73                                         0x1000009 0x0000
74                                         0x100000a 0x0000
75                                         0x100000c 0x0000
76                                         0x100000d 0x0000
77                                         0x100000f 0x0000
78                                         0x1000010 0x0000
79                                         0x1000011 0x0007
80                                         0x1000012 0x0000
81                                         0x1000013 0x0000
82                                         0x1000007 0x0001
83                                         0x2000032
84                                         0x2000032
85                                         0x2000032
86                                         0x2000032
87                                         0x1000010 0x1090
88                                         0x1000011 0x0227
89                                         0x2000032
90                                         0x1000012 0x001f
91                                         0x2000032
92                                         0x1000013 0x1500
93                                         0x1000029 0x0027
94                                         0x100002b 0x000d
95                                         0x2000032
96                                         0x1000020 0x0000
97                                         0x1000021 0x0000
98                                         0x2000032
99                                         0x1000030 0x0000
100                                         0x1000031 0x0707
101                                         0x1000032 0x0307
102                                         0x1000035 0x0200
103                                         0x1000036 0x0008
104                                         0x1000037 0x0004
105                                         0x1000038 0x0000
106                                         0x1000039 0x0707
107                                         0x100003c 0x0002
108                                         0x100003d 0x1d04
109                                         0x1000050 0x0000
110                                         0x1000051 0x00ef
111                                         0x1000052 0x0000
112                                         0x1000053 0x013f
113                                         0x1000060 0xa700
114                                         0x1000061 0x0001
115                                         0x100006a 0x0000
116                                         0x1000080 0x0000
117                                         0x1000081 0x0000
118                                         0x1000082 0x0000
119                                         0x1000083 0x0000
120                                         0x1000084 0x0000
121                                         0x1000085 0x0000
122                                         0x1000090 0x0010
123                                         0x1000092 0x0600
124                                         0x1000007 0x0133>;
125                                 debug = <0>;
126                         };
127
128                         hy28b_ts: hy28b-ts@1 {
129                                 compatible = "ti,ads7846";
130                                 reg = <1>;
131
132                                 spi-max-frequency = <2000000>;
133                                 interrupts = <17 2>; /* high-to-low edge triggered */
134                                 interrupt-parent = <&gpio>;
135                                 pendown-gpio = <&gpio 17 0>;
136                                 ti,x-plate-ohms = /bits/ 16 <100>;
137                                 ti,pressure-max = /bits/ 16 <255>;
138                         };
139                 };
140         };
141         __overrides__ {
142                 speed =         <&hy28b>,"spi-max-frequency:0";
143                 rotate =        <&hy28b>,"rotate:0";
144                 fps =           <&hy28b>,"fps:0";
145                 debug =         <&hy28b>,"debug:0";
146                 xohms =         <&hy28b_ts>,"ti,x-plate-ohms;0";
147                 resetgpio =     <&hy28b>,"reset-gpios:4",
148                                 <&hy28b_pins>, "brcm,pins:4";
149                 ledgpio =       <&hy28b>,"led-gpios:4",
150                                 <&hy28b_pins>, "brcm,pins:8";
151         };
152 };