Split mode LVDS to eDP via bridge

I’m debugging a display issue and would like to have some feedback on whether the device tree modifications I’ve made are correct given my intentions.

The LVDS output from the Apalis iMX6 SOM is connected to a DisplayPort panel via an LVDS-to-eDP bridge.

SOM
    >>>[2 channel LVDS]>>>
LVDS-to-eDP bridge (it6251)
    >>>[DisplayPort lanes]>>>
Panel (AUO G133HAN01.0)

The Linux kernel version is 4.9.87-2.8.3 and it was built with patches applied to linux-toradex.git (07d40f6f tag: Apalis-iMX6_LXDE-Image_2.8b3.111-20180626).

The changes to the device tree are applied via an addition dtsi file which is included in imx6q-apalis-eval.dts.

/ {
        panel: panel {
                compatible = "simple-panel";
                power-supply = <&reg_3p3v>;
                backlight = <&backlight>;
                port {
                        panel_in_edp: endpoint {
                                remote-endpoint = <&bridge_out_edp>;
                        };
                };
        };
};


&mxcfb1 {
        interface_pix_fmt = "RGB24";
        default_bpp = <24>;
};


&ldb {  
        split-mode;

        lvds-channel@0 {
                fsl,data-mapping = "jeida";
                fsl,data-width = <24>;

                port@4 {
                        reg = <4>;
                        lvds_odd_out: endpoint {
                                remote-endpoint = <&bridge_in_lvds_odd>;
                        };
                };

                display-timings {
                        native-mode = <&timing_fullhd>;
                        timing_fullhd: 1920x1080 {
                                clock-frequency = <72000000>;
                                hactive = <1920>;
                                vactive = <1080>;
                                hback-porch = <46>;
                                hfront-porch = <45>;
                                vback-porch = <18>;
                                vfront-porch = <17>;
                                hsync-len = <1>;
                                vsync-len = <1>;
                                hsync-active = <0>;
                                vsync-active = <0>;
                                pixelclk-active = <0>;
                        };
                };
        };

        lvds-channel@1 {
                fsl,data-mapping = "jeida";
                fsl,data-width = <24>;

                port@4 {
                        reg = <4>;
                        lvds_even_out: endpoint {
                                remote-endpoint = <&bridge_in_lvds_even>;
                        };
                };

                display-timings {
                        native-mode = <&timing_fullhd_ch2>;
                        timing_fullhd_ch2: 1920x1080 {
                                clock-frequency = <72000000>;
                                hactive = <1920>;
                                vactive = <1080>;
                                hback-porch = <46>;
                                hfront-porch = <45>;
                                vback-porch = <18>;
                                vfront-porch = <17>;
                                hsync-len = <1>;
                                vsync-len = <1>;
                                hsync-active = <0>;
                                vsync-active = <0>;
                                pixelclk-active = <0>;
                        };
                };
        };
};

&i2c1 {
        it6251: it6251@5c {
                compatible = "ite,it6251";
                reg = <0x5c>, <0x5e>;
                reg-names = "bridge", "lvds";
                power-supply = <&reg_3p3v>;
                status = "okay";

                ports {
                        port@0 {
                                bridge_out_edp: endpoint {
                                        remote-endpoint = <&panel_in_edp>;
                                };
                        };

                        port@1 {
                                bridge_in_lvds_odd: endpoint {
                                        remote-endpoint = <&lvds_odd_out>;
                                };
                        };

                        port@2 {
                                bridge_in_lvds_even: endpoint {
                                        remote-endpoint = <&lvds_even_out>;
                                };
                        };

                };
        };
};

The it6251 driver is from a patch series (DRI devel - Patchwork) and this is the device tree bindings documentation.

ITE IT6251 LVDS-to-eDP bridge bindings

Required properties:
- compatible:           Should be "ite,it6251"
- reg:                  i2c address of the bridge, i2c address of the LVDS part
- reg-names:            Should be "bridge", "lvds"
- power-supply:         Regulator to provide the supply voltage
- video interfaces:     Device node can contain video interface port nodes
                        for panel according to [1].

[1]: Documentation/devicetree/bindings/media/video-interfaces.txt

Example:

        it6251@5c {
                compatible = "ite,it6251";
                reg = <0x5c>, <0x5e>;
                reg-names = "bridge", "lvds";
                power-supply = <&reg_display>;

                ports { 
                        port@0 {
                                bridge_out_edp0: endpoint {
                                        remote-endpoint = <&panel_in_edp0>;
                                };
                        };

                        port@1 {
                                bridge_in_lvds0: endpoint {
                                        remote-endpoint = <&lvds0_out>;
                                };
                        };
                };
        };

The U-Boot vidargs environment variable has also been modified to use LVDS.

vidargs=video=mxcfb0:dev=ldb,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off

I am unsure whether to focus on the device tree and U-Boot settings or on the it6251 driver when debugging. I have not noticed any display errors reported in dmesg, but the display comes up blank. This is the output from fbset.

mode "1920x1080-32"
        # D: 72.005 MHz, H: 35.788 kHz, V: 32.068 Hz
        geometry 1920 1080 1920 2160 24
        timings 13888 46 45 18 17 1 1
        accel false
        rgba 8/16,8/8,8/0,0/0
endmode

Hi @Jimmy

The Linux kernel version is 4.9.87-2.8.3 and it was built with patches applied to linux-toradex.git (07d40f6f tag: Apalis-iMX6_LXDE-Image_2.8b3.111-20180626)

Bsp 2.8b3 is not supported anymore? Could you update to Bsp 2.8 stable version version and check if the issue is still present?

I am unsure whether to focus on the device tree and U-Boot settings or on the it6251 driver when debugging. I have not noticed any display errors reported in dmesg, but the display comes up blank. This is the output from fbset.

Thanks for the devicetree changes and U-Boot settings. Could you provide also your kernel config? Please share also the dmesg output in a file?

Additionally could you provide the schematic of the connection between LVDS output and eDP bridge?

Thanks and best regards,
Jaski

My issue ended up being a combination of

  1. Loosely connected display cable
  2. Incorrect display timing
  3. Incorrect values written to LVDS-to-eDP bridge adapter by driver

I ended up removing the driver for now and writing the correct values to the bridge adapter via a shell script.

The only change to the device tree required was

    &ldb {  
            split-mode;

            lvds-channel@0 {
                    fsl,data-mapping = "jeida";
                    fsl,data-width = <24>;

            };
    };

And the U-Boot vidargs argument is now

    video=mxcfb0:dev=ldb,1920x1080M@60,if=RGB24

Perfect that you found the solution. Thanks for your feedback.