From f75d53004415d9600b42a0814148d58478a155c0 Mon Sep 17 00:00:00 2001 From: libing Date: Mon, 26 Aug 2013 10:28:41 +0800 Subject: [PATCH] rk616_mipi:add mipi lcd reset pin in the board 'board-rk3168-tb.c' --- arch/arm/mach-rk30/board-rk3168-tb.c | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/mach-rk30/board-rk3168-tb.c b/arch/arm/mach-rk30/board-rk3168-tb.c index bd74a1bac58e..dd4ea7c54979 100755 --- a/arch/arm/mach-rk30/board-rk3168-tb.c +++ b/arch/arm/mach-rk30/board-rk3168-tb.c @@ -484,6 +484,7 @@ static struct sensor_platform_data cm3217_info = { #define LCD_CS_VALUE GPIO_HIGH #define LCD_EN_PIN RK30_PIN0_PB0 +#define MIPI_LCD_RST_PIN RK30_PIN0_PC3 //mipi lcd's reset pin, if no reset pin, set's INVALID_GPIO #define LCD_EN_VALUE GPIO_HIGH static int rk_fb_io_init(struct rk29_fb_setting_info *fb_setting) @@ -519,6 +520,23 @@ static int rk_fb_io_init(struct rk29_fb_setting_info *fb_setting) gpio_direction_output(LCD_EN_PIN, LCD_EN_VALUE); } } + + if(MIPI_LCD_RST_PIN !=INVALID_GPIO) + { + ret = gpio_request(MIPI_LCD_RST_PIN, NULL); + if (ret != 0) + { + gpio_free(MIPI_LCD_RST_PIN); + printk(KERN_ERR "request mipi lcd rst pin fail!\n"); + return -1; + } + + else + { + gpio_set_value(MIPI_LCD_RST_PIN, !GPIO_LOW); + msleep(20); + } + } return 0; } static int rk_fb_io_disable(void) @@ -531,6 +549,12 @@ static int rk_fb_io_disable(void) { gpio_set_value(LCD_EN_PIN, !LCD_EN_VALUE); } + + if(MIPI_LCD_RST_PIN !=INVALID_GPIO) + { + gpio_set_value(MIPI_LCD_RST_PIN, GPIO_LOW); + msleep(10); + } return 0; } static int rk_fb_io_enable(void) @@ -543,6 +567,12 @@ static int rk_fb_io_enable(void) { gpio_set_value(LCD_EN_PIN, LCD_EN_VALUE); } + + if(MIPI_LCD_RST_PIN !=INVALID_GPIO) + { + gpio_set_value(MIPI_LCD_RST_PIN, !GPIO_LOW); + msleep(10); + } return 0; } -- 2.34.1