camera: update board-rk30-ds975.c for new_camera struct
authorddl <ddl@rock-chips.com>
Mon, 15 Apr 2013 07:26:28 +0000 (15:26 +0800)
committerddl <ddl@rock-chips.com>
Mon, 15 Apr 2013 07:26:28 +0000 (15:26 +0800)
arch/arm/mach-rk30/board-rk30-ds975.c

index 5b821b2609ecc5d2c8fcc3f05112c5c0803d48d5..303256212149566dc9d0d8575777de28ecc61088 100755 (executable)
@@ -194,10 +194,61 @@ struct rk29_keys_platform_data rk29_keys_pdata = {
 #define RK30_IPP_MEM_SIZE 8*SZ_1M
 #endif
 #ifdef CONFIG_VIDEO_RK29
+#include <plat/rk_camera.h>
+/* Notes:
+
+Simple camera device registration:
+
+       new_camera_device(sensor_name,\       // sensor name, it is equal to CONFIG_SENSOR_X
+                          face,\              // sensor face information, it can be back or front
+                          pwdn_io,\           // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX
+                          flash_attach,\      // sensor is attach flash or not
+                          mir,\               // sensor image mirror and flip control information
+                          i2c_chl,\           // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X
+                          cif_chl)  \         // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X
+
+Comprehensive camera device registration:
+
+      new_camera_device_ex(sensor_name,\
+                             face,\
+                             ori,\            // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X
+                             pwr_io,\         // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX
+                             pwr_active,\     // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X
+                             rst_io,\         // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX
+                             rst_active,\     // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X
+                             pwdn_io,\
+                             pwdn_active,\    // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X
+                             flash_attach,\
+                             res,\            // sensor resolution, this is real resolution or resoltuion after interpolate
+                             mir,\
+                             i2c_chl,\
+                             i2c_spd,\        // i2c speed , 100000 = 100KHz
+                             i2c_addr,\       // the i2c slave device address for sensor
+                             cif_chl,\
+                             mclk)\           // sensor input clock rate, 24 or 48
+                          
+*/
+static struct rkcamera_platform_data new_camera[] = {                          
+    new_camera_device(RK29_CAM_SENSOR_OV2659,
+                        back,
+                        RK30_PIN1_PD6,
+                        0,
+                        0,
+                        3,
+                        0),  
+    new_camera_device(RK29_CAM_SENSOR_OV2659,
+                        front,
+                        RK30_PIN1_PB7,
+                        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_CIF_INDEX_0                    0
 #define CONFIG_SENSOR_ORIENTATION_0      90
@@ -266,7 +317,7 @@ struct rk29_keys_platform_data rk29_keys_pdata = {
 #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_CIF_INDEX_1                                0
 #define CONFIG_SENSOR_ORIENTATION_1       270