首页 > 学院 > 开发设计 > 正文

NUC970_Linux_Kernel patch

2019-11-06 06:35:55
字体:
来源:转载
供稿:网友
diff --git a/Makefile b/Makefileindex 644cd79..6ea6df6 100644--- a/Makefile+++ b/Makefile@@ -195,7 +195,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ / #ARCH  ?= $(SUBARCH) ARCH  = arm #CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)-CROSS_COMPILE = arm-linux-+CROSS_COMPILE ?= arm-linux- # Architecture as PResent in compile.h UTS_MACHINE  := $(ARCH) SRCARCH  := $(ARCH)diff --git a/arch/arm/mach-nuc970/dev.c b/arch/arm/mach-nuc970/dev.cindex 5291191..bad3afb 100755--- a/arch/arm/mach-nuc970/dev.c+++ b/arch/arm/mach-nuc970/dev.c@@ -55,6 +55,9 @@ #include <linux/platform_data/spi-nuc970.h> #include <linux/platform_data/dma-nuc970.h> #include <linux/platform_data/keypad-nuc970.h>+#if defined(CONFIG_TOUCHSCREEN_AVNET_FT5X06)+#include  <linux/input/edt-ft5x06.h>+#endif  #include "cpu.h" @@ -379,6 +382,43 @@ static struct nuc970fb_display nuc970fb_lcd_info[] = {   .scale  = 0x04000400,    }, #endif++ #ifdef CONFIG_GL043025Q_480X272+ /* GL043025Q 480X272 TFT Panel , 24bits*/+  [0] = {+  #if  defined(CONFIG_FB_SRCFMT_RGB888)+   .type  = LCM_DCCS_VA_SRC_RGB888,+   .bpp  = 32,+  #elif defined(CONFIG_FB_SRCFMT_RGB565)+   .type   = LCM_DCCS_VA_SRC_RGB565,+   .bpp  = 16,+  #endif+   .width  = 480,+   .height  = 272,+   .xres  = 480,+   .yres  = 272,+   .pixclock = 9000000, //9MHz+   .left_margin = 10,+   .right_margin   = 20,+   .hsync_len = 40, //hsync_len = Th - Thd - right_margin = (525+5)-480-40 = 10+   .upper_margin = 20,+   .lower_margin = 8,+   .vsync_len = 10, //vsync_len = Vh - Vhd - lower_margin = 288-272-10 = 6+  #if  defined(CONFIG_FB_SRCFMT_RGB888)+   .dccs  = 0x0e00020a,+   .fbctrl  = 0x01E001E0, //480+  #elif defined(CONFIG_FB_SRCFMT_RGB565)+   .dccs  = 0x0e00040a,+   .fbctrl  = 0x00F000F0, //480/2+  #endif+  #if defined(CONFIG_FB_LCD_16BIT_PIN)+          .devctl  = 0x050000c0,+  #elif defined(CONFIG_FB_LCD_24BIT_PIN)+          .devctl  = 0x070000c0,+  #endif+   .scale  = 0x04000400,+  },+ #endif };  static struct nuc970fb_mach_info nuc970fb_fb_info = {@@ -389,6 +429,8 @@ static struct nuc970fb_mach_info nuc970fb_fb_info = {     .gpio_lcs           = NUC970_PG2, }; ++ static struct resource nuc970fb_lcd_resource[] = {  [0] = {   .start = NUC970_PA_LCD,@@ -766,6 +808,7 @@ static struct nuc970_platform_i2c nuc970_i2c1_data = {  .bus_freq = 100000, }; + static struct resource nuc970_i2c_p1_resource[] = {         [0] = {                 .start = NUC970_PA_I2C1,@@ -1352,6 +1395,13 @@ struct platform_device nuc970_device_pinctrl = {  #if defined(CONFIG_GPIO_NUC970) || defined(CONFIG_GPIO_NUC970_MODULE) #if defined(CONFIG_I2C_ALGOBIT) || defined(CONFIG_I2C_ALGOBIT_MODULE)+#if defined(CONFIG_TOUCHSCREEN_AVNET_FT5X06)+static struct edt_ft5x06_platform_data avnet_ft5x06_pdata = {+        .irq_pin = NUC970_PF14,+        .reset_pin = NUC970_PF13,+};+#endif+ static struct i2c_board_info __initdata nuc970_i2c_clients2[] = { #ifdef CONFIG_SENSOR_OV7725@@ -1366,10 +1416,23 @@ static struct i2c_board_info __initdata nuc970_i2c_clients2[] = #ifdef CONFIG_SENSOR_NT99050  {I2C_BOARD_INFO("nt99050", 0x21),}, #endif+#if defined(CONFIG_TOUCHSCREEN_AVNET_FT5X06)+ {+  I2C_BOARD_INFO("ft5x0x_ts", 0x38),+     .platform_data  = &avnet_ft5x06_pdata,+     .irq = IRQ_EXT7_I2,+ },+#endif };+ static struct i2c_gpio_platform_data i2c_gpio_adapter_data = {+#ifdef CONFIG_TOUCHSCREEN_AVNET_FT5X06+ .sda_pin = NUC970_PG1,+ .scl_pin = NUC970_PG0,+#else     .sda_pin = NUC970_PB1,     .scl_pin = NUC970_PB0,+#endif     .udelay = 1,     .timeout = 100,     .sda_is_open_drain = 0,   //not support open drain modediff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfigindex f9a5fd8..2e96b27 100644--- a/drivers/input/touchscreen/Kconfig+++ b/drivers/input/touchscreen/Kconfig@@ -11,6 +11,37 @@ menuconfig INPUT_TOUCHSCREEN  if INPUT_TOUCHSCREEN +config TOUCHSCREEN_AVNET_FT5X06+ tristate "AVNET FT5x06 I2C Touchscreen support"+ depends on I2C+ help+   Say Y here if you have an EDT "Polytouch" touchscreen based+   on the FocalTech FT5x06 family of controllers connected to+   your system.++   If unsure, say N.++   To compile this driver as a module, choose M here: the+   module will be called avnet-ft5x06.+ +    +choice+        prompt "Choice FT5X06 touch type"+        default FT5X0X_SINGLETOUCH+        depends on TOUCHSCREEN_AVNET_FT5X06++config FT5X0X_SINGLETOUCH+        bool "Single-Touch"+config FT5X0X_MULTITOUCH+        bool "Multi-Touch"+       +endchoice+config TOUCH_VKBD+ tristate "Touchscreen virtual keyborad"+ depends on TOUCHSCREEN_AVNET_FT5X06+ help+  include a simple virtual keyborad in bottom of the screen+ config TOUCHSCREEN_88PM860X  tristate "Marvell 88PM860x touchscreen"  depends on MFD_88PM860Xdiff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefileindex 6bfbeab..0c41522 100644--- a/drivers/input/touchscreen/Makefile+++ b/drivers/input/touchscreen/Makefile@@ -24,6 +24,7 @@ obj-$(CONFIG_TOUCHSCREEN_DA9034) += da9034-ts.o obj-$(CONFIG_TOUCHSCREEN_DA9052) += da9052_tsi.o obj-$(CONFIG_TOUCHSCREEN_DYNAPRO) += dynapro.o obj-$(CONFIG_TOUCHSCREEN_EDT_FT5X06) += edt-ft5x06.o+obj-$(CONFIG_TOUCHSCREEN_AVNET_FT5X06) += avnet-ft5x06.o obj-$(CONFIG_TOUCHSCREEN_HAMPSHIRE) += hampshire.o obj-$(CONFIG_TOUCHSCREEN_GUNZE)  += gunze.o obj-$(CONFIG_TOUCHSCREEN_EETI)  += eeti_ts.odiff --git a/drivers/mtd/nand/nuc970_nand.c b/drivers/mtd/nand/nuc970_nand.cindex cadc614..58e200b 100644--- a/drivers/mtd/nand/nuc970_nand.c+++ b/drivers/mtd/nand/nuc970_nand.c@@ -94,7 +94,7 @@ static struct mtd_partition partitions[] = {  },  {   .name = "Kernel",-  .size = 20 * 1024 * 1024,+  .size =8 * 1024 * 1024,   .offset = MTDPART_OFS_APPEND,   .ecclayout = (struct nand_ecclayout*)&nuc970_nand_EXECUTE_oob  },diff --git a/drivers/video/Kconfig b/drivers/video/Kconfigindex 76352d44..2df9de9 100644--- a/drivers/video/Kconfig+++ b/drivers/video/Kconfig@@ -2138,13 +2138,20 @@ choice         select FB_NUC970_16BIT_PIN         select GPIOLIB         select GPIO_NUC970++     config  GL043025Q_480X272 +        bool "GL043025Q 480x272 3.5-Inch Color TFT LCD"+        depends on FB_NUC970+        select GPIOLIB+        select GPIO_NUC970+        select FB_NUC970_24BIT_PIN endchoice  choice  prompt "Framebuffer bitmap source format"  default FB_SRCFMT_RGB565  depends on FB_NUC970- depends on E50A2V1_800X480+ depends on E50A2V1_800X480 || GL043025Q_480X272       config FB_SRCFMT_RGB565         bool "RGB565 support"@@ -2166,7 +2173,9 @@ choice       config FB_LCD_24BIT_PIN       bool "24 bits interface"-        depends on BOARD_NUC972+        depends on FB_NUC970 +        depends on E50A2V1_800X480 || GL043025Q_480X272+         endchoice   config FB_SM501
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表