kernel: add ar0330 2304x1520 resolution
Ming Wong [Tue, 14 Apr 2015 22:44:34 +0000 (15:44 -0700)]
added 2304x1520 1 MIPI lane resolution

Bug 1552628

Change-Id: Ib2af3a77f9bede216e538a53d162839e9a249996
Signed-off-by: Ming Wong <miwong@nvidia.com>
Reviewed-on: http://git-master/r/731521
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

drivers/media/platform/tegra/ar0330.c

index b4d4f13..bdf37ee 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ar0330.c - ar0330 sensor driver
  *
- * Copyright (c) 2014, NVIDIA CORPORATION, All Rights Reserved.
+ * Copyright (c) 2014 - 2015, NVIDIA CORPORATION, All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -73,326 +73,51 @@ static const struct regmap_config sensor_regmap_config = {
 #define AR0330_GAIN_ADDR 0x3060
 
 static struct ar0330_reg mode_2304x1536[] = {
-       {0x301A, 0x0059},
-       {AR0330_TABLE_WAIT_MS, AR0330_WAIT_MS},
-       {0x31AE, 0x0204},
-       {0x301A, 0x0059},
+       {0x3052, 0xa114},
+       {0x304A, 0x0070},
        {AR0330_TABLE_WAIT_MS, AR0330_WAIT_MS},
        {0x301A, 0x0058},
-       {0x3064, 0x1802},
-       {0x3078, 0x0001},
-       {0x30BA, 0x002C},
-       {0x30FE, 0x0080},
-       {0x31E0, 0x0003},
-       {0x3ECE, 0x09FF},
-       {0x3ED0, 0xE4F6},
-       {0x3ED2, 0x0146},
-       {0x3ED4, 0x8F6C},
-       {0x3ED6, 0x66CC},
-       {0x3ED8, 0x8C42},
-       {0x3EDA, 0x889B},
-       {0x3EDC, 0x8863},
-       {0x3EDE, 0xAA04},
-       {0x3EE0, 0x15F0},
-       {0x3EE6, 0x008C},
-       {0x3EE8, 0x2024},
-       {0x3EEA, 0xFF1F},
-       {0x3F06, 0x046A},
-       {0x3046, 0x4038},
-       {0x3048, 0x8480},
-       {0x31E0, 0x0003},
-       {0x301A, 0x0058},
-       {0x31AE, 0x0202},
-       {0x31AC, 0x0A0A},
-       {0x31B0, 0x0028},
-       {0x31B2, 0x000E},
-       {0x31B4, 0x2743},
-       {0x31B6, 0x114E},
-       {0x31B8, 0x2049},
-       {0x31BA, 0x0186},
-       {0x31BC, 0x8005},
-       {0x31BE, 0x2003},
        {0x302A, 0x0005},
-       {0x302C, 0x0002},
-       {0x302E, 0x0002},
-       {0x3030, 0x0031},
+       {0x302C, 0x0004},
+       {0x302E, 0x0003},
+       {0x3030, 0x005F},
        {0x3036, 0x000A},
        {0x3038, 0x0001},
        {0x31AC, 0x0A0A},
-       {0x3004, 0x0000},
-       {0x3008, 0x08FF},
-       {0x3002, 0x0000},
-       {0x3006, 0x05FF},
+       {0x31AE, 0x0201},
+       {0x31B0, 0x003D},
+       {0x31B2, 0x0018},
+       {0x31B4, 0x4F56},
+       {0x31B6, 0x4214},
+       {0x31B8, 0x308B},
+       {0x31BA, 0x028A},
+       {0x31BC, 0x8008},
+       {0x3002, 0x0006},
+       {0x3004, 0x0006},
+       {0x3006, 0x0605},
+       {0x3008, 0x0905},
+       {0x300A, 0x0611},
+       {0x300C, 0x04E0},
+       {0x3012, 0x0610},
+       {0x3014, 0x0000},
        {0x30A2, 0x0001},
        {0x30A6, 0x0001},
        {0x3040, 0x0000},
-       {0x300C, 0x04E0},
-       {0x300A, 0x0622},
-       {0x3014, 0x0000},
-       {0x3012, 0x0621},
        {0x3042, 0x0000},
-       {0x30BA, 0x002C},
-       {0x301A, 0x0058},
-       {AR0330_TABLE_WAIT_MS, AR0330_WAIT_MS},
-       {0x3088, 0x8000},
-       {0x3086, 0x4A03},
-       {0x3086, 0x4316},
-       {0x3086, 0x0443},
-       {0x3086, 0x1645},
-       {0x3086, 0x4045},
-       {0x3086, 0x6017},
-       {0x3086, 0x2045},
-       {0x3086, 0x404B},
-       {0x3086, 0x1244},
-       {0x3086, 0x6134},
-       {0x3086, 0x4A31},
-       {0x3086, 0x4342},
-       {0x3086, 0x4560},
-       {0x3086, 0x2714},
-       {0x3086, 0x3DFF},
-       {0x3086, 0x3DFF},
-       {0x3086, 0x3DEA},
-       {0x3086, 0x2704},
-       {0x3086, 0x3D10},
-       {0x3086, 0x2705},
-       {0x3086, 0x3D10},
-       {0x3086, 0x2715},
-       {0x3086, 0x3527},
-       {0x3086, 0x053D},
-       {0x3086, 0x1045},
-       {0x3086, 0x4027},
-       {0x3086, 0x0427},
-       {0x3086, 0x143D},
-       {0x3086, 0xFF3D},
-       {0x3086, 0xFF3D},
-       {0x3086, 0xEA62},
-       {0x3086, 0x2728},
-       {0x3086, 0x3627},
-       {0x3086, 0x083D},
-       {0x3086, 0x6444},
-       {0x3086, 0x2C2C},
-       {0x3086, 0x2C2C},
-       {0x3086, 0x4B01},
-       {0x3086, 0x432D},
-       {0x3086, 0x4643},
-       {0x3086, 0x1647},
-       {0x3086, 0x435F},
-       {0x3086, 0x4F50},
-       {0x3086, 0x2604},
-       {0x3086, 0x2684},
-       {0x3086, 0x2027},
-       {0x3086, 0xFC53},
-       {0x3086, 0x0D5C},
-       {0x3086, 0x0D57},
-       {0x3086, 0x5417},
-       {0x3086, 0x0955},
-       {0x3086, 0x5649},
-       {0x3086, 0x5307},
-       {0x3086, 0x5302},
-       {0x3086, 0x4D28},
-       {0x3086, 0x6C4C},
-       {0x3086, 0x0928},
-       {0x3086, 0x2C28},
-       {0x3086, 0x294E},
-       {0x3086, 0x5C09},
-       {0x3086, 0x6045},
-       {0x3086, 0x0045},
-       {0x3086, 0x8026},
-       {0x3086, 0xA627},
-       {0x3086, 0xF817},
-       {0x3086, 0x0227},
-       {0x3086, 0xFA5C},
-       {0x3086, 0x0B17},
-       {0x3086, 0x1826},
-       {0x3086, 0xA25C},
-       {0x3086, 0x0317},
-       {0x3086, 0x4427},
-       {0x3086, 0xF25F},
-       {0x3086, 0x2809},
-       {0x3086, 0x1714},
-       {0x3086, 0x2808},
-       {0x3086, 0x1701},
-       {0x3086, 0x4D1A},
-       {0x3086, 0x2683},
-       {0x3086, 0x1701},
-       {0x3086, 0x27FA},
-       {0x3086, 0x45A0},
-       {0x3086, 0x1707},
-       {0x3086, 0x27FB},
-       {0x3086, 0x1729},
-       {0x3086, 0x4580},
-       {0x3086, 0x1708},
-       {0x3086, 0x27FA},
-       {0x3086, 0x1728},
-       {0x3086, 0x5D17},
-       {0x3086, 0x0E26},
-       {0x3086, 0x8153},
-       {0x3086, 0x0117},
-       {0x3086, 0xE653},
-       {0x3086, 0x0217},
-       {0x3086, 0x1026},
-       {0x3086, 0x8326},
-       {0x3086, 0x8248},
-       {0x3086, 0x4D4E},
-       {0x3086, 0x2809},
-       {0x3086, 0x4C0B},
-       {0x3086, 0x6017},
-       {0x3086, 0x2027},
-       {0x3086, 0xF217},
-       {0x3086, 0x535F},
-       {0x3086, 0x2808},
-       {0x3086, 0x164D},
-       {0x3086, 0x1A17},
-       {0x3086, 0x0127},
-       {0x3086, 0xFA26},
-       {0x3086, 0x035C},
-       {0x3086, 0x0145},
-       {0x3086, 0x4027},
-       {0x3086, 0x9817},
-       {0x3086, 0x2A4A},
-       {0x3086, 0x0A43},
-       {0x3086, 0x160B},
-       {0x3086, 0x4327},
-       {0x3086, 0x9C45},
-       {0x3086, 0x6017},
-       {0x3086, 0x0727},
-       {0x3086, 0x9D17},
-       {0x3086, 0x2545},
-       {0x3086, 0x4017},
-       {0x3086, 0x0827},
-       {0x3086, 0x985D},
-       {0x3086, 0x2645},
-       {0x3086, 0x4B17},
-       {0x3086, 0x0A28},
-       {0x3086, 0x0853},
-       {0x3086, 0x0D52},
-       {0x3086, 0x5112},
-       {0x3086, 0x4460},
-       {0x3086, 0x184A},
-       {0x3086, 0x0343},
-       {0x3086, 0x1604},
-       {0x3086, 0x4316},
-       {0x3086, 0x5843},
-       {0x3086, 0x1659},
-       {0x3086, 0x4316},
-       {0x3086, 0x5A43},
-       {0x3086, 0x165B},
-       {0x3086, 0x4327},
-       {0x3086, 0x9C45},
-       {0x3086, 0x6017},
-       {0x3086, 0x0727},
-       {0x3086, 0x9D17},
-       {0x3086, 0x2545},
-       {0x3086, 0x4017},
-       {0x3086, 0x1027},
-       {0x3086, 0x9817},
-       {0x3086, 0x2022},
-       {0x3086, 0x4B12},
-       {0x3086, 0x442C},
-       {0x3086, 0x2C2C},
-       {0x3086, 0x2C00},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       {0x3086, 0x0000},
-       /* stream on */
-       {0x301A, 0x005C},
+       {0x30BA, 0x006C},
+       {0x31E0, 0x0303},
+       {0x3064, 0x1802},
+       {0x3ED2, 0x0146},
+       {0x3ED4, 0x8F6C},
+       {0x3ED6, 0x66CC},
+       {0x3ED8, 0x8C42},
+       {0x3EDA, 0x88BC},
+       {0x3EDC, 0xAA63},
+       {0x305E, 0x00A0},
+       {0x3088, 0x80BA},
+       {0x3086, 0x0253},
+       {0x30CE, 0x0010},
+       {0x301A, 0x035C},
        {AR0330_TABLE_END, 0x00}
 };
 
@@ -910,7 +635,7 @@ ar0330_set_mode(struct ar0330_info *info, struct ar0330_mode *mode)
                         __func__, mode->xres, mode->yres, mode->frame_length,
                         mode->coarse_time, mode->gain);
 
-       if (mode->xres == 2304 && mode->yres == 1536) {
+       if (mode->xres == 2304 && mode->yres == 1520) {
                sensor_mode = AR0330_MODE_2304X1536;
        } else if (mode->xres == 1280 && mode->yres == 720) {
                sensor_mode = AR0330_MODE_1280X720;