Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / hy28b-overlay.dts
1 /*
2  * Device Tree overlay for HY28b display shield by Texy
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                         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                                 gamma = "04 1F 4 7 7 0 7 7 6 0\n0F 00 1 7 4 0 0 0 6 7";
68
69                                 init = <0x10000e7 0x0010
70                                         0x1000000 0x0001
71                                         0x1000001 0x0100
72                                         0x1000002 0x0700
73                                         0x1000003 0x1030
74                                         0x1000004 0x0000
75                                         0x1000008 0x0207
76                                         0x1000009 0x0000
77                                         0x100000a 0x0000
78                                         0x100000c 0x0001
79                                         0x100000d 0x0000
80                                         0x100000f 0x0000
81                                         0x1000010 0x0000
82                                         0x1000011 0x0007
83                                         0x1000012 0x0000
84                                         0x1000013 0x0000
85                                         0x2000032
86                                         0x1000010 0x1590
87                                         0x1000011 0x0227
88                                         0x2000032
89                                         0x1000012 0x009c
90                                         0x2000032
91                                         0x1000013 0x1900
92                                         0x1000029 0x0023
93                                         0x100002b 0x000e
94                                         0x2000032
95                                         0x1000020 0x0000
96                                         0x1000021 0x0000
97                                         0x2000032
98                                         0x1000050 0x0000
99                                         0x1000051 0x00ef
100                                         0x1000052 0x0000
101                                         0x1000053 0x013f
102                                         0x1000060 0xa700
103                                         0x1000061 0x0001
104                                         0x100006a 0x0000
105                                         0x1000080 0x0000
106                                         0x1000081 0x0000
107                                         0x1000082 0x0000
108                                         0x1000083 0x0000
109                                         0x1000084 0x0000
110                                         0x1000085 0x0000
111                                         0x1000090 0x0010
112                                         0x1000092 0x0000
113                                         0x1000093 0x0003
114                                         0x1000095 0x0110
115                                         0x1000097 0x0000
116                                         0x1000098 0x0000
117                                         0x1000007 0x0133
118                                         0x1000020 0x0000
119                                         0x1000021 0x0000
120                                         0x2000064>;
121                                 debug = <0>;
122                         };
123
124                         hy28b_ts: hy28b-ts@1 {
125                                 compatible = "ti,ads7846";
126                                 reg = <1>;
127
128                                 spi-max-frequency = <2000000>;
129                                 interrupts = <17 2>; /* high-to-low edge triggered */
130                                 interrupt-parent = <&gpio>;
131                                 pendown-gpio = <&gpio 17 0>;
132                                 ti,x-plate-ohms = /bits/ 16 <100>;
133                                 ti,pressure-max = /bits/ 16 <255>;
134                         };
135                 };
136         };
137         __overrides__ {
138                 speed =         <&hy28b>,"spi-max-frequency:0";
139                 rotate =        <&hy28b>,"rotate:0";
140                 fps =           <&hy28b>,"fps:0";
141                 debug =         <&hy28b>,"debug:0";
142                 xohms =         <&hy28b_ts>,"ti,x-plate-ohms;0";
143                 resetgpio =     <&hy28b>,"reset-gpios:4",
144                                 <&hy28b_pins>, "brcm,pins:4";
145                 ledgpio =       <&hy28b>,"led-gpios:4",
146                                 <&hy28b_pins>, "brcm,pins:8";
147         };
148 };