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

Commit c717a488 authored by Tony Lijo Jose's avatar Tony Lijo Jose Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: csiphy: update csiphy data rate settings for sm8150



Add csiphy registers based on the incoming data rate.

Change-Id: I8276918f0b9214a14b54b365778e82aa1c1a2ebd
Signed-off-by: default avatarTony Lijo Jose <tjose@codeaurora.org>
parent 0c5592f3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -253,7 +253,8 @@ int32_t cam_csiphy_parse_dt_info(struct platform_device *pdev,
		csiphy_dev->is_csiphy_3phase_hw = CSI_3PHASE_HW;
		csiphy_dev->hw_version = CSIPHY_VERSION_V11;
		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_1;
	} else if (of_device_is_compatible(soc_info->dev->of_node,
		"qcom,csiphy-v1.2")) {
		csiphy_dev->ctrl_reg->csiphy_2ph_reg = csiphy_2ph_v1_2_reg;
+29 −0
Original line number Diff line number Diff line
@@ -504,4 +504,33 @@ struct csiphy_reg_t
	},
};


struct data_rate_settings_t data_rate_delta_table_1_1 = {
	.num_data_rate_settings = 2,
	.data_rate_settings = {
		{
			// data rate <= 2.3 Gsps
			// max bandwidth = 2.3 * 2.28 * (10**3) Mbps
			.bandwidth = 5243000000,
			.data_rate_reg_array_size = 3,
			.csiphy_data_rate_regs = {
				{0x09B0, 0x23, 0x00, CSIPHY_DEFAULT_PARAMS},
				{0x0AB0, 0x23, 0x00, CSIPHY_DEFAULT_PARAMS},
				{0x0BB0, 0x23, 0x00, CSIPHY_DEFAULT_PARAMS}
			}
		},
		{
			// 2.3 Gsps <= data rate <= 2.5 Gsps
			// max bandwidth = 2.5 * 2.28 * (10**3) Mbps
			.bandwidth = 5700000000,
			.data_rate_reg_array_size = 3,
			.csiphy_data_rate_regs = {
				{0x09B0, 0x22, 0x00, CSIPHY_DEFAULT_PARAMS},
				{0x0AB0, 0x22, 0x00, CSIPHY_DEFAULT_PARAMS},
				{0x0BB0, 0x22, 0x00, CSIPHY_DEFAULT_PARAMS}
			}
		}
	}
};

#endif /* _CAM_CSIPHY_D5_0_HWREG_H_ */