Difference between revisions of "EDP"

From Rockchip open source Document
Jump to: navigation, search
(Created page with " === * How to Enable eDP Module === ---- '''1. Driver Compile'''<br/> Ensure below configures have been selected: <pre><code>CONFIG_ROCKCHIP_ANALOGIX_DP=y CONFIG_PHY_ROCKCHI...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
=== * How to Enable eDP Module ===
+
= References =
  
----
+
[https://github.com/rockchip-linux/kernel/tree/release-4.4/drivers/gpu/drm/rockchip 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/analogix_dp-rockchip.txt device-tree document]
<pre><code>CONFIG_ROCKCHIP_ANALOGIX_DP=y
 
CONFIG_PHY_ROCKCHIP_DP=y</code>
 
</pre>
 
 
 
Bellow drivers have been compiled:
 
<pre><code>drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
 
drivers/gpu/drm/bridge/analogix/</code>
 
</pre>
 
 
 
'''2. DTS Setting'''<br/> 2.1 Enable eDP Device Node:
 
 
 
*Include the SoC DTS 'rk3288.dtsi' file.
 
*Set the eDP device node state to 'okay'.
 
*Set the eDP-PHY device node state to 'okay'.
 
<pre><code>include "rk3288.dtsi"
 
&edp {
 
        status = "okay";
 
};
 
 
 
&edp_phy {
 
        status = "okay";
 
};</code>
 
</pre>
 
 
 
2.2 eDP device node parameters, there are two properties for eDP device:
 
<pre><code>force-hpd;
 
ports {
 
        edp_out: port@1 {
 
                reg = <1>;
 
                #address-cells = <1>;
 
                #size-cells = <0>;
 
                edp_out_panel: endpoint {
 
                        reg = <0>;
 
                        remote-endpoint = <&panel_in_edp>;
 
                };
 
        };
 
};</code>
 
</pre>
 
 
 
*"force-hpd": forcing regard panel is connected for some panel without Hotplug pin.
 
*"ports": pointed to panel device node
 
  
----
+
&nbsp;
  
=== * How To Debug eDP Module ===
+
= Tips =
  
'''3. Whether eDP display card has been registered successfully'''
+
== '''Whether eDP display card has been registered successfully''' ==
  
 
If the eDP display card has been created, it would create a sysfs debug directory.
 
If the eDP display card has been created, it would create a sysfs debug directory.
<pre><code>$ ls /sys/class/drm/card0-eDP-1</code>
+
<pre>$ ls /sys/class/drm/card0-eDP-1</code>
 
</pre>
 
</pre>
  
Line 64: Line 23:
 
*Check the kernel log for more detail (dmesg | grep dp)  
 
*Check the kernel log for more detail (dmesg | grep dp)  
  
'''4. Check eDP display card status: status, enabled, modes'''
+
== '''Check eDP display card status: status, enabled, modes''' ==
<pre><code>$ cd /sys/class/drm/card0-eDP-1
+
<pre>$ cd /sys/class/drm/card0-eDP-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
$ cat modes  # should printed the available mode list, like 1536x2048</code>
+
$ cat modes  # should printed the available mode list, like 1536x2048
 
</pre>
 
</pre>
  
'''5. If you still have no picture on eDP panel, please check bellow information:'''
+
== '''If you still have no picture on eDP panel, please check bellow information:''' ==
  
 
*Check the eDP panel power supply.  
 
*Check the eDP panel power supply.  
 
*Check the panel datasheet, ensure you have configured the timing and power sequence rightly.  
 
*Check the panel datasheet, ensure you have configured the timing and power sequence 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 eDP DTS Configure: ===
 
<pre><code>include "rk3288.dtsi"
 
 
 
edp_panel: edp-panel {
 
        compatible ="lg,lp079qx1-sp0v", "simple-panel";
 
        backlight = <&backlight>;
 
        enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
 
        pinctrl-0 = <&lcd_cs>;
 
        ports {
 
                panel_in: port {
 
                        panel_in_edp: endpoint {
 
                                remote-endpoint = <&edp_out_panel>;
 
                        };
 
                };
 
        };
 
};
 
 
 
&edp {
 
        force-hpd;
 
        status = "okay";
 
 
 
        ports {
 
                edp_out: port@1 {
 
                        reg = <1>;
 
                        #address-cells = <1>;
 
                        #size-cells = <0>;
 
                        edp_out_panel: endpoint {
 
                                reg = <0>;
 
                                remote-endpoint = <&panel_in_edp>;
 
                        };
 
                };
 
        };
 
};
 
 
 
&edp_phy {
 
        status = "okay";
 
};</code></pre>
 

Latest revision as of 07:37, 11 October 2017

References

source code

device-tree document

 

Tips

Whether eDP display card has been registered successfully

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

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

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

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

Check eDP display card status: status, enabled, modes

$ cd /sys/class/drm/card0-eDP-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

If you still have no picture on eDP panel, please check bellow information:

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