|
@@ -44,6 +44,8 @@
|
|
|
|
|
|
struct cam_camnoc_info *camnoc_info[CAM_CAMNOC_HW_TYPE_MAX];
|
|
struct cam_camnoc_info *camnoc_info[CAM_CAMNOC_HW_TYPE_MAX];
|
|
struct cam_cpas_info *cpas_info;
|
|
struct cam_cpas_info *cpas_info;
|
|
|
|
+struct cam_cpas_camnoc_qchannel *qchannel_info;
|
|
|
|
+struct cam_cpas_top_regs *cpas_top_info;
|
|
|
|
|
|
#if (defined(CONFIG_CAM_TEST_IRQ_LINE) && defined(CONFIG_CAM_TEST_IRQ_LINE_AT_PROBE))
|
|
#if (defined(CONFIG_CAM_TEST_IRQ_LINE) && defined(CONFIG_CAM_TEST_IRQ_LINE_AT_PROBE))
|
|
struct completion test_irq_hw_complete[CAM_CAMNOC_HW_TYPE_MAX];
|
|
struct completion test_irq_hw_complete[CAM_CAMNOC_HW_TYPE_MAX];
|
|
@@ -1290,6 +1292,33 @@ static int cam_cpastop_get_hw_capability(struct cam_hw_info *cpas_hw)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int cam_cpastop_set_tpg_mux_sel(struct cam_hw_info *cpas_hw,
|
|
|
|
+ uint32_t tpg_mux)
|
|
|
|
+{
|
|
|
|
+ struct cam_cpas *cpas_core = (struct cam_cpas *) cpas_hw->core_info;
|
|
|
|
+ struct cam_hw_soc_info *soc_info = &cpas_hw->soc_info;
|
|
|
|
+ int reg_cpas_top;
|
|
|
|
+ uint32_t curr_tpg_mux = 0;
|
|
|
|
+
|
|
|
|
+ reg_cpas_top = cpas_core->regbase_index[CAM_CPAS_REG_CPASTOP];
|
|
|
|
+
|
|
|
|
+ if (cpas_top_info == NULL)
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
|
|
+ if (!cpas_top_info->tpg_mux_sel_enabled)
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
|
|
+ curr_tpg_mux = cam_io_r_mb(soc_info->reg_map[reg_cpas_top].mem_base +
|
|
|
|
+ cpas_top_info->tpg_mux_sel);
|
|
|
|
+
|
|
|
|
+ curr_tpg_mux = curr_tpg_mux | ((1 << tpg_mux) << cpas_top_info->tpg_mux_sel_shift);
|
|
|
|
+ cam_io_w_mb(curr_tpg_mux, soc_info->reg_map[reg_cpas_top].mem_base +
|
|
|
|
+ cpas_top_info->tpg_mux_sel);
|
|
|
|
+ CAM_DBG(CAM_CPAS, "SET TPG MUX to 0x%x", curr_tpg_mux);
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static int cam_cpastop_init_hw_version(struct cam_hw_info *cpas_hw,
|
|
static int cam_cpastop_init_hw_version(struct cam_hw_info *cpas_hw,
|
|
struct cam_cpas_hw_caps *hw_caps)
|
|
struct cam_cpas_hw_caps *hw_caps)
|
|
{
|
|
{
|
|
@@ -1299,6 +1328,9 @@ static int cam_cpastop_init_hw_version(struct cam_hw_info *cpas_hw,
|
|
struct cam_cpas_cesta_info *cesta_info = NULL;
|
|
struct cam_cpas_cesta_info *cesta_info = NULL;
|
|
struct cam_camnoc_info *alloc_camnoc_info[CAM_CAMNOC_HW_TYPE_MAX] = {0};
|
|
struct cam_camnoc_info *alloc_camnoc_info[CAM_CAMNOC_HW_TYPE_MAX] = {0};
|
|
|
|
|
|
|
|
+ qchannel_info = NULL;
|
|
|
|
+ cpas_top_info = NULL;
|
|
|
|
+
|
|
CAM_DBG(CAM_CPAS,
|
|
CAM_DBG(CAM_CPAS,
|
|
"hw_version=0x%x Camera Version %d.%d.%d, cpas version %d.%d.%d",
|
|
"hw_version=0x%x Camera Version %d.%d.%d, cpas version %d.%d.%d",
|
|
soc_info->hw_version,
|
|
soc_info->hw_version,
|
|
@@ -1389,6 +1421,7 @@ static int cam_cpastop_init_hw_version(struct cam_hw_info *cpas_hw,
|
|
case CAM_CPAS_TITAN_640_V200:
|
|
case CAM_CPAS_TITAN_640_V200:
|
|
alloc_camnoc_info[CAM_CAMNOC_HW_COMBINED] = &cam640_cpas200_camnoc_info;
|
|
alloc_camnoc_info[CAM_CAMNOC_HW_COMBINED] = &cam640_cpas200_camnoc_info;
|
|
cpas_info = &cam640_cpas200_cpas_info;
|
|
cpas_info = &cam640_cpas200_cpas_info;
|
|
|
|
+ cpas_top_info = &cam640_cpas200_cpas_top_info;
|
|
break;
|
|
break;
|
|
case CAM_CPAS_TITAN_880_V100:
|
|
case CAM_CPAS_TITAN_880_V100:
|
|
alloc_camnoc_info[CAM_CAMNOC_HW_COMBINED] = &cam880_cpas100_camnoc_info;
|
|
alloc_camnoc_info[CAM_CAMNOC_HW_COMBINED] = &cam880_cpas100_camnoc_info;
|
|
@@ -1489,6 +1522,7 @@ int cam_cpastop_get_internal_ops(struct cam_cpas_internal_ops *internal_ops)
|
|
internal_ops->print_poweron_settings =
|
|
internal_ops->print_poweron_settings =
|
|
cam_cpastop_print_poweron_settings;
|
|
cam_cpastop_print_poweron_settings;
|
|
internal_ops->qchannel_handshake = cam_cpastop_qchannel_handshake;
|
|
internal_ops->qchannel_handshake = cam_cpastop_qchannel_handshake;
|
|
|
|
+ internal_ops->set_tpg_mux_sel = cam_cpastop_set_tpg_mux_sel;
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|