diff --git a/Documentation/devicetree/bindings/media/video/msm-csid.txt b/Documentation/devicetree/bindings/media/video/msm-csid.txt index 340d98688b76..e580c056b3eb 100644 --- a/Documentation/devicetree/bindings/media/video/msm-csid.txt +++ b/Documentation/devicetree/bindings/media/video/msm-csid.txt @@ -12,8 +12,8 @@ Required properties: - "qcom,csid-v3.5" - "qcom,csid-v4.0" - "qcom,csid-v3.4.2" - - "qcom,csid-v3.5.1" - "qcom,csid-v3.4.3" + - "qcom,csid-v3.5.1" - "qcom,csid-v5.0" - reg : offset and length of the register set for the device for the csid operating in compatible mode. diff --git a/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_5_1_hwreg.h b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_5_1_hwreg.h new file mode 100644 index 000000000000..13e560dc207d --- /dev/null +++ b/drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_5_1_hwreg.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef MSM_CSID_3_5_1_HWREG_H +#define MSM_CSID_3_5_1_HWREG_H + +#include + +static uint8_t csid_lane_assign_v3_5_1[PHY_LANE_MAX] = {0, 4, 1, 2, 3}; + +static struct csid_reg_parms_t csid_v3_5_1 = { + /* MIPI CSID registers */ + 0x0, + 0x4, + 0x8, + 0x10, + 0x14, + 0x18, + 0x1C, + 0x20, + 0x24, + 0x64, + 0x68, + 0x6C, + 0x70, + 0x74, + 0x78, + 0x7C, + 0x80, + 0x88, + 0x8C, + 0x90, + 0x94, + 0x98, + 0x9C, + 0xA0, + 0xA8, + 0xAC, + 0xB4, + 0xB8, + 0xBC, + 11, + 0x7FFF, + 0x4, + 17, + 0x30050001, + 0xC, + 0x84, + 0xA4, + 0x7f010800, + 20, + 17, + 16, +}; +#endif diff --git a/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c b/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c index 7ae071176ef4..9473fb0dc44e 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c +++ b/drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c @@ -27,6 +27,7 @@ #include "include/msm_csid_3_4_1_hwreg.h" #include "include/msm_csid_3_4_2_hwreg.h" #include "include/msm_csid_3_6_0_hwreg.h" +#include "include/msm_csid_3_5_1_hwreg.h" #include "cam_hw_ops.h" #define V4L2_IDENT_CSID 50002 @@ -44,6 +45,7 @@ #define CSID_VERSION_V36 0x30060000 #define CSID_VERSION_V37 0x30070000 #define CSID_VERSION_V35 0x30050000 +#define CSID_VERSION_V35_1 0x30050001 #define CSID_VERSION_V40 0x40000000 #define CSID_VERSION_V50 0x50000000 #define MSM_CSID_DRV_NAME "msm_csid" @@ -1185,6 +1187,12 @@ static int csid_probe(struct platform_device *pdev) new_csid_dev->ctrl_reg->csid_lane_assign = csid_lane_assign_v3_5; new_csid_dev->hw_dts_version = CSID_VERSION_V35; + } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, + "qcom,csid-v3.5.1")) { + new_csid_dev->ctrl_reg->csid_reg = csid_v3_5_1; + new_csid_dev->ctrl_reg->csid_lane_assign = + csid_lane_assign_v3_5_1; + new_csid_dev->hw_dts_version = CSID_VERSION_V35_1; } else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node, "qcom,csid-v5.0")) { new_csid_dev->ctrl_reg->csid_reg = csid_v3_5;