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
|
From 9611ea32f2db0150cc9d7e69110cb48df05af238 Mon Sep 17 00:00:00 2001
From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Date: Fri, 28 Jun 2019 00:35:26 +0300
Subject: [PATCH] media: i2c: ov490: add LI cameras
This adds Leopard Imaging firmware support
Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
---
drivers/media/i2c/soc_camera/ov490_ov10640.c | 3 +++
drivers/media/i2c/soc_camera/ov490_ov10640.h | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/soc_camera/ov490_ov10640.c b/drivers/media/i2c/soc_camera/ov490_ov10640.c
index 0ea9a54..0f1a0d4 100644
--- a/drivers/media/i2c/soc_camera/ov490_ov10640.c
+++ b/drivers/media/i2c/soc_camera/ov490_ov10640.c
@@ -138,6 +138,9 @@ static int ov490_set_regs(struct i2c_client *client,
usleep_range(100, 150); /* wait 100 us */
reg16_write(client, regs[i].reg, regs[i].val);
}
+
+ if (regs[i].reg == 0xFFFE)
+ usleep_range(100, 150); /* wait 100 us */
}
return 0;
diff --git a/drivers/media/i2c/soc_camera/ov490_ov10640.h b/drivers/media/i2c/soc_camera/ov490_ov10640.h
index b22e93e..b00dc3ade 100644
--- a/drivers/media/i2c/soc_camera/ov490_ov10640.h
+++ b/drivers/media/i2c/soc_camera/ov490_ov10640.h
@@ -17,6 +17,12 @@ struct ov490_reg {
};
static const struct ov490_reg ov490_regs_wizard[] = {
+/* Firmware start (some firmwares need this to kick processing) */
+{0xfffd, 0x80},
+{0xfffe, 0x19},
+{0x5000, 0x05},
+{0xfffe, 0x80},
+{0x00c0, 0x3f},
/* The following registers should match firmware */
{0xfffd, 0x80},
{0xfffe, 0x82},
@@ -93,10 +99,12 @@ static const struct ov490_reg ov490_regs_wizard[] = {
{0xfffe, 0x80},
{0x00c0, 0xdc},
#ifdef OV490_DISPLAY_PATTERN
-{0xfffd, 0x80},
{0xfffe, 0x19},
{0x5000, 0x02},
{0xfffe, 0x80},
{0x00c0, 0xd6},
#endif
+/* respin register 0x6010 due to added firmware start HOST command */
+{0xfffe, 0x29},
+{0x6010, 0x01},
};
--
2.7.4
|