Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / adafruit-st7735r-overlay.dts
1 /*
2  * adafruit-st7735r-overlay.dts
3  *
4  * ST7735R based SPI LCD displays. Either
5  * Adafruit 1.8" 160x128
6  *   or
7  * Okaya 1.44" 128x128
8  */
9
10 /dts-v1/;
11 /plugin/;
12
13 #include <dt-bindings/gpio/gpio.h>
14
15 / {
16         compatible = "brcm,bcm2835";
17
18         fragment@0 {
19                 target = <&spidev0>;
20                 __overlay__ {
21                         status = "disabled";
22                 };
23         };
24
25         fragment@1 {
26                 target = <&gpio>;
27                 __overlay__ {
28                         adafruit_pins: adafruit_pins {
29                                 brcm,pins = <25 24>;
30                                 brcm,function = <1>; /* out */
31                         };
32                         backlight_pins: backlight_pins {
33                                 brcm,pins = <18>;
34                                 brcm,function = <1>; /* out */
35                         };
36                 };
37         };
38
39         fragment@2 {
40                 target-path = "/";
41                 __overlay__ {
42                         af18_backlight: backlight {
43                                 compatible = "gpio-backlight";
44                                 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
45                                 pinctrl-names = "default";
46                                 pinctrl-0 = <&backlight_pins>;
47                         };
48                 };
49         };
50
51         fragment@3 {
52                 target = <&spi0>;
53                 __overlay__ {
54                         /* needed to avoid dtc warning */
55                         #address-cells = <1>;
56                         #size-cells = <0>;
57                         status = "okay";
58
59                         af18: adafruit18@0 {
60                                 compatible = "jianda,jd-t18003-t01";
61                                 reg = <0>;
62                                 spi-max-frequency = <32000000>;
63                                 dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
64                                 reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
65                                 rotation = <90>;
66                                 pinctrl-names = "default";
67                                 pinctrl-0 = <&adafruit_pins>;
68                                 backlight = <&af18_backlight>;
69                         };
70                 };
71         };
72
73         __overrides__ {
74                 128x128 = <&af18>, "compatible=okaya,rh128128t";
75                 speed = <&af18>,"spi-max-frequency:0";
76                 rotate = <&af18>,"rotation:0";
77                 dc_pin = <&af18>,"dc-gpios:4", <&adafruit_pins>,"brcm,pins:4";
78                 reset_pin = <&af18>,"reset-gpios:4",
79                             <&adafruit_pins>,"brcm,pins:0";
80                 led_pin = <&af18_backlight>,"gpios:4",
81                           <&backlight_pins>,"brcm,pins:0";
82         };
83 };