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

Commit c83cfeab authored by Vijay kumar Tumati's avatar Vijay kumar Tumati Committed by Ebrahim Shaik
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>
Signed-off-by: default avatarAbhishek Jain <abhij@codeaurora.org>
Signed-off-by: default avatarEbrahim Shaik <eshaik@codeaurora.org>
parent 6150c9ff
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@
#define SNPS_INTERPHY_OFFSET                      0x800
#define SET_THE_BIT(x)                            (0x1 << x)
#define SNPS_MAX_DATA_RATE_PER_LANE               2500000000ULL
#define GBPS                                      1000000000

#undef CDBG
#define CDBG(fmt, args...) pr_debug(fmt, ##args)
@@ -769,11 +770,20 @@ static int msm_csiphy_3phase_lane_config(
				.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++;
	}