RK3568使用RGB显示功能

RK3568支持多种显示功能,HDMI, MIPI-DSI, LVDS, RGB。这些显示功能是由VP来提供的,总共有三个VP,分别是VP0, VP1, VP2。

RK3568使用RGB显示功能

支持的分辨率如下

  • Video output0, up to 4096×2304@60Hz resolution
  • Video output1, up to 2048×1536@60Hz resolution
  • Video output2, up to 1920×1080@60Hz resolution

三个显示处理支持的接口如下

  • VP0支持HDMI, eDP/DP, MIPI-DSI
  • VP1支持HDMI, eDP/DP, MIPI-DSI, LVDS
  • VP2支持LVDS, BT565/RGB

目前市面上大部分7inch以下的液晶屏,会使用RGB信号来作为显示数据的接口。本文将使用7Inch液晶屏和RK3568来连接,液晶屏使用RGB888信号。

RK3568上支持这个液晶,需要以下的配置

  • 液晶屏的参数,尺寸,水平,垂直的参数
  • VP通道的选择,显示功能在对应的通道上
  • 通道和液晶屏的连接

下面是参考代码

/ {
	rgb_panel: panel {
		status = "okay";
		//compatible = "avic,tm070ddh03";
		enable-gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio4 RK_PC7 GPIO_ACTIVE_LOW>;
		//power-supply = <&vcc3v3_lcd>;
		backlight = <&backlight>;

		compatible = "simple-panel";
		bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;

                display-timings {
                        native-mode = <&timing1>;

                        timing1: timing1 {
                               clock-frequency = <51200000>;
                               hactive = <1024>;
                               vactive = <600>;
                               hfront-porch = <160>;
                               hback-porch = <160>;
                               hsync-len = <1>;
                               vback-porch = <15>;
                               vfront-porch = <12>;
                               vsync-len = <1>;
                               hsync-active = <0>;
                               vsync-active = <0>;
                               de-active = <1>;
                               pixelclk-active = <1>;
                        };
                };

                ports {
                        #address-cells = <1>;
                        #size-cells = <0>;

                        port@0 {
                                reg = <0>;
                                panel_in_rgb: endpoint {
                                        remote-endpoint = <&rgb_out_panel>;
                                };
                        };

                };
        }
};

&rgb_in_vp2 {
	status = "okay";
};

&route_rgb {
        status = "okay";
	connect = <&vp2_out_rgb>;
};

&rgb {
	status = "okay";

        ports {
		#address-cells = <1>;
		#size-cells = <0>;
                port@1 {
                        reg = <1>;
                        rgb_out_panel: endpoint {
                                remote-endpoint = <&panel_in_rgb>;
                        };
                };
        };
};

rgb_panel是液晶屏的显示参数。RGB功能是在VP2上,所以要使能rgb_in_vp2节点。rgb节点的port1是作为输出连接到panel,这样显示的数据才能流向液晶面板控制器。

相关新闻

联系我们

029-89197679

技术咨询:support@i2som.tech

商务合作:market@i2som.tech

工作时间:周一至周五,9:30-18:30,节假日休息