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