Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / media-center-overlay.dts
1 /*
2  * Device Tree overlay for Media Center HAT by Pi Supply
3  *
4  */
5
6 /dts-v1/;
7 /plugin/;
8
9 / {
10         compatible = "brcm,bcm2835";
11
12         fragment@0 {
13                 target = <&spidev0>;
14                 __overlay__ {
15                         status = "disabled";
16                 };
17         };
18
19         fragment@1 {
20                 target = <&spidev1>;
21                 __overlay__ {
22                         status = "disabled";
23                 };
24         };
25
26         fragment@2 {
27                 target = <&gpio>;
28                 __overlay__ {
29                         rpi_display_pins: rpi_display_pins {
30                                 brcm,pins = <12 23 24 25>;
31                                 brcm,function = <1 1 1 0>; /* out out out in */
32                                 brcm,pull = <0 0 0 2>; /* - - - up */
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                         status = "okay";
44
45                         rpidisplay: rpi-display@0{
46                                 compatible = "ilitek,ili9341";
47                                 reg = <0>;
48                                 pinctrl-names = "default";
49                                 pinctrl-0 = <&rpi_display_pins>;
50
51                                 spi-max-frequency = <32000000>;
52                                 rotate = <90>;
53                                 bgr;
54                                 fps = <30>;
55                                 buswidth = <8>;
56                                 reset-gpios = <&gpio 23 1>;
57                                 dc-gpios = <&gpio 24 0>;
58                                 led-gpios = <&gpio 12 0>;
59                                 debug = <0>;
60                         };
61
62                         rpidisplay_ts: rpi-display-ts@1 {
63                                 compatible = "ti,ads7846";
64                                 reg = <1>;
65
66                                 spi-max-frequency = <2000000>;
67                                 interrupts = <25 2>; /* high-to-low edge triggered */
68                                 interrupt-parent = <&gpio>;
69                                 pendown-gpio = <&gpio 25 1>;
70                                 ti,x-plate-ohms = /bits/ 16 <60>;
71                                 ti,pressure-max = /bits/ 16 <255>;
72                         };
73                 };
74         };
75
76         fragment@4 {
77                 target-path = "/";
78                 __overlay__ {
79                         lirc_rpi: lirc_rpi {
80                                 compatible = "rpi,lirc-rpi";
81                                 pinctrl-names = "default";
82                                 pinctrl-0 = <&lirc_pins>;
83                                 status = "okay";
84
85                                 // Override autodetection of IR receiver circuit
86                                 // (0 = active high, 1 = active low, -1 = no override )
87                                 rpi,sense = <0xffffffff>;
88
89                                 // Software carrier
90                                 // (0 = off, 1 = on)
91                                 rpi,softcarrier = <1>;
92
93                                 // Invert output
94                                 // (0 = off, 1 = on)
95                                 rpi,invert = <0>;
96
97                                 // Enable debugging messages
98                                 // (0 = off, 1 = on)
99                                 rpi,debug = <0>;
100                         };
101                 };
102         };
103
104         fragment@5 {
105                 target = <&gpio>;
106                 __overlay__ {
107                         lirc_pins: lirc_pins {
108                                 brcm,pins = <6 5>;
109                                 brcm,function = <1 0>; // out in
110                                 brcm,pull = <0 1>; // off down
111                         };
112                 };
113         };
114
115         __overrides__ {
116                 speed =     <&rpidisplay>,"spi-max-frequency:0";
117                 rotate =    <&rpidisplay>,"rotate:0";
118                 fps =       <&rpidisplay>,"fps:0";
119                 debug =     <&rpidisplay>,"debug:0", 
120                             <&lirc_rpi>,"rpi,debug:0";
121                 xohms =     <&rpidisplay_ts>,"ti,x-plate-ohms;0";
122                 swapxy =    <&rpidisplay_ts>,"ti,swap-xy?";
123                 backlight = <&rpidisplay>,"led-gpios:4",
124                             <&rpi_display_pins>,"brcm,pins:0";
125
126                 gpio_out_pin =  <&lirc_pins>,"brcm,pins:0";
127                 gpio_in_pin =   <&lirc_pins>,"brcm,pins:4";
128                 gpio_in_pull =  <&lirc_pins>,"brcm,pull:4";
129
130                 sense =         <&lirc_rpi>,"rpi,sense:0";
131                 softcarrier =   <&lirc_rpi>,"rpi,softcarrier:0";
132                 invert =        <&lirc_rpi>,"rpi,invert:0";
133         };
134 };