xref: /linux/Documentation/devicetree/bindings/display/bridge/fsl,ldb.yaml (revision fbf5df34a4dbcd09d433dd4f0916bf9b2ddb16de)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/bridge/fsl,ldb.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Freescale i.MX8MP DPI to LVDS bridge chip
8
9maintainers:
10  - Marek Vasut <marex@denx.de>
11
12description: |
13  The i.MX8MP mediamix contains two registers which are responsible
14  for configuring the on-SoC DPI-to-LVDS serializer. This describes
15  those registers as bridge within the DT.
16
17properties:
18  compatible:
19    enum:
20      - fsl,imx6sx-ldb
21      - fsl,imx8mp-ldb
22      - fsl,imx93-ldb
23
24  clocks:
25    maxItems: 1
26
27  clock-names:
28    const: ldb
29
30  reg:
31    maxItems: 2
32
33  reg-names:
34    items:
35      - const: ldb
36      - const: lvds
37
38  nxp,enable-termination-resistor:
39    type: boolean
40    description:
41      Indicates that the built-in 100 Ohm termination resistor on the LVDS
42      output is enabled. This property is optional and controlled via the
43      HS_EN bit in the LVDS_CTRL register. Enabling it can improve signal
44      quality and prevent visual artifacts on some boards, but increases
45      power consumption.
46
47  ports:
48    $ref: /schemas/graph.yaml#/properties/ports
49
50    properties:
51      port@0:
52        $ref: /schemas/graph.yaml#/properties/port
53        description: Video port for DPI input.
54
55      port@1:
56        $ref: /schemas/graph.yaml#/properties/port
57        description: Video port for LVDS Channel-A output (panel or bridge).
58
59      port@2:
60        $ref: /schemas/graph.yaml#/properties/port
61        description: Video port for LVDS Channel-B output (panel or bridge).
62
63    required:
64      - port@0
65      - port@1
66
67required:
68  - compatible
69  - clocks
70  - ports
71  - reg
72
73allOf:
74  - if:
75      properties:
76        compatible:
77          contains:
78            enum:
79              - fsl,imx6sx-ldb
80              - fsl,imx93-ldb
81    then:
82      properties:
83        ports:
84          properties:
85            port@2: false
86  - if:
87      not:
88        properties:
89          compatible:
90            contains:
91              const: fsl,imx6sx-ldb
92    then:
93      required:
94        - reg-names
95
96  - if:
97      properties:
98        compatible:
99          contains:
100            const: fsl,imx6sx-ldb
101    then:
102      properties:
103        nxp,enable-termination-resistor: false
104
105additionalProperties: false
106
107examples:
108  - |
109    #include <dt-bindings/clock/imx8mp-clock.h>
110
111    blk-ctrl {
112        #address-cells = <1>;
113        #size-cells = <1>;
114
115        bridge@5c {
116            compatible = "fsl,imx8mp-ldb";
117            clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
118            clock-names = "ldb";
119            reg = <0x5c 0x4>, <0x128 0x4>;
120            reg-names = "ldb", "lvds";
121
122            ports {
123                #address-cells = <1>;
124                #size-cells = <0>;
125
126                port@0 {
127                    reg = <0>;
128
129                    ldb_from_lcdif2: endpoint {
130                        remote-endpoint = <&lcdif2_to_ldb>;
131                    };
132                };
133
134                port@1 {
135                    reg = <1>;
136
137                    ldb_lvds_ch0: endpoint {
138                        remote-endpoint = <&ldb_to_lvdsx4panel>;
139                    };
140                };
141
142                port@2 {
143                    reg = <2>;
144
145                    ldb_lvds_ch1: endpoint {
146                    };
147                };
148            };
149        };
150    };
151