#define mt9t111_FULL_RESOLUTION 0x300000 // 3 megapixel
#define mt9p111_FULL_RESOLUTION 0x500000 // 5 megapixel
#define gt2005_FULL_RESOLUTION 0x200000 // 2 megapixel
-#define gc0308_FULL_RESOLUTION 0x30000 // 0.3 megapixel
+#if defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_5M)
+ #define gc0308_FULL_RESOLUTION 0x500000 // 5 megapixel
+#elif defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_3M)
+ #define gc0308_FULL_RESOLUTION 0x300000 // 3 megapixel
+#elif defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_2M)
+ #define gc0308_FULL_RESOLUTION 0x200000 // 2 megapixel
+#else
+ #define gc0308_FULL_RESOLUTION 0x30000 // 0.3 megapixel#endif
+#endif
+
#define gc0309_FULL_RESOLUTION 0x30000 // 0.3 megapixel
#define gc2015_FULL_RESOLUTION 0x200000 // 2 megapixel
#define siv120b_FULL_RESOLUTION 0x30000 // 0.3 megapixel
#define siv121d_FULL_RESOLUTION 0x30000 // 0.3 megapixel
#define sid130B_FULL_RESOLUTION 0x200000 // 2 megapixel
-#define hi253_FULL_RESOLUTION 0x200000 // 2 megapixel
+
+#if defined(CONFIG_SOC_CAMERA_HI253_INTERPOLATION_5M)
+ #define hi253_FULL_RESOLUTION 0x500000 // 5 megapixel
+#elif defined(CONFIG_SOC_CAMERA_HI253_INTERPOLATION_3M)
+ #define hi253_FULL_RESOLUTION 0x300000 // 3 megapixel
+#else
+ #define hi253_FULL_RESOLUTION 0x200000 // 2 megapixel
+#endif
+
#define hi704_FULL_RESOLUTION 0x30000 // 0.3 megapixel
#define nt99250_FULL_RESOLUTION 0x200000 // 2 megapixel
#define sp0838_FULL_RESOLUTION 0x30000 // 0.3 megapixel
bool "GC0308 user defined init series"
default n
+config SOC_CAMERA_GC0308_INTERPOLATION
+ bool "support sensor interpolation for higher resolution"
+ depends on SOC_CAMERA_GC0308
+
+config SOC_CAMERA_GC0308_INTERPOLATION_2M
+ bool "sensor interpolation 2 megapixel 1600x1200"
+ depends on SOC_CAMERA_GC0308_INTERPOLATION
+ help
+ 0x200000 2 megapixel 1600x1200
+
+config SOC_CAMERA_GC0308_INTERPOLATION_3M
+ bool "sensor interpolation 3 megapixel 2048x1536"
+ depends on SOC_CAMERA_GC0308_INTERPOLATION
+ help
+ 0x300000 3 megapixel 2048x1536
+
+config SOC_CAMERA_GC0308_INTERPOLATION_5M
+ bool "sensor interpolation 5 megapixel 2592x1944"
+ depends on SOC_CAMERA_GC0308_INTERPOLATION
+ help
+ 0x500000 5 megapixel 2592x1944
+
config SOC_CAMERA_GC0309
tristate "GC0309 support for rockchip"
depends on SOC_CAMERA && I2C
bool "HI253 user defined init series"
default n
+config SOC_CAMERA_HI253_INTERPOLATION
+ bool "support sensor interpolation for higher resolution"
+ depends on SOC_CAMERA_HI253
+
+config SOC_CAMERA_HI253_INTERPOLATION_3M
+ bool "sensor interpolation 3 megapixel 2048x1536"
+ depends on SOC_CAMERA_HI253_INTERPOLATION
+ help
+ 0x300000 3 megapixel 2048x1536
+
+config SOC_CAMERA_HI253_INTERPOLATION_5M
+ bool "sensor interpolation 5 megapixel 2592x1944"
+ depends on SOC_CAMERA_HI253_INTERPOLATION
+ help
+ 0x500000 5 megapixel 2592x1944
+
config SOC_CAMERA_HI704
tristate "HI704 support for rockchip"
depends on SOC_CAMERA && I2C
#define SENSOR_ID 0x9b
#define SENSOR_MIN_WIDTH 640//176
#define SENSOR_MIN_HEIGHT 480//144
-#define SENSOR_MAX_WIDTH 640
-#define SENSOR_MAX_HEIGHT 480
+#if defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_5M)
+ #define SENSOR_MAX_WIDTH 2592
+ #define SENSOR_MAX_HEIGHT 1944
+#elif defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_3M)
+ #define SENSOR_MAX_WIDTH 2048
+ #define SENSOR_MAX_HEIGHT 1536
+#elif defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_2M)
+ #define SENSOR_MAX_WIDTH 1600
+ #define SENSOR_MAX_HEIGHT 1200
+#else
+ #define SENSOR_MAX_WIDTH 640
+ #define SENSOR_MAX_HEIGHT 480
+#endif
#define SENSOR_INIT_WIDTH 640 /* Sensor pixel size for sensor_init_data array */
#define SENSOR_INIT_HEIGHT 480
#define SENSOR_INIT_WINSEQADR sensor_vga
set_w = 1280;
set_h = 1024;
}
+#if defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_2M)||defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_3M) || defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_5M)
+ else if (((set_w <= SENSOR_MAX_WIDTH) && (set_h <= SENSOR_MAX_HEIGHT)) )
+ {
+ winseqe_set_addr = sensor_vga;
+ set_w = 640;
+ set_h = 480;
+ }
+#endif
+
else
{
winseqe_set_addr = SENSOR_INIT_WINSEQADR; /* ddl@rock-chips.com : Sensor output smallest size if isn't support app */
set_w = 1280;
set_h = 1024;
}
+#if defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_2M)||defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_3M) || defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_5M)
+ else if (((set_w <= SENSOR_MAX_WIDTH) && (set_h <= SENSOR_MAX_HEIGHT)) )
+ {
+ set_w = 640;
+ set_h = 480;
+ }
+#endif
+
else
{
set_w = SENSOR_INIT_WIDTH;
#define SENSOR_ID 0x92
#define SENSOR_MIN_WIDTH 176
#define SENSOR_MIN_HEIGHT 144
-#define SENSOR_MAX_WIDTH 1600
-#define SENSOR_MAX_HEIGHT 1200
+#if defined(CONFIG_SOC_CAMERA_HI253_INTERPOLATION_5M)
+ #define SENSOR_MAX_WIDTH 2592
+ #define SENSOR_MAX_HEIGHT 1944
+#elif defined(CONFIG_SOC_CAMERA_HI253_INTERPOLATION_3M)
+ #define SENSOR_MAX_WIDTH 2048
+ #define SENSOR_MAX_HEIGHT 1536
+#else
+ #define SENSOR_MAX_WIDTH 1600
+ #define SENSOR_MAX_HEIGHT 1200
+#endif
+
#define SENSOR_INIT_WIDTH 1600 /* Sensor pixel size for sensor_init_data array */
#define SENSOR_INIT_HEIGHT 1200
#define SENSOR_INIT_WINSEQADR sensor_uxga
set_w = 1600;
set_h = 1200;
}
+#if defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_3M) || defined(CONFIG_SOC_CAMERA_GC0308_INTERPOLATION_5M)
+ else if (((set_w <= SENSOR_MAX_WIDTH) && (set_h <= SENSOR_MAX_HEIGHT)) )
+ {
+ winseqe_set_addr = sensor_uxga;
+ set_w = 1600;
+ set_h = 1200;
+ }
+#endif
else
{
winseqe_set_addr = SENSOR_INIT_WINSEQADR; /* ddl@rock-chips.com : Sensor output smallest size if isn't support app */