msm: camera: sensor: Program SDR mask delay based on data rate

Program camera csiphy correctly by using sensor output data rate
information.

Change-Id: I34f4b6b88f645aa620c4d03be2d7905c0951fd4e
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
This commit is contained in:
Vijay kumar Tumati 2018-03-08 22:14:25 +05:30
parent 169e423524
commit 28b773c49c

View file

@ -52,6 +52,7 @@
#define MAX_DPHY_DATA_LN 4
#define CLOCK_OFFSET 0x700
#define CSIPHY_SOF_DEBUG_COUNT 2
#define GBPS 1000000000
#undef CDBG
#define CDBG(fmt, args...) pr_debug(fmt, ##args)
@ -281,11 +282,20 @@ static int msm_csiphy_3phase_lane_config(
csiphy_3ph_reg.mipi_csiphy_3ph_lnn_ctrl51.addr +
0x200*i);
}
msm_camera_io_w(csiphy_dev->ctrl_reg->csiphy_3ph_reg.
mipi_csiphy_3ph_lnn_ctrl25.data,
csiphybase + csiphy_dev->ctrl_reg->csiphy_3ph_reg.
mipi_csiphy_3ph_lnn_ctrl25.addr + 0x200*i);
if ((csiphy_dev->hw_version == CSIPHY_VERSION_V35) &&
((csiphy_params->data_rate /
csiphy_params->lane_cnt) > 2 * GBPS)) {
msm_camera_io_w(0x40,
csiphybase +
csiphy_dev->ctrl_reg->csiphy_3ph_reg.
mipi_csiphy_3ph_lnn_ctrl25.addr + 0x200*i);
} else {
msm_camera_io_w(csiphy_dev->ctrl_reg->csiphy_3ph_reg.
mipi_csiphy_3ph_lnn_ctrl25.data,
csiphybase +
csiphy_dev->ctrl_reg->csiphy_3ph_reg.
mipi_csiphy_3ph_lnn_ctrl25.addr + 0x200*i);
}
lane_mask >>= 1;
i++;
}