正点原子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

相关推荐
用户0510122572964 分钟前
Linux下有关QT显示环境变量设置
linux·嵌入式
闲云自留地5 分钟前
告别命令恐惧症,openEuler 基础操作 + 文本 + 网络管理实战
linux·运维·云计算
剑指offer.15 分钟前
ARM裸机开发-点亮LED灯
linux·服务器·嵌入式硬件
GeW25 分钟前
工作忙.基础弱,也能快速拿RHCE?这套方法亲测有效
linux
SelectDB28 分钟前
快手基于 Apache Doris 千亿多模态检索的实践
大数据·数据库·数据分析
SelectDB34 分钟前
StarRocks 迁移至 Apache Doris 完整指南:三步完成结构、数据与业务平滑切换
大数据·数据库·数据分析
这个DBA有点耶34 分钟前
InnoDB索引组织表下,复合主键和自增主键的物理存储差异与选型对比
数据库·mysql·架构
Wang's Blog39 分钟前
Java 接入Redis: 使用Jedis操作Redis
java·服务器·redis
Ivanqhz1 小时前
数据搬运是性能关键
java·服务器·网络·人工智能·深度学习
其实防守也摸鱼1 小时前
常见安全架构中 Shiro 的认证确认机制解析
运维·服务器·数据库·windows·github