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

Commit 18a9493a authored by Jigarkumar Zala's avatar Jigarkumar Zala
Browse files

msm: camera: Add csiphy hardware support



Add csiphy hardware configuration register support.

Change-Id: I5b7e9fef1d58100d3e367b832e6ac1307263e721
Signed-off-by: default avatarJigarkumar Zala <jzala@codeaurora.org>
parent 6f545b76
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@ First Level Node - CSIPHY device
- compatible
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,csiphy-v1.0", "qcom,csiphy".
  Definition: Should be "qcom,csiphy-v1.0",
	"qcom,csiphy-v1.1", "qcom,csiphy".

- cell-index: csiphy hardware core index
  Usage: required
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@
#define MAX_CSIPHY_CMN_REG_ARRAY    5

#define MAX_LANES             5
#define MAX_SETTINGS_PER_LANE 20
#define MAX_SETTINGS_PER_LANE 42

#define MAX_REGULATOR         5
#define CAMX_CSIPHY_DEV_NAME "cam-csiphy-driver"
+22 −3
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

#include "cam_csiphy_soc.h"
#include "cam_csiphy_core.h"
#include "include/cam_csiphy_1_1_hwreg.h"
#include "include/cam_csiphy_1_0_hwreg.h"

#define BYTES_PER_REGISTER           4
@@ -160,7 +161,8 @@ int32_t cam_csiphy_parse_dt_info(struct platform_device *pdev,
	}

	csiphy_dev->is_csiphy_3phase_hw = 0;
	if (of_device_is_compatible(csiphy_dev->v4l2_dev_str.pdev->dev.of_node,

	if (of_device_is_compatible(soc_info->dev->of_node,
		"qcom,csiphy-v1.0")) {
		csiphy_dev->ctrl_reg->csiphy_2ph_reg = csiphy_2ph_v1_0_reg;
		csiphy_dev->ctrl_reg->csiphy_2ph_combo_mode_reg =
@@ -175,6 +177,23 @@ int32_t cam_csiphy_parse_dt_info(struct platform_device *pdev,
		csiphy_dev->hw_version = CSIPHY_VERSION_V10;
		csiphy_dev->is_csiphy_3phase_hw = CSI_3PHASE_HW;
		csiphy_dev->clk_lane = 0;
	} else if (of_device_is_compatible(soc_info->dev->of_node,
		"qcom,csiphy-v1.1")) {
		csiphy_dev->ctrl_reg->csiphy_2ph_reg = csiphy_2ph_v1_1_reg;
		csiphy_dev->ctrl_reg->csiphy_2ph_combo_mode_reg =
			csiphy_2ph_v1_1_combo_mode_reg;
		csiphy_dev->ctrl_reg->csiphy_3ph_reg = csiphy_3ph_v1_1_reg;
		csiphy_dev->ctrl_reg->csiphy_2ph_3ph_mode_reg =
			csiphy_3ph_v1_1_combo_mode_reg;
		csiphy_dev->ctrl_reg->csiphy_irq_reg = csiphy_irq_reg_1_1;
		csiphy_dev->ctrl_reg->csiphy_common_reg =
			csiphy_common_reg_1_1;
		csiphy_dev->ctrl_reg->csiphy_reset_reg =
			csiphy_reset_reg_1_1;
		csiphy_dev->ctrl_reg->csiphy_reg = csiphy_v1_1;
		csiphy_dev->is_csiphy_3phase_hw = CSI_3PHASE_HW;
		csiphy_dev->hw_version = CSIPHY_VERSION_V11;
		csiphy_dev->clk_lane = 0;
	} else {
		CAM_ERR(CAM_CSIPHY, "invalid hw version : 0x%x",
			csiphy_dev->hw_version);
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#define CSI_3PHASE_HW                               1
#define CSIPHY_VERSION_V35                        0x35
#define CSIPHY_VERSION_V10                        0x10
#define CSIPHY_VERSION_V11                        0x11

/**
 * @csiphy_dev: CSIPhy device structure
+498 −0

File added.

Preview size limit exceeded, changes collapsed.