浏览代码

Merge "msm: camera: common: Add hw version checks for shima camera" into camera-kernel.lnx.4.0

Camera Software Integration 5 年之前
父节点
当前提交
071907ecf0

+ 2 - 1
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c

@@ -6134,7 +6134,8 @@ int cam_icp_hw_mgr_init(struct device_node *of_node, uint64_t *hw_mgr_hdl,
 	cam_cpas_get_cpas_hw_version(&camera_hw_version);
 
 	if ((camera_hw_version == CAM_CPAS_TITAN_480_V100) ||
-		(camera_hw_version == CAM_CPAS_TITAN_580_V100)) {
+		(camera_hw_version == CAM_CPAS_TITAN_580_V100) ||
+		(camera_hw_version == CAM_CPAS_TITAN_570_V200)) {
 		if (cam_caps & CPAS_TITAN_480_IPE0_BIT)
 			icp_hw_mgr.ipe0_enable = true;
 		if (cam_caps & CPAS_BPS_BIT)

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -1364,6 +1364,7 @@ static int cam_convert_hw_idx_to_ife_hw_num(int hw_idx)
 				return CAM_ISP_IFE4_LITE_HW;
 			break;
 		case CAM_CPAS_TITAN_580_V100:
+		case CAM_CPAS_TITAN_570_V200:
 			if (hw_idx == 0)
 				return CAM_ISP_IFE0_HW;
 			else if (hw_idx == 1)

+ 13 - 7
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c

@@ -354,8 +354,9 @@ static int cam_ife_match_vc_dt_pair(int32_t *vc, uint32_t *dt,
 		return -EINVAL;
 	}
 
-	if ((camera_hw_version != CAM_CPAS_TITAN_480_V100) &&
-		(camera_hw_version != CAM_CPAS_TITAN_580_V100))
+	if ((camera_hw_version != CAM_CPAS_TITAN_480_V100) ||
+		(camera_hw_version != CAM_CPAS_TITAN_580_V100) ||
+		(camera_hw_version != CAM_CPAS_TITAN_570_V200))
 		num_valid_vc_dt = 1;
 
 	switch (num_valid_vc_dt) {
@@ -1815,7 +1816,8 @@ static int cam_ife_csid_init_config_pxl_path(
 	CAM_DBG(CAM_ISP, "HW version: %x", camera_hw_version);
 
 	if ((camera_hw_version == CAM_CPAS_TITAN_480_V100) ||
-		(camera_hw_version == CAM_CPAS_TITAN_580_V100))
+		(camera_hw_version == CAM_CPAS_TITAN_580_V100) ||
+		(camera_hw_version == CAM_CPAS_TITAN_570_V200))
 		val |= (path_data->drop_enable <<
 			csid_reg->cmn_reg->drop_h_en_shift_val) |
 			(path_data->drop_enable <<
@@ -1837,7 +1839,8 @@ static int cam_ife_csid_init_config_pxl_path(
 
 	if (path_data->is_valid_vc1_dt1 &&
 		((camera_hw_version == CAM_CPAS_TITAN_480_V100) ||
-		(camera_hw_version == CAM_CPAS_TITAN_580_V100))) {
+		(camera_hw_version == CAM_CPAS_TITAN_580_V100) ||
+		(camera_hw_version == CAM_CPAS_TITAN_570_V200))) {
 		val = cam_io_r_mb(soc_info->reg_map[0].mem_base +
 			pxl_reg->csid_pxl_multi_vcdt_cfg0_addr);
 		val |= ((path_data->vc1 << 2) |
@@ -2304,7 +2307,8 @@ static int cam_ife_csid_init_config_rdi_path(
 
 	if (camera_hw_version == CAM_CPAS_TITAN_480_V100 ||
 		camera_hw_version == CAM_CPAS_TITAN_175_V130 ||
-		camera_hw_version == CAM_CPAS_TITAN_580_V100) {
+		camera_hw_version == CAM_CPAS_TITAN_580_V100 ||
+		camera_hw_version == CAM_CPAS_TITAN_570_V200) {
 		val |= (path_data->drop_enable <<
 			csid_reg->cmn_reg->drop_h_en_shift_val) |
 			(path_data->drop_enable <<
@@ -2318,7 +2322,8 @@ static int cam_ife_csid_init_config_rdi_path(
 
 	if (path_data->is_valid_vc1_dt1 &&
 		((camera_hw_version == CAM_CPAS_TITAN_480_V100) ||
-		(camera_hw_version == CAM_CPAS_TITAN_580_V100))) {
+		(camera_hw_version == CAM_CPAS_TITAN_580_V100) ||
+		(camera_hw_version == CAM_CPAS_TITAN_570_V200))) {
 		val = cam_io_r_mb(soc_info->reg_map[0].mem_base +
 			csid_reg->rdi_reg[id]->csid_rdi_multi_vcdt_cfg0_addr);
 		val |= ((path_data->vc1 << 2) |
@@ -2404,7 +2409,8 @@ static int cam_ife_csid_init_config_rdi_path(
 
 	/* Write max value to pixel drop period due to a bug in ver 480 HW */
 	if (((camera_hw_version == CAM_CPAS_TITAN_480_V100) ||
-		(camera_hw_version == CAM_CPAS_TITAN_580_V100)) &&
+		(camera_hw_version == CAM_CPAS_TITAN_580_V100) ||
+		(camera_hw_version == CAM_CPAS_TITAN_570_V200)) &&
 		path_data->drop_enable)
 		cam_io_w_mb(0x1F, soc_info->reg_map[0].mem_base +
 		csid_reg->rdi_reg[id]->csid_rdi_rpp_pix_drop_period_addr);

+ 2 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.c

@@ -91,6 +91,7 @@ int cam_vfe_reset_irq_top_half(uint32_t    evt_id,
 	switch (soc_info->hw_version) {
 	case CAM_CPAS_TITAN_480_V100:
 	case CAM_CPAS_TITAN_580_V100:
+	case CAM_CPAS_TITAN_570_V200:
 		if (!soc_private->is_ife_lite) {
 			if (th_payload->evt_status_arr[0] & 0x1) {
 				cam_io_w(0xFFFFFFFF, mem_base +
@@ -332,6 +333,7 @@ int cam_vfe_reset(void *hw_priv, void *reset_core_args, uint32_t arg_size)
 	switch (soc_info->hw_version) {
 	case CAM_CPAS_TITAN_480_V100:
 	case CAM_CPAS_TITAN_580_V100:
+	case CAM_CPAS_TITAN_570_V200:
 		if (!soc_private->is_ife_lite)
 			top_reset_irq_reg_mask[CAM_IFE_IRQ_CAMIF_REG_STATUS0]
 				= CAM_VFE_48X_TOP_RESET_MASK;

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_soc.c

@@ -61,6 +61,7 @@ static int cam_vfe_get_dt_properties(struct cam_hw_soc_info *soc_info)
 	switch (soc_info->hw_version) {
 	case CAM_CPAS_TITAN_480_V100:
 	case CAM_CPAS_TITAN_580_V100:
+	case CAM_CPAS_TITAN_570_V200:
 		num_ubwc_cfg = of_property_count_u32_elems(of_node,
 			"ubwc-static-cfg");
 

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_ver3.c

@@ -463,6 +463,7 @@ static int cam_vfe_camif_ver3_resource_start(
 	switch (soc_private->cpas_version) {
 	case CAM_CPAS_TITAN_480_V100:
 	case CAM_CPAS_TITAN_580_V100:
+	case CAM_CPAS_TITAN_570_V200:
 		epoch0_line_cfg = (rsrc_data->last_line -
 			rsrc_data->first_line) / 4;
 	/* epoch line cfg will still be configured at midpoint of the