LVDS

From Rockchip open source Document
Revision as of 02:32, 11 October 2017 by Jacob (talk | contribs) (Created page with " === * How to Enable LVDS Module === ---- '''1. Driver Compile'''<br/> Ensure below configures have been selected: <pre><code>CONFIG_ROCKCHIP_LVDS=y</code> </pre> Bellow dr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

* How to Enable LVDS Module


1. Driver Compile
Ensure below configures have been selected:

<code>CONFIG_ROCKCHIP_LVDS=y</code>

Bellow drivers have been compiled:

<code>drivers/gpu/drm/rockchip/rockchip_lvds.c</code>

2. DTS Setting
2.1 Enable LVDS Device Node:

  • Include the SoC DTS 'rk3288.dtsi' file.
  • Set the LVDS device node state to 'okay'.
<code>include "rk3288.dtsi"
&lvds {
        status = "okay";
};</code>

2.2 LVDS device node parameters, there're four properties for LVDS device:

  • "rockchip,data-mapping": stand for the output data mapping, avaliable values "jeida" or "vesa".
  • "rockchip,data-width": stand for the output data width, avaliable values "<24>" or "<18>". ("<24>" means RGB888, "<18>" means RGB666)
  • "rockchip,ouput": stand for the output connector type, avaliable values "rgb", "lvds" or "duallvds".
  • "rockchip,panel": pointed to panel device node (more panel detail, please see link: xxxx )
<code>rockchip,data-mapping = "jeida";
rockchip,data-width = <24>;
rockchip,output = "lvds";
rockchip,panel = <&lvds_panel>;</code>

* How To Debug LVDS Module

3. Whether LVDS display card has been registered successfully

If the LVDS display card has been created, it would create a sysfs debug directory.

<code>$ ls /sys/class/drm/card0-LVDS-1</code>

So you just need to check that directory. If that directory is missing in your machine board, please check:

  • Whether LVDS have been enabled in DTS files.
  • Whether LVDS panel have been registered successfully.
  • Whether you have available VOP module for LVDS.
  • Check the kernel log for more detail (dmesg | grep lvds)

4. Check LVDS display card status: status, enabled, modes

<code>$ cd /sys/class/drm/card0-LVDS-1
$ cat status  # should printed "connected" or "disconnected"
$ cat enabled # should printed "enabled" or "disabled"
$ cat modes   # should printed the available mode list, like 1536x2048</code>

5. If you still have no picture on LVDS panel, please check bellow information:

  • Check the LVDS panel power supply.
  • Check the panel datasheet, ensure you have configured the timing and data format rightly.
  • Check the hardware connected status, or test the panel on workable board.

* Reference LVDS DTS Configure:

<code>include "rk3288.dtsi"

lvds_panel: lvds_panel {
        compatible ="auo,b101ew05","simple-panel";
        backlight = <&backlight>;
        enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
        pinctrl-0 = <&lcd_cs>;
        status = "okay";

        ports {
                panel_in_lvds: endpoint {
                        remote-endpoint = <&lvds_out_panel>;
                };
        };
};

&lvds {
        rockchip,data-mapping = "jeida";
        rockchip,data-width = <24>;
        rockchip,output = "lvds";
        status = "okay";

        ports {
                 lvds_out: port@1 {
                        reg = <1>;
                        #address-cells = <1>;
                        #size-cells = <0>;

                        lvds_out_panel: endpoint@0 {
                            reg = <0>;
                                remote-endpoint = <&panel_in_lvds>;
                        };
                };
        };
};</code>