TQIMX6UL添加7寸高清电容屏分辨率

内核版本:4.1.15
平台:TQIMX6UL
TQIMX6UL设备树默认使用H50和TN92屏,
现修改分辨率为1024x600的7寸高清电容屏,使板子正常使用和7寸高清电容屏正常显示和触摸。
修改内核源码如下:
1.修改设备树arch/arm/boot/tq-imx6ul.dts 搜索lcdif触摸屏部分,修改timing0(修改前复制一份备用),按照七寸高清屏datesheet修改其参数,名字可以自定义,但要与uboot中触摸屏名字相对应

timing0: timing0 {
				mode_name = "lcd_5hd";
				clock-frequency = <48000000>;
				hactive = <1024>;
				vactive = <600>;
				hfront-porch = <150>;
				hback-porch = <150>;
				hsync-len = <20>;
				vback-porch = <15>;
				vfront-porch = <15>;
				vsync-len = <5>;

				hsync-active = <0>;
				vsync-active = <0>;
				de-active = <1>; 
				pixelclk-active = <0>;
			};

修改uboot源码:
2.在/board/freescale/mx6ul_14x14_evk目录下修改mx6ul_14x14_evk.c
在struct display_info_t const displays[]结构体中参考内核设备树添加修改七寸高清屏对应参数

{
		.bus = MX6UL_LCDIF1_BASE_ADDR,
		.addr = 0,
		.pixfmt = 24,
		.detect = NULL,
		.enable	= do_enable_parallel_lcd,
		.mode	= {
			.name			= "lcd_5hd",
			.xres           = 1024,
			.yres           = 600,
			.pixclock       = KHZ2PICOS(48000),
			.left_margin    = 150,
			.right_margin   = 150,
			.upper_margin   = 15,
			.lower_margin   = 15,
			.hsync_len      = 20,
			.vsync_len      = 5,
			.sync           = 0,
			.vmode          = FB_VMODE_NONINTERLACED
		},
	},

3.重新编译烧写设备树、uboot,在uboot选择对应名字的显示屏即可

你可能感兴趣的:(linux)