msm: camera: csiphy: Enable multi-datarate support for csiphy v1.2
Enable support for multiple data rates (2.5/3.5/4.5 Gsps) for csiphy v1.2 driver. CRs-Fixed: 2542855 Change-Id: Idbe299aca210e30d732304e77e2a8191c8809f09 Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
This commit is contained in:
Родитель
a62a432522
Коммит
3205f18e3c
|
@ -269,7 +269,7 @@ int32_t cam_csiphy_parse_dt_info(struct platform_device *pdev,
|
|||
csiphy_dev->hw_version = CSIPHY_VERSION_V12;
|
||||
csiphy_dev->clk_lane = 0;
|
||||
csiphy_dev->ctrl_reg->data_rates_settings_table =
|
||||
&data_rate_delta_table;
|
||||
&data_rate_delta_table_1_2;
|
||||
} else if (of_device_is_compatible(soc_info->dev->of_node,
|
||||
"qcom,csiphy-v1.2.1")) {
|
||||
csiphy_dev->ctrl_reg->csiphy_2ph_reg = csiphy_2ph_v1_2_1_reg;
|
||||
|
@ -308,7 +308,8 @@ int32_t cam_csiphy_parse_dt_info(struct platform_device *pdev,
|
|||
csiphy_dev->is_divisor_32_comp = false;
|
||||
csiphy_dev->hw_version = CSIPHY_VERSION_V12;
|
||||
csiphy_dev->clk_lane = 0;
|
||||
csiphy_dev->ctrl_reg->data_rates_settings_table = NULL;
|
||||
csiphy_dev->ctrl_reg->data_rates_settings_table =
|
||||
&data_rate_delta_table_1_2;
|
||||
} else if (of_device_is_compatible(soc_info->dev->of_node,
|
||||
"qcom,csiphy-v2.0")) {
|
||||
csiphy_dev->ctrl_reg->csiphy_2ph_reg = csiphy_2ph_v2_0_reg;
|
||||
|
|
|
@ -376,17 +376,14 @@ csiphy_reg_t csiphy_3ph_v1_2_reg[MAX_LANES][MAX_SETTINGS_PER_LANE] = {
|
|||
},
|
||||
};
|
||||
|
||||
struct data_rate_settings_t data_rate_delta_table = {
|
||||
struct data_rate_settings_t data_rate_delta_table_1_2 = {
|
||||
.num_data_rate_settings = 3,
|
||||
.data_rate_settings = {
|
||||
{
|
||||
/* (2.5 * 10**3 * 2.28) rounded value*/
|
||||
.bandwidth = 5700000000,
|
||||
.data_rate_reg_array_size = 9,
|
||||
.data_rate_reg_array_size = 6,
|
||||
.csiphy_data_rate_regs = {
|
||||
{0x9B4, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0xAB4, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0xBB4, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x144, 0x22, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x344, 0x22, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x544, 0x22, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
|
@ -398,11 +395,8 @@ struct data_rate_settings_t data_rate_delta_table = {
|
|||
{
|
||||
/* (3.5 * 10**3 * 2.28) rounded value */
|
||||
.bandwidth = 7980000000,
|
||||
.data_rate_reg_array_size = 18,
|
||||
.data_rate_reg_array_size = 15,
|
||||
.csiphy_data_rate_regs = {
|
||||
{0x9B4, 0x03, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0xAB4, 0x03, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0xBB4, 0x03, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x144, 0xB2, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x344, 0xB2, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x544, 0xB2, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
|
@ -418,17 +412,13 @@ struct data_rate_settings_t data_rate_delta_table = {
|
|||
{0x10C, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x30C, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x50C, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
/* (4.5 * 10**3 * 2.28) rounded value */
|
||||
.bandwidth = 10260000000,
|
||||
.data_rate_reg_array_size = 18,
|
||||
.data_rate_reg_array_size = 15,
|
||||
.csiphy_data_rate_regs = {
|
||||
{0x9B4, 0x03, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0xAB4, 0x03, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0xBB4, 0x03, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x144, 0xB2, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x344, 0xB2, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
{0x544, 0xB2, 0x00, CSIPHY_DEFAULT_PARAMS},
|
||||
|
|
Загрузка…
Ссылка в новой задаче