xref: /freebsd/sys/contrib/device-tree/Bindings/display/bridge/fsl,imx8qxp-ldb.yaml (revision b97ee269eae3cbaf35c18f51a459aea581c2a7dc)
1*b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*b97ee269SEmmanuel Vadot%YAML 1.2
3*b97ee269SEmmanuel Vadot---
4*b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/display/bridge/fsl,imx8qxp-ldb.yaml#
5*b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*b97ee269SEmmanuel Vadot
7*b97ee269SEmmanuel Vadottitle: Freescale i.MX8qm/qxp LVDS Display Bridge
8*b97ee269SEmmanuel Vadot
9*b97ee269SEmmanuel Vadotmaintainers:
10*b97ee269SEmmanuel Vadot  - Liu Ying <victor.liu@nxp.com>
11*b97ee269SEmmanuel Vadot
12*b97ee269SEmmanuel Vadotdescription: |
13*b97ee269SEmmanuel Vadot  The Freescale i.MX8qm/qxp LVDS Display Bridge(LDB) has two channels.
14*b97ee269SEmmanuel Vadot
15*b97ee269SEmmanuel Vadot  The i.MX8qm/qxp LDB is controlled by Control and Status Registers(CSR) module.
16*b97ee269SEmmanuel Vadot  The CSR module, as a system controller, contains the LDB's configuration
17*b97ee269SEmmanuel Vadot  registers.
18*b97ee269SEmmanuel Vadot
19*b97ee269SEmmanuel Vadot  For i.MX8qxp LDB, each channel supports up to 24bpp parallel input color
20*b97ee269SEmmanuel Vadot  format and can map the input to VESA or JEIDA standards.  The two channels
21*b97ee269SEmmanuel Vadot  cannot be used simultaneously, that is to say, the user should pick one of
22*b97ee269SEmmanuel Vadot  them to use.  Two LDB channels from two LDB instances can work together in
23*b97ee269SEmmanuel Vadot  LDB split mode to support a dual link LVDS display.  The channel indexes
24*b97ee269SEmmanuel Vadot  have to be different.  Channel0 outputs odd pixels and channel1 outputs
25*b97ee269SEmmanuel Vadot  even pixels.
26*b97ee269SEmmanuel Vadot
27*b97ee269SEmmanuel Vadot  For i.MX8qm LDB, each channel additionally supports up to 30bpp parallel
28*b97ee269SEmmanuel Vadot  input color format.  The two channels can be used simultaneously, either
29*b97ee269SEmmanuel Vadot  in dual mode or split mode.  In dual mode, the two channels output identical
30*b97ee269SEmmanuel Vadot  data.  In split mode, channel0 outputs odd pixels and channel1 outputs even
31*b97ee269SEmmanuel Vadot  pixels.
32*b97ee269SEmmanuel Vadot
33*b97ee269SEmmanuel Vadot  A side note is that i.MX8qm/qxp LDB is officially called pixel mapper in
34*b97ee269SEmmanuel Vadot  the SoC reference manuals.  The pixel mapper uses logic of LDBs embedded in
35*b97ee269SEmmanuel Vadot  i.MX6qdl/sx SoCs, i.e., it is essentially based on them.  To keep the naming
36*b97ee269SEmmanuel Vadot  consistency, this binding calls it LDB.
37*b97ee269SEmmanuel Vadot
38*b97ee269SEmmanuel Vadotproperties:
39*b97ee269SEmmanuel Vadot  compatible:
40*b97ee269SEmmanuel Vadot    enum:
41*b97ee269SEmmanuel Vadot      - fsl,imx8qm-ldb
42*b97ee269SEmmanuel Vadot      - fsl,imx8qxp-ldb
43*b97ee269SEmmanuel Vadot
44*b97ee269SEmmanuel Vadot  "#address-cells":
45*b97ee269SEmmanuel Vadot    const: 1
46*b97ee269SEmmanuel Vadot
47*b97ee269SEmmanuel Vadot  "#size-cells":
48*b97ee269SEmmanuel Vadot    const: 0
49*b97ee269SEmmanuel Vadot
50*b97ee269SEmmanuel Vadot  clocks:
51*b97ee269SEmmanuel Vadot    items:
52*b97ee269SEmmanuel Vadot      - description: pixel clock
53*b97ee269SEmmanuel Vadot      - description: bypass clock
54*b97ee269SEmmanuel Vadot
55*b97ee269SEmmanuel Vadot  clock-names:
56*b97ee269SEmmanuel Vadot    items:
57*b97ee269SEmmanuel Vadot      - const: pixel
58*b97ee269SEmmanuel Vadot      - const: bypass
59*b97ee269SEmmanuel Vadot
60*b97ee269SEmmanuel Vadot  power-domains:
61*b97ee269SEmmanuel Vadot    maxItems: 1
62*b97ee269SEmmanuel Vadot
63*b97ee269SEmmanuel Vadot  fsl,companion-ldb:
64*b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
65*b97ee269SEmmanuel Vadot    description: |
66*b97ee269SEmmanuel Vadot      A phandle which points to companion LDB which is used in LDB split mode.
67*b97ee269SEmmanuel Vadot
68*b97ee269SEmmanuel VadotpatternProperties:
69*b97ee269SEmmanuel Vadot  "^channel@[0-1]$":
70*b97ee269SEmmanuel Vadot    type: object
71*b97ee269SEmmanuel Vadot    description: Represents a channel of LDB.
72*b97ee269SEmmanuel Vadot
73*b97ee269SEmmanuel Vadot    properties:
74*b97ee269SEmmanuel Vadot      "#address-cells":
75*b97ee269SEmmanuel Vadot        const: 1
76*b97ee269SEmmanuel Vadot
77*b97ee269SEmmanuel Vadot      "#size-cells":
78*b97ee269SEmmanuel Vadot        const: 0
79*b97ee269SEmmanuel Vadot
80*b97ee269SEmmanuel Vadot      reg:
81*b97ee269SEmmanuel Vadot        description: The channel index.
82*b97ee269SEmmanuel Vadot        enum: [ 0, 1 ]
83*b97ee269SEmmanuel Vadot
84*b97ee269SEmmanuel Vadot      phys:
85*b97ee269SEmmanuel Vadot        description: A phandle to the phy module representing the LVDS PHY.
86*b97ee269SEmmanuel Vadot        maxItems: 1
87*b97ee269SEmmanuel Vadot
88*b97ee269SEmmanuel Vadot      phy-names:
89*b97ee269SEmmanuel Vadot        const: lvds_phy
90*b97ee269SEmmanuel Vadot
91*b97ee269SEmmanuel Vadot      port@0:
92*b97ee269SEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
93*b97ee269SEmmanuel Vadot        description: Input port of the channel.
94*b97ee269SEmmanuel Vadot
95*b97ee269SEmmanuel Vadot      port@1:
96*b97ee269SEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
97*b97ee269SEmmanuel Vadot        description: Output port of the channel.
98*b97ee269SEmmanuel Vadot
99*b97ee269SEmmanuel Vadot    required:
100*b97ee269SEmmanuel Vadot      - "#address-cells"
101*b97ee269SEmmanuel Vadot      - "#size-cells"
102*b97ee269SEmmanuel Vadot      - reg
103*b97ee269SEmmanuel Vadot      - phys
104*b97ee269SEmmanuel Vadot      - phy-names
105*b97ee269SEmmanuel Vadot
106*b97ee269SEmmanuel Vadot    additionalProperties: false
107*b97ee269SEmmanuel Vadot
108*b97ee269SEmmanuel Vadotrequired:
109*b97ee269SEmmanuel Vadot  - compatible
110*b97ee269SEmmanuel Vadot  - "#address-cells"
111*b97ee269SEmmanuel Vadot  - "#size-cells"
112*b97ee269SEmmanuel Vadot  - clocks
113*b97ee269SEmmanuel Vadot  - clock-names
114*b97ee269SEmmanuel Vadot  - power-domains
115*b97ee269SEmmanuel Vadot  - channel@0
116*b97ee269SEmmanuel Vadot  - channel@1
117*b97ee269SEmmanuel Vadot
118*b97ee269SEmmanuel VadotallOf:
119*b97ee269SEmmanuel Vadot  - if:
120*b97ee269SEmmanuel Vadot      properties:
121*b97ee269SEmmanuel Vadot        compatible:
122*b97ee269SEmmanuel Vadot          contains:
123*b97ee269SEmmanuel Vadot            const: fsl,imx8qm-ldb
124*b97ee269SEmmanuel Vadot    then:
125*b97ee269SEmmanuel Vadot      properties:
126*b97ee269SEmmanuel Vadot        fsl,companion-ldb: false
127*b97ee269SEmmanuel Vadot
128*b97ee269SEmmanuel VadotadditionalProperties: false
129*b97ee269SEmmanuel Vadot
130*b97ee269SEmmanuel Vadotexamples:
131*b97ee269SEmmanuel Vadot  - |
132*b97ee269SEmmanuel Vadot    #include <dt-bindings/firmware/imx/rsrc.h>
133*b97ee269SEmmanuel Vadot    ldb {
134*b97ee269SEmmanuel Vadot        #address-cells = <1>;
135*b97ee269SEmmanuel Vadot        #size-cells = <0>;
136*b97ee269SEmmanuel Vadot        compatible = "fsl,imx8qxp-ldb";
137*b97ee269SEmmanuel Vadot        clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_MISC2>,
138*b97ee269SEmmanuel Vadot                 <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_BYPASS>;
139*b97ee269SEmmanuel Vadot        clock-names = "pixel", "bypass";
140*b97ee269SEmmanuel Vadot        power-domains = <&pd IMX_SC_R_LVDS_0>;
141*b97ee269SEmmanuel Vadot
142*b97ee269SEmmanuel Vadot        channel@0 {
143*b97ee269SEmmanuel Vadot            #address-cells = <1>;
144*b97ee269SEmmanuel Vadot            #size-cells = <0>;
145*b97ee269SEmmanuel Vadot            reg = <0>;
146*b97ee269SEmmanuel Vadot            phys = <&mipi_lvds_0_phy>;
147*b97ee269SEmmanuel Vadot            phy-names = "lvds_phy";
148*b97ee269SEmmanuel Vadot
149*b97ee269SEmmanuel Vadot            port@0 {
150*b97ee269SEmmanuel Vadot                reg = <0>;
151*b97ee269SEmmanuel Vadot
152*b97ee269SEmmanuel Vadot                mipi_lvds_0_ldb_ch0_mipi_lvds_0_pxl2dpi: endpoint {
153*b97ee269SEmmanuel Vadot                    remote-endpoint = <&mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch0>;
154*b97ee269SEmmanuel Vadot                };
155*b97ee269SEmmanuel Vadot            };
156*b97ee269SEmmanuel Vadot        };
157*b97ee269SEmmanuel Vadot
158*b97ee269SEmmanuel Vadot        channel@1 {
159*b97ee269SEmmanuel Vadot            #address-cells = <1>;
160*b97ee269SEmmanuel Vadot            #size-cells = <0>;
161*b97ee269SEmmanuel Vadot            reg = <1>;
162*b97ee269SEmmanuel Vadot            phys = <&mipi_lvds_0_phy>;
163*b97ee269SEmmanuel Vadot            phy-names = "lvds_phy";
164*b97ee269SEmmanuel Vadot
165*b97ee269SEmmanuel Vadot            port@0 {
166*b97ee269SEmmanuel Vadot                reg = <0>;
167*b97ee269SEmmanuel Vadot
168*b97ee269SEmmanuel Vadot                mipi_lvds_0_ldb_ch1_mipi_lvds_0_pxl2dpi: endpoint {
169*b97ee269SEmmanuel Vadot                    remote-endpoint = <&mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch1>;
170*b97ee269SEmmanuel Vadot                };
171*b97ee269SEmmanuel Vadot            };
172*b97ee269SEmmanuel Vadot        };
173*b97ee269SEmmanuel Vadot    };
174