msm: camera: sensor: Add support for CSIPHY fuse

Add support to disable the 5th CSIPHY based on
the CSIPHY SW fuse register bit.

Change-Id: Iae9dd7df0c0277eb48a258c91502390d042c9c43
CRs-Fixed: 3071805
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
This commit is contained in:
Shravan Nevatia
2021-11-09 20:36:24 +05:30
committed by Gerrit - the friendly Code Review server
parent 258defb7e2
commit d841951985
2 changed files with 13 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
#include "cam_csiphy_core.h"
#include <media/cam_sensor.h>
#include "camera_main.h"
#include <dt-bindings/msm-camera.h>
#define CSIPHY_DEBUGFS_NAME_MAX_SIZE 10
static struct dentry *root_dentry;
@@ -248,6 +249,16 @@ static int cam_csiphy_component_bind(struct device *dev,
goto csiphy_no_resource;
}
/* validate PHY fuse only for CSIPHY4 */
if ((new_csiphy_dev->soc_info.index == 4) &&
!cam_cpas_is_feature_supported(
CAM_CPAS_CSIPHY_FUSE,
(1 << new_csiphy_dev->soc_info.index), NULL)) {
CAM_ERR(CAM_CSIPHY, "PHY%d is not supported",
new_csiphy_dev->soc_info.index);
goto csiphy_no_resource;
}
new_csiphy_dev->v4l2_dev_str.internal_ops =
&csiphy_subdev_intern_ops;
new_csiphy_dev->v4l2_dev_str.ops =

View File

@@ -91,7 +91,8 @@
#define CAM_CPAS_ISP_FUSE 4
#define CAM_CPAS_ISP_PIX_FUSE 5
#define CAM_CPAS_ISP_LITE_FUSE 6
#define CAM_CPAS_FUSE_FEATURE_MAX 7
#define CAM_CPAS_CSIPHY_FUSE 7
#define CAM_CPAS_FUSE_FEATURE_MAX 8
#define CCI_MASTER_0 0
#define CCI_MASTER_1 1