xref: /freebsd-src/sys/contrib/device-tree/Bindings/display/imx/ldb.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotDevice-Tree bindings for LVDS Display Bridge (ldb)
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotLVDS Display Bridge
4*c66ec88fSEmmanuel Vadot===================
5*c66ec88fSEmmanuel Vadot
6*c66ec88fSEmmanuel VadotThe LVDS Display Bridge device tree node contains up to two lvds-channel
7*c66ec88fSEmmanuel Vadotnodes describing each of the two LVDS encoder channels of the bridge.
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel VadotRequired properties:
10*c66ec88fSEmmanuel Vadot - #address-cells : should be <1>
11*c66ec88fSEmmanuel Vadot - #size-cells : should be <0>
12*c66ec88fSEmmanuel Vadot - compatible : should be "fsl,imx53-ldb" or "fsl,imx6q-ldb".
13*c66ec88fSEmmanuel Vadot                Both LDB versions are similar, but i.MX6 has an additional
14*c66ec88fSEmmanuel Vadot                multiplexer in the front to select any of the four IPU display
15*c66ec88fSEmmanuel Vadot                interfaces as input for each LVDS channel.
16*c66ec88fSEmmanuel Vadot - gpr : should be <&gpr> on i.MX53 and i.MX6q.
17*c66ec88fSEmmanuel Vadot         The phandle points to the iomuxc-gpr region containing the LVDS
18*c66ec88fSEmmanuel Vadot         control register.
19*c66ec88fSEmmanuel Vadot- clocks, clock-names : phandles to the LDB divider and selector clocks and to
20*c66ec88fSEmmanuel Vadot                        the display interface selector clocks, as described in
21*c66ec88fSEmmanuel Vadot                        Documentation/devicetree/bindings/clock/clock-bindings.txt
22*c66ec88fSEmmanuel Vadot        The following clocks are expected on i.MX53:
23*c66ec88fSEmmanuel Vadot                "di0_pll" - LDB LVDS channel 0 mux
24*c66ec88fSEmmanuel Vadot                "di1_pll" - LDB LVDS channel 1 mux
25*c66ec88fSEmmanuel Vadot                "di0" - LDB LVDS channel 0 gate
26*c66ec88fSEmmanuel Vadot                "di1" - LDB LVDS channel 1 gate
27*c66ec88fSEmmanuel Vadot                "di0_sel" - IPU1 DI0 mux
28*c66ec88fSEmmanuel Vadot                "di1_sel" - IPU1 DI1 mux
29*c66ec88fSEmmanuel Vadot        On i.MX6q the following additional clocks are needed:
30*c66ec88fSEmmanuel Vadot                "di2_sel" - IPU2 DI0 mux
31*c66ec88fSEmmanuel Vadot                "di3_sel" - IPU2 DI1 mux
32*c66ec88fSEmmanuel Vadot        The needed clock numbers for each are documented in
33*c66ec88fSEmmanuel Vadot        Documentation/devicetree/bindings/clock/imx5-clock.yaml, and in
34*c66ec88fSEmmanuel Vadot        Documentation/devicetree/bindings/clock/imx6q-clock.yaml.
35*c66ec88fSEmmanuel Vadot
36*c66ec88fSEmmanuel VadotOptional properties:
37*c66ec88fSEmmanuel Vadot - pinctrl-names : should be "default" on i.MX53, not used on i.MX6q
38*c66ec88fSEmmanuel Vadot - pinctrl-0 : a phandle pointing to LVDS pin settings on i.MX53,
39*c66ec88fSEmmanuel Vadot               not used on i.MX6q
40*c66ec88fSEmmanuel Vadot - fsl,dual-channel : boolean. if it exists, only LVDS channel 0 should
41*c66ec88fSEmmanuel Vadot   be configured - one input will be distributed on both outputs in dual
42*c66ec88fSEmmanuel Vadot   channel mode
43*c66ec88fSEmmanuel Vadot
44*c66ec88fSEmmanuel VadotLVDS Channel
45*c66ec88fSEmmanuel Vadot============
46*c66ec88fSEmmanuel Vadot
47*c66ec88fSEmmanuel VadotEach LVDS Channel has to contain either an of graph link to a panel device node
48*c66ec88fSEmmanuel Vadotor a display-timings node that describes the video timings for the connected
49*c66ec88fSEmmanuel VadotLVDS display as well as the fsl,data-mapping and fsl,data-width properties.
50*c66ec88fSEmmanuel Vadot
51*c66ec88fSEmmanuel VadotRequired properties:
52*c66ec88fSEmmanuel Vadot - reg : should be <0> or <1>
53*c66ec88fSEmmanuel Vadot - port: Input and output port nodes with endpoint definitions as defined in
54*c66ec88fSEmmanuel Vadot   Documentation/devicetree/bindings/graph.txt.
55*c66ec88fSEmmanuel Vadot   On i.MX5, the internal two-input-multiplexer is used. Due to hardware
56*c66ec88fSEmmanuel Vadot   limitations, only one input port (port@[0,1]) can be used for each channel
57*c66ec88fSEmmanuel Vadot   (lvds-channel@[0,1], respectively).
58*c66ec88fSEmmanuel Vadot   On i.MX6, there should be four input ports (port@[0-3]) that correspond
59*c66ec88fSEmmanuel Vadot   to the four LVDS multiplexer inputs.
60*c66ec88fSEmmanuel Vadot   A single output port (port@2 on i.MX5, port@4 on i.MX6) must be connected
61*c66ec88fSEmmanuel Vadot   to a panel input port. Optionally, the output port can be left out if
62*c66ec88fSEmmanuel Vadot   display-timings are used instead.
63*c66ec88fSEmmanuel Vadot
64*c66ec88fSEmmanuel VadotOptional properties (required if display-timings are used):
65*c66ec88fSEmmanuel Vadot - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
66*c66ec88fSEmmanuel Vadot - display-timings : A node that describes the display timings as defined in
67*c66ec88fSEmmanuel Vadot   Documentation/devicetree/bindings/display/panel/display-timing.txt.
68*c66ec88fSEmmanuel Vadot - fsl,data-mapping : should be "spwg" or "jeida"
69*c66ec88fSEmmanuel Vadot                      This describes how the color bits are laid out in the
70*c66ec88fSEmmanuel Vadot                      serialized LVDS signal.
71*c66ec88fSEmmanuel Vadot - fsl,data-width : should be <18> or <24>
72*c66ec88fSEmmanuel Vadot
73*c66ec88fSEmmanuel Vadotexample:
74*c66ec88fSEmmanuel Vadot
75*c66ec88fSEmmanuel Vadotgpr: iomuxc-gpr@53fa8000 {
76*c66ec88fSEmmanuel Vadot	/* ... */
77*c66ec88fSEmmanuel Vadot};
78*c66ec88fSEmmanuel Vadot
79*c66ec88fSEmmanuel Vadotldb: ldb@53fa8008 {
80*c66ec88fSEmmanuel Vadot	#address-cells = <1>;
81*c66ec88fSEmmanuel Vadot	#size-cells = <0>;
82*c66ec88fSEmmanuel Vadot	compatible = "fsl,imx53-ldb";
83*c66ec88fSEmmanuel Vadot	gpr = <&gpr>;
84*c66ec88fSEmmanuel Vadot	clocks = <&clks IMX5_CLK_LDB_DI0_SEL>,
85*c66ec88fSEmmanuel Vadot		 <&clks IMX5_CLK_LDB_DI1_SEL>,
86*c66ec88fSEmmanuel Vadot		 <&clks IMX5_CLK_IPU_DI0_SEL>,
87*c66ec88fSEmmanuel Vadot		 <&clks IMX5_CLK_IPU_DI1_SEL>,
88*c66ec88fSEmmanuel Vadot		 <&clks IMX5_CLK_LDB_DI0_GATE>,
89*c66ec88fSEmmanuel Vadot		 <&clks IMX5_CLK_LDB_DI1_GATE>;
90*c66ec88fSEmmanuel Vadot	clock-names = "di0_pll", "di1_pll",
91*c66ec88fSEmmanuel Vadot		      "di0_sel", "di1_sel",
92*c66ec88fSEmmanuel Vadot		      "di0", "di1";
93*c66ec88fSEmmanuel Vadot
94*c66ec88fSEmmanuel Vadot	/* Using an of-graph endpoint link to connect the panel */
95*c66ec88fSEmmanuel Vadot	lvds-channel@0 {
96*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
97*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
98*c66ec88fSEmmanuel Vadot		reg = <0>;
99*c66ec88fSEmmanuel Vadot
100*c66ec88fSEmmanuel Vadot		port@0 {
101*c66ec88fSEmmanuel Vadot			reg = <0>;
102*c66ec88fSEmmanuel Vadot
103*c66ec88fSEmmanuel Vadot			lvds0_in: endpoint {
104*c66ec88fSEmmanuel Vadot				remote-endpoint = <&ipu_di0_lvds0>;
105*c66ec88fSEmmanuel Vadot			};
106*c66ec88fSEmmanuel Vadot		};
107*c66ec88fSEmmanuel Vadot
108*c66ec88fSEmmanuel Vadot		port@2 {
109*c66ec88fSEmmanuel Vadot			reg = <2>;
110*c66ec88fSEmmanuel Vadot
111*c66ec88fSEmmanuel Vadot			lvds0_out: endpoint {
112*c66ec88fSEmmanuel Vadot				remote-endpoint = <&panel_in>;
113*c66ec88fSEmmanuel Vadot			};
114*c66ec88fSEmmanuel Vadot		};
115*c66ec88fSEmmanuel Vadot	};
116*c66ec88fSEmmanuel Vadot
117*c66ec88fSEmmanuel Vadot	/* Using display-timings and fsl,data-mapping/width instead */
118*c66ec88fSEmmanuel Vadot	lvds-channel@1 {
119*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
120*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
121*c66ec88fSEmmanuel Vadot		reg = <1>;
122*c66ec88fSEmmanuel Vadot		fsl,data-mapping = "spwg";
123*c66ec88fSEmmanuel Vadot		fsl,data-width = <24>;
124*c66ec88fSEmmanuel Vadot
125*c66ec88fSEmmanuel Vadot		display-timings {
126*c66ec88fSEmmanuel Vadot			/* ... */
127*c66ec88fSEmmanuel Vadot		};
128*c66ec88fSEmmanuel Vadot
129*c66ec88fSEmmanuel Vadot		port@1 {
130*c66ec88fSEmmanuel Vadot			reg = <1>;
131*c66ec88fSEmmanuel Vadot
132*c66ec88fSEmmanuel Vadot			lvds1_in: endpoint {
133*c66ec88fSEmmanuel Vadot				remote-endpoint = <&ipu_di1_lvds1>;
134*c66ec88fSEmmanuel Vadot			};
135*c66ec88fSEmmanuel Vadot		};
136*c66ec88fSEmmanuel Vadot	};
137*c66ec88fSEmmanuel Vadot};
138*c66ec88fSEmmanuel Vadot
139*c66ec88fSEmmanuel Vadotpanel: lvds-panel {
140*c66ec88fSEmmanuel Vadot	/* ... */
141*c66ec88fSEmmanuel Vadot
142*c66ec88fSEmmanuel Vadot	port {
143*c66ec88fSEmmanuel Vadot		panel_in: endpoint {
144*c66ec88fSEmmanuel Vadot			remote-endpoint = <&lvds0_out>;
145*c66ec88fSEmmanuel Vadot		};
146*c66ec88fSEmmanuel Vadot	};
147*c66ec88fSEmmanuel Vadot};
148