正点原子Mini Linux 4.3寸800x480触摸屏gt115x驱动

测试内核:NXP官方imx6ull,Linux version 4.1.15

1、设备树

复制代码
&i2c2 {
	clock_frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c2>;
	status = "okay";

	goodix_ts@14 {
        compatible = "goodix,gt115x";
		reg = <0x14>;
		status = "okay";
		interrupt-parent = <&gpio1>;
		interrupts = <9 IRQ_TYPE_EDGE_RISING>; 
		
		reset-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
		irq-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
		
		// 手动指定分辨率(覆盖默认值)
		touchscreen-size-x = <800>;
		touchscreen-size-y = <480>;
	};

2、驱动文件

复制代码
drivers/input/touchscreen/goodix.c

static const struct of_device_id goodix_of_match[] = {
	{ .compatible = "goodix,gt911" },
	{ .compatible = "goodix,gt9110" },
	{ .compatible = "goodix,gt912" },
	{ .compatible = "goodix,gt927" },
	{ .compatible = "goodix,gt9271" },
	{ .compatible = "goodix,gt928" },
	{ .compatible = "goodix,gt967" },
	{ .compatible = "goodix,gt115x" },  // <-- 添加这一行
	{ }
};

3、menuconfig配置

复制代码
Device Drivers --->
  Input device support --->
    [*] Touchscreens --->
      <*> Goodix I2C touchscreen   # 选中为 <*> (编译进内核)

4、测试

root@ATK-IMX6U:~# hexdump /dev/input/event1

0000000 6b4f 685f 3511 0008 0003 0039 0000 0000

0000010 6b4f 685f 3511 0008 0003 0035 01fb 0000

0000020 6b4f 685f 3511 0008 0003 0036 0086 0000

0000030 6b4f 685f 3511 0008 0003 0030 0040 0000

相关推荐
DashVector2 小时前
Zvec v0.4.0 正式发布
数据库·嵌入式·ai编程
dingdingfish2 小时前
TLPI 第19 章 练习:Monitoring File Events
linux·inotify·tlpi·exercise
Bert.Cai2 小时前
Linux basename命令详解
linux·运维·服务器
源远流长jerry2 小时前
Linux 本机网络通信机制深度解析:Loopback 设备原理
linux·运维·服务器·网络·tcp/ip·nginx·负载均衡
whn19772 小时前
centos10.1上安装mysql 9.6
数据库·mysql
薪火铺子2 小时前
布隆过滤器原理与 Redis 防穿透实战
数据库·redis·缓存
网络工程小王2 小时前
【LangGraph 子图(Subgraph)详解】学习笔记
java·服务器·数据库·人工智能·langchain
黄俊懿2 小时前
复合索引设计指南:最左前缀 & 字段排座次
数据库·sql·mysql·adb·性能优化·dba·db
源远流长jerry3 小时前
Linux 网络性能优化:从应用到内核
linux·运维·服务器·网络·网络协议·性能优化
goyeer3 小时前
【ITIL】指导原则
linux·运维·服务器·数字化·itil