Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 340df2f2 authored by Vijay kumar Tumati's avatar Vijay kumar Tumati Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarVijay kumar Tumati <vtumati@codeaurora.org>
parent ee4cc1c2
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -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);
		}
		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.
				csiphybase +
				csiphy_dev->ctrl_reg->csiphy_3ph_reg.
				mipi_csiphy_3ph_lnn_ctrl25.addr + 0x200*i);

		}
		lane_mask >>= 1;
		i++;
	}