xref: /linux/Documentation/devicetree/bindings/display/fsl,lcdif.yaml (revision be3382ecdf317f005e7d47356d0a9256cc36dd88)
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          contains:
127            enum:
128              - fsl,imx6sl-lcdif
129              - fsl,imx6sx-lcdif
130              - fsl,imx8mm-lcdif
131              - fsl,imx8mn-lcdif
132              - fsl,imx8mp-lcdif
133              - fsl,imx93-lcdif
134    then:
135      required:
136        - power-domains
137  - if:
138      properties:
139        compatible:
140          contains:
141            enum:
142              - fsl,imx23-lcdif
143    then:
144      properties:
145        interrupts:
146          minItems: 2
147          maxItems: 2
148    else:
149      properties:
150        interrupts:
151          maxItems: 1
152
153examples:
154  - |
155    #include <dt-bindings/clock/imx6sx-clock.h>
156    #include <dt-bindings/interrupt-controller/arm-gic.h>
157
158    display-controller@2220000 {
159        compatible = "fsl,imx6sx-lcdif";
160        reg = <0x02220000 0x4000>;
161        interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
162        clocks = <&clks IMX6SX_CLK_LCDIF1_PIX>,
163                 <&clks IMX6SX_CLK_LCDIF_APB>,
164                 <&clks IMX6SX_CLK_DISPLAY_AXI>;
165        clock-names = "pix", "axi", "disp_axi";
166        power-domains = <&pd_disp>;
167
168        port {
169            endpoint {
170                remote-endpoint = <&panel_in>;
171            };
172        };
173    };
174
175...
176