1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #ifndef OMAP3_ISP_H3A_H
16 #define OMAP3_ISP_H3A_H
17
18 #include <linux/omap3isp.h>
19
20
21
22
23
24
25
26 #define AEWB_PACKET_SIZE 16
27 #define AEWB_SATURATION_LIMIT 0x3ff
28
29
30 #define PCR_CHNG (1 << 0)
31 #define AEWWIN1_CHNG (1 << 1)
32 #define AEWINSTART_CHNG (1 << 2)
33 #define AEWINBLK_CHNG (1 << 3)
34 #define AEWSUBWIN_CHNG (1 << 4)
35 #define PRV_WBDGAIN_CHNG (1 << 5)
36 #define PRV_WBGAIN_CHNG (1 << 6)
37
38
39 #define ISPH3A_PCR_AF_EN (1 << 0)
40 #define ISPH3A_PCR_AF_ALAW_EN (1 << 1)
41 #define ISPH3A_PCR_AF_MED_EN (1 << 2)
42 #define ISPH3A_PCR_AF_BUSY (1 << 15)
43 #define ISPH3A_PCR_AEW_EN (1 << 16)
44 #define ISPH3A_PCR_AEW_ALAW_EN (1 << 17)
45 #define ISPH3A_PCR_AEW_BUSY (1 << 18)
46 #define ISPH3A_PCR_AEW_MASK (ISPH3A_PCR_AEW_ALAW_EN | \
47 ISPH3A_PCR_AEW_AVE2LMT_MASK)
48
49
50
51
52
53
54
55
56 #define AFPID 0x0
57
58 #define AFCOEF_OFFSET 0x00000004
59
60
61 #define AF_BUSYAF (1 << 15)
62 #define AF_FVMODE (1 << 14)
63 #define AF_RGBPOS (0x7 << 11)
64 #define AF_MED_TH (0xFF << 3)
65 #define AF_MED_EN (1 << 2)
66 #define AF_ALAW_EN (1 << 1)
67 #define AF_EN (1 << 0)
68 #define AF_PCR_MASK (AF_FVMODE | AF_RGBPOS | AF_MED_TH | \
69 AF_MED_EN | AF_ALAW_EN)
70
71
72 #define AF_PAXW (0x7F << 16)
73 #define AF_PAXH 0x7F
74
75
76 #define AF_AFINCV (0xF << 13)
77 #define AF_PAXVC (0x7F << 6)
78 #define AF_PAXHC 0x3F
79
80
81 #define AF_PAXSH (0xFFF<<16)
82 #define AF_PAXSV 0xFFF
83
84
85 #define AF_COEF_MASK0 0xFFF
86 #define AF_COEF_MASK1 (0xFFF<<16)
87
88
89 #define AF_RGBPOS_SHIFT 11
90 #define AF_MED_TH_SHIFT 3
91 #define AF_PAXW_SHIFT 16
92 #define AF_LINE_INCR_SHIFT 13
93 #define AF_VT_COUNT_SHIFT 6
94 #define AF_HZ_START_SHIFT 16
95 #define AF_COEF_SHIFT 16
96
97
98 int omap3isp_h3a_aewb_init(struct isp_device *isp);
99 int omap3isp_h3a_af_init(struct isp_device *isp);
100
101 void omap3isp_h3a_aewb_cleanup(struct isp_device *isp);
102 void omap3isp_h3a_af_cleanup(struct isp_device *isp);
103
104 #endif