diff --git a/config/kernel/linux-rockchip64-current.config b/config/kernel/linux-rockchip64-current.config index 2e8e7e9cebcc..e7db6f5d8fa9 100644 --- a/config/kernel/linux-rockchip64-current.config +++ b/config/kernel/linux-rockchip64-current.config @@ -7796,6 +7796,7 @@ CONFIG_FB_TFT_SSD1331=m CONFIG_FB_TFT_SSD1351=m CONFIG_FB_TFT_ST7735R=m CONFIG_FB_TFT_ST7789V=m +CONFIG_FB_TFT_ST7796=m CONFIG_FB_TFT_TINYLCD=m CONFIG_FB_TFT_TLS8204=m CONFIG_FB_TFT_UC1611=m diff --git a/config/kernel/linux-rockchip64-edge.config b/config/kernel/linux-rockchip64-edge.config index 18a6f5228004..4eaae942d505 100644 --- a/config/kernel/linux-rockchip64-edge.config +++ b/config/kernel/linux-rockchip64-edge.config @@ -8031,6 +8031,7 @@ CONFIG_FB_TFT_SSD1331=m CONFIG_FB_TFT_SSD1351=m CONFIG_FB_TFT_ST7735R=m CONFIG_FB_TFT_ST7789V=m +CONFIG_FB_TFT_ST7796=m CONFIG_FB_TFT_TINYLCD=m CONFIG_FB_TFT_TLS8204=m CONFIG_FB_TFT_UC1611=m diff --git a/patch/kernel/archive/rockchip64-6.12/general-st7796-driver.patch b/patch/kernel/archive/rockchip64-6.12/general-st7796-driver.patch new file mode 100644 index 000000000000..e986a922556a --- /dev/null +++ b/patch/kernel/archive/rockchip64-6.12/general-st7796-driver.patch @@ -0,0 +1,196 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Maxim Medvedev +Date: Fri, 12 May 2023 22:30:14 +0000 +Subject: Custom st7796 display module + +--- + +diff --git a/drivers/staging/fbtft/Kconfig b/drivers/staging/fbtft/Kconfig +index 4d29e8c1014..265c7e3fe76 100644 +--- a/drivers/staging/fbtft/Kconfig ++++ b/drivers/staging/fbtft/Kconfig +@@ -82,6 +82,12 @@ config FB_TFT_ILI9481 + help + Generic Framebuffer support for ILI9481 + ++config FB_TFT_ST7796 ++ tristate "FB driver for the ST7796 LCD Controller" ++ depends on FB_TFT ++ help ++ Generic Framebuffer support for ST7796 ++ + config FB_TFT_ILI9486 + tristate "FB driver for the ILI9486 LCD Controller" + depends on FB_TFT +diff --git a/drivers/staging/fbtft/Makefile b/drivers/staging/fbtft/Makefile +index e9cdf0f0a7d..3c62b33e596 100644 +--- a/drivers/staging/fbtft/Makefile ++++ b/drivers/staging/fbtft/Makefile +@@ -16,6 +16,7 @@ obj-$(CONFIG_FB_TFT_ILI9325) += fb_ili9325.o + obj-$(CONFIG_FB_TFT_ILI9340) += fb_ili9340.o + obj-$(CONFIG_FB_TFT_ILI9341) += fb_ili9341.o + obj-$(CONFIG_FB_TFT_ILI9481) += fb_ili9481.o ++obj-$(CONFIG_FB_TFT_ST7796) += fb_st7796.o + obj-$(CONFIG_FB_TFT_ILI9486) += fb_ili9486.o + obj-$(CONFIG_FB_TFT_PCD8544) += fb_pcd8544.o + obj-$(CONFIG_FB_TFT_RA8875) += fb_ra8875.o +diff --git a/drivers/staging/fbtft/fb_st7796.c b/drivers/staging/fbtft/fb_st7796.c +new file mode 100755 +index 00000000000..c7deedbea69 +--- /dev/null ++++ b/drivers/staging/fbtft/fb_st7796.c +@@ -0,0 +1,160 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * FB driver for the ST7796 LCD display controller ++ * ++ * Based on ILI9486 from Christian Vogelgsang and adafruit22fb.c by Noralf Tronnes. ++ */ ++ ++#include ++#include ++#include ++#include ++#include