File tree Expand file tree Collapse file tree 1 file changed +75
-2
lines changed Expand file tree Collapse file tree 1 file changed +75
-2
lines changed Original file line number Diff line number Diff line change 4
4
*
5
5
* Copyright (C) 2018 Fuzhou Rockchip Electronics Co., Ltd.
6
6
* V0.0X01.0X01 add enum_frame_interval function.
7
+ * V0.0X01.0X02 add mipi svga 10fps.
7
8
*/
8
9
9
10
#include <linux/clk.h>
35
36
#include <media/v4l2-mediabus.h>
36
37
#include <media/v4l2-subdev.h>
37
38
38
- #define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x1 )
39
+ #define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x2 )
39
40
#define DRIVER_NAME "gc2145"
40
41
#define GC2145_PIXEL_RATE (120 * 1000 * 1000)
41
42
@@ -1731,6 +1732,70 @@ static const struct sensor_register gc2145_mipi_full[] = {
1731
1732
{REG_NULL , 0x00 },
1732
1733
};
1733
1734
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
+
1734
1799
static const struct sensor_register gc2145_mipi_svga_20fps [] = {
1735
1800
/*frame rate 50Hz*/
1736
1801
{0xfe , 0x00 },
@@ -1904,6 +1969,14 @@ static const struct gc2145_framesize gc2145_dvp_framesizes[] = {
1904
1969
1905
1970
static const struct gc2145_framesize gc2145_mipi_framesizes [] = {
1906
1971
{ /* 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 */
1907
1980
.width = 800 ,
1908
1981
.height = 600 ,
1909
1982
.max_fps = {
@@ -1924,7 +1997,7 @@ static const struct gc2145_framesize gc2145_mipi_framesizes[] = {
1924
1997
.height = 1200 ,
1925
1998
.max_fps = {
1926
1999
.numerator = 10000 ,
1927
- .denominator = 300000 ,
2000
+ .denominator = 100000 ,
1928
2001
},
1929
2002
.regs = gc2145_mipi_full ,
1930
2003
}
You can’t perform that action at this time.
0 commit comments