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

相关推荐
我命由我123458 小时前
SEO 与 GEO 极简理解
java·linux·运维·开发语言·学习·算法·运维开发
我材不敲代码8 小时前
Python基础:注释的写法(单行、多行、文档注释)
服务器·python·microsoft
楼兰公子8 小时前
RK3588 Linux驱动开发大纲
linux·驱动开发
红辣椒...9 小时前
codex+第三方模型
java·服务器·前端
Web极客码9 小时前
AI的下一个风口:智能助力超越ChatGPT
服务器·人工智能·ai编程
!沧海@一粟!9 小时前
Linux高并发内核优化
linux·运维·oracle
perfect123126459 小时前
轻量运维工具fastdp v6版本
linux·运维
我叫张小白。9 小时前
基于Redis的缓存架构与一致性保障体系
数据库·redis·缓存·架构
Omics Pro9 小时前
基因泰克:检测级虚拟细胞基准!大语言模型+智能体
大数据·数据库·人工智能·机器学习·语言模型·自然语言处理·r语言
linksinke9 小时前
在 CentOS 7.x 外网环境离线构建便携式 Python 3.11.4 的方案参考
linux·python·centos