aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0033-media-soc-camera-fix-parallel-i-f-in-VIN.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0033-media-soc-camera-fix-parallel-i-f-in-VIN.patch')
-rw-r--r--meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0033-media-soc-camera-fix-parallel-i-f-in-VIN.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0033-media-soc-camera-fix-parallel-i-f-in-VIN.patch b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0033-media-soc-camera-fix-parallel-i-f-in-VIN.patch
new file mode 100644
index 0000000..c56049a
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0033-media-soc-camera-fix-parallel-i-f-in-VIN.patch
@@ -0,0 +1,69 @@
+From 112395ed601c67a6ba935cec0107335e966888dc Mon Sep 17 00:00:00 2001
+From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
+Date: Fri, 14 Jul 2017 21:55:20 +0300
+Subject: [PATCH] media: soc_camera: fix parallel i/f in VIN
+
+This fixes parallel interface in VIN
+
+Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
+---
+ drivers/media/platform/soc_camera/rcar_vin.c | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c
+index f5c2528..a9cb72d 100644
+--- a/drivers/media/platform/soc_camera/rcar_vin.c
++++ b/drivers/media/platform/soc_camera/rcar_vin.c
+@@ -149,6 +149,9 @@
+ /* Video n Data Mode Register 2 bits */
+ #define VNDMR2_VPS (1 << 30)
+ #define VNDMR2_HPS (1 << 29)
++#define VNDMR2_CES (1 << 28)
++#define VNDMR2_DES (1 << 27)
++#define VNDMR2_CHS (1 << 23)
+ #define VNDMR2_FTEV (1 << 17)
+ #define VNDMR2_VLV(n) ((n & 0xf) << 12)
+
+@@ -1850,10 +1853,15 @@ static int rcar_vin_set_bus_param(struct soc_camera_device *icd)
+ val = VNDMR2_FTEV;
+ else
+ val = VNDMR2_FTEV | VNDMR2_VLV(1);
++
+ if (!(common_flags & V4L2_MBUS_VSYNC_ACTIVE_LOW))
+ val |= VNDMR2_VPS;
+ if (!(common_flags & V4L2_MBUS_HSYNC_ACTIVE_LOW))
+ val |= VNDMR2_HPS;
++
++ val |= VNDMR2_CES;
++ dev_dbg(icd->parent, "VNDMR2=0x%x\n", val);
++
+ iowrite32(val, priv->base + VNDMR2_REG);
+
+ ret = rcar_vin_set_rect(icd);
+@@ -2937,8 +2945,8 @@ static int rcar_vin_probe(struct platform_device *pdev)
+ priv->max_height = 2048;
+ }
+
+- if (priv->chip == RCAR_H3 || priv->chip == RCAR_M3 ||
+- priv->chip == RCAR_V3M) {
++ if ((priv->chip == RCAR_H3 || priv->chip == RCAR_M3 ||
++ priv->chip == RCAR_V3M) && !of_property_read_string(np, "csi,select", &str)) {
+ u32 ifmd = 0;
+ bool match_flag = false;
+ const struct vin_gen3_ifmd *gen3_ifmd_table = NULL;
+@@ -2973,12 +2981,6 @@ static int rcar_vin_probe(struct platform_device *pdev)
+ else
+ priv->index = RCAR_VIN_CH_NONE;
+
+- ret = of_property_read_string(np, "csi,select", &str);
+- if (ret) {
+- dev_err(&pdev->dev, "could not parse csi,select\n");
+- return ret;
+- }
+-
+ if (strcmp(str, "csi40") == 0)
+ priv->csi_ch = RCAR_CSI40;
+ else if (strcmp(str, "csi20") == 0)
+--
+1.9.1
+