rk3168_86v: add support lcd auo A080SN03
authorhjc <hjc@rock-chips.com>
Mon, 18 Mar 2013 02:59:34 +0000 (10:59 +0800)
committerhjc <hjc@rock-chips.com>
Mon, 18 Mar 2013 02:59:34 +0000 (10:59 +0800)
arch/arm/mach-rk30/board-rk3168-86v-camera.c [changed mode: 0644->0755]
drivers/video/display/screen/Kconfig
drivers/video/display/screen/Makefile
drivers/video/display/screen/lcd_AUO_A080SN03.c [new file with mode: 0755]

old mode 100644 (file)
new mode 100755 (executable)
index 501242c..3b58c72
@@ -1,14 +1,14 @@
 #ifdef CONFIG_VIDEO_RK29
 /*---------------- Camera Sensor Macro Define Begin  ------------------------*/
 /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/
-#define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5640                                         /* back camera sensor */
-#define CONFIG_SENSOR_IIC_ADDR_0               0x00
+#define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV2659                                         /* back camera sensor */
+#define CONFIG_SENSOR_IIC_ADDR_0               0x60
 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0   3
 #define CONFIG_SENSOR_ORIENTATION_0      90
 #define CONFIG_SENSOR_POWER_PIN_0                INVALID_GPIO
 #define CONFIG_SENSOR_RESET_PIN_0                INVALID_GPIO
 #define CONFIG_SENSOR_POWERDN_PIN_0      RK30_PIN3_PB5
-#define CONFIG_SENSOR_FALSH_PIN_0                RK30_PIN0_PD5 //INVALID_GPIO
+#define CONFIG_SENSOR_FALSH_PIN_0                INVALID_GPIO//RK30_PIN0_PD5 //INVALID_GPIO
 #define CONFIG_SENSOR_POWERACTIVE_LEVEL_0 RK29_CAM_POWERACTIVE_L
 #define CONFIG_SENSOR_RESETACTIVE_LEVEL_0 RK29_CAM_RESETACTIVE_L
 #define CONFIG_SENSOR_POWERDNACTIVE_LEVEL_0 RK29_CAM_POWERDNACTIVE_H
index fe946dda9a043b3783173ccd8158ab7ad6c7bbf7..bf2fe80e9645c2b2937aa97e1fc8afd1eaace9da 100755 (executable)
@@ -107,6 +107,9 @@ config LCD_HV070WSA100
        bool "HV070WSA-100 1024X600"
 config LCD_COMMON
        bool "LCD COMMON"
+config LCD_RK3168_AUO_A080SN03
+       bool "RK3168  auo panel 800x480"
+
 config LCD_RK2928_A720
        bool "RK2928 A720 panel 800x480"
 config LCD_RK2926_V86
index 6bfaed5a8179ec3e90c964e88245a87b9868234c..9632f967ec7a7d4f2197e32d09839178e5ca86fc 100755 (executable)
@@ -45,6 +45,7 @@ obj-$(CONFIG_LCD_HSD100PXN_FOR_TDW851) += lcd_hsd100pxn_for_tdw851.o
 obj-$(CONFIG_LCD_HV070WSA100)    += lcd_hv070wsa.o
 obj-$(CONFIG_LCD_COMMON)    += lcd_common.o
 obj-$(CONFIG_LCD_RK2928_A720) += lcd_YQ70CPT9160.o
+obj-$(CONFIG_LCD_RK3168_AUO_A080SN03) += lcd_AUO_A080SN03.o
 obj-$(CONFIG_LCD_RK2926_V86) += lcd_YQ70CPT9160_v86.o
 obj-$(CONFIG_LCD_RK3168_86V) += lcd_YQ70CPT9160_rk3168_86v.o
 obj-$(CONFIG_LCD_HSD07PFW1) += lcd_hdmi_1024x600.o
diff --git a/drivers/video/display/screen/lcd_AUO_A080SN03.c b/drivers/video/display/screen/lcd_AUO_A080SN03.c
new file mode 100755 (executable)
index 0000000..ea9d91b
--- /dev/null
@@ -0,0 +1,89 @@
+/* This Lcd Driver is HSD070IDW1 write by cst 2009.10.27 */
+
+#include <linux/delay.h>
+#include<linux/rk_fb.h>
+#include <mach/gpio.h>
+#include <mach/iomux.h>
+#include <mach/board.h>
+
+
+
+/* Base */
+#define OUT_TYPE               SCREEN_RGB
+#define OUT_FACE               OUT_P888//OUT_P666
+#define OUT_CLK                        40000000
+#define LCDC_ACLK       500000000     //29 lcdc axi DMA ÆµÂÊ
+
+/* Timing */
+#define H_PW                   1//30//48 //10
+#define H_BP                   46//10//40 //100
+#define H_VD                   800 //1024
+#define H_FP                   210// //210
+
+#define V_PW           3//       2//        3//13//10
+#define V_BP           23//     18     //    23//10// //10
+#define V_VD                   600//480 //768
+#define V_FP           2//     8//           12//22 //18
+
+/* Other */
+#define DCLK_POL               1
+#define SWAP_RB                        0
+
+#define LCD_WIDTH       162//154    //need modify
+#define LCD_HEIGHT      121//85
+
+static struct rk29lcd_info *gLcd_info = NULL;
+
+void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
+{
+    /* screen type & face */
+    screen->type = OUT_TYPE;
+    screen->face = OUT_FACE;
+
+    /* Screen size */
+    screen->x_res = H_VD;
+    screen->y_res = V_VD;
+
+    screen->width = LCD_WIDTH;
+    screen->height = LCD_HEIGHT;
+
+    /* Timing */
+    screen->lcdc_aclk = LCDC_ACLK;
+    screen->pixclock = OUT_CLK;
+       screen->left_margin = H_BP;
+       screen->right_margin = H_FP;
+       screen->hsync_len = H_PW;
+       screen->upper_margin = V_BP;
+       screen->lower_margin = V_FP;
+       screen->vsync_len = V_PW;
+
+       /* Pin polarity */
+       screen->pin_hsync = 0;
+       screen->pin_vsync = 0;
+       screen->pin_den = 0;
+       screen->pin_dclk = DCLK_POL;
+
+       /* Swap rule */
+    screen->swap_rb = SWAP_RB;
+    screen->swap_rg = 0;
+    screen->swap_gb = 0;
+    screen->swap_delta = 0;
+    screen->swap_dumy = 0;
+
+    /* Operation function*/
+    /*screen->init = init;*/
+    screen->init = NULL;
+    screen->standby = NULL;
+    if(lcd_info)
+        gLcd_info = lcd_info;
+}
+size_t get_fb_size(void)
+{
+       size_t size = 0;
+       #if defined(CONFIG_THREE_FB_BUFFER)
+               size = ((H_VD)*(V_VD)<<2)* 3; //three buffer
+       #else
+               size = ((H_VD)*(V_VD)<<2)<<1; //two buffer
+       #endif
+       return ALIGN(size,SZ_1M);
+}