Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / vc4-kms-dpi-hyperpixel2r-overlay.dts
1 /*
2  * vc4-kms-dpi-hyperpixel2r-overlay.dts
3  */
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/pinctrl/bcm2835.h>
7
8 /dts-v1/;
9 /plugin/;
10
11 / {
12         compatible = "brcm,bcm2835";
13
14         fragment@0 {
15                 target-path = "/";
16                 __overlay__ {
17                         spi {
18                                 compatible = "spi-gpio";
19                                 #address-cells = <1>;
20                                 #size-cells = <0>;
21                                 pinctrl-0 = <&spi_pins>;
22                                 pinctrl-names = "default";
23
24                                 sck-gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
25                                 mosi-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
26                                 cs-gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
27                                 num-chipselects = <1>;
28
29                                 panel: display@0 {
30                                         compatible = "pimoroni,hyperpixel2round";
31                                         reg = <0>;
32                                         /* 100 kHz */
33                                         spi-max-frequency = <100000>;
34                                         backlight = <&backlight>;
35                                         rotation = <0>;
36
37                                         port {
38                                                 panel_in: endpoint {
39                                                         remote-endpoint = <&dpi_out>;
40                                                 };
41                                         };
42                                 };
43                         };
44
45                         backlight: backlight {
46                                 compatible = "gpio-backlight";
47                                 gpios = <&gpio 19 0>;
48                         };
49                 };
50         };
51
52         fragment@1 {
53                 target = <&dpi>;
54                 __overlay__  {
55                         status = "okay";
56
57                         pinctrl-names = "default";
58                         pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;
59
60                         port {
61                                 dpi_out: endpoint {
62                                         remote-endpoint = <&panel_in>;
63                                 };
64                         };
65                 };
66         };
67
68         fragment@2 {
69                 target = <&gpio>;
70                 __overlay__ {
71                         spi_pins: hyperpixel4_spi_pins {
72                                 brcm,pins = <27 18 26>;
73                                 brcm,pull = <BCM2835_PUD_UP BCM2835_PUD_UP BCM2835_PUD_OFF>;
74                                 brcm,function = <0>;
75                         };
76                 };
77         };
78
79         fragment@3 {
80                 target-path = "/";
81                 __overlay__ {
82                         i2c_gpio: i2c@0 {
83                                 compatible = "i2c-gpio";
84                                 status = "disabled";
85
86                                 gpios = <&gpio 10 GPIO_ACTIVE_HIGH /* sda */
87                                          &gpio 11 GPIO_ACTIVE_HIGH>; /* scl */
88                                 i2c-gpio,delay-us = <4>;        /* ~100 kHz */
89                                 #address-cells = <1>;
90                                 #size-cells = <0>;
91
92                                 polytouch: edt-ft5x06@15 {
93                                         #address-cells = <1>;
94                                         #size-cells = <0>;
95                                         compatible = "edt,edt-ft5406";
96                                         reg = <0x15>;
97                                         interrupt-parent = <&gpio>;
98                                         interrupts = <27 0x02>;
99                                         touchscreen-size-x = <240>;
100                                         touchscreen-size-y = <240>;
101                                 };
102                         };
103                 };
104         };
105
106         __overrides__ {
107                 disable-touch = <0>,"-3";
108                 touchscreen-inverted-x = <&polytouch>,"touchscreen-inverted-x?";
109                 touchscreen-inverted-y = <&polytouch>,"touchscreen-inverted-y!";
110                 touchscreen-swapped-x-y = <&polytouch>,"touchscreen-swapped-x-y!";
111                 rotate = <&panel>, "rotation:0";
112         };
113
114 };