MIPI屏幕 TFT08006 patch:
https://www.aw-ol.com/downloads/resources/27
MIPI屏幕 TFT08006 相关资料见:
https://www.aw-ol.com/downloads/resources/28
getevent demo ,用于D1-H按键或屏幕触摸测试:
https://www.aw-ol.com/downloads/resources/26
1.【仅限内测v0.5*版本需要做】将 configs.patch 文件复制到 tina/device/config/chips/d1 目录下,
git apply configs.patch
打上patch
2.【仅限内测v0.5*版本需要做】将 uboot下的 0001-K1-sun20iw1p1-P2-disp-add-tft08006-panel-driver.patch 文件复制到 tina/lichee/brandy-2.0/u-boot-2018 目录下,
git apply 0001-K1-sun20iw1p1-P2-disp-add-tft08006-panel-driver.patch
打上patch
3.【仅限内测v0.5*版本需要做】将 kernel下的 0001-K1-sun20iw1p1-P2-disp-add-tft08006-panel-driver.patch 文件复制到 tina/lichee/linux-5.4 目录下,
git apply 0001-K1-sun20iw1p1-P2-disp-add-tft08006-panel-driver.patch
打上patch
4.make kernel_menuconfig选中
│ Symbol: LCD_SUPPORT_TFT08006 [=y] │
│ Type : bool │
│ Prompt: LCD support TFT08006 panel │
│ Location: │
│ -> Device Drivers │
│ -> Graphics support │
│ -> Frame buffer Devices │
│ -> Video support for sunxi │
│ (1) -> LCD panels select │
│ Defined at drivers/video/fbdev/sunxi/disp2/disp/lcd/Kconfig:178 │
│ Depends on: HAS_IOMEM [=y] && FB [=y] && DISP2_SUNXI [=y]
目录下其它项可以全部取消选择
5.make menuconfig中选中:
Kernel modules > Input modules > <*> kmod-touchscreen-gt9xxnew
6.触摸demo
make menuconfig选中Utilities-->getevent
在设备端运行getevent,再触摸屏幕则会打印触摸的屏幕坐标值
patch压缩包里放了一个getevent_d1 demo,可以直接将其adb push 到设备下运行
运行后触摸屏幕,如果正常会有如下打印:
root@TinaLinux:/# ./getevent_d1
add device 1: /dev/input/event2
name: "gt9xxnew_ts"
add device 2: /dev/input/event1
name: "audiocodec sunxi Audio Jack"
add device 3: /dev/input/event0
name: "sunxi-keyboard"
poll 4, returned 1
/dev/input/event2: 0001 014a 00000001
poll 4, returned 1
/dev/input/event2: 0003 0035 0000016a
poll 4, returned 1
/dev/input/event2: 0003 0036 00000091
poll 4, returned 1
/dev/input/event2: 0003 0030 00000019
poll 4, returned 1
/dev/input/event2: 0003 0032 00000019
poll 4, returned 1
/dev/input/event2: 0003 0039 00000000
poll 4, returned 1
/dev/input/event2: 0000 0002 00000000
poll 4, returned 1
/dev/input/event2: 0000 0000 00000000
poll 4, returned 1
/dev/input/event2: 0003 0035 0000016a
poll 4, returned 1
/dev/input/event2: 0003 0036 00000091
poll 4, returned 1
/dev/input/event2: 0003 0030 00000019
poll 4, returned 1
/dev/input/event2: 0003 0032 00000019
poll 4, returned 1
/dev/input/event2: 0003 0039 00000000
poll 4, returned 1
/dev/input/event2: 0000 0002 00000000
poll 4, returned 1
/dev/input/event2: 0000 0000 00000000
poll 4, returned 1
/dev/input/event2: 0003 0035 0000016a
poll 4, returned 1
/dev/input/event2: 0003 0036 00000091
poll 4, returned 1
V1.0版本支持显示
Tina D1-H V1.0版本不支持背光调节,使用当前淘宝店卖的屏幕可能点不亮,需要做如下修改:
将tina/device/config/chips/d1/configs/nezha/linux-5.4/board.dts中的lcd0节点内的lcd_pwm_freq修改为
lcd_pwm_freq = <1000>;
V1.01及后续版本均可直接使用屏幕并进行背光调节。
背光亮度调节的方法
mount -t debugfs none /sys/kernek/debug;
cd /sys/kernel/debug/dispdbg;
/* 设置背光亮度为100 */
echo lcd0 > name;echo setbl > command;echo 100 > param;echo 1 > start;
/* 设置背光亮度为0 */
echo lcd0 > name;echo setbl > command;echo 0 > param;echo 1 > start;
若以上命令无法调节背光亮度,则需检查屏幕转接板的硬件:
结合屏幕转接板原理图,需将背光模块的R6接上1K电阻(注意R4的阻值≥10K或置空,R7置空)
转接板原理图