Permalink
Browse files

blade: add support for S5K5CAGX camera sensor and fix msm_camera debu…

…gging

Also corrected typo claiming S5K5CAGX is 5MP. The specs from Samsung say 2048 x 1536 pixels (3.1MP) 1/5-inch.
  • Loading branch information...
1 parent 7faa7dc commit ba598a60bb03e02ffc4186ac90157729d96f6db7 @TomGiordano TomGiordano committed Oct 9, 2011
@@ -2115,6 +2115,30 @@ static struct platform_device msm_camera_sensor_s5k3e2fx = {
};
#endif
+#ifdef CONFIG_S5K5CAGX
+static struct msm_camera_sensor_flash_data flash_s5k5cagx = {
+ .flash_type = MSM_CAMERA_FLASH_LED,
+ .flash_src = &msm_flash_src
+};
+
+static struct msm_camera_sensor_info msm_camera_sensor_s5k5cagx_data = {
+ .sensor_name = "s5k5cagx",
+ .sensor_reset = 2,
+ .sensor_pwd = 1,
+ .vcm_pwd = 0,
+ .vcm_enable = 0,
+ .pdata = &msm_camera_device_data,
+ .flash_data = &flash_s5k5cagx
+};
+
+static struct platform_device msm_camera_sensor_s5k5cagx = {
+ .name = "msm_camera_s5k5cagx",
+ .dev = {
+ .platform_data = &msm_camera_sensor_s5k5cagx_data,
+ },
+};
+#endif
+
#ifdef CONFIG_MT9P012
static struct msm_camera_sensor_flash_data flash_mt9p012 = {
.flash_type = MSM_CAMERA_FLASH_LED,
@@ -2682,6 +2706,16 @@ static struct platform_device *devices[] __initdata = {
&msm_camera_sensor_ov5642,
#endif
+#ifdef CONFIG_S5K5CAGX
+ /*
+ * Commented by zh.shj
+ *
+ * Refer to drivers/media/video/msm/s5k5cagx.c
+ * For S5K5CAGX: 3.1Mp, 1/5-Inch System-On-A-Chip (SOC) CMOS Digital Image Sensor
+ */
+ &msm_camera_sensor_s5k5cagx,
+#endif
+
&hs_device,
&msm_batt_device,
#ifdef CONFIG_ANDROID_RAM_CONSOLE
@@ -59,6 +59,52 @@ int g_v4l2_opencnt;
static int camera_node;
static enum msm_camera_type camera_type[MSM_MAX_CAMERA_SENSORS];
+char * vfe_config_cmd[] = {
+ "CMD_GENERAL",
+ "CMD_AXI_CFG_OUT1",
+ "CMD_AXI_CFG_SNAP_O1_AND_O2",
+ "CMD_AXI_CFG_OUT2",
+ "CMD_PICT_T_AXI_CFG",
+ "CMD_PICT_M_AXI_CFG",
+ "CMD_RAW_PICT_AXI_CFG",
+ "CMD_FRAME_BUF_RELEASE",
+ "CMD_PREV_BUF_CFG",
+ "CMD_SNAP_BUF_RELEASE",
+ "CMD_SNAP_BUF_CFG",
+ "CMD_STATS_DISABLE",
+ "CMD_STATS_AEC_AWB_ENABLE",
+ "CMD_STATS_AF_ENABLE",
+ "CMD_STATS_AEC_ENABLE",
+ "CMD_STATS_AWB_ENABLE",
+ "CMD_STATS_ENABLE",
+ "CMD_STATS_AXI_CFG",
+ "CMD_STATS_AEC_AXI_CFG",
+ "CMD_STATS_AF_AXI_CFG",
+ "CMD_STATS_AWB_AXI_CFG",
+ "CMD_STATS_RS_AXI_CFG",
+ "CMD_STATS_CS_AXI_CFG",
+ "CMD_STATS_IHIST_AXI_CFG",
+ "CMD_STATS_SKIN_AXI_CFG",
+ "CMD_STATS_BUF_RELEASE",
+ "CMD_STATS_AEC_BUF_RELEASE",
+ "CMD_STATS_AF_BUF_RELEASE",
+ "CMD_STATS_AWB_BUF_RELEASE",
+ "CMD_STATS_RS_BUF_RELEASE",
+ "CMD_STATS_CS_BUF_RELEASE",
+ "CMD_STATS_IHIST_BUF_RELEASE",
+ "CMD_STATS_SKIN_BUF_RELEASE",
+ "UPDATE_STATS_INVALID",
+ "CMD_AXI_CFG_SNAP_GEMINI",
+ "CMD_AXI_CFG_SNAP",
+ "CMD_AXI_CFG_PREVIEW",
+ "CMD_AXI_CFG_VIDEO",
+ "CMD_STATS_IHIST_ENABLE",
+ "CMD_STATS_RS_ENABLE",
+ "CMD_STATS_CS_ENABLE",
+ "CMD_VPE",
+ "CMD_AXI_CFG_VPE",
+ NULL
+};
static uint32_t sensor_mount_angle[MSM_MAX_CAMERA_SENSORS];
@@ -3395,6 +3441,7 @@ int msm_camera_drv_start(struct platform_device *dev,
CDBG("%s: setting camera node %d\n", __func__, camera_node);
rc = msm_device_init(pmsm, sync, camera_node);
if (rc < 0) {
+ CDBG("%s: failed setting camera node", __func__);
msm_sync_destroy(sync);
kfree(pmsm);
goto drv_start_failed;
@@ -3407,6 +3454,7 @@ int msm_camera_drv_start(struct platform_device *dev,
if (camera_node == 1) {
rc = add_axi_qos();
if (rc < 0) {
+ CDBG("%s: failed add_axi_qos. rc=%d", __func__, rc);
msm_sync_destroy(sync);
kfree(pmsm);
return rc;
@@ -108,7 +108,7 @@ static ssize_t sensorinfo_show_name(struct sys_device *dev,
sprintf(sensor_name, "OV5642-5.0Mp-AF");
break;
case SENSOR_INFO_0X5CA_MODEL_ID:
- sprintf(sensor_name, "0x5ca-5.0Mp-AF");
+ sprintf(sensor_name, "0x5ca-3.1Mp-AF");
break;
default:
sprintf(sensor_name, "No sensor or error ID!");

1 comment on commit ba598a6

I made these changes in the Tureis board file and the camera still doesn't work. Do you know if the Tureis is using another sensor for the camera?

Please sign in to comment.