Merge pull request #530 from mbergstrand/master
Enable pine64 LCD/Touchpanel.
This commit is contained in:
commit
c5425dd381
@ -3,7 +3,7 @@ BOARD_NAME="Pine64"
|
||||
KERNEL_TARGET="default,dev"
|
||||
LINUXFAMILY=pine64
|
||||
BOOTCONFIG=pine64_plus_defconfig
|
||||
MODULES="sunxi_codec sunxi_i2s sunxi_sndcodec 8723bs"
|
||||
MODULES="sunxi_codec sunxi_i2s sunxi_sndcodec 8723bs gt9xxf_ts"
|
||||
MODULES_NEXT=""
|
||||
CLI_TARGET="jessie,xenial:default,dev"
|
||||
DESKTOP_TARGET=""
|
||||
|
||||
@ -2,3 +2,4 @@ verbosity=1
|
||||
console=both
|
||||
disp_mode=720p60
|
||||
camera_type=none
|
||||
pine64_lcd=off
|
||||
|
||||
@ -12,6 +12,7 @@ setenv disp_mem_reserves "off"
|
||||
setenv disp_mode "720p60"
|
||||
setenv rootfstype "ext4"
|
||||
setenv camera_type "none"
|
||||
setenv pine64_lcd "off"
|
||||
|
||||
if ext4load mmc 0 ${load_addr} /boot/armbianEnv.txt || fatload mmc 0 ${load_addr} armbianEnv.txt || ext4load mmc 0 ${load_addr} armbianEnv.txt; then
|
||||
env import -t ${load_addr} ${filesize}
|
||||
@ -47,8 +48,22 @@ fi
|
||||
|
||||
fdt addr ${fdt_addr}
|
||||
fdt resize
|
||||
fdt set /soc@01c00000/disp@01000000 screen0_output_mode ${fdt_disp_mode}
|
||||
#fdt set /soc@01c00000/disp@01000000 screen1_output_mode ${fdt_disp_mode}
|
||||
if test ${pine64_lcd} = 1 || test ${pine64_lcd} = on; then
|
||||
fdt set /soc@01c00000/disp@01000000 screen0_output_type "<0x00000001>"
|
||||
fdt set /soc@01c00000/disp@01000000 screen0_output_mode "<0x00000004>"
|
||||
fdt set /soc@01c00000/disp@01000000 screen1_output_mode ${fdt_disp_mode}
|
||||
|
||||
fdt set /soc@01c00000/lcd0@01c0c000 lcd_used "<0x00000001>"
|
||||
|
||||
fdt set /soc@01c00000/boot_disp output_type "<0x00000001>"
|
||||
fdt set /soc@01c00000/boot_disp output_mode "<0x00000004>"
|
||||
|
||||
fdt set /soc@01c00000/ctp status "okay"
|
||||
fdt set /soc@01c00000/ctp ctp_used "<0x00000001>"
|
||||
fdt set /soc@01c00000/ctp ctp_name "gt911_DB2"
|
||||
else
|
||||
fdt set /soc@01c00000/disp@01000000 screen0_output_mode ${fdt_disp_mode}
|
||||
fi
|
||||
|
||||
# DVI compatibility
|
||||
if test ${disp_dvi_compat} = 1 || test ${disp_dvi_compat} = on; then
|
||||
|
||||
@ -1411,7 +1411,7 @@ CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_INPUT_EVBUG is not set
|
||||
# CONFIG_INPUT_KEYRESET is not set
|
||||
# CONFIG_INPUT_KEYCOMBO is not set
|
||||
CONFIG_INPUT_SW_DEVICE=m
|
||||
CONFIG_INPUT_SW_DEVICE=y
|
||||
|
||||
#
|
||||
# Input Device Drivers
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
From 832757c73ba9b69d0ee2d2753cca228f0d831386 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Bergstrand <martin@bergstrand.us>
|
||||
Date: Mon, 24 Oct 2016 17:00:54 -0500
|
||||
Subject: [PATCH] Use Correct I2C Touchscreen Driver
|
||||
|
||||
---
|
||||
drivers/input/touchscreen/gt9xxf/gt9xxf.c | 5 +++++
|
||||
drivers/input/touchscreen/gt9xxf/gt9xxf.h | 2 +-
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/input/touchscreen/gt9xxf/gt9xxf.c b/drivers/input/touchscreen/gt9xxf/gt9xxf.c
|
||||
index 83f2358..95b13f4 100755
|
||||
--- a/drivers/input/touchscreen/gt9xxf/gt9xxf.c
|
||||
+++ b/drivers/input/touchscreen/gt9xxf/gt9xxf.c
|
||||
@@ -1454,6 +1454,11 @@ static s32 gtp_init_panel(struct goodix_ts_data *ts)
|
||||
GTP_INFO("gt9xx:index = %d\n",index);
|
||||
|
||||
}
|
||||
+ if (!strcmp(config_info.name,"gt911_DB2")){
|
||||
+ index = 4;
|
||||
+ GTP_INFO("gt9xx:index = %d\n",index);
|
||||
+
|
||||
+ }
|
||||
}
|
||||
#endif
|
||||
|
||||
diff --git a/drivers/input/touchscreen/gt9xxf/gt9xxf.h b/drivers/input/touchscreen/gt9xxf/gt9xxf.h
|
||||
index 3db7c68..dd2a729 100755
|
||||
--- a/drivers/input/touchscreen/gt9xxf/gt9xxf.h
|
||||
+++ b/drivers/input/touchscreen/gt9xxf/gt9xxf.h
|
||||
@@ -156,7 +156,7 @@ extern void gtp_io_init(int ms);
|
||||
|
||||
// TODO: define your config for Sensor_ID == 4 here, if needed
|
||||
#define CTP_CFG_GROUP5 {\
|
||||
- }
|
||||
+ 0x42,0x00,0x04,0x58,0x02,0x0A,0x0D,0x00,0x01,0x08,0x28,0x08,0x5A,0x46,0x03,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x87,0x28,0x0A,0x41,0x43,0xB5,0x06,0x00,0x00,0x00,0x42,0x02,0x11,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x5A,0x94,0xC5,0x02,0x08,0x00,0x00,0x04,0x98,0x35,0x00,0x8A,0x3B,0x00,0x7C,0x43,0x00,0x72,0x4B,0x00,0x67,0x55,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x12,0x10,0x0E,0x0C,0x0A,0x08,0x06,0x04,0x02,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x26,0x24,0x22,0x21,0x20,0x1F,0x1E,0x1D,0x0C,0x0A,0x08,0x06,0x04,0x02,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x01}
|
||||
|
||||
// TODO: define your config for Sensor_ID == 5 here, if needed
|
||||
#define CTP_CFG_GROUP6 {\
|
||||
Loading…
Reference in New Issue
Block a user