Difference between revisions of "LVDS"

From Rockchip open source Document
Jump to: navigation, search
(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...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
=== * How to Enable LVDS Module ===
+
= References =
  
----
+
[https://github.com/rockchip-linux/kernel/tree/release-4.4/drivers/media/platform/rockchip-rga source code]
  
'''1. Driver Compile'''<br/> Ensure below configures have been selected:
+
[https://github.com/rockchip-linux/kernel/blob/release-4.4/Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt device-tree document]
<pre><code>CONFIG_ROCKCHIP_LVDS=y</code>
 
</pre>
 
 
 
Bellow drivers have been compiled:
 
<pre><code>drivers/gpu/drm/rockchip/rockchip_lvds.c</code>
 
</pre>
 
 
 
'''2. DTS Setting'''<br/> 2.1 Enable LVDS Device Node:
 
 
 
*Include the SoC DTS 'rk3288.dtsi' file.
 
*Set the LVDS device node state to 'okay'.
 
<pre><code>include "rk3288.dtsi"
 
&lvds {
 
        status = "okay";
 
};</code>
 
</pre>
 
 
 
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 )
 
<pre><code>rockchip,data-mapping = "jeida";
 
rockchip,data-width = <24>;
 
rockchip,output = "lvds";
 
rockchip,panel = <&lvds_panel>;</code>
 
</pre>
 
  
----
+
&nbsp;
  
=== * How To Debug LVDS Module ===
+
= Tips =
  
'''3. Whether LVDS display card has been registered successfully'''
+
== Whether LVDS display card has been registered successfully ==
  
 
If the LVDS display card has been created, it would create a sysfs debug directory.
 
If the LVDS display card has been created, it would create a sysfs debug directory.
<pre><code>$ ls /sys/class/drm/card0-LVDS-1</code>
+
<pre>$ ls /sys/class/drm/card0-LVDS-1</code>
 
</pre>
 
</pre>
  
Line 51: Line 23:
 
*Check the kernel log for more detail (dmesg | grep lvds)  
 
*Check the kernel log for more detail (dmesg | grep lvds)  
  
'''4. Check LVDS display card status: status, enabled, modes'''
+
== Check LVDS display card status: status, enabled, modes ==
<pre><code>$ cd /sys/class/drm/card0-LVDS-1
+
<pre>$ cd /sys/class/drm/card0-LVDS-1
 
$ cat status  # should printed "connected" or "disconnected"
 
$ cat status  # should printed "connected" or "disconnected"
 
$ cat enabled # should printed "enabled" or "disabled"
 
$ cat enabled # should printed "enabled" or "disabled"
Line 58: Line 30:
 
</pre>
 
</pre>
  
'''5. If you still have no picture on LVDS panel, please check bellow information:'''
+
== If you still have no picture on LVDS panel, please check bellow information: ==
  
 
*Check the LVDS panel power supply.  
 
*Check the LVDS panel power supply.  
 
*Check the panel datasheet, ensure you have configured the timing and data format rightly.  
 
*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.  
+
*Check the hardware connected status, or test the panel on workable board.
 
 
----
 
 
 
=== * Reference LVDS DTS Configure: ===
 
<pre><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></pre>
 

Latest revision as of 07:37, 11 October 2017

References

source code

device-tree document

 

Tips

Whether LVDS display card has been registered successfully

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

$ 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)

Check LVDS display card status: status, enabled, modes

$ 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>

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.