当前位置:网站首页>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

边栏推荐
- Esp32-c3 is based on blinker lighting control 10 way switch or relay group under Arduino framework
- 迁移PaloAlto HA高可用防火墙到Panorama
- Pytorch creates its own dataset and loads the dataset
- 【重温SSM框架系列】15 - SSM系列博文总结【SSM杀青篇】
- 外围系统调用SAP的WebAPI接口
- 简单了解流
- 全网最简单解决方式1045-Access denied for user [email protected](using password:YES)
- [ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)
- The world is exploding, and the Google server has collapsed
- Zero basic learning canoe panel (14) -- led control and LCD control
猜你喜欢

Brpc source code analysis (III) -- the mechanism of requesting other servers and writing data to sockets

How to use causal inference and experiments to drive user growth| July 28 tf67

6W+字记录实验全过程 | 探索Alluxio经济化数据存储策略

为提高效率使用ParallelStream竟出现各种问题
![[review SSM framework series] 15 - Summary of SSM series blog posts [SSM kill]](/img/fb/6ca8e0eb57c76c515e2aae68e9e549.png)
[review SSM framework series] 15 - Summary of SSM series blog posts [SSM kill]

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

Concurrent programming - memory model JMM

Jupyter Notebook介绍

【GCN-RS】Region or Global? A Principle for Negative Sampling in Graph-based Recommendation (TKDE‘22)

ESP32-C3 基于Arduino框架下Blinker点灯控制10路开关或继电器组
随机推荐
Blindly expanding the scale of the meta universe has deviated from the development logic of the meta universe
Azure Devops(十四) 使用Azure的私有Nuget仓库
网络空间安全 渗透攻防9(PKI)
How to use causal inference and experiments to drive user growth| July 28 tf67
Django 2 ----- 数据库与Admin
OAuth,JWT ,OIDC你们搞得我好乱啊
Cv2.resize function reports an error: error: (-215:assertion failed) func= 0 in function ‘cv::hal::resize‘
web安全入门-UDP测试与防御
【CTR】《Towards Universal Sequence Representation Learning for Recommender Systems》 (KDD‘22)
Zero basic learning canoe panel (15) -- CAPL output view
My creation anniversary
如何用因果推断和实验驱动用户增长? | 7月28日TF67
How to solve the problem of taking up too much space when recording and editing videos?
录制和剪辑视频,如何解决占用空间过大的问题?
Shell常用脚本:判断远程主机的文件是否存在
Word style and multi-level list setting skills (II)
Convolutional neural network model -- googlenet network structure and code implementation
Substance Designer 2021软件安装包下载及安装教程
Eccv2022 | transclassp class level grab posture migration
Emqx cloud update: more parameters are added to log analysis, which makes monitoring, operation and maintenance easier