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