From 4ce8fc520934fe035a481ed1bff7e3e9fb655cdc Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 30 Nov 2011 08:50:27 +0100 Subject: [PATCH] linux-ti335x-psp 3.1: add support for ST7735FB, but don't enable it in the beaglebone boardfile yet Signed-off-by: Koen Kooi --- .../linux-ti33x-psp-3.1/beaglebone/defconfig | 14 +- ...mebuffer-driver-supporting-Adafruit-.patch | 667 ++++++++++++++++++ ...in-support-for-the-WIP-st7735fb-driv.patch | 73 ++ recipes-kernel/linux/linux-ti33x-psp_3.1.bb | 3 +- 4 files changed, 751 insertions(+), 6 deletions(-) create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.1/st7735fb/0001-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.1/st7735fb/0002-beaglebone-hack-in-support-for-the-WIP-st7735fb-driv.patch diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/beaglebone/defconfig b/recipes-kernel/linux/linux-ti33x-psp-3.1/beaglebone/defconfig index 00872ca9..fcff5914 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.1/beaglebone/defconfig +++ b/recipes-kernel/linux/linux-ti33x-psp-3.1/beaglebone/defconfig @@ -2239,11 +2239,14 @@ CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -CONFIG_FB_SYS_FILLRECT=m -CONFIG_FB_SYS_COPYAREA=m -CONFIG_FB_SYS_IMAGEBLIT=m -# CONFIG_FB_FOREIGN_ENDIAN is not set -CONFIG_FB_SYS_FOPS=m +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +CONFIG_FB_FOREIGN_ENDIAN=y +CONFIG_FB_BOTH_ENDIAN=y +# CONFIG_FB_BIG_ENDIAN is not set +# CONFIG_FB_LITTLE_ENDIAN is not set +CONFIG_FB_SYS_FOPS=y # CONFIG_FB_WMT_GE_ROPS is not set CONFIG_FB_DEFERRED_IO=y # CONFIG_FB_SVGALIB is not set @@ -2264,6 +2267,7 @@ CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE=4 # CONFIG_FB_VIRTUAL is not set # CONFIG_FB_METRONOME is not set # CONFIG_FB_BROADSHEET is not set +CONFIG_FB_ST7735=y # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set CONFIG_OMAP2_VRAM=y CONFIG_OMAP2_VRFB=y diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/st7735fb/0001-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/st7735fb/0001-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch new file mode 100644 index 00000000..5e915339 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.1/st7735fb/0001-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch @@ -0,0 +1,667 @@ +From a99fbc0639e6c42cd7c53c8d1d4852d04e9f8bb1 Mon Sep 17 00:00:00 2001 +From: Matt Porter +Date: Mon, 21 Nov 2011 12:55:23 -0500 +Subject: [PATCH 1/2] st7735fb: WIP framebuffer driver supporting Adafruit 1.8" SPI LCD + +Signed-off-by: Matt Porter +Signed-off-by: Koen Kooi +--- + drivers/video/Kconfig | 11 + + drivers/video/Makefile | 1 + + drivers/video/st7735fb.c | 516 ++++++++++++++++++++++++++++++++++++++++++++++ + include/video/st7735fb.h | 86 ++++++++ + 4 files changed, 614 insertions(+), 0 deletions(-) + create mode 100644 drivers/video/st7735fb.c + create mode 100644 include/video/st7735fb.h + +diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig +index 792b7841..4ac5eb1 100644 +--- a/drivers/video/Kconfig ++++ b/drivers/video/Kconfig +@@ -2394,6 +2394,17 @@ config FB_PUV3_UNIGFX + Choose this option if you want to use the Unigfx device as a + framebuffer device. Without the support of PCI & AGP. + ++config FB_ST7735 ++ tristate "ST7735 framebuffer support" ++ depends on FB && SPI ++ select FB_SYS_FILLRECT ++ select FB_SYS_COPYAREA ++ select FB_SYS_IMAGEBLIT ++ select FB_SYS_FOPS ++ select FB_DEFERRED_IO ++ help ++ Framebuffer support for the ST7735 display controller in SPI mode. ++ + source "drivers/video/omap/Kconfig" + source "drivers/video/omap2/Kconfig" + +diff --git a/drivers/video/Makefile b/drivers/video/Makefile +index 8b83129..6b67f05 100644 +--- a/drivers/video/Makefile ++++ b/drivers/video/Makefile +@@ -141,6 +141,7 @@ obj-$(CONFIG_FB_MSM) += msm/ + obj-$(CONFIG_FB_NUC900) += nuc900fb.o + obj-$(CONFIG_FB_JZ4740) += jz4740_fb.o + obj-$(CONFIG_FB_PUV3_UNIGFX) += fb-puv3.o ++obj-$(CONFIG_FB_ST7735) += st7735fb.o + + # Platform or fallback drivers go here + obj-$(CONFIG_FB_UVESA) += uvesafb.o +diff --git a/drivers/video/st7735fb.c b/drivers/video/st7735fb.c +new file mode 100644 +index 0000000..500cc88 +--- /dev/null ++++ b/drivers/video/st7735fb.c +@@ -0,0 +1,516 @@ ++/* ++ * linux/drivers/video/st7735fb.c -- FB driver for ST7735 LCD controller ++ * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven. ++ * ++ * Copyright (C) 2011, Matt Porter ++ * ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file COPYING in the main directory of this archive for ++ * more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include