Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / mz61581-overlay.dts
1 /*
2  * Device Tree overlay for MZ61581-PI-EXT 2014.12.28 by Tontec
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                         mz61581_pins: mz61581_pins {
37                                 brcm,pins = <4 15 18 25>;
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                         mz61581: mz61581@0{
51                                 compatible = "samsung,s6d02a1";
52                                 reg = <0>;
53                                 pinctrl-names = "default";
54                                 pinctrl-0 = <&mz61581_pins>;
55
56                                 spi-max-frequency = <128000000>;
57                                 spi-cpol;
58                                 spi-cpha;
59
60                                 width = <320>;
61                                 height = <480>;
62                                 rotate = <270>;
63                                 bgr;
64                                 fps = <30>;
65                                 buswidth = <8>;
66                                 txbuflen = <32768>;
67
68                                 reset-gpios = <&gpio 15 1>;
69                                 dc-gpios = <&gpio 25 0>;
70                                 led-gpios = <&gpio 18 0>;
71
72                                 init = <0x10000b0 00
73                                         0x1000011
74                                         0x20000ff
75                                         0x10000b3 0x02 0x00 0x00 0x00
76                                         0x10000c0 0x13 0x3b 0x00 0x02 0x00 0x01 0x00 0x43
77                                         0x10000c1 0x08 0x16 0x08 0x08
78                                         0x10000c4 0x11 0x07 0x03 0x03
79                                         0x10000c6 0x00
80                                         0x10000c8 0x03 0x03 0x13 0x5c 0x03 0x07 0x14 0x08 0x00 0x21 0x08 0x14 0x07 0x53 0x0c 0x13 0x03 0x03 0x21 0x00
81                                         0x1000035 0x00
82                                         0x1000036 0xa0
83                                         0x100003a 0x55
84                                         0x1000044 0x00 0x01
85                                         0x10000d0 0x07 0x07 0x1d 0x03
86                                         0x10000d1 0x03 0x30 0x10
87                                         0x10000d2 0x03 0x14 0x04
88                                         0x1000029
89                                         0x100002c>;
90
91                                 /* This is a workaround to make sure the init sequence slows down and doesn't fail */
92                                 debug = <3>;
93                         };
94
95                         mz61581_ts: mz61581_ts@1 {
96                                 compatible = "ti,ads7846";
97                                 reg = <1>;
98
99                                 spi-max-frequency = <2000000>;
100                                 interrupts = <4 2>; /* high-to-low edge triggered */
101                                 interrupt-parent = <&gpio>;
102                                 pendown-gpio = <&gpio 4 0>;
103
104                                 ti,x-plate-ohms = /bits/ 16 <60>;
105                                 ti,pressure-max = /bits/ 16 <255>;
106                         };
107                 };
108         };
109         __overrides__ {
110                 speed =   <&mz61581>, "spi-max-frequency:0";
111                 rotate =  <&mz61581>, "rotate:0";
112                 fps =     <&mz61581>, "fps:0";
113                 txbuflen = <&mz61581>, "txbuflen:0";
114                 debug =   <&mz61581>, "debug:0";
115                 xohms =   <&mz61581_ts>,"ti,x-plate-ohms;0";
116         };
117 };