Lvds
* How to Enable LVDS Module
1. Driver Compile
Ensure below configures have been selected:
CONFIG_ROCKCHIP_LVDS=y
Bellow drivers have been compiled:
drivers/gpu/drm/rockchip/rockchip_lvds.c
2. DTS Setting
2.1 Enable LVDS Device Node:
- Include the SoC DTS 'rk3288.dtsi' file.
- Set the LVDS device node state to 'okay'.
include "rk3288.dtsi"
&lvds {
status = "okay";
};
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 )
rockchip,data-mapping = "jeida";
rockchip,data-width = <24>;
rockchip,output = "lvds";
rockchip,panel = <&lvds_panel>;
* 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.
$ ls /sys/class/drm/card0-LVDS-1
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
$ 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
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:
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>;
};
};
};
};