当前位置:网站首页>Based on Baiwen imx6ull_ Pro development board transplants LCD multi touch driver (gt911)
Based on Baiwen imx6ull_ Pro development board transplants LCD multi touch driver (gt911)
2022-07-25 13:17:00 【Jiang Lin】
introduction
I use here Linux The kernel is transplanted by itself 4.1.15 edition
Add driver code
Get into drivers/input/touchscreen Directory to find out if you own gt911 drive
cd drivers/input/touchscreen/
grep -nR gt911

Check whether Baiwen official uses this driver
Search in the device tree gt9
It seems that the driver we just searched is not used , Let's go to the official source code of Baiwen to search for this gt9xx
grep -nR gt9xx

It seems to be in a folder , Then we can directly copy this folder into our driver file ( If you don't have this file, please click here to download
cp Baiwen Linux Source directory /drivers/input/touchscreen/gt9xx Yours Linux Source directory /
add to gt9xx To menuconfig in
open drivers/input/touchscreen/ Folder , open Kconfig, add gt9xx Of Kconfig Path to file , In this way, we can use the graphical interface to configure gt9xx drive 
open drivers/input/touchscreen/Makefile, Add... At the end gt9xx route , Don't forget **/,/** Indicates that this is a folder rather than a file 
go back to Linux Source code main directory , Enter the configuration
make menuconfig
The configuration item is recorded as :
Device Drivers
->Input device support
->Touchscreens
->Goodix touchpanel GT9xx series
thus gt9xx The source code is added , But we haven't added a device tree to describe hardware resources , Because the board is Baiwen's board , Reference gt9xx The driver is also an official copy from Baiwen , So we can directly copy the device tree
&iomuxc_snvs {
pinctrl_tsc_reset: tscresetgrp {
/*!< Function assigned for the core: Cortex-A7[ca7] */
fsl,pins = <
MX6ULL_PAD_SNVS_TAMPER2__GPIO5_IO02 0x000110A0
>;
};
}
&iomuxc{
pinctrl_touchscreen_int: lcdif_tsc_int {
fsl,pins = <
MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x000010B0
>;
};
}
&i2c2{
[email protected]5d {
compatible = "goodix,gt9xx";
reg = <0x5d>;
status = "okay";
interrupt-parent = <&gpio1>;
interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_tsc_reset &pinctrl_touchscreen_int>;
reset-gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
irq-gpios = <&gpio1 5 IRQ_TYPE_EDGE_FALLING>;
irq-flags = <2>; /*1:rising 2: falling*/
touchscreen-max-id = <1>;
touchscreen-size-x = <800>;
touchscreen-size-y = <480>;
touchscreen-max-w = <1024>;
touchscreen-max-p = <1024>;
/*touchscreen-key-map = <172>, <158>;*/ /*KEY_HOMEPAGE, KEY_BACK*/
goodix,type-a-report = <0>;
goodix,driver-send-cfg = <1>;
goodix,create-wr-node = <1>;
goodix,wakeup-with-reset = <0>;
goodix,resume-in-workqueue = <0>;
goodix,int-sync = <0>;
goodix,swap-x2y = <0>;
goodix,esd-protect = <0>;
goodix,pen-suppress-finger = <0>;
goodix,auto-update = <0>;
goodix,auto-update-cfg = <0>;
goodix,power-off-sleep = <0>;
/*7*/
goodix,cfg-group0 = [
6b 00 04 58 02 05 0d 00 01 0f
28 0f 50 32 03 05 00 00 00 00
00 00 00 00 00 00 00 8a 2a 0c
45 47 0c 08 00 00 00 40 03 2c
00 01 00 00 00 03 64 32 00 00
00 28 64 94 d5 02 07 00 00 04
95 2c 00 8b 34 00 82 3f 00 7d
4c 00 7a 5b 00 7a 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 18 16 14 12 10 0e 0c 0a
08 06 04 02 ff ff 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 16 18 1c 1d 1e 1f 20 21
22 24 13 12 10 0f 0a 08 06 04
02 00 ff ff ff ff ff ff 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 00 79 01
];
/*4.3*/
goodix,cfg-group1 = [
97 E0 01 10 01 05 0D 00 01 00
00 05 5A 46 53 11 00 00 11 11
14 14 14 22 0A 04 00 00 00 00
00 00 53 00 14 00 00 84 00 00
3C 00 00 64 1E 28 87 27 08 32
34 05 0D 20 33 60 11 02 24 00
00 64 80 80 14 02 00 00 54 89
68 85 6D 82 72 80 76 7D 7B 7B
00 00 00 00 00 00 00 F0 50 3C
FF FF 07 00 00 00 02 14 14 03
04 00 21 64 0A 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
32 20 50 3C 3C 00 00 00 00 00
0D 06 0C 05 0B 04 0A 03 FF FF
FF FF FF FF 00 01 02 03 04 05
06 07 08 09 0A 0B 0C 0D FF FF
FF FF FF FF FF FF FF FF FF FF
00 00 00 00 00 00 00 00 00 00
00 00 00 00 3C 00 05 1E 00 02
2A 1E 19 14 02 00 03 0A 05 00
00 00 00 00 00 00 01 FF FF 86
22 03 00 00 33 00 0F 00 00 00
50 3C 50 00 00 00 00 2A 01
];
/*5*/
goodix,cfg-group2 = [
00 20 03 E0 01 05 3C 00 01 08
28 0C 50 32 03 05 00 00 00 00
00 00 00 17 19 1E 14 8B 2B 0D
33 35 0C 08 00 00 00 9A 03 11
00 01 00 00 00 00 00 32 00 00
00 20 58 94 C5 02 00 00 00 04
B0 23 00 93 2B 00 7B 35 00 69
41 00 5B 4F 00 5B 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 02 04 06 08 0A 0C 0E 10
12 14 16 18 1A FF 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 02 04 06 08 0A 0C 0F
10 12 13 16 18 1C 1D 1E 1F 20
21 22 24 26 FF FF FF FF 00 00
00 FF FF FF FF FF FF FF FF FF
FF FF FF FF 48 01
];
};
}
After saving, return to the main directory to compile the device tree and kernel
make dtbs
make -j32
Download to the board , Get into /dev/input Catalog , Test it
here event2 Not absolutely , According to the actual situation
cd /dev/input
hexdump event2

边栏推荐
- Django 2 ----- database and admin
- MLX90640 红外热成像仪测温传感器模块开发笔记(五)
- Pytorch creates its own dataset and loads the dataset
- Migrate PaloAlto ha high availability firewall to panorama
- Cyberspace Security penetration attack and defense 9 (PKI)
- Substance Designer 2021软件安装包下载及安装教程
- Excel import and export source code analysis
- 简单了解流
- 【GCN】《Adaptive Propagation Graph Convolutional Network》(TNNLS 2020)
- Docker学习 - Redis集群-3主3从-扩容-缩容搭建
猜你喜欢

Programmer growth chapter 27: how to evaluate requirements priorities?
![[300 opencv routines] 239. accurate positioning of Harris corner detection (cornersubpix)](/img/a6/c45a504722f5fd6e3c9fb8e51c6bb5.png)
[300 opencv routines] 239. accurate positioning of Harris corner detection (cornersubpix)

Vim技巧:永远显示行号

Django 2 ----- database and admin

Zero basic learning canoe panel (13) -- trackbar

How to solve the problem of taking up too much space when recording and editing videos?

Convolutional neural network model -- alexnet network structure and code implementation

Redis可视化工具RDM安装包分享

并发编程 — 内存模型 JMM

B tree and b+ tree
随机推荐
手写jdbc的使用步骤?
Migrate PaloAlto ha high availability firewall to panorama
详解浮点数的精度问题
【历史上的今天】7 月 25 日:IBM 获得了第一项专利;Verizon 收购雅虎;亚马逊发布 Fire Phone
【CTR】《Towards Universal Sequence Representation Learning for Recommender Systems》 (KDD‘22)
0719RHCSA
Excel import and export source code analysis
程序员奶爸自制AI喂奶检测仪,预判宝宝饿点,不让哭声影响老婆睡眠
说说对hashcode和equals方法的理解?
基于百问网IMX6ULL_PRO开发板驱动AP3216实验
vim基础操作汇总
AtCoder Beginner Contest 261 F // 树状数组
全网最简单解决方式1045-Access denied for user [email protected](using password:YES)
Atcoder beginer contest 261e / / bitwise thinking + DP
Esp32-c3 is based on blinker lighting control 10 way switch or relay group under Arduino framework
Convolutional neural network model -- lenet network structure and code implementation
【GCN-RS】Region or Global? A Principle for Negative Sampling in Graph-based Recommendation (TKDE‘22)
基于百问网IMX6ULL_PRO开发板移植LCD多点触摸驱动(GT911)
Brpc source code analysis (III) -- the mechanism of requesting other servers and writing data to sockets
我的创作纪念日