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