aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0100-LVDS-ar0132-use-raw12.patch
blob: abf26241b6e90fa2cb355b1cabe2e51b7ce5ac1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
From 2869ff3002560ee637f905ed684aaccfac53372e Mon Sep 17 00:00:00 2001
From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Date: Mon, 28 Aug 2017 03:16:21 +0300
Subject: [PATCH] LVDS: ar0132: use raw12

Set CSI2 type raw8 in RCAR CSI2 and set raw12 in ti960

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
---
 arch/arm64/boot/dts/renesas/legacy/r8a7795-es1-h3ulcb-kf-v0.dts | 8 ++++----
 arch/arm64/boot/dts/renesas/legacy/r8a7795-h3ulcb-kf-v0.dts     | 8 ++++----
 arch/arm64/boot/dts/renesas/r8a7797-v3msk-kf.dts                | 8 ++++----
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi                        | 8 ++++----
 drivers/media/i2c/soc_camera/ti964_ti9x3.c                      | 5 +++--
 5 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/legacy/r8a7795-es1-h3ulcb-kf-v0.dts b/arch/arm64/boot/dts/renesas/legacy/r8a7795-es1-h3ulcb-kf-v0.dts
index cd23797..5dc5144 100644
--- a/arch/arm64/boot/dts/renesas/legacy/r8a7795-es1-h3ulcb-kf-v0.dts
+++ b/arch/arm64/boot/dts/renesas/legacy/r8a7795-es1-h3ulcb-kf-v0.dts
@@ -1571,19 +1571,19 @@
 
 	virtual,channel {
 		csi2_vc0 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <0>;
 		};
 		csi2_vc1 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <1>;
 		};
 		csi2_vc2 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <2>;
 		};
 		csi2_vc3 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <3>;
 		};
 	};
diff --git a/arch/arm64/boot/dts/renesas/legacy/r8a7795-h3ulcb-kf-v0.dts b/arch/arm64/boot/dts/renesas/legacy/r8a7795-h3ulcb-kf-v0.dts
index f640350..b26ca3a 100644
--- a/arch/arm64/boot/dts/renesas/legacy/r8a7795-h3ulcb-kf-v0.dts
+++ b/arch/arm64/boot/dts/renesas/legacy/r8a7795-h3ulcb-kf-v0.dts
@@ -1578,19 +1578,19 @@
 
 	virtual,channel {
 		csi2_vc0 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <0>;
 		};
 		csi2_vc1 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <1>;
 		};
 		csi2_vc2 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <2>;
 		};
 		csi2_vc3 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <3>;
 		};
 	};
diff --git a/arch/arm64/boot/dts/renesas/r8a7797-v3msk-kf.dts b/arch/arm64/boot/dts/renesas/r8a7797-v3msk-kf.dts
index 9837e17..402e894 100644
--- a/arch/arm64/boot/dts/renesas/r8a7797-v3msk-kf.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7797-v3msk-kf.dts
@@ -511,19 +511,19 @@
 
 	virtual,channel {
 		csi2_vc0 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <0>;
 		};
 		csi2_vc1 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <1>;
 		};
 		csi2_vc2 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <2>;
 		};
 		csi2_vc3 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <3>;
 		};
 	};
diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
index 4ead97a..6dbcf7f 100644
--- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
+++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
@@ -1346,19 +1346,19 @@
 
 	virtual,channel {
 		csi2_vc0 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <0>;
 		};
 		csi2_vc1 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <1>;
 		};
 		csi2_vc2 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <2>;
 		};
 		csi2_vc3 {
-			data,type = "ycbcr422";
+			data,type = "raw8";
 			receive,vc = <3>;
 		};
 	};
diff --git a/drivers/media/i2c/soc_camera/ti964_ti9x3.c b/drivers/media/i2c/soc_camera/ti964_ti9x3.c
index 8dd0f99..caa3f74 100644
--- a/drivers/media/i2c/soc_camera/ti964_ti9x3.c
+++ b/drivers/media/i2c/soc_camera/ti964_ti9x3.c
@@ -122,12 +122,14 @@ static void ti964_ti9x3_fpdlink3_setup(struct i2c_client *client, int idx)
 //	reg8_write(client, 0x5d, SENSOR_ID << 1);		/* SENSOR I2C native - must be set by sensor driver */
 //	reg8_write(client, 0x65, (0x60 + idx) << 1);		/* SENSOR I2C translated - must be set by sensor driver */
 	if (strcmp(priv->cable_mode, "coax") == 0) {
-		reg8_write(client, 0x6d, 0x7f);			/* Coax, RAW10 */
+		reg8_write(client, 0x6d, 0x7e);			/* Coax, RAW12 */
 	} else if (strcmp(priv->cable_mode, "stp") == 0) {
 		reg8_write(client, 0x6d, 0x78);			/* STP, CSI */
 	}
 	reg8_write(client, 0x70, (idx << 6) | 0x1e);		/* CSI data type: yuv422 8-bit, assign VC */
-	reg8_write(client, 0x7c, 0x81);				/* BIT(7) - magic to Use RAW10 as 8-bit mode */
+	reg8_write(client, 0x71, (idx << 6) | 0x2a);		/* CSI data type: RAW12, assign VC */
+	reg8_write(client, 0x7c, 0x00);				/* RAW12 mode */
+	reg8_write(client, 0xbc, 0x00);				/* Setup minimal time between FV and LV to 3 PCLKs */
 	reg8_write(client, 0x6e, 0x88);				/* Sensor reset: backchannel GPIO0/GPIO1 set low */
 }
 
-- 
1.9.1