diff --git a/FunKey/board/funkey/patches/linux/0020_fbtft_SpiAsync_SoftRotation_Notifs.patch b/FunKey/board/funkey/patches/linux/0020_fbtft_SpiAsync_SoftRotation_Notifs.patch new file mode 100644 index 0000000..f84aaa7 --- /dev/null +++ b/FunKey/board/funkey/patches/linux/0020_fbtft_SpiAsync_SoftRotation_Notifs.patch @@ -0,0 +1,2842 @@ +From 5171507843ebfba3f353b61ee854c73b175f0546 Mon Sep 17 00:00:00 2001 +From: vincent +Date: Sun, 15 Dec 2019 17:48:43 +0100 +Subject: [PATCH 1/2] new fbtft with spi async mode, notifs, soft rotation + +--- + drivers/staging/fbtft/Makefile | 2 +- + drivers/staging/fbtft/fb_st7789v.c | 12 +- + drivers/staging/fbtft/fbtft-bus.c | 152 +++++++++++++++- + drivers/staging/fbtft/fbtft-core.c | 336 +++++++++++++++++++++++++++++++++--- + drivers/staging/fbtft/fbtft-io.c | 61 +++++++ + drivers/staging/fbtft/fbtft-sysfs.c | 255 ++++++++++++++++++++++++++- + drivers/staging/fbtft/fbtft.h | 41 ++++- + 7 files changed, 821 insertions(+), 38 deletions(-) + +diff --git a/drivers/staging/fbtft/Makefile b/drivers/staging/fbtft/Makefile +index 6bc0331..c74518e 100644 +--- a/drivers/staging/fbtft/Makefile ++++ b/drivers/staging/fbtft/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + # Core module + obj-$(CONFIG_FB_TFT) += fbtft.o +-fbtft-y += fbtft-core.o fbtft-sysfs.o fbtft-bus.o fbtft-io.o ++fbtft-y += fbtft-core.o fbtft-sysfs.o fbtft-bus.o fbtft-io.o fb_text.o + + # drivers + obj-$(CONFIG_FB_TFT_AGM1264K_FL) += fb_agm1264k-fl.o +diff --git a/drivers/staging/fbtft/fb_st7789v.c b/drivers/staging/fbtft/fb_st7789v.c +index 212836f..ba21ab5 100755 +--- a/drivers/staging/fbtft/fb_st7789v.c ++++ b/drivers/staging/fbtft/fb_st7789v.c +@@ -153,8 +153,16 @@ static int init_display(struct fbtft_par *par) + /* Display Inversion of colors */ + write_reg(par, 0x21); + +- /* 39Hz refresh rate */ +- write_reg(par, 0xC6,0x1F); ++ /* refresh rate */ ++ //write_reg(par, 0xC6,0x1F); //39Hz ++ //write_reg(par, 0xC6,0x1A); //44Hz ++ //write_reg(par, 0xC6,0x17); //48Hz ++ //write_reg(par, 0xC6,0x15); //50Hz ++ //write_reg(par, 0xC6,0x12); //55Hz ++ //write_reg(par, 0xC6,0x10); //58Hz ++ //write_reg(par, 0xC6,0x0F); //60Hz ++ write_reg(par, 0xC6,0x09); //60Hz ++ //write_reg(par, 0xC6,0x03); //99Hz + + write_reg(par, MIPI_DCS_SET_DISPLAY_ON); + +diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c +index 2a8eef1..55255a4 100644 +--- a/drivers/staging/fbtft/fbtft-bus.c ++++ b/drivers/staging/fbtft/fbtft-bus.c +@@ -3,7 +3,10 @@ + #include + #include + #include ++#include /* usleep_range */ ++#include