mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
media: i2c: gc2145 mipi add svga 30fps support
Change-Id: I86222ef5059bae4b83c28026f884740f610f20f9 Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
This commit is contained in:
committed by
Tao Huang
parent
ab56a9ca9a
commit
8b7bf8d12d
@@ -1669,9 +1669,29 @@ static const struct sensor_register gc2145_mipi_init_regs[] = {
|
||||
};
|
||||
|
||||
static const struct sensor_register gc2145_mipi_full[] = {
|
||||
{0xfe, 0x00},
|
||||
{0x05, 0x01},
|
||||
{0x06, 0x56},
|
||||
{0x07, 0x00},
|
||||
{0x08, 0x32},
|
||||
{0xfe, 0x01},
|
||||
{0x25, 0x00},
|
||||
{0x26, 0xfa},
|
||||
|
||||
{0x27, 0x04},
|
||||
{0x28, 0xe2},
|
||||
{0x29, 0x04},
|
||||
{0x2a, 0xe2},
|
||||
{0x2b, 0x04},
|
||||
{0x2c, 0xe2},
|
||||
{0x2d, 0x04},
|
||||
{0x2e, 0xe2},
|
||||
{0xfe, 0x00},
|
||||
|
||||
{0xfe, 0x00},
|
||||
{0xfd, 0x00},
|
||||
{0xfa, 0x11},
|
||||
{0x18, 0x22},
|
||||
/*crop window*/
|
||||
{0xfe, 0x00},
|
||||
{0x90, 0x01},
|
||||
@@ -1693,6 +1713,13 @@ static const struct sensor_register gc2145_mipi_full[] = {
|
||||
{0xef, 0x90},
|
||||
{0xfe, 0x01},
|
||||
{0x74, 0x01},
|
||||
|
||||
{0xfe, 0x00},
|
||||
{0x7e, 0x3c},
|
||||
{0x7f, 0x00},
|
||||
{0xfe, 0x01},
|
||||
{0xa0, 0x03},
|
||||
|
||||
/*AEC*/
|
||||
{0xfe, 0x01},
|
||||
{0x01, 0x04},
|
||||
@@ -1704,6 +1731,8 @@ static const struct sensor_register gc2145_mipi_full[] = {
|
||||
{0x07, 0x30},
|
||||
{0x08, 0x80},
|
||||
{0x0a, 0x82},
|
||||
{0x1b, 0x01},
|
||||
{0xfe, 0x00},
|
||||
{0xfe, 0x01},
|
||||
{0x21, 0x15},
|
||||
{0xfe, 0x00},
|
||||
@@ -1717,10 +1746,17 @@ static const struct sensor_register gc2145_mipi_full[] = {
|
||||
{REG_NULL, 0x00},
|
||||
};
|
||||
|
||||
static const struct sensor_register gc2145_mipi_svga[] = {
|
||||
static const struct sensor_register gc2145_mipi_svga_20fps[] = {
|
||||
/*frame rate 50Hz*/
|
||||
{0xfe, 0x00},
|
||||
{0xfd, 0x01},
|
||||
{0x05, 0x02},
|
||||
{0x06, 0x20},
|
||||
{0x07, 0x03},
|
||||
{0x08, 0x80},
|
||||
{0xb6, 0x01},
|
||||
{0xfd, 0x03},
|
||||
{0xfa, 0x00},
|
||||
{0x18, 0x42},
|
||||
/*crop window*/
|
||||
{0xfe, 0x00},
|
||||
{0x90, 0x01},
|
||||
@@ -1744,6 +1780,12 @@ static const struct sensor_register gc2145_mipi_svga[] = {
|
||||
{0x9d, 0x08},
|
||||
{0xfe, 0x01},
|
||||
{0x74, 0x00},
|
||||
|
||||
{0xfe, 0x00},
|
||||
{0x7e, 0x00},
|
||||
{0x7f, 0x60},
|
||||
{0xfe, 0x01},
|
||||
{0xa0, 0x0b},
|
||||
/*AEC*/
|
||||
{0xfe, 0x01},
|
||||
{0x01, 0x04},
|
||||
@@ -1754,7 +1796,8 @@ static const struct sensor_register gc2145_mipi_svga[] = {
|
||||
{0x06, 0x50},
|
||||
{0x07, 0x10},
|
||||
{0x08, 0x38},
|
||||
{0x0a, 0x80},
|
||||
{0x0a, 0xc0},
|
||||
{0x1b, 0x04},
|
||||
{0x21, 0x04},
|
||||
{0xfe, 0x00},
|
||||
{0x20, 0x03},
|
||||
@@ -1766,6 +1809,86 @@ static const struct sensor_register gc2145_mipi_svga[] = {
|
||||
{0xfe, 0x00},
|
||||
{REG_NULL, 0x00},
|
||||
};
|
||||
|
||||
static const struct sensor_register gc2145_mipi_svga_30fps[] = {
|
||||
/*frame rate 50Hz*/
|
||||
{0xfe, 0x00},
|
||||
{0x05, 0x02},
|
||||
{0x06, 0x20},
|
||||
{0x07, 0x00},
|
||||
{0x08, 0xb8},
|
||||
{0xfe, 0x01},
|
||||
{0x25, 0x01},
|
||||
{0x26, 0xac},
|
||||
|
||||
{0x27, 0x05},//4e2 pad
|
||||
{0x28, 0x04},
|
||||
{0x29, 0x05},//6d6 pad
|
||||
{0x2a, 0x04},
|
||||
{0x2b, 0x05},//7d0 pad
|
||||
{0x2c, 0x04},
|
||||
{0x2d, 0x05},
|
||||
{0x2e, 0x04},
|
||||
{0xfe, 0x00},
|
||||
|
||||
{0xfe, 0x00},
|
||||
{0xfd, 0x01},
|
||||
{0xfa, 0x00},
|
||||
{0x18, 0x62},
|
||||
{0xfd, 0x03},
|
||||
/*crop window*/
|
||||
{0xfe, 0x00},
|
||||
{0x90, 0x01},
|
||||
{0x91, 0x00},
|
||||
{0x92, 0x00},
|
||||
{0x93, 0x00},
|
||||
{0x94, 0x00},
|
||||
{0x95, 0x02},
|
||||
{0x96, 0x58},
|
||||
{0x97, 0x03},
|
||||
{0x98, 0x20},
|
||||
{0x99, 0x11},
|
||||
{0x9a, 0x06},
|
||||
/*AWB*/
|
||||
{0xfe, 0x00},
|
||||
{0xec, 0x02},
|
||||
{0xed, 0x02},
|
||||
{0xee, 0x30},
|
||||
{0xef, 0x48},
|
||||
{0xfe, 0x02},
|
||||
{0x9d, 0x08},
|
||||
{0xfe, 0x01},
|
||||
{0x74, 0x00},
|
||||
|
||||
{0xfe, 0x00},
|
||||
{0x7e, 0x00},
|
||||
{0x7f, 0x60},
|
||||
{0xfe, 0x01},
|
||||
{0xa0, 0x0b},
|
||||
/*AEC*/
|
||||
{0xfe, 0x01},
|
||||
{0x01, 0x04},
|
||||
{0x02, 0x60},
|
||||
{0x03, 0x02},
|
||||
{0x04, 0x48},
|
||||
{0x05, 0x18},
|
||||
{0x06, 0x50},
|
||||
{0x07, 0x10},
|
||||
{0x08, 0x38},
|
||||
{0x0a, 0xc0},
|
||||
{0x1b, 0x04},
|
||||
{0x21, 0x04},
|
||||
{0xfe, 0x00},
|
||||
{0x20, 0x03},
|
||||
{0xfe, 0x03},
|
||||
{0x12, 0x40},
|
||||
{0x13, 0x06},
|
||||
{0x04, 0x01},
|
||||
{0x05, 0x00},
|
||||
{0xfe, 0x00},
|
||||
{REG_NULL, 0x00},
|
||||
};
|
||||
|
||||
static const struct gc2145_framesize gc2145_dvp_framesizes[] = {
|
||||
{ /* SVGA */
|
||||
.width = 800,
|
||||
@@ -1786,16 +1909,21 @@ static const struct gc2145_framesize gc2145_dvp_framesizes[] = {
|
||||
};
|
||||
|
||||
static const struct gc2145_framesize gc2145_mipi_framesizes[] = {
|
||||
{
|
||||
.width = 800,
|
||||
.height = 600,
|
||||
.fps = 20,
|
||||
.regs = gc2145_mipi_svga,
|
||||
}, {
|
||||
.width = 1600,
|
||||
.height = 1200,
|
||||
.fps = 10,
|
||||
.regs = gc2145_mipi_full,
|
||||
{ /* SVGA */
|
||||
.width = 800,
|
||||
.height = 600,
|
||||
.fps = 20,
|
||||
.regs = gc2145_mipi_svga_20fps,
|
||||
}, { /* SVGA */
|
||||
.width = 800,
|
||||
.height = 600,
|
||||
.fps = 30,
|
||||
.regs = gc2145_mipi_svga_30fps,
|
||||
}, { /* FULL */
|
||||
.width = 1600,
|
||||
.height = 1200,
|
||||
.fps = 10,
|
||||
.regs = gc2145_mipi_full,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user