更新sc132gs的初始化序列,目前支持60fps
This commit is contained in:
@ -129,17 +129,17 @@ struct sc132gs {
|
||||
|
||||
#define to_sc132gs(sd) container_of(sd, struct sc132gs, subdev)
|
||||
|
||||
/*
|
||||
* Xclk 24Mhz
|
||||
* Pclk 72Mhz
|
||||
* linelength 1696(0x06a0)
|
||||
* framelength 2122(0x084a)
|
||||
* grabwindow_width 1080
|
||||
* grabwindow_height 1280
|
||||
* mipi 1 lane
|
||||
* max_framerate 30fps
|
||||
* mipi_datarate per lane 720Mbps
|
||||
*/
|
||||
// /*
|
||||
// * Xclk 24Mhz
|
||||
// * Pclk 72Mhz
|
||||
// * linelength 1333
|
||||
// * framelength 1350
|
||||
// * grabwindow_width 1080
|
||||
// * grabwindow_height 1280
|
||||
// * mipi 1 lane
|
||||
// * max_framerate 60fps
|
||||
// * mipi_datarate per lane 720Mbps
|
||||
// */
|
||||
static const struct regval sc132gs_global_regs[] = {
|
||||
{0x0103, 0x01},
|
||||
{0x0100, 0x00},
|
||||
@ -151,18 +151,19 @@ static const struct regval sc132gs_global_regs[] = {
|
||||
{0x3018, 0x12},
|
||||
{0x3019, 0x0e},
|
||||
{0x301a, 0xb4},
|
||||
{0x301f, 0x23},
|
||||
{0x3031, 0x08},
|
||||
{0x3032, 0x60},
|
||||
{0x3038, 0x44},
|
||||
{0x3207, 0x17},
|
||||
{0x320c, 0x06},
|
||||
{0x320d, 0xa0},
|
||||
{0x320e, 0x08},
|
||||
{0x320f, 0x4a},
|
||||
{0x320c, 0x05},
|
||||
{0x320d, 0x35},
|
||||
{0x320e, 0x05},
|
||||
{0x320f, 0x46},
|
||||
{0x3250, 0xcc},
|
||||
{0x3251, 0x02},
|
||||
{0x3252, 0x08},
|
||||
{0x3253, 0x45},
|
||||
{0x3252, 0x05},
|
||||
{0x3253, 0x41},
|
||||
{0x3254, 0x05},
|
||||
{0x3255, 0x3b},
|
||||
{0x3306, 0x78},
|
||||
@ -197,9 +198,13 @@ static const struct regval sc132gs_global_regs[] = {
|
||||
{0x363b, 0x48},
|
||||
{0x363c, 0x83},
|
||||
{0x363d, 0x10},
|
||||
{0x36ea, 0x3a},
|
||||
{0x36ea, 0x38},
|
||||
{0x36eb, 0x05},
|
||||
{0x36ec, 0x03},
|
||||
{0x36ed, 0x24},
|
||||
{0x36fa, 0x25},
|
||||
{0x36fb, 0x05},
|
||||
{0x36fc, 0x00},
|
||||
{0x36fd, 0x04},
|
||||
{0x3900, 0x11},
|
||||
{0x3901, 0x05},
|
||||
@ -213,10 +218,9 @@ static const struct regval sc132gs_global_regs[] = {
|
||||
{0x3e0e, 0xd2},
|
||||
{0x3e14, 0xb0},
|
||||
{0x3e1e, 0x7c},
|
||||
{0x3e26, 0x20},
|
||||
{0x4418, 0x38},
|
||||
{0x4503, 0x10},
|
||||
{0x4837, 0x14},
|
||||
{0x4837, 0x10},
|
||||
{0x5000, 0x0e},
|
||||
{0x540c, 0x51},
|
||||
{0x550f, 0x38},
|
||||
@ -247,21 +251,154 @@ static const struct regval sc132gs_global_regs[] = {
|
||||
{REG_NULL, 0x00},
|
||||
};
|
||||
|
||||
/*
|
||||
* Xclk 24Mhz
|
||||
* Pclk 72Mhz
|
||||
* linelength 1696(0x06a0)
|
||||
* framelength 2122(0x084a)
|
||||
* grabwindow_width 1080
|
||||
* grabwindow_height 1280
|
||||
* mipi 1 lane
|
||||
* max_framerate 30fps
|
||||
* mipi_datarate per lane 720Mbps
|
||||
*/
|
||||
// static const struct regval sc132gs_global_regs_2[] = {
|
||||
// {0x0103, 0x01},
|
||||
// {0x0100, 0x00},
|
||||
|
||||
// //PLL bypass
|
||||
// {0x36e9, 0x80},
|
||||
// {0x36f9, 0x80},
|
||||
|
||||
// {0x3018, 0x12},
|
||||
// {0x3019, 0x0e},
|
||||
// {0x301a, 0xb4},
|
||||
// {0x3031, 0x08},
|
||||
// {0x3032, 0x60},
|
||||
// {0x3038, 0x44},
|
||||
// {0x3207, 0x17},
|
||||
// {0x320c, 0x06},
|
||||
// {0x320d, 0xa0},
|
||||
// {0x320e, 0x08},
|
||||
// {0x320f, 0x4a},
|
||||
// {0x3250, 0xcc},
|
||||
// {0x3251, 0x02},
|
||||
// {0x3252, 0x08},
|
||||
// {0x3253, 0x45},
|
||||
// {0x3254, 0x05},
|
||||
// {0x3255, 0x3b},
|
||||
// {0x3306, 0x78},
|
||||
// {0x330a, 0x00},
|
||||
// {0x330b, 0xc8},
|
||||
// {0x330f, 0x24},
|
||||
// {0x3314, 0x80},
|
||||
// {0x3315, 0x40},
|
||||
// {0x3317, 0xf0},
|
||||
// {0x331f, 0x12},
|
||||
// {0x3364, 0x00},
|
||||
// {0x3385, 0x41},
|
||||
// {0x3387, 0x41},
|
||||
// {0x3389, 0x09},
|
||||
// {0x33ab, 0x00},
|
||||
// {0x33ac, 0x00},
|
||||
// {0x33b1, 0x03},
|
||||
// {0x33b2, 0x12},
|
||||
// {0x33f8, 0x02},
|
||||
// {0x33fa, 0x01},
|
||||
// {0x3409, 0x08},
|
||||
// {0x34f0, 0xc0},
|
||||
// {0x34f1, 0x20},
|
||||
// {0x34f2, 0x03},
|
||||
// {0x3622, 0xf5},
|
||||
// {0x3630, 0x5c},
|
||||
// {0x3631, 0x80},
|
||||
// {0x3632, 0xc8},
|
||||
// {0x3633, 0x32},
|
||||
// {0x3638, 0x2a},
|
||||
// {0x3639, 0x07},
|
||||
// {0x363b, 0x48},
|
||||
// {0x363c, 0x83},
|
||||
// {0x363d, 0x10},
|
||||
// {0x36ea, 0x3a},
|
||||
// {0x36fa, 0x25},
|
||||
// {0x36fb, 0x05},
|
||||
// {0x36fd, 0x04},
|
||||
// {0x3900, 0x11},
|
||||
// {0x3901, 0x05},
|
||||
// {0x3902, 0xc5},
|
||||
// {0x3904, 0x04},
|
||||
// {0x3908, 0x91},
|
||||
// {0x391e, 0x00},
|
||||
// {0x3e01, 0x53},
|
||||
// {0x3e02, 0xe0},
|
||||
// {0x3e09, 0x20},
|
||||
// {0x3e0e, 0xd2},
|
||||
// {0x3e14, 0xb0},
|
||||
// {0x3e1e, 0x7c},
|
||||
// {0x3e26, 0x20},
|
||||
// {0x4418, 0x38},
|
||||
// {0x4503, 0x10},
|
||||
// {0x4837, 0x14},
|
||||
// {0x5000, 0x0e},
|
||||
// {0x540c, 0x51},
|
||||
// {0x550f, 0x38},
|
||||
// {0x5780, 0x67},
|
||||
// {0x5784, 0x10},
|
||||
// {0x5785, 0x06},
|
||||
// {0x5787, 0x02},
|
||||
// {0x5788, 0x00},
|
||||
// {0x5789, 0x00},
|
||||
// {0x578a, 0x02},
|
||||
// {0x578b, 0x00},
|
||||
// {0x578c, 0x00},
|
||||
// {0x5790, 0x00},
|
||||
// {0x5791, 0x00},
|
||||
// {0x5792, 0x00},
|
||||
// {0x5793, 0x00},
|
||||
// {0x5794, 0x00},
|
||||
// {0x5795, 0x00},
|
||||
// {0x5799, 0x04},
|
||||
|
||||
// {0x3037, 0x00},
|
||||
|
||||
// //PLL set
|
||||
// {0x36e9, 0x24},
|
||||
// {0x36f9, 0x24},
|
||||
|
||||
// {0x0100, 0x01},
|
||||
// {REG_NULL, 0x00},
|
||||
|
||||
static const struct sc132gs_mode supported_modes[] = {
|
||||
{
|
||||
.width = 1080,
|
||||
.height = 1280,
|
||||
.max_fps = {
|
||||
.numerator = 10000,
|
||||
.denominator = 300000,
|
||||
.denominator = 1200000,
|
||||
},
|
||||
.exp_def = 0x0148,
|
||||
.hts_def = 0x06a0,
|
||||
.vts_def = 0x084a,
|
||||
.exp_def = 0x0540,
|
||||
.hts_def = 0x0535,
|
||||
.vts_def = 0x0546,
|
||||
.reg_list = sc132gs_global_regs,
|
||||
},
|
||||
};
|
||||
|
||||
// static const struct sc132gs_mode supported_modes[] = {
|
||||
// {
|
||||
// .width = 1080,
|
||||
// .height = 1280,
|
||||
// .max_fps = {
|
||||
// .numerator = 10000,
|
||||
// .denominator = 300000,
|
||||
// },
|
||||
// .exp_def = 0x0148,
|
||||
// .hts_def = 0x06a0,
|
||||
// .vts_def = 0x084a,
|
||||
// .reg_list = sc132gs_global_regs,
|
||||
// },
|
||||
// };
|
||||
|
||||
|
||||
static const char * const sc132gs_test_pattern_menu[] = {
|
||||
"Disabled",
|
||||
"Vertical Color Bar Type 1",
|
||||
|
||||
Reference in New Issue
Block a user