From d2b203ea59b4bce1272876a5d57b87fdfc91eb4f Mon Sep 17 00:00:00 2001 From: hhb Date: Wed, 30 Mar 2011 11:19:13 +0800 Subject: [PATCH] rk29_phone: fix lcd_ls035y8dx02a driver --- arch/arm/mach-rk29/board-rk29-phonesdk.c | 22 +++++++++---------- .../video/display/screen/lcd_ls035y8dx02a.c | 22 ++++++++++++++----- 2 files changed, 27 insertions(+), 17 deletions(-) mode change 100755 => 100644 drivers/video/display/screen/lcd_ls035y8dx02a.c diff --git a/arch/arm/mach-rk29/board-rk29-phonesdk.c b/arch/arm/mach-rk29/board-rk29-phonesdk.c index b3bc8c979cd5..5597f111adb3 100644 --- a/arch/arm/mach-rk29/board-rk29-phonesdk.c +++ b/arch/arm/mach-rk29/board-rk29-phonesdk.c @@ -142,9 +142,9 @@ struct rk29_nand_platform_data rk29_nand_data = { * author: zyw@rock-chips.com *****************************************************************************************/ #define FB_ID 0 -#define FB_DISPLAY_ON_PIN RK29_PIN6_PD0 -#define FB_LCD_STANDBY_PIN RK29_PIN6_PD1 -#define FB_LCD_CABC_EN_PIN RK29_PIN6_PD2 +#define FB_DISPLAY_ON_PIN INVALID_GPIO//RK29_PIN6_PD0 +#define FB_LCD_STANDBY_PIN INVALID_GPIO//RK29_PIN6_PD1 +#define FB_LCD_CABC_EN_PIN INVALID_GPIO//RK29_PIN6_PD2 #define FB_MCU_FMK_PIN INVALID_GPIO #define FB_DISPLAY_ON_VALUE GPIO_HIGH @@ -154,12 +154,12 @@ struct rk29_nand_platform_data rk29_nand_data = { static int rk29_lcd_io_init(void) { int ret = 0; - printk("rk29_lcd_io_init\n"); - ret = gpio_request(LCD_RXD_PIN, NULL); + //printk("rk29_lcd_io_init\n"); + //ret = gpio_request(LCD_RXD_PIN, NULL); ret = gpio_request(LCD_TXD_PIN, NULL); ret = gpio_request(LCD_CLK_PIN, NULL); ret = gpio_request(LCD_CS_PIN, NULL); - rk29_mux_api_set(GPIO2C7_SPI1RXD_NAME,GPIO2H_GPIO2C7); + //rk29_mux_api_set(GPIO2C7_SPI1RXD_NAME,GPIO2H_GPIO2C7); rk29_mux_api_set(GPIO2C6_SPI1TXD_NAME,GPIO2H_GPIO2C6); rk29_mux_api_set(GPIO2C5_SPI1CSN0_NAME,GPIO2H_GPIO2C5); rk29_mux_api_set(GPIO2C4_SPI1CLK_NAME,GPIO2H_GPIO2C4); @@ -169,12 +169,12 @@ static int rk29_lcd_io_init(void) static int rk29_lcd_io_deinit(void) { int ret = 0; - printk("rk29_lcd_io_deinit\n"); + //printk("rk29_lcd_io_deinit\n"); gpio_free(LCD_CS_PIN); gpio_free(LCD_CLK_PIN); gpio_free(LCD_TXD_PIN); - gpio_free(LCD_RXD_PIN); - rk29_mux_api_set(GPIO2C7_SPI1RXD_NAME,GPIO2H_SPI1_RXD); + //gpio_free(LCD_RXD_PIN); + //rk29_mux_api_set(GPIO2C7_SPI1RXD_NAME,GPIO2H_SPI1_RXD); rk29_mux_api_set(GPIO2C6_SPI1TXD_NAME,GPIO2H_SPI1_TXD); rk29_mux_api_set(GPIO2C5_SPI1CSN0_NAME,GPIO2H_SPI1_CSN0); rk29_mux_api_set(GPIO2C4_SPI1CLK_NAME,GPIO2H_SPI1_CLK); @@ -681,7 +681,7 @@ int wm831x_last_deinit(struct wm831x *parm) struct wm831x_backlight_pdata wm831x_backlight_platdata = { .isink = 1, /** ISINK to use, 1 or 2 */ - .max_uA = 5000, /** Maximum current to allow */ + .max_uA = 19484, /** Maximum current to allow */ }; struct wm831x_backup_pdata wm831x_backup_platdata = { @@ -1562,7 +1562,7 @@ static struct i2c_board_info __initdata board_i2c2_devices[] = { #if defined (CONFIG_TOUCHSCREEN_GT801_IIC) { .type = "gt801_ts", - .addr = 0x55, + .addr = 0xAA, .flags = 0, .irq = RK29_PIN4_PD5, .platform_data = >801_info, diff --git a/drivers/video/display/screen/lcd_ls035y8dx02a.c b/drivers/video/display/screen/lcd_ls035y8dx02a.c old mode 100755 new mode 100644 index 469411e9a4ff..17e4c41b841d --- a/drivers/video/display/screen/lcd_ls035y8dx02a.c +++ b/drivers/video/display/screen/lcd_ls035y8dx02a.c @@ -31,15 +31,15 @@ #define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ�� //rk29 /* Timing */ -#define H_PW 16 //8 -#define H_BP 24//6 +#define H_PW 8 //16 +#define H_BP 6//24 #define H_VD 480//320 //***800 -#define H_FP 16//60 +#define H_FP 60//16 -#define V_PW 2//12 -#define V_BP 2// 4 +#define V_PW 12//2 +#define V_BP 4// 2 #define V_VD 800//480 //***480 -#define V_FP 4//40 +#define V_FP 40//4 #define LCD_WIDTH 800 //need modify //rk29 #define LCD_HEIGHT 480 @@ -284,6 +284,16 @@ int lcd_init(void) printk("lcd init11111111111111111111111111...\n"); gLcd_info->io_init(); } + + /* reset lcd to start init lcd */ + gpio_request(RK29_PIN6_PC6, NULL); + gpio_direction_output(RK29_PIN6_PC6, 0); + mdelay(2); + gpio_set_value(RK29_PIN6_PC6, 1); + mdelay(10); + gpio_free(RK29_PIN6_PC6); + + printk("lcd init22222222222222222222222222...\n"); printk("lcd init...\n"); spi_screenreg_set(0x29, 0xffff, 0xffff); -- 2.34.1