From e9958d73ab933ceda2ddc79ba80cd8a46464f3b1 Mon Sep 17 00:00:00 2001 From: mbergstrand Date: Tue, 1 Nov 2016 15:50:02 -0500 Subject: [PATCH 1/8] Update pine64.conf Kernel source change. --- config/sources/pine64.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/sources/pine64.conf b/config/sources/pine64.conf index 7edd231999..3d60fb4676 100644 --- a/config/sources/pine64.conf +++ b/config/sources/pine64.conf @@ -9,8 +9,8 @@ case $BRANCH in BOOTBRANCH='branch:master' BOOTSCRIPT='boot-pine64-default.cmd:boot.cmd' BOOTENV_FILE='pine64-default.txt' - KERNELSOURCE='https://github.com/longsleep/linux-pine64.git' - KERNELBRANCH='branch:pine64-hacks-1.2' + KERNELSOURCE='https://github.com/mbergstrand/linux-pine64.git' + KERNELBRANCH='branch:master' KERNELDIR='linux-pine64' GOVERNOR=interactive OFFSET=2 From 076211e487e8d6d18ed3194edaa7f41bce5ebe3a Mon Sep 17 00:00:00 2001 From: Martin Bergstrand Date: Tue, 1 Nov 2016 16:09:02 -0500 Subject: [PATCH 2/8] Enable pine64 7in LCD panel from armbianEnv.txt --- config/bootenv/pine64-default.txt | 1 + config/bootscripts/boot-pine64-default.cmd | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/config/bootenv/pine64-default.txt b/config/bootenv/pine64-default.txt index 1628ebf087..464abde1e1 100644 --- a/config/bootenv/pine64-default.txt +++ b/config/bootenv/pine64-default.txt @@ -2,3 +2,4 @@ verbosity=1 console=both disp_mode=720p60 camera_type=none +pine_lcd=off diff --git a/config/bootscripts/boot-pine64-default.cmd b/config/bootscripts/boot-pine64-default.cmd index 2481c35029..3b954a1f3b 100644 --- a/config/bootscripts/boot-pine64-default.cmd +++ b/config/bootscripts/boot-pine64-default.cmd @@ -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} +f 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 From c8195e654f246d46ccdc5b84706a637cd3c61d2f Mon Sep 17 00:00:00 2001 From: Martin Bergstrand Date: Wed, 2 Nov 2016 11:59:01 -0500 Subject: [PATCH 3/8] Dynaically modify Device Tree for pine64 7in LCD in boot script --- config/boards/pine64.conf | 2 +- config/bootscripts/boot-pine64-default.cmd | 2 +- config/kernel/linux-pine64-default.config | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/boards/pine64.conf b/config/boards/pine64.conf index 2c2542e1b4..1f5127c7d0 100644 --- a/config/boards/pine64.conf +++ b/config/boards/pine64.conf @@ -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="" diff --git a/config/bootscripts/boot-pine64-default.cmd b/config/bootscripts/boot-pine64-default.cmd index 3b954a1f3b..0c5685430d 100644 --- a/config/bootscripts/boot-pine64-default.cmd +++ b/config/bootscripts/boot-pine64-default.cmd @@ -48,7 +48,7 @@ fi fdt addr ${fdt_addr} fdt resize -f test ${pine64_lcd} = 1 || test ${pine64_lcd} = on; then +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} diff --git a/config/kernel/linux-pine64-default.config b/config/kernel/linux-pine64-default.config index f74daa3248..16f930fedc 100644 --- a/config/kernel/linux-pine64-default.config +++ b/config/kernel/linux-pine64-default.config @@ -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 From 792138356872dc20ace8dcd03c2c53ad088e8246 Mon Sep 17 00:00:00 2001 From: vintagewaffle Date: Wed, 2 Nov 2016 12:07:10 -0500 Subject: [PATCH 4/8] Update pine64-default.txt Correct typo --- config/bootenv/pine64-default.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/bootenv/pine64-default.txt b/config/bootenv/pine64-default.txt index 464abde1e1..5ba1cc5f1d 100644 --- a/config/bootenv/pine64-default.txt +++ b/config/bootenv/pine64-default.txt @@ -2,4 +2,4 @@ verbosity=1 console=both disp_mode=720p60 camera_type=none -pine_lcd=off +pine64_lcd=off From 393d2bfae6e79a3f5726b794547d24e1a536f5ba Mon Sep 17 00:00:00 2001 From: vintagewaffle Date: Wed, 2 Nov 2016 12:16:33 -0500 Subject: [PATCH 5/8] Update pine64.conf Original kernel sources. --- config/sources/pine64.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/sources/pine64.conf b/config/sources/pine64.conf index 3d60fb4676..7edd231999 100644 --- a/config/sources/pine64.conf +++ b/config/sources/pine64.conf @@ -9,8 +9,8 @@ case $BRANCH in BOOTBRANCH='branch:master' BOOTSCRIPT='boot-pine64-default.cmd:boot.cmd' BOOTENV_FILE='pine64-default.txt' - KERNELSOURCE='https://github.com/mbergstrand/linux-pine64.git' - KERNELBRANCH='branch:master' + KERNELSOURCE='https://github.com/longsleep/linux-pine64.git' + KERNELBRANCH='branch:pine64-hacks-1.2' KERNELDIR='linux-pine64' GOVERNOR=interactive OFFSET=2 From 72ce83f3e69de7fc49bbde7bef8b380e21da4690 Mon Sep 17 00:00:00 2001 From: Martin Bergstrand Date: Wed, 2 Nov 2016 12:24:01 -0500 Subject: [PATCH 6/8] Revert "Update pine64.conf" This reverts commit 393d2bfae6e79a3f5726b794547d24e1a536f5ba. --- config/sources/pine64.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/sources/pine64.conf b/config/sources/pine64.conf index 7edd231999..3d60fb4676 100644 --- a/config/sources/pine64.conf +++ b/config/sources/pine64.conf @@ -9,8 +9,8 @@ case $BRANCH in BOOTBRANCH='branch:master' BOOTSCRIPT='boot-pine64-default.cmd:boot.cmd' BOOTENV_FILE='pine64-default.txt' - KERNELSOURCE='https://github.com/longsleep/linux-pine64.git' - KERNELBRANCH='branch:pine64-hacks-1.2' + KERNELSOURCE='https://github.com/mbergstrand/linux-pine64.git' + KERNELBRANCH='branch:master' KERNELDIR='linux-pine64' GOVERNOR=interactive OFFSET=2 From 736e1ef0471bc029542de796d8b86b3f762fcd93 Mon Sep 17 00:00:00 2001 From: Martin Bergstrand Date: Wed, 2 Nov 2016 12:49:21 -0500 Subject: [PATCH 7/8] Revert "Revert "Update pine64.conf"" This reverts commit 72ce83f3e69de7fc49bbde7bef8b380e21da4690. --- config/sources/pine64.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/sources/pine64.conf b/config/sources/pine64.conf index 3d60fb4676..7edd231999 100644 --- a/config/sources/pine64.conf +++ b/config/sources/pine64.conf @@ -9,8 +9,8 @@ case $BRANCH in BOOTBRANCH='branch:master' BOOTSCRIPT='boot-pine64-default.cmd:boot.cmd' BOOTENV_FILE='pine64-default.txt' - KERNELSOURCE='https://github.com/mbergstrand/linux-pine64.git' - KERNELBRANCH='branch:master' + KERNELSOURCE='https://github.com/longsleep/linux-pine64.git' + KERNELBRANCH='branch:pine64-hacks-1.2' KERNELDIR='linux-pine64' GOVERNOR=interactive OFFSET=2 From b4004df66b0ee108c38ad2108d070bc31c8371c5 Mon Sep 17 00:00:00 2001 From: Martin Bergstrand Date: Wed, 2 Nov 2016 12:50:32 -0500 Subject: [PATCH 8/8] Add LCD Kernel patch for longsleep's kernel --- ...t911_DB2_profile_to_gt9xxf_ts_driver.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 patch/kernel/pine64-default/add_gt911_DB2_profile_to_gt9xxf_ts_driver.patch diff --git a/patch/kernel/pine64-default/add_gt911_DB2_profile_to_gt9xxf_ts_driver.patch b/patch/kernel/pine64-default/add_gt911_DB2_profile_to_gt9xxf_ts_driver.patch new file mode 100644 index 0000000000..9593a2ca77 --- /dev/null +++ b/patch/kernel/pine64-default/add_gt911_DB2_profile_to_gt9xxf_ts_driver.patch @@ -0,0 +1,39 @@ +From 832757c73ba9b69d0ee2d2753cca228f0d831386 Mon Sep 17 00:00:00 2001 +From: Martin Bergstrand +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 {\