Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / vc4-kms-dpi-hyperpixel.dtsi
1 /*
2  * vc4-kms-dpi-hyperpixel4.dtsi
3  * Commmon initialisation for HyperPixel DPI displays
4  */
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/pinctrl/bcm2835.h>
8
9 / {
10         compatible = "brcm,bcm2835";
11
12         fragment@0 {
13                 target-path = "/";
14                 __overlay__ {
15                         spi {
16                                 compatible = "spi-gpio";
17                                 #address-cells = <1>;
18                                 #size-cells = <0>;
19                                 pinctrl-0 = <&spi_pins>;
20                                 pinctrl-names = "default";
21
22                                 sck-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
23                                 mosi-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
24                                 cs-gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
25                                 num-chipselects = <1>;
26                                 sck-idle-input;
27
28                                 panel: display@0 {
29                                         reg = <0>;
30                                         /* 100 kHz */
31                                         spi-max-frequency = <100000>;
32                                         backlight = <&backlight>;
33                                         rotation = <0>;
34
35                                         port {
36                                                 panel_in: endpoint {
37                                                         remote-endpoint = <&dpi_out>;
38                                                 };
39                                         };
40                                 };
41                         };
42
43                         backlight: backlight {
44                                 compatible = "gpio-backlight";
45                                 gpios = <&gpio 19 0>;
46                         };
47                 };
48         };
49
50         fragment@1 {
51                 target = <&dpi>;
52                 __overlay__  {
53                         status = "okay";
54
55                         pinctrl-names = "default";
56                         pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;
57
58                         port {
59                                 dpi_out: endpoint {
60                                         remote-endpoint = <&panel_in>;
61                                 };
62                         };
63                 };
64         };
65
66         fragment@2 {
67                 target = <&gpio>;
68                 __overlay__ {
69                         spi_pins: hyperpixel4_spi_pins {
70                                 brcm,pins = <27 18 26>;
71                                 brcm,pull = <BCM2835_PUD_UP BCM2835_PUD_UP BCM2835_PUD_OFF>;
72                                 brcm,function = <0>;
73                         };
74                 };
75         };
76
77         fragment@3 {
78                 target-path = "/";
79                 __overlay__ {
80                         i2c_gpio: i2c@0 {
81                                 compatible = "i2c-gpio";
82                                 gpios = <&gpio 10 0 /* sda */
83                                          &gpio 11 0>; /* scl */
84                                 i2c-gpio,delay-us = <4>;        /* ~100 kHz */
85                                 #address-cells = <1>;
86                                 #size-cells = <0>;
87                         };
88                 };
89         };
90
91         __overrides__ {
92                 rotate = <&panel>, "rotation:0";
93         };
94 };