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

相关推荐
倔强的石头_1 天前
KingbaseES 新版MySQL 兼容版体验:旧版迁移 + 功能实测
数据库
zzzzzz3102 天前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
XIAOHEZIcode2 天前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
A小辣椒4 天前
TShark:Wireshark CLI 功能
linux
倔强的石头_4 天前
《Kingbase护城河》——数据库存储空间全景探测与精细化瘦身实战
数据库
A小辣椒4 天前
TShark:基础知识
linux
AlfredZhao4 天前
OCI 明明分配了 200G 系统盘,为什么 df 只看到 30G?
linux·oci
冬奇Lab4 天前
每日一个开源项目(第134篇):Zvec - 阿里开源的嵌入式向量数据库,向量搜索界的 SQLite
数据库·人工智能·llm
AlfredZhao5 天前
vi 删除指定范围的行,不用再反复按 dd
linux·vi
ClouGence5 天前
Oracle CDC 架构优化:从主库直连到 DataGuard 备库同步
数据库·后端·oracle