公司最近评估T527,恰好借到盈鹏飞嵌入式的T527开发板-AHD-X527,以下操作都是在该主板上操作,该产品介绍如下:
AHD-X527产品特性:
- 采用Allwinner公司Cortex-A55八核A527/T527处理器,运行最高速度为2.0GHZ(T527最高1.8GHZ);
- 支持Mali-G57 MC1 GPU,支持OpenGL ES 3.2/2.0/1.0, Valkan 1.1,OpenCL 2.0
- 支持4K/25fps H.264视频编码,支持4K/15fps MJPEG编码;
- 多格式4K/60fps视频解码 (H.265,H.264,VC-1, MPEG-1/2/4, VP8) ;
- 支持双屏异显;支持HDMI 2.0B, 分辨率最高4K@60fps;支持LVDS,分辨率最高1920x1080@60fps;支持MIPI DSI,分辨率最高2.5K@60fps(与LVDS复用);
- 支持1-4G Bytes LPDDR4X SDRAM;
- 支持EMMC 8G-64G大容量电子盘,可启动;
- 支持1路USB 3.0;支持3路USB2.0 HOST和一路OTG(TYPE-C接口);
- 支持2路I2C(其中一路支持掉电唤醒)、2路PWM(应用于背光);
- 支持双路千兆以太网;
- 支持3G/4G通信;
- 支持2路UART(TTL)、支持1路RS485、支持双路CAN BUS(2.0B,仅T527支持);
- 支持MIPI CSI - 2*4-lane/4*2-lane/ 4+2*2-lane;
- 操作系统的支持,可预装Android13/LINUX 5.15/Ubuntu 22.04;
- 尺寸为146X119MM
AHD-X527产品功能:
1. 触摸屏测试
USB接口的电容式触摸屏测试(hid-multitouch协议)
本章节只介绍我司EAC-LCD70H液晶屏上配套的USB接口的电容式触摸。它使用hid-multitouch标准协议,使用非常方便。
当该触摸屏通过USB接口正常连接到主板时,主板终端会出现如下信息:
[5.567916]input: wch.cn USB2IIC_CTP_CONTROL as
/devices/platform/soc@3000000/4200000.ehci1-controller/usb1/1-1/1-1.6/1-1.6:1.0/0003:26AE:8506.0001/input/input5
[5.585427] hid-multitouch 0003:26AE:8506.0001: input: USB HID v1.00 Device [wch.cn USB2IIC_CTP_CONTROL] on usb-sunxi-ehci-1.6/input0
可以通过以下指令更详细的了解它的信息:
Target# cat /proc/bus/input/devices
root@Embfly-x527:~$ cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-ts"
P: Phys=sunxi_ts/input0
S: Sysfs=/devices/platform/soc@3000000/2009c00.rtp/input/input1
U: Uniq=
H: Handlers=event1
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=3
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-gpadc0"
P: Phys=sunxigpadc0/input0
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=event2
B: PROP=0
B: EV=100003
B: KEY=0
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-gpadc1"
P: Phys=sunxigpadc1/input0
S: Sysfs=/devices/virtual/input/input3
U: Uniq=
H: Handlers=event3
B: PROP=0
B: EV=11
B: MSC=10
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="audiocodec sunxi Audio Jack"
P: Phys=ALSA
S: Sysfs=/devices/platform/soc@3000000/2030340.sound/sound/card0/input4
U: Uniq=
H: Handlers=kbd event4
B: PROP=0
B: EV=23
B: KEY=40 0 0 0 0 0 0 0 0 0 0 4 0 0 0 c0000 0 0 0
B: SW=14
I: Bus=0003 Vendor=26ae Product=8506 Version=0100
N: Name="wch.cn USB2IIC_CTP_CONTROL"
P: Phys=usb-sunxi-ehci-1.6/input0
S: Sysfs=/devices/platform/soc@3000000/4200000.ehci1-controller/usb1/1-1/1-1.6/1-1.6:1.0/0003:26AE:8506.0001/input/input5
U: Uniq=
H: Handlers=event5
B: PROP=2
B: EV=1b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=2618000 3
B: MSC=20
它的名字是"wch.cn USB2IIC_CTP_CONTROL",用户可以通过节点event5来访问它。因电容式触摸屏不需要校验,一般使用evtest命令测试触摸有响应即表示正常。
终端执行“evtest”进入测试界面,这里event5对应的名字为“wch.cn USB2IIC_CTP_CONTROL”,因此测试界面选择5按下回车即可开始测试:
Target# evtest
root@Embfly-x527:~$ evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: sunxi-keyboard
/dev/input/event1: sunxi-ts
/dev/input/event2: sunxi-gpadc0
/dev/input/event3: sunxi-gpadc1
/dev/input/event4: audiocodec sunxi Audio Jack
/dev/input/event5: wch.cn USB2IIC_CTP_CONTROL
Select the device event number [0-5]: 5
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x26ae product 0x8506 version 0x100
Input device name: "wch.cn USB2IIC_CTP_CONTROL"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 0
Min 0
Max 4096
Resolution 19
Event code 1 (ABS_Y)
Value 0
Min 0
Max 4096
Resolution 30
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 5
Event code 48 (ABS_MT_TOUCH_MAJOR)
Value 0
Min 0
Max 4096
Resolution 30
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 4096
Resolution 19
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 4096
Resolution 30
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Event type 4 (EV_MSC)
Event code 5 (MSC_TIMESTAMP)
Properties:
Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 762.079385, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 762.079385, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1024
Event: time 762.079385, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1706
Event: time 762.079385, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 48
Event: time 762.079385, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 762.079385, type 3 (EV_ABS), code 0 (ABS_X), value 1024
Event: time 762.079385, type 3 (EV_ABS), code 1 (ABS_Y), value 1706
Event: time 762.079385, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
Event: time 762.079385, -------------- SYN_REPORT ------------
Event: time 762.090364, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
Event: time 762.090364, -------------- SYN_REPORT ------------
Event: time 762.101348, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
Event: time 762.101348, -------------- SYN_REPORT ------------
Event: time 762.111348, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
Event: time 762.111348, -------------- SYN_REPORT ------------
Event: time 762.121346, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 762.121346, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 762.121346, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
Event: time 762.121346, -------------- SYN_REPORT ------------
Event: time 762.122347, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
Event: time 762.122347, -------------- SYN_REPORT ------------
用手轻触电容式触摸,可以看到终端中有坐标信息显示出来。
2. I2C接口电容式触摸屏测试
评估板单独引出1个I2C电容触摸屏接口CN20,通过该接口可连接GT911等电容式触摸屏,CN20接口位置如下图:
CN20的接口定义如下:
脚位 | 定义 | 说明 |
1 | CTP_NRST | 复位信号,连接处理器的PL10 |
2 | VCC-PL | 电源3.3V,常供电 |
3 | GND | 地 |
4 | CTP_INT | 中断信号,连接处理器的PL7 |
5 | CTP_SDA | I2C2串行数据信号,连接处理器的PL13,上拉4.7K |
6 | CTP_SCL | I2C2串行时钟信号,连接处理器的PL12,上拉4.7K |
CN20是使用的FPC0.5mm_1x6的连接线,满足如上线序的电容式触摸屏均可连接。
当该触摸屏正常连接到主板时,主板终端会出现如下信息:
[ 0.580104] 001: get ctp_power is fail, -22
[ 0.580116] 001: get ctp_power_ldo_vol is fail, -22
[ 0.580130] 001: sunxi_ctp_startup: ctp_power_io is invalid.
[ 0.580173] 001: get ctp_gesture_wakeup fail, no gesture wakeup
[ 0.580198] 001: gt9xxnew_ts 2-0014: 2-0014 supply ctp not found, using dummy regulator
[ 0.745390] 000: sunxi-i2c sunxi-i2c2: drv-mode: dma read data end
[ 0.769471] 001: input: gt9xxnew_ts as /devices/virtual/input/input4
可以通过以下指令更详细的了解触摸屏的信息:
Target# cat /proc/bus/input/devices
root@Embfly-x527:~$ cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-ts"
P: Phys=sunxi_ts/input0
S: Sysfs=/devices/platform/soc@3000000/2009c00.rtp/input/input1
U: Uniq=
H: Handlers=event1
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=3
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-gpadc0"
P: Phys=sunxigpadc0/input0
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=100003
B: KEY=c0000 0 0 0
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="audiocodec sunxi Audio Jack"
P: Phys=ALSA
S: Sysfs=/devices/platform/soc@3000000/2030340.sound/sound/card0/input3
U: Uniq=
H: Handlers=kbd event3
B: PROP=0
B: EV=23
B: KEY=40 0 0 0 0 0 0 0 0 0 0 4 0 0 0 c0000 0 0 0
B: SW=14
I: Bus=0018 Vendor=dead Product=beef Version=28bb
N: Name="gt9xxnew_ts"
P: Phys=2b
S: Sysfs=/devices/virtual/input/input4
U: Uniq=
H: Handlers=kbd event4
B: PROP=2
B: EV=b
B: KEY=400 0 0 7f8 0 0 0 100000 0 0 0
B: ABS=2650000 0
GT911触摸屏的名字是"gt9xxnew_ts",用户可以通过节点event4来访问它。因电容式触摸屏不需要校验,一般使用evtest命令测试触摸有响应即表示正常。
终端执行“evtest”进入测试界面,这里event5对应的名字为“gt9xxnew_ts”,因此测试界面选择4按下回车即可开始测试:
Target# evtest
root@Embfly-x527:~$ evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: sunxi-keyboard
/dev/input/event1: sunxi-ts
/dev/input/event2: sunxi-gpadc0
/dev/input/event3: audiocodec sunxi Audio Jack
/dev/input/event4: gt9xxnew_ts
Select the device event number [0-4]: 4
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0xdead product 0xbeef version 0x28bb
Input device name: "gt9xxnew_ts"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 116 (KEY_POWER)
Event code 227 (KEY_SWITCHVIDEOMODE)
Event code 228 (KEY_KBDILLUMTOGGLE)
Event code 229 (KEY_KBDILLUMDOWN)
Event code 230 (KEY_KBDILLUMUP)
Event code 231 (KEY_SEND)
Event code 232 (KEY_REPLY)
Event code 233 (KEY_FORWARDMAIL)
Event code 234 (KEY_SAVE)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 48 (ABS_MT_TOUCH_MAJOR)
Value 0
Min 0
Max 255
Event code 50 (ABS_MT_WIDTH_MAJOR)
Value 0
Min 0
Max 255
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 1024
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 600
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 255
Properties:
Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 47.491062, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 47.491062, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 548
Event: time 47.491062, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 316
Event: time 47.491062, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 23
Event: time 47.491062, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 23
Event: time 47.491062, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 47.491062, ++++++++++++++ SYN_MT_REPORT ++++++++++++
Event: time 47.491062, -------------- SYN_REPORT ------------
Event: time 47.505268, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 548
Event: time 47.505268, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 316
Event: time 47.505268, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 23
Event: time 47.505268, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 23
Event: time 47.505268, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 47.505268, ++++++++++++++ SYN_MT_REPORT ++++++++++++
Event: time 47.505268, -------------- SYN_REPORT ------------
Event: time 47.519633, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 548
Event: time 47.519633, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 316
Event: time 47.519633, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 23
Event: time 47.519633, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 23
Event: time 47.519633, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 47.519633, ++++++++++++++ SYN_MT_REPORT ++++++++++++
Event: time 47.519633, -------------- SYN_REPORT ------------
用手轻触电容式触摸,可以看到终端中有坐标信息显示出来。