xref: /linux/Documentation/devicetree/bindings/display/panel/sitronix,st7701.yaml (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/panel/sitronix,st7701.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Sitronix ST7701 based LCD panels
8
9maintainers:
10  - Jagan Teki <jagan@amarulasolutions.com>
11
12description: |
13  ST7701 designed for small and medium sizes of TFT LCD display, is
14  capable of supporting up to 480RGBX864 in resolution. It provides
15  several system interfaces like MIPI/RGB/SPI.
16
17  Techstar TS8550B is 480x854, 2-lane MIPI DSI LCD panel which has
18  inbuilt ST7701 chip.
19
20  Densitron DMT028VGHMCMI-1A is 480x640, 2-lane MIPI DSI LCD panel
21  which has built-in ST7701 chip.
22
23properties:
24  compatible:
25    items:
26      - enum:
27          - anbernic,rg-arc-panel
28          - anbernic,rg28xx-panel
29          - densitron,dmt028vghmcmi-1a
30          - elida,kd50t048a
31          - techstar,ts8550b
32      - const: sitronix,st7701
33
34  reg:
35    description: DSI / SPI channel used by that screen
36    maxItems: 1
37
38  VCC-supply:
39    description: analog regulator for MIPI circuit
40
41  IOVCC-supply:
42    description: I/O system regulator
43
44  dc-gpios:
45    maxItems: 1
46    description:
47      Controller data/command selection (D/CX) in 4-line SPI mode.
48      If not set, the controller is in 3-line SPI mode.
49      Disallowed for DSI.
50
51  port: true
52  reset-gpios: true
53  rotation: true
54
55  backlight: true
56
57required:
58  - compatible
59  - reg
60  - VCC-supply
61  - IOVCC-supply
62  - port
63  - reset-gpios
64
65allOf:
66  - $ref: panel-common.yaml#
67  - if:
68      properties:
69        compatible:
70          contains:
71            # SPI connected panels
72            enum:
73              - anbernic,rg28xx-panel
74    then:
75      $ref: /schemas/spi/spi-peripheral-props.yaml#
76
77  - if:
78      properties:
79        compatible:
80          not:
81            contains:
82              # DSI or SPI without D/CX pin
83              enum:
84                - anbernic,rg-arc-panel
85                - anbernic,rg28xx-panel
86                - densitron,dmt028vghmcmi-1a
87                - elida,kd50t048a
88                - techstar,ts8550b
89    then:
90      required:
91        - dc-gpios
92    else:
93      properties:
94        dc-gpios: false
95
96unevaluatedProperties: false
97
98examples:
99  - |
100    #include <dt-bindings/gpio/gpio.h>
101
102    dsi {
103        #address-cells = <1>;
104        #size-cells = <0>;
105
106        panel@0 {
107            compatible = "techstar,ts8550b", "sitronix,st7701";
108            reg = <0>;
109            VCC-supply = <&reg_dldo2>;
110            IOVCC-supply = <&reg_dldo2>;
111            reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* LCD-RST: PD24 */
112            backlight = <&backlight>;
113
114            port {
115                mipi_in_panel: endpoint {
116                    remote-endpoint = <&mipi_out_panel>;
117                };
118            };
119        };
120    };
121  - |
122    #include <dt-bindings/gpio/gpio.h>
123
124    spi {
125        #address-cells = <1>;
126        #size-cells = <0>;
127
128        panel@0 {
129            compatible = "anbernic,rg28xx-panel", "sitronix,st7701";
130            reg = <0>;
131            spi-max-frequency = <3125000>;
132            VCC-supply = <&reg_lcd>;
133            IOVCC-supply = <&reg_lcd>;
134            reset-gpios = <&pio 8 14 GPIO_ACTIVE_HIGH>; /* LCD-RST: PI14 */
135            backlight = <&backlight>;
136
137            port {
138                panel_in_rgb: endpoint {
139                    remote-endpoint = <&tcon_lcd0_out_lcd>;
140                };
141            };
142        };
143    };
144