Skip to content

Commit 1b3570e

Browse files
Zefa Chenrkhuangtao
authored andcommitted
media: i2c: gc2145 mipi add 800x600@10fps
Change-Id: I32ffdbfff78c92fa9e4203800a8f113fd5b4e819 Signed-off-by: Zefa Chen <[email protected]>
1 parent 9d705d7 commit 1b3570e

File tree

1 file changed

+75
-2
lines changed

1 file changed

+75
-2
lines changed

drivers/media/i2c/gc2145.c

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*
55
* Copyright (C) 2018 Fuzhou Rockchip Electronics Co., Ltd.
66
* V0.0X01.0X01 add enum_frame_interval function.
7+
* V0.0X01.0X02 add mipi svga 10fps.
78
*/
89

910
#include <linux/clk.h>
@@ -35,7 +36,7 @@
3536
#include <media/v4l2-mediabus.h>
3637
#include <media/v4l2-subdev.h>
3738

38-
#define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x1)
39+
#define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x2)
3940
#define DRIVER_NAME "gc2145"
4041
#define GC2145_PIXEL_RATE (120 * 1000 * 1000)
4142

@@ -1731,6 +1732,70 @@ static const struct sensor_register gc2145_mipi_full[] = {
17311732
{REG_NULL, 0x00},
17321733
};
17331734

1735+
static const struct sensor_register gc2145_mipi_svga_10fps[] = {
1736+
/*frame rate 50Hz*/
1737+
{0xfe, 0x00},
1738+
{0x05, 0x04},
1739+
{0x06, 0x40},
1740+
{0x07, 0x07},
1741+
{0x08, 0x40},
1742+
{0xb6, 0x01},
1743+
{0xfd, 0x03},
1744+
{0xfa, 0x00},
1745+
{0x18, 0x42},
1746+
/*crop window*/
1747+
{0xfe, 0x00},
1748+
{0x90, 0x01},
1749+
{0x91, 0x00},
1750+
{0x92, 0x00},
1751+
{0x93, 0x00},
1752+
{0x94, 0x00},
1753+
{0x95, 0x02},
1754+
{0x96, 0x58},
1755+
{0x97, 0x03},
1756+
{0x98, 0x20},
1757+
{0x99, 0x11},
1758+
{0x9a, 0x06},
1759+
/*AWB*/
1760+
{0xfe, 0x00},
1761+
{0xec, 0x02},
1762+
{0xed, 0x02},
1763+
{0xee, 0x30},
1764+
{0xef, 0x48},
1765+
{0xfe, 0x02},
1766+
{0x9d, 0x08},
1767+
{0xfe, 0x01},
1768+
{0x74, 0x00},
1769+
1770+
{0xfe, 0x00},
1771+
{0x7e, 0x00},
1772+
{0x7f, 0x60},
1773+
{0xfe, 0x01},
1774+
{0xa0, 0x0b},
1775+
/*AEC*/
1776+
{0xfe, 0x01},
1777+
{0x01, 0x04},
1778+
{0x02, 0x60},
1779+
{0x03, 0x02},
1780+
{0x04, 0x48},
1781+
{0x05, 0x18},
1782+
{0x06, 0x50},
1783+
{0x07, 0x10},
1784+
{0x08, 0x38},
1785+
{0x0a, 0xc0},
1786+
{0x1b, 0x04},
1787+
{0x21, 0x04},
1788+
{0xfe, 0x00},
1789+
{0x20, 0x03},
1790+
{0xfe, 0x03},
1791+
{0x12, 0x40},
1792+
{0x13, 0x06},
1793+
{0x04, 0x01},
1794+
{0x05, 0x00},
1795+
{0xfe, 0x00},
1796+
{REG_NULL, 0x00},
1797+
};
1798+
17341799
static const struct sensor_register gc2145_mipi_svga_20fps[] = {
17351800
/*frame rate 50Hz*/
17361801
{0xfe, 0x00},
@@ -1904,6 +1969,14 @@ static const struct gc2145_framesize gc2145_dvp_framesizes[] = {
19041969

19051970
static const struct gc2145_framesize gc2145_mipi_framesizes[] = {
19061971
{ /* SVGA */
1972+
.width = 800,
1973+
.height = 600,
1974+
.max_fps = {
1975+
.numerator = 10000,
1976+
.denominator = 100000,
1977+
},
1978+
.regs = gc2145_mipi_svga_10fps,
1979+
}, { /* SVGA */
19071980
.width = 800,
19081981
.height = 600,
19091982
.max_fps = {
@@ -1924,7 +1997,7 @@ static const struct gc2145_framesize gc2145_mipi_framesizes[] = {
19241997
.height = 1200,
19251998
.max_fps = {
19261999
.numerator = 10000,
1927-
.denominator = 300000,
2000+
.denominator = 100000,
19282001
},
19292002
.regs = gc2145_mipi_full,
19302003
}

0 commit comments

Comments
 (0)