RK3399 GM8775C mipi2lvds

LCD screen

Posted by LXG on August 26, 2022

概述

GM8775C 型 DSI 转双通道 LVDS 发送器产品主要实现将 MIPI DSI 转单/双通道 LVDS功能,MIPI 支持 1/2/3/4 通道可选,最大支持 4Gbps 速率。LVDS 时钟频率最高 154MHz, 最大支持视频格式为 FULL HD(1920 x 1200)。

产品功能框图

gm8775c_structure

主要由 DSI 接收通道、数据缓冲、锁相环、LVDS 信号打包、 LVDS TX 等模块组成,实现将 1/2/3/4 通道的 DSI 图像信号转换成单/双通道 LVDS 信号输出的功能。

参考原理图

GM8775C 主要应用于前端视频应用处理器和后端显示设备之间,用于做 DSI 到 LVDS转换驱动输出功能。前端视频应用处理器输出 4lane DSI 数据,并同步输出 1lane DSI 时钟信号。 GM8775C 将该 DSI 信号转换成双通道 LVDS 差分信号输出,驱动后级显示器完成转换、传输和显示功能。

gm8775c_apply

时序适配

gm8775c_dtsi

测试模式:打开测试模式后,可现实ColorBar、White等效果,但不能正常logo、Android界面。我们旨在现实Android,因此关闭测试模式。

DTS


&dsi {
	status = "okay";
	rockchip,lane-rate = <468>;

	panel: panel {
		compatible = "simple-panel-dsi";
		reg = <0>;
		backlight = <&backlight>;
		reset-gpios = <&gpio4 29 GPIO_ACTIVE_LOW>;//4 26
		enable-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;

		//dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM)>;
		//dsi,format = <MIPI_DSI_FMT_RGB666>;

		//dsi,lanes = <4>;
		dsi,flags = <0xa03>;
                dsi,format = <0x0>;
                dsi,lanes = <0x4>;
		//bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
		reset-delay-ms = <50>;
		init-delay-ms = <20>;
		enable-delay-ms = <120>;
		prepare-delay-ms = <50>;
		unprepare-delay-ms = <20>;
		status = "okay";
		panel-init-sequence = [
		23 02 02 27 AA
		23 02 02 48 02
		23 02 02 B6 20
		23 02 02 01 00
		23 02 02 02 20
		23 02 02 03 35
		23 02 02 04 46
		23 02 02 05 14
		23 02 02 06 46
		23 02 02 07 00
		23 02 02 08 12
		23 02 02 09 02
		23 02 02 0A 12
		23 02 02 0B 02
		23 02 02 0C 57
		23 02 02 0D 01
		23 02 02 0E 80
		23 02 02 0F 20
		23 02 02 10 20
		23 02 02 11 03
		23 02 02 12 1B
		23 02 02 13 03
		23 02 02 14 34
		23 02 02 15 20
		23 02 02 16 10
		23 02 02 17 00
		23 02 02 18 01
		23 02 02 19 23
		23 02 02 1A 40
		23 02 02 1B 00
		23 02 02 1E 46
		23 02 02 51 30
		23 02 02 1F 10
		23 02 02 2A 01

		];
		disp_timings: display-timings {
			native-mode = <&timing0>;

			timing0: timing0 {
				clock-frequency = <72400000>;
				hactive = <1280>;
				vactive = <800>;
				hback-porch = <70>;
				hfront-porch = <70>;
				vback-porch = <18>;
				vfront-porch = <18>;
				hsync-len = <20>;
				vsync-len = <2>;
				hsync-active = <0>;
				vsync-active = <0>;
				de-active = <0>;
				pixelclk-active = <0>;
			};
		};
	};
};

初始化序列含义

gm8775c_1

gm8775c_2

19寸屏幕调试

屏幕型号 G190ETN01.0

标准LVDS的座子线序如下

rk3288_lvds_interface

根据原理图线序确定Link0 LINE和Link1 LINE的交换顺序

rk3399_gm8775c_1

rk3399_gm8775c_2

根据规格书中的屏幕参数,生成初始化序列,注意双通道的时钟频率只填一半即可

G190ETN01

gm8775_19

配置驱动参数


&dsi {
	status = "okay";
	rockchip,lane-rate = <1000>;

	panel: panel {
		status = "okay";
		compatible = "simple-panel-dsi";
		reg = <0>;
		backlight = <&backlight>;
		reset-gpios = <&gpio4 29 GPIO_ACTIVE_LOW>;//4 26
		enable-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;

		dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
			MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
		dsi,format = <MIPI_DSI_FMT_RGB888>;
		dsi,lanes = <4>;
		reset-delay-ms = <120>;
		init-delay-ms = <120>;
		enable-delay-ms = <120>;
		prepare-delay-ms = <120>;
		unprepare-delay-ms = <120>;
		panel-init-sequence = [
		23 02 02 27 AA
		23 02 02 48 02
		23 02 02 B6 20
		23 02 02 01 00
		23 02 02 02 00
		23 02 02 03 45
		23 02 02 04 64
		23 02 02 05 04
		23 02 02 06 64
		23 02 02 07 00
		23 02 02 08 14
		23 02 02 09 02
		23 02 02 0A 14
		23 02 02 0B 02
		23 02 02 0C 3D
		23 02 02 0D 01
		23 02 02 0E 80
		23 02 02 0F 20
		23 02 02 10 20
		23 02 02 11 03
		23 02 02 12 1B
		23 02 02 13 63
		23 02 02 14 34
		23 02 02 15 20
		23 02 02 16 10
		23 02 02 17 00
		23 02 02 18 34
		23 02 02 19 20
		23 02 02 1A 10
		23 02 02 1B 00
		23 02 02 1E 46
		23 02 02 51 30
		23 02 02 1F 10
		23 02 02 2A 01
		];
		disp_timings: display-timings {
			native-mode = <&timing0>;

			timing0: timing0 {
				clock-frequency = <108000000>;
				hactive = <1280>;
				vactive = <1024>;
				hback-porch = <100>;
				hfront-porch = <100>;
				vback-porch = <20>;
				vfront-porch = <20>;
				hsync-len = <4>;
				vsync-len = <2>;
				hsync-active = <0>;
				vsync-active = <0>;
				de-active = <0>;
				pixelclk-active = <0>;
			};
		};
	};
};

FAQ

  1. GM8775C拥有自测模式,不需要MIPI数据就能显示,初步调试可优先进入彩条模式,排除后端问题 将 23 00 02 2A 01 修改为 23 00 02 2A 4D
  2. GM8775C的data di必须是0x23 ,发送完后示波器测量:CLK/DATA 是否有输出
  3. 颜色显示异常,可在屏规格书上查找屏支持的LVDS数据格式是JEIDA或是VESA
  4. 双路LVDS出现显示重影,请排除LVDS奇偶是不是反了,可对调下ODD/EVEN试下