From f37ee5ed2b7461f1327e1d56a3f452f19c0e2408 Mon Sep 17 00:00:00 2001 From: ddl Date: Fri, 12 Apr 2013 09:55:02 +0800 Subject: [PATCH] camera: modify camera sensor device register method for each board file --- arch/arm/mach-rk29/board-rk29-ddr3sdk.c | 18 +++++- arch/arm/mach-rk29/board-rk29-k97.c | 29 ++++++++- .../mach-rk2928/board-rk2928-a720-camera.c | 11 +++- .../board-rk2928-phonepad-760-camera.c | 27 ++++++++- .../arm/mach-rk2928/board-rk2928-sdk-camera.c | 19 +++++- arch/arm/mach-rk2928/board-rk2928-tb-camera.c | 9 ++- .../arm/mach-rk30/board-rk3066b-m701-camera.c | 18 +++++- arch/arm/mach-rk30/board-rk3066b-sdk-camera.c | 11 +++- arch/arm/mach-rk30/board-rk3168-86v-camera.c | 18 +++++- .../arm/mach-rk30/board-rk3168-LR097-camera.c | 59 +++++++++++++++++-- .../mach-rk30/board-rk3168-ds1006h-camera.c | 31 +++++++++- arch/arm/mach-rk30/board-rk3168-tb-camera.c | 14 +++++ .../mach-rk3188/board-rk3188-u30gt2-camera.c | 37 +++++++++++- 13 files changed, 272 insertions(+), 29 deletions(-) diff --git a/arch/arm/mach-rk29/board-rk29-ddr3sdk.c b/arch/arm/mach-rk29/board-rk29-ddr3sdk.c index 89d4cb12f771..43e138563462 100755 --- a/arch/arm/mach-rk29/board-rk29-ddr3sdk.c +++ b/arch/arm/mach-rk29/board-rk29-ddr3sdk.c @@ -105,12 +105,26 @@ Comprehensive camera device registration: */ static struct rkcamera_platform_data new_camera[] = { + new_camera_device(RK29_CAM_SENSOR_OV5642, + back, + RK29_PIN6_PB7, + 0, + 0, + 1, + 0), + new_camera_device(RK29_CAM_SENSOR_OV2659, + front, + RK29_PIN5_PD7, + 0, + 0, + 1, + 0), new_camera_device_end }; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5642 /* back camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_0 0x78 +#define CONFIG_SENSOR_IIC_ADDR_0 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 1 #define CONFIG_SENSOR_ORIENTATION_0 90 #define CONFIG_SENSOR_POWER_PIN_0 INVALID_GPIO @@ -176,7 +190,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_OV2659 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x60 +#define CONFIG_SENSOR_IIC_ADDR_1 0 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 1 #define CONFIG_SENSOR_ORIENTATION_1 270 #define CONFIG_SENSOR_POWER_PIN_1 INVALID_GPIO diff --git a/arch/arm/mach-rk29/board-rk29-k97.c b/arch/arm/mach-rk29/board-rk29-k97.c index 4933e1879d4e..d129bc56b211 100755 --- a/arch/arm/mach-rk29/board-rk29-k97.c +++ b/arch/arm/mach-rk29/board-rk29-k97.c @@ -102,13 +102,38 @@ Comprehensive camera device registration: */ static struct rkcamera_platform_data new_camera[] = { +#ifdef CONFIG_SOC_CAMERA_OV2655 + new_camera_device(RK29_CAM_SENSOR_OV2655, + back, + RK29_PIN5_PD7, + 0, + 0, + 1, + 0), +#endif +#ifdef CONFIG_SOC_CAMERA_OV9665 + new_camera_device(RK29_CAM_SENSOR_OV9665, + front, + RK29_PIN6_PB7, + 0, + 0, + 1, + 0), +#endif + new_camera_device(RK29_CAM_SENSOR_OV2655, + front, + RK29_PIN6_PB7, + 0, + 0, + 1, + 0), new_camera_device_end }; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #ifdef CONFIG_SOC_CAMERA_OV2655 #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV2655 /* back camera sensor *//* back camera sensor */ -#define CONFIG_SENSOR_IIC_ADDR_0 0x60 +#define CONFIG_SENSOR_IIC_ADDR_0 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 1 #define CONFIG_SENSOR_ORIENTATION_0 90 #define CONFIG_SENSOR_POWER_PIN_0 INVALID_GPIO @@ -131,7 +156,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_0 12504 #ifdef CONFIG_SOC_CAMERA_OV9665 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_OV9665 /* front camera sensor */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x60 +#define CONFIG_SENSOR_IIC_ADDR_1 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 1 #define CONFIG_SENSOR_ORIENTATION_1 0 #define CONFIG_SENSOR_POWER_PIN_1 INVALID_GPIO diff --git a/arch/arm/mach-rk2928/board-rk2928-a720-camera.c b/arch/arm/mach-rk2928/board-rk2928-a720-camera.c index c0b69f2679b7..de1c3973f860 100644 --- a/arch/arm/mach-rk2928/board-rk2928-a720-camera.c +++ b/arch/arm/mach-rk2928/board-rk2928-a720-camera.c @@ -33,7 +33,14 @@ Comprehensive camera device registration: mclk)\ // sensor input clock rate, 24 or 48 */ -static struct rkcamera_platform_data new_camera[] = { +static struct rkcamera_platform_data new_camera[] = { + new_camera_device(RK29_CAM_SENSOR_GC0308, + front, + RK2928_PIN3_PB3, + 0, + 0, + 1, + 0), new_camera_device_end }; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ @@ -108,7 +115,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_GC0308 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x42 +#define CONFIG_SENSOR_IIC_ADDR_1 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 1 #define CONFIG_SENSOR_CIF_INDEX_1 0 #define CONFIG_SENSOR_ORIENTATION_1 270 diff --git a/arch/arm/mach-rk2928/board-rk2928-phonepad-760-camera.c b/arch/arm/mach-rk2928/board-rk2928-phonepad-760-camera.c index a87323fe7f72..7daec0e77d1d 100755 --- a/arch/arm/mach-rk2928/board-rk2928-phonepad-760-camera.c +++ b/arch/arm/mach-rk2928/board-rk2928-phonepad-760-camera.c @@ -34,12 +34,33 @@ Comprehensive camera device registration: */ static struct rkcamera_platform_data new_camera[] = { + new_camera_device(RK29_CAM_SENSOR_GC2035, + back, + RK2928_PIN3_PB3, + 0, + 0, + 1, + 0), + new_camera_device(RK29_CAM_SENSOR_GC0308, + front, + RK2928_PIN3_PD7, + 0, + 0, + 1, + 0), + new_camera_device(RK29_CAM_SENSOR_GC0329, + front, + RK2928_PIN3_PD7, + 0, + 0, + 1, + 0), new_camera_device_end }; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_GC2035 /* back camera sensor */ -#define CONFIG_SENSOR_IIC_ADDR_0 0x78 +#define CONFIG_SENSOR_IIC_ADDR_0 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 1 #define CONFIG_SENSOR_CIF_INDEX_0 0 #define CONFIG_SENSOR_ORIENTATION_0 90 @@ -108,7 +129,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_GC0308 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x42 +#define CONFIG_SENSOR_IIC_ADDR_1 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 1 #define CONFIG_SENSOR_CIF_INDEX_1 0 #define CONFIG_SENSOR_ORIENTATION_1 270 @@ -131,7 +152,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_1 30000 #define CONFIG_SENSOR_11 RK29_CAM_SENSOR_GC0329 /* front camera sensor 1 */ -#define CONFIG_SENSOR_IIC_ADDR_11 0x62 +#define CONFIG_SENSOR_IIC_ADDR_11 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_11 1 #define CONFIG_SENSOR_CIF_INDEX_11 0 #define CONFIG_SENSOR_ORIENTATION_11 90 diff --git a/arch/arm/mach-rk2928/board-rk2928-sdk-camera.c b/arch/arm/mach-rk2928/board-rk2928-sdk-camera.c index 1ae48b0deb87..13adc5faca94 100755 --- a/arch/arm/mach-rk2928/board-rk2928-sdk-camera.c +++ b/arch/arm/mach-rk2928/board-rk2928-sdk-camera.c @@ -34,6 +34,23 @@ Comprehensive camera device registration: */ static struct rkcamera_platform_data new_camera[] = { +#if defined(CONFIG_MACH_RK2928_SDK) + new_camera_device(RK29_CAM_SENSOR_GC0308, + front, + RK2928_PIN3_PD7, + 0, + 0, + 1, + 0), +#else + new_camera_device(RK29_CAM_SENSOR_GC0308, + front, + RK2928_PIN3_PB3, + 0, + 0, + 1, + 0), +#endif new_camera_device_end }; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ @@ -108,7 +125,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_GC0308 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x42 +#define CONFIG_SENSOR_IIC_ADDR_1 0 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 1 #define CONFIG_SENSOR_CIF_INDEX_1 0 #define CONFIG_SENSOR_ORIENTATION_1 270 diff --git a/arch/arm/mach-rk2928/board-rk2928-tb-camera.c b/arch/arm/mach-rk2928/board-rk2928-tb-camera.c index 5dc0edc3e40e..1b355f74eda8 100644 --- a/arch/arm/mach-rk2928/board-rk2928-tb-camera.c +++ b/arch/arm/mach-rk2928/board-rk2928-tb-camera.c @@ -34,12 +34,19 @@ Comprehensive camera device registration: */ static struct rkcamera_platform_data new_camera[] = { + new_camera_device(RK29_CAM_SENSOR_OV5642, + back, + RK2928_PIN3_PB3, + 0, + 0, + 0, + 0), new_camera_device_end }; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5642 /* back camera sensor */ -#define CONFIG_SENSOR_IIC_ADDR_0 0x78// 0 +#define CONFIG_SENSOR_IIC_ADDR_0 0 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 0 #define CONFIG_SENSOR_CIF_INDEX_0 0 #define CONFIG_SENSOR_ORIENTATION_0 90 diff --git a/arch/arm/mach-rk30/board-rk3066b-m701-camera.c b/arch/arm/mach-rk30/board-rk3066b-m701-camera.c index 2264a81a3146..7c2a8d1a6b91 100644 --- a/arch/arm/mach-rk30/board-rk3066b-m701-camera.c +++ b/arch/arm/mach-rk30/board-rk3066b-m701-camera.c @@ -35,13 +35,27 @@ Comprehensive camera device registration: */ static struct rkcamera_platform_data new_camera[] = { + new_camera_device(RK29_CAM_SENSOR_HI253, + back, + RK30_PIN3_PB5, + 0, + 0, + 4, + 0), + new_camera_device(RK29_CAM_SENSOR_HI704, + front, + RK30_PIN3_PB4, + 0, + 0, + 4, + 0), new_camera_device_end }; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_HI253 /* back camera sensor */ -#define CONFIG_SENSOR_IIC_ADDR_0 0x40 +#define CONFIG_SENSOR_IIC_ADDR_0 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 4 #define CONFIG_SENSOR_ORIENTATION_0 90 #define CONFIG_SENSOR_POWER_PIN_0 INVALID_GPIO @@ -108,7 +122,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_HI704 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x60 +#define CONFIG_SENSOR_IIC_ADDR_1 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 4 #define CONFIG_SENSOR_ORIENTATION_1 270 #define CONFIG_SENSOR_POWER_PIN_1 INVALID_GPIO diff --git a/arch/arm/mach-rk30/board-rk3066b-sdk-camera.c b/arch/arm/mach-rk30/board-rk3066b-sdk-camera.c index 66c32c19d924..75bb1a62eedf 100755 --- a/arch/arm/mach-rk30/board-rk3066b-sdk-camera.c +++ b/arch/arm/mach-rk30/board-rk3066b-sdk-camera.c @@ -33,7 +33,14 @@ Comprehensive camera device registration: mclk)\ // sensor input clock rate, 24 or 48 */ -static struct rkcamera_platform_data new_camera[] = { +static struct rkcamera_platform_data new_camera[] = { + new_camera_device(RK29_CAM_SENSOR_OV2659, + front, + RK30_PIN2_PC7, + 0, + 0, + 3, + 0), new_camera_device_end }; @@ -107,7 +114,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_OV2659 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x60 +#define CONFIG_SENSOR_IIC_ADDR_1 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 3 #define CONFIG_SENSOR_ORIENTATION_1 270 #define CONFIG_SENSOR_POWER_PIN_1 INVALID_GPIO diff --git a/arch/arm/mach-rk30/board-rk3168-86v-camera.c b/arch/arm/mach-rk30/board-rk3168-86v-camera.c index f61ea0e32908..b5f185d2a2c5 100755 --- a/arch/arm/mach-rk30/board-rk3168-86v-camera.c +++ b/arch/arm/mach-rk30/board-rk3168-86v-camera.c @@ -34,13 +34,27 @@ Comprehensive camera device registration: */ static struct rkcamera_platform_data new_camera[] = { + new_camera_device(RK29_CAM_SENSOR_OV2659, + back, + RK30_PIN3_PB5, + 0, + 0, + 3, + 0), + new_camera_device(RK29_CAM_SENSOR_GC0308, + front, + RK30_PIN3_PB4, + 0, + 0, + 3, + 0), new_camera_device_end }; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV2659 /* back camera sensor */ -#define CONFIG_SENSOR_IIC_ADDR_0 0x60 +#define CONFIG_SENSOR_IIC_ADDR_0 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 3 #define CONFIG_SENSOR_ORIENTATION_0 90 #define CONFIG_SENSOR_POWER_PIN_0 INVALID_GPIO @@ -107,7 +121,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_GC0308 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x42 +#define CONFIG_SENSOR_IIC_ADDR_1 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 3 #define CONFIG_SENSOR_ORIENTATION_1 270 #define CONFIG_SENSOR_POWER_PIN_1 INVALID_GPIO diff --git a/arch/arm/mach-rk30/board-rk3168-LR097-camera.c b/arch/arm/mach-rk30/board-rk3168-LR097-camera.c index a4ee55222985..b5af93e8b34b 100644 --- a/arch/arm/mach-rk30/board-rk3168-LR097-camera.c +++ b/arch/arm/mach-rk30/board-rk3168-LR097-camera.c @@ -34,12 +34,59 @@ Comprehensive camera device registration: */ static struct rkcamera_platform_data new_camera[] = { + new_camera_device(RK29_CAM_SENSOR_OV2659, + back, + RK30_PIN3_PB5, + 0, + 0, + 3, + 0), + + new_camera_device(RK29_CAM_SENSOR_SP2518, + back, + RK30_PIN3_PB5, + 0, + 0, + 3, + 0), + + new_camera_device(RK29_CAM_SENSOR_GC2035, + back, + RK30_PIN3_PB5, + 0, + 0, + 3, + 0), + + new_camera_device(RK29_CAM_SENSOR_OV2659, + front, + RK30_PIN3_PB4, + 0, + 0, + 3, + 0), + + new_camera_device(RK29_CAM_SENSOR_SP2518, + front, + RK30_PIN3_PB4, + 0, + 0, + 3, + 0), + + new_camera_device(RK29_CAM_SENSOR_GC2035, + front, + RK30_PIN3_PB4, + 0, + 0, + 3, + 0), new_camera_device_end }; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV2659 /* back camera sensor */ -#define CONFIG_SENSOR_IIC_ADDR_0 0x60 +#define CONFIG_SENSOR_IIC_ADDR_0 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 3 #define CONFIG_SENSOR_ORIENTATION_0 90 #define CONFIG_SENSOR_POWER_PIN_0 INVALID_GPIO @@ -61,7 +108,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_0 30000 #define CONFIG_SENSOR_01 RK29_CAM_SENSOR_SP2518 /* back camera sensor 1 */ -#define CONFIG_SENSOR_IIC_ADDR_01 0x60 +#define CONFIG_SENSOR_IIC_ADDR_01 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_01 3 #define CONFIG_SENSOR_ORIENTATION_01 90 #define CONFIG_SENSOR_POWER_PIN_01 INVALID_GPIO @@ -83,7 +130,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_01 30000 #define CONFIG_SENSOR_02 RK29_CAM_SENSOR_GC2035 /* back camera sensor 2 */ -#define CONFIG_SENSOR_IIC_ADDR_02 0x78 +#define CONFIG_SENSOR_IIC_ADDR_02 0x00 #define CONFIG_SENSOR_CIF_INDEX_02 0 #define CONFIG_SENSOR_IIC_ADAPTER_ID_02 3 #define CONFIG_SENSOR_ORIENTATION_02 90 @@ -106,7 +153,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_OV2659 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x60 +#define CONFIG_SENSOR_IIC_ADDR_1 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 3 #define CONFIG_SENSOR_ORIENTATION_1 270 #define CONFIG_SENSOR_POWER_PIN_1 INVALID_GPIO @@ -128,7 +175,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_1 30000 #define CONFIG_SENSOR_11 RK29_CAM_SENSOR_SP2518 /* front camera sensor 1 */ -#define CONFIG_SENSOR_IIC_ADDR_11 0x60 +#define CONFIG_SENSOR_IIC_ADDR_11 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_11 3 #define CONFIG_SENSOR_ORIENTATION_11 270 #define CONFIG_SENSOR_POWER_PIN_11 INVALID_GPIO @@ -150,7 +197,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_11 30000 #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_ADDR_12 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_12 3 #define CONFIG_SENSOR_ORIENTATION_12 270 #define CONFIG_SENSOR_POWER_PIN_12 INVALID_GPIO diff --git a/arch/arm/mach-rk30/board-rk3168-ds1006h-camera.c b/arch/arm/mach-rk30/board-rk3168-ds1006h-camera.c index 4ac0a2a2d097..956b9f2a0133 100644 --- a/arch/arm/mach-rk30/board-rk3168-ds1006h-camera.c +++ b/arch/arm/mach-rk30/board-rk3168-ds1006h-camera.c @@ -33,13 +33,38 @@ Comprehensive camera device registration: mclk)\ // sensor input clock rate, 24 or 48 */ -static struct rkcamera_platform_data new_camera[] = { +static struct rkcamera_platform_data new_camera[] = { + + new_camera_device_ex(RK29_CAM_SENSOR_OV5640, + back, + INVALID_VALUE, + INVALID_VALUE, + INVALID_VALUE, + INVALID_VALUE, + INVALID_VALUE, + RK30_PIN3_PB5, + CONS(RK29_CAM_SENSOR_OV5640,_PWRDN_ACTIVE), + 1, + CONS(RK29_CAM_SENSOR_OV5640,_FULL_RESOLUTION), + 0x00, + 3, + 100000, + CONS(RK29_CAM_SENSOR_OV5640,_I2C_ADDR), + 0, + 24), + new_camera_device(RK29_CAM_SENSOR_OV2659, + front, + RK30_PIN3_PB4, + 0, + 0, + 3, + 0), new_camera_device_end }; /*---------------- 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 0x78 +#define CONFIG_SENSOR_IIC_ADDR_0 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 3 #define CONFIG_SENSOR_ORIENTATION_0 90 #define CONFIG_SENSOR_POWER_PIN_0 INVALID_GPIO @@ -106,7 +131,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_OV2659 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x60 +#define CONFIG_SENSOR_IIC_ADDR_1 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 3 #define CONFIG_SENSOR_ORIENTATION_1 270 #define CONFIG_SENSOR_POWER_PIN_1 INVALID_GPIO diff --git a/arch/arm/mach-rk30/board-rk3168-tb-camera.c b/arch/arm/mach-rk30/board-rk3168-tb-camera.c index 322013d93f5f..8865cc8465e3 100755 --- a/arch/arm/mach-rk30/board-rk3168-tb-camera.c +++ b/arch/arm/mach-rk30/board-rk3168-tb-camera.c @@ -34,6 +34,20 @@ Comprehensive camera device registration: */ static struct rkcamera_platform_data new_camera[] = { + new_camera_device(RK29_CAM_SENSOR_OV5640, + back, + RK30_PIN3_PB5, + 0, + 0, + 4, + 0), + new_camera_device(RK29_CAM_SENSOR_OV2659, + front, + RK30_PIN3_PB4, + 0, + 0, + 3, + 0), new_camera_device_end }; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ diff --git a/arch/arm/mach-rk3188/board-rk3188-u30gt2-camera.c b/arch/arm/mach-rk3188/board-rk3188-u30gt2-camera.c index 30fc9258b34b..90c3f6f66b19 100755 --- a/arch/arm/mach-rk3188/board-rk3188-u30gt2-camera.c +++ b/arch/arm/mach-rk3188/board-rk3188-u30gt2-camera.c @@ -34,12 +34,43 @@ Comprehensive camera device registration: */ static struct rkcamera_platform_data new_camera[] = { + new_camera_device_ex(RK29_CAM_SENSOR_OV5640, + back, + INVALID_VALUE, + INVALID_VALUE, + INVALID_VALUE, + INVALID_VALUE, + INVALID_VALUE, + RK30_PIN3_PB4, + CONS(RK29_CAM_SENSOR_OV5640,_PWRDN_ACTIVE), + 1, + CONS(RK29_CAM_SENSOR_OV5640,_FULL_RESOLUTION), + 0x00, + 3, + 100000, + CONS(RK29_CAM_SENSOR_OV5640,_I2C_ADDR), + 0, + 24), + new_camera_device(RK29_CAM_SENSOR_OV2659, + front, + RK30_PIN3_PB5, + 0, + 0, + 3, + 0), + new_camera_device(RK29_CAM_SENSOR_GC0308, + front, + RK30_PIN3_PB5, + 0, + 0, + 3, + 0), new_camera_device_end }; /*---------------- 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 0x78 +#define CONFIG_SENSOR_IIC_ADDR_0 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 3 #define CONFIG_SENSOR_ORIENTATION_0 90 #define CONFIG_SENSOR_POWER_PIN_0 INVALID_GPIO @@ -106,7 +137,7 @@ static struct rkcamera_platform_data new_camera[] = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_GC0308 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x42 +#define CONFIG_SENSOR_IIC_ADDR_1 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 3 #define CONFIG_SENSOR_ORIENTATION_1 270 #define CONFIG_SENSOR_POWER_PIN_1 INVALID_GPIO @@ -128,7 +159,7 @@ static struct rkcamera_platform_data new_camera[] = { #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 0x60 +#define CONFIG_SENSOR_IIC_ADDR_11 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_11 3 #define CONFIG_SENSOR_ORIENTATION_11 270 #define CONFIG_SENSOR_POWER_PIN_11 INVALID_GPIO -- 2.34.1