xref: /linux/Documentation/devicetree/bindings/display/fsl,lcdif.yaml (revision ae22a94997b8a03dcb3c922857c203246711f9d4)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Freescale/NXP i.MX LCD Interface (LCDIF)
8
9maintainers:
10  - Marek Vasut <marex@denx.de>
11  - Stefan Agner <stefan@agner.ch>
12
13description: |
14  (e)LCDIF display controller found in the Freescale/NXP i.MX SoCs.
15
16properties:
17  compatible:
18    oneOf:
19      - enum:
20          - fsl,imx23-lcdif
21          - fsl,imx28-lcdif
22          - fsl,imx6sx-lcdif
23          - fsl,imx8mp-lcdif
24          - fsl,imx93-lcdif
25      - items:
26          - enum:
27              - fsl,imx6sl-lcdif
28              - fsl,imx6sll-lcdif
29              - fsl,imx6ul-lcdif
30              - fsl,imx7d-lcdif
31              - fsl,imx8mm-lcdif
32              - fsl,imx8mn-lcdif
33              - fsl,imx8mq-lcdif
34          - const: fsl,imx6sx-lcdif
35
36  reg:
37    maxItems: 1
38
39  clocks:
40    items:
41      - description: Pixel clock
42      - description: Bus clock
43      - description: Display AXI clock
44    minItems: 1
45
46  clock-names:
47    items:
48      - const: pix
49      - const: axi
50      - const: disp_axi
51    minItems: 1
52
53  interrupts:
54    items:
55      - description: LCDIF DMA interrupt
56      - description: LCDIF Error interrupt
57    minItems: 1
58
59  power-domains:
60    maxItems: 1
61
62  port:
63    $ref: /schemas/graph.yaml#/properties/port
64    description: The LCDIF output port
65
66required:
67  - compatible
68  - reg
69  - clocks
70  - interrupts
71  - port
72
73additionalProperties: false
74
75allOf:
76  - if:
77      properties:
78        compatible:
79          contains:
80            const: fsl,imx6sx-lcdif
81    then:
82      properties:
83        clocks:
84          minItems: 2
85          maxItems: 3
86        clock-names:
87          minItems: 2
88          maxItems: 3
89      required:
90        - clock-names
91  - if:
92      properties:
93        compatible:
94          contains:
95            enum:
96              - fsl,imx8mp-lcdif
97              - fsl,imx93-lcdif
98    then:
99      properties:
100        clocks:
101          minItems: 3
102          maxItems: 3
103        clock-names:
104          minItems: 3
105          maxItems: 3
106      required:
107        - clock-names
108  - if:
109      not:
110        properties:
111          compatible:
112            contains:
113              enum:
114                - fsl,imx6sx-lcdif
115                - fsl,imx8mp-lcdif
116                - fsl,imx93-lcdif
117    then:
118      properties:
119        clocks:
120          maxItems: 1
121        clock-names:
122          maxItems: 1
123  - if:
124      properties:
125        compatible:
126          const: fsl,imx6sx-lcdif
127    then:
128      required:
129        - power-domains
130  - if:
131      properties:
132        compatible:
133          contains:
134            enum:
135              - fsl,imx6sl-lcdif
136              - fsl,imx8mm-lcdif
137              - fsl,imx8mn-lcdif
138              - fsl,imx8mp-lcdif
139              - fsl,imx93-lcdif
140    then:
141      required:
142        - power-domains
143  - if:
144      properties:
145        compatible:
146          contains:
147            enum:
148              - fsl,imx23-lcdif
149    then:
150      properties:
151        interrupts:
152          minItems: 2
153          maxItems: 2
154    else:
155      properties:
156        interrupts:
157          maxItems: 1
158
159examples:
160  - |
161    #include <dt-bindings/clock/imx6sx-clock.h>
162    #include <dt-bindings/interrupt-controller/arm-gic.h>
163
164    display-controller@2220000 {
165        compatible = "fsl,imx6sx-lcdif";
166        reg = <0x02220000 0x4000>;
167        interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
168        clocks = <&clks IMX6SX_CLK_LCDIF1_PIX>,
169                 <&clks IMX6SX_CLK_LCDIF_APB>,
170                 <&clks IMX6SX_CLK_DISPLAY_AXI>;
171        clock-names = "pix", "axi", "disp_axi";
172        power-domains = <&pd_disp>;
173
174        port {
175            endpoint {
176                remote-endpoint = <&panel_in>;
177            };
178        };
179    };
180
181...
182