summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShankar Ravi <rshankar@codeaurora.org>2015-12-17 14:52:12 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-11-15 22:01:58 -0800
commit11490ec83c235bd74fe9c23c54d086b96c583cce (patch)
tree361920bb3189d5e3195e0715b28839eb5b0d32e1
parentae2f6cb5ada42a3e3da6182ac3092007f5a319d8 (diff)
msm: camera: Version changes for new csid on msm8953
msm8953 uses a new version of csid. Adding new configuration file and making necessary driver changes. Change-Id: I5c0ce7f43a4ccd55bd18461bc910e4dcb0c23bb0 Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
-rw-r--r--Documentation/devicetree/bindings/media/video/msm-csid.txt2
-rw-r--r--drivers/media/platform/msm/camera_v2/sensor/csid/include/msm_csid_3_5_1_hwreg.h64
-rw-r--r--drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c8
3 files changed, 73 insertions, 1 deletions
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 <sensor/csid/msm_csid.h>
+
+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"
@@ -1186,6 +1188,12 @@ static int csid_probe(struct platform_device *pdev)
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;
new_csid_dev->ctrl_reg->csid_lane_assign =