From 941f5446a125fddb718332d81a9eaeecda4efc22 Mon Sep 17 00:00:00 2001 From: yxj Date: Tue, 19 Feb 2013 14:31:26 +0800 Subject: [PATCH] board LR097:update camera,charger,ddr freq --- .../arm/mach-rk30/board-rk3168-LR097-camera.c | 28 +++++------ arch/arm/mach-rk30/board-rk3168-LR097.c | 49 +++++++++++++++---- 2 files changed, 53 insertions(+), 24 deletions(-) diff --git a/arch/arm/mach-rk30/board-rk3168-LR097-camera.c b/arch/arm/mach-rk30/board-rk3168-LR097-camera.c index 708f764f8e66..a7281382fdc0 100644 --- a/arch/arm/mach-rk30/board-rk3168-LR097-camera.c +++ b/arch/arm/mach-rk30/board-rk3168-LR097-camera.c @@ -23,13 +23,13 @@ #define CONFIG_SENSOR_SVGA_FPS_FIXED_0 15000 #define CONFIG_SENSOR_720P_FPS_FIXED_0 30000 -#define CONFIG_SENSOR_01 RK29_CAM_SENSOR_OV5642 /* back camera sensor 1 */ -#define CONFIG_SENSOR_IIC_ADDR_01 0x00 -#define CONFIG_SENSOR_IIC_ADAPTER_ID_01 4 +#define CONFIG_SENSOR_01 RK29_CAM_SENSOR_SP2518 /* back camera sensor 1 */ +#define CONFIG_SENSOR_IIC_ADDR_01 0x60 +#define CONFIG_SENSOR_IIC_ADAPTER_ID_01 3 #define CONFIG_SENSOR_ORIENTATION_01 90 #define CONFIG_SENSOR_POWER_PIN_01 INVALID_GPIO #define CONFIG_SENSOR_RESET_PIN_01 INVALID_GPIO -#define CONFIG_SENSOR_POWERDN_PIN_01 RK30_PIN1_PD6 +#define CONFIG_SENSOR_POWERDN_PIN_01 RK30_PIN3_PB5 #define CONFIG_SENSOR_FALSH_PIN_01 INVALID_GPIO #define CONFIG_SENSOR_POWERACTIVE_LEVEL_01 RK29_CAM_POWERACTIVE_L #define CONFIG_SENSOR_RESETACTIVE_LEVEL_01 RK29_CAM_RESETACTIVE_L @@ -45,14 +45,14 @@ #define CONFIG_SENSOR_SVGA_FPS_FIXED_01 15000 #define CONFIG_SENSOR_720P_FPS_FIXED_01 30000 -#define CONFIG_SENSOR_02 RK29_CAM_SENSOR_OV5640 /* back camera sensor 2 */ -#define CONFIG_SENSOR_IIC_ADDR_02 0x00 +#define CONFIG_SENSOR_02 RK29_CAM_SENSOR_GC2035 /* back camera sensor 2 */ +#define CONFIG_SENSOR_IIC_ADDR_02 0x78 #define CONFIG_SENSOR_CIF_INDEX_02 0 -#define CONFIG_SENSOR_IIC_ADAPTER_ID_02 4 +#define CONFIG_SENSOR_IIC_ADAPTER_ID_02 3 #define CONFIG_SENSOR_ORIENTATION_02 90 #define CONFIG_SENSOR_POWER_PIN_02 INVALID_GPIO #define CONFIG_SENSOR_RESET_PIN_02 INVALID_GPIO -#define CONFIG_SENSOR_POWERDN_PIN_02 INVALID_GPIO +#define CONFIG_SENSOR_POWERDN_PIN_02 RK30_PIN3_PB5 #define CONFIG_SENSOR_FALSH_PIN_02 INVALID_GPIO #define CONFIG_SENSOR_POWERACTIVE_LEVEL_02 RK29_CAM_POWERACTIVE_L #define CONFIG_SENSOR_RESETACTIVE_LEVEL_02 RK29_CAM_RESETACTIVE_L @@ -90,13 +90,13 @@ #define CONFIG_SENSOR_SVGA_FPS_FIXED_1 15000 #define CONFIG_SENSOR_720P_FPS_FIXED_1 30000 -#define CONFIG_SENSOR_11 RK29_CAM_SENSOR_OV2659 /* front camera sensor 1 */ -#define CONFIG_SENSOR_IIC_ADDR_11 0x00 +#define CONFIG_SENSOR_11 RK29_CAM_SENSOR_SP2518 /* front camera sensor 1 */ +#define CONFIG_SENSOR_IIC_ADDR_11 0x60 #define CONFIG_SENSOR_IIC_ADAPTER_ID_11 3 #define CONFIG_SENSOR_ORIENTATION_11 270 #define CONFIG_SENSOR_POWER_PIN_11 INVALID_GPIO #define CONFIG_SENSOR_RESET_PIN_11 INVALID_GPIO -#define CONFIG_SENSOR_POWERDN_PIN_11 INVALID_GPIO//RK30_PIN1_PB7 +#define CONFIG_SENSOR_POWERDN_PIN_11 RK30_PIN3_PB4//RK30_PIN1_PB7 #define CONFIG_SENSOR_FALSH_PIN_11 INVALID_GPIO #define CONFIG_SENSOR_POWERACTIVE_LEVEL_11 RK29_CAM_POWERACTIVE_L #define CONFIG_SENSOR_RESETACTIVE_LEVEL_11 RK29_CAM_RESETACTIVE_L @@ -112,13 +112,13 @@ #define CONFIG_SENSOR_SVGA_FPS_FIXED_11 15000 #define CONFIG_SENSOR_720P_FPS_FIXED_11 30000 -#define CONFIG_SENSOR_12 RK29_CAM_SENSOR_OV2659//RK29_CAM_SENSOR_OV2655 /* front camera sensor 2 */ -#define CONFIG_SENSOR_IIC_ADDR_12 0x00 +#define CONFIG_SENSOR_12 RK29_CAM_SENSOR_GC2035//RK29_CAM_SENSOR_OV2655 /* front camera sensor 2 */ +#define CONFIG_SENSOR_IIC_ADDR_12 0x78 #define CONFIG_SENSOR_IIC_ADAPTER_ID_12 3 #define CONFIG_SENSOR_ORIENTATION_12 270 #define CONFIG_SENSOR_POWER_PIN_12 INVALID_GPIO #define CONFIG_SENSOR_RESET_PIN_12 INVALID_GPIO -#define CONFIG_SENSOR_POWERDN_PIN_12 INVALID_GPIO//RK30_PIN1_PB7 +#define CONFIG_SENSOR_POWERDN_PIN_12 RK30_PIN3_PB4//RK30_PIN1_PB7 #define CONFIG_SENSOR_FALSH_PIN_12 INVALID_GPIO #define CONFIG_SENSOR_POWERACTIVE_LEVEL_12 RK29_CAM_POWERACTIVE_L #define CONFIG_SENSOR_RESETACTIVE_LEVEL_12 RK29_CAM_RESETACTIVE_L diff --git a/arch/arm/mach-rk30/board-rk3168-LR097.c b/arch/arm/mach-rk30/board-rk3168-LR097.c index 9e23c0f103fd..12e0cbcc66ac 100755 --- a/arch/arm/mach-rk30/board-rk3168-LR097.c +++ b/arch/arm/mach-rk30/board-rk3168-LR097.c @@ -223,7 +223,7 @@ static int rk29_backlight_pwm_resume(void) gpio_free(pwm_gpio); iomux_set(PWM_MODE); #ifdef LCD_DISP_ON_PIN - msleep(30); + msleep(200); gpio_direction_output(BL_EN_PIN, BL_EN_VALUE); #endif return 0; @@ -232,8 +232,9 @@ static int rk29_backlight_pwm_resume(void) static struct rk29_bl_info rk29_bl_info = { .pwm_id = PWM_ID, .min_brightness = 50, - .max_brightness=255, + .max_brightness=200, .brightness_mode =BRIGHTNESS_MODE_CONIC, + .pre_div = 30 * 1000, .bl_ref = PWM_EFFECT_VALUE, .io_init = rk29_backlight_io_init, .io_deinit = rk29_backlight_io_deinit, @@ -417,6 +418,16 @@ static struct sensor_platform_data lis3dh_info = { .orientation = {-1, 0, 0, 0, 0, 1, 0, -1, 0}, }; #endif +#if defined(CONFIG_CHARGER_CW2015) +struct cw2015_platform_data cw2015_info = { + .dc_det_pin = RK30_PIN0_PB2, + .batt_low_pin = RK30_PIN0_PB1, + //.charge_ok_pin = RK30_PIN0_PA6, + .dc_det_level = GPIO_LOW, + .batt_low_level = GPIO_LOW, + //.charge_ok_level = GPIO_HIGH, +}; +#endif #if defined (CONFIG_COMPASS_AK8975) static struct sensor_platform_data akm8975_info = { @@ -1521,7 +1532,14 @@ static struct i2c_board_info __initdata i2c0_info[] = { .flags = 0, }, #endif - +#if defined (CONFIG_CHARGER_CW2015) + { + .type = "cw2015", + .addr = 0x62, + .flags = 0, + .platform_data = &cw2015_info, + }, +#endif }; #endif @@ -1719,19 +1737,31 @@ static struct pmu_info act8846_dcdc_info[] = { .name = "vdd_core", //logic .min_uv = 1000000, .max_uv = 1000000, - .suspend_vol = 1000000, + #ifdef CONFIG_ACT8846_SUPPORT_RESET + .suspend_vol = 1200000, + #else + .suspend_vol = 900000, + #endif }, { .name = "vdd_cpu", //arm .min_uv = 1000000, .max_uv = 1000000, - .suspend_vol = 1000000, + #ifdef CONFIG_ACT8846_SUPPORT_RESET + .suspend_vol = 1200000, + #else + .suspend_vol = 900000, + #endif }, { .name = "act_dcdc4", //vccio .min_uv = 3300000, .max_uv = 3300000, + #ifdef CONFIG_ACT8846_SUPPORT_RESET + .suspend_vol = 3000000, + #else .suspend_vol = 2800000, + #endif }, }; @@ -1805,7 +1835,7 @@ static struct i2c_board_info __initdata i2c1_info[] = { .type = "act8846", .addr = 0x5a, .flags = 0, - .irq = ACT8846_HOST_IRQ, + // .irq = ACT8846_HOST_IRQ, .platform_data=&act8846_data, }, #endif @@ -1817,7 +1847,6 @@ static struct i2c_board_info __initdata i2c1_info[] = { .irq = RK30_PIN0_PB5, }, #endif - }; #endif @@ -2250,9 +2279,9 @@ static struct cpufreq_frequency_table dvfs_gpu_table[] = { }; static struct cpufreq_frequency_table dvfs_ddr_table[] = { -// {.frequency = 200 * 1000 + DDR_FREQ_SUSPEND, .index = 950 * 1000}, -// {.frequency = 300 * 1000 + DDR_FREQ_VIDEO, .index = 1000 * 1000}, - {.frequency = 533 * 1000 + DDR_FREQ_NORMAL, .index = 1200 * 1000}, + {.frequency = 200 * 1000 + DDR_FREQ_SUSPEND, .index = 950 * 1000}, + //{.frequency = 300 * 1000 + DDR_FREQ_VIDEO, .index = 1000 * 1000}, + {.frequency = 528 * 1000 + DDR_FREQ_NORMAL, .index = 1200 * 1000}, {.frequency = CPUFREQ_TABLE_END}, }; -- 2.34.1