2 * CMC623 Setting table for SLP7 Machine.
4 * Author: InKi Dae <inki.dae@samsung.com>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #include <plat/mdnie.h>
23 #define SCR_C8_TN 0x0000 /* kb R SCR */
24 #define SCR_C9_TN 0x3000 /* gc R */
25 #define SCR_CA_TN 0xffff /* rm R */
26 #define SCR_CB_TN 0xffd0 /* yw R */
27 #define SCR_CC_TN 0x0040 /* kb G */
28 #define SCR_CD_TN 0xffff /* gc G */
29 #define SCR_CE_TN 0x0000 /* rm G */
30 #define SCR_CF_MSB16_TN 0xf000 /* yw G */
31 #define SCR_D0_TN 0x00a0 /* kb B */
32 #define SCR_D1_TN 0x00ff /* gc B */
33 #define SCR_D2_TN 0x00ff /* rm B */
34 #define SCR_D3_TN 0x00d0 /* yw B */
35 #define SCR_CC_DMB_TN 0x0040 /* kb G */
37 static const unsigned short cmc623_video_tn[] = {
38 0x0000, 0x0000, /* BANK 0 */
39 0x0001, 0x0060, /* SCR LABC */
40 0x002c, 0x0fff, /* DNR bypass 0x003C */
41 0x002d, 0x1900, /* DNR bypass 0x0a08 */
42 0x002e, 0x0000, /* DNR bypass 0x1010 */
43 0x002f, 0x00ff, /* DNR bypass 0x0400 */
44 0x003A, 0x000D, /* HDTR DE CS */
45 0x003B, 0x03ff, /* DE SHARPNESS */
46 0x003C, 0x0000, /* NOISE LEVEL */
47 0x0042, 0x0000, /* DE TH (MAX DIFF) */
62 static const unsigned short cmc623_video_cabc_tn[] = {
63 0x0000, 0x0000, /* BANK 0 */
64 0x0001, 0x0070, /* SCR LABC CABC */
65 0x002c, 0x0fff, /* DNR bypass 0x003C */
66 0x002d, 0x1900, /* DNR bypass 0x0a08 */
67 0x002e, 0x0000, /* DNR bypass 0x1010 */
68 0x002f, 0x00ff, /* DNR bypass 0x0400 */
69 0x003A, 0x000D, /* HDTR DE CS */
70 0x003B, 0x03ff, /* DE SHARPNESS */
71 0x003C, 0x0000, /* NOISE LEVEL */
72 0x0042, 0x0000, /* DE TH (MAX DIFF) */
73 0x0072, 0x0000, /* CABC Dgain */
77 0x007C, 0x0002, /* Dynamic LCD */
92 static const unsigned short cmc623_camera_tn[]= {
93 0x0000, 0x0000, /* BANK 0 */
94 0x0001, 0x0060, /* SCR LABC */
95 0x002c, 0x0fff, /* DNR bypass 0x003C */
96 0x002d, 0x1900, /* DNR bypass 0x0a08 */
97 0x002e, 0x0000, /* DNR bypass 0x1010 */
98 0x002f, 0x00ff, /* DNR bypass 0x0400 */
99 0x003A, 0x000D, /* HDTR DE CS */
100 0x003B, 0x03ff, /* DE SHARPNESS */
101 0x003C, 0x0000, /* NOISE LEVEL */
102 0x0042, 0x0000, /* DE TH (MAX DIFF) */
117 static const unsigned short cmc623_camera_cabc_tn[] = {
118 0x0000, 0x0000, /* BANK 0 */
119 0x0001, 0x0070, /* SCR LABC CABC */
120 0x002c, 0x0fff, /* DNR bypass {0x003C */
121 0x002d, 0x1900, /* DNR bypass {0x0a08 */
122 0x002e, 0x0000, /* DNR bypass {0x1010 */
123 0x002f, 0x00ff, /* DNR bypass {0x0400 */
124 0x003A, 0x000D, /* HDTR DE CS */
125 0x003B, 0x03ff, /* DE SHARPNESS */
126 0x003C, 0x0000, /* NOISE LEVEL */
127 0x0042, 0x0000, /* DE TH (MAX DIFF) */
128 0x0072, 0x0000, /* CABC Dgain */
132 0x007C, 0x0002, /* Dynamic LCD */
147 static const unsigned short cmc623_ui_tn[] = {
148 0x0000, 0x0000, /* BANK 0 */
149 0x0001, 0x0060, /* SCR LABC */
150 0x002c, 0x0fff, /* DNR bypass 0x003C */
151 0x002d, 0x1900, /* DNR bypass 0x0a08 */
152 0x002e, 0x0000, /* DNR bypass 0x1010 */
153 0x002f, 0x00ff, /* DNR bypass 0x0400 */
154 0x003A, 0x0009, /* HDTR (DE D) CS */
155 0x003B, 0x03ff, /* DE SHARPNESS */
156 0x003C, 0x0000, /* NOISE LEVEL */
157 0x0042, 0x0000, /* DE TH (MAX DIFF) */
172 static const unsigned short cmc623_ui_cabc_tn[] = {
173 0x0000, 0x0000, /* BANK 0 */
174 0x0001, 0x0070, /* SCR LABC CABC */
175 0x002c, 0x0fff, /* DNR bypass 0x003C */
176 0x002d, 0x1900, /* DNR bypass 0x0a08 */
177 0x002e, 0x0000, /* DNR bypass 0x1010 */
178 0x002f, 0x00ff, /* DNR bypass 0x0400 */
179 0x003A, 0x0009, /* HDTR (DE D) CS */
180 0x003B, 0x03ff, /* DE SHARPNESS */
181 0x003C, 0x0000, /* NOISE LEVEL */
182 0x0042, 0x0000, /* DE TH (MAX DIFF) */
183 0x0072, 0x0000, /* CABC Dgain */
187 0x007C, 0x0002, /* Dynamic LCD */
202 static const unsigned short cmc623_vt_tn[] = {
203 0x0000, 0x0000, /* BANK 0 */
204 0x0001, 0x0060, /* SCR LABC */
205 0x002c, 0x0fff, /* DNR bypass,dir_th 0x003c */
206 0x002d, 0x19ff, /* DNR dir_num,decont7 0x0a08 */
207 0x002e, 0xff16, /* DNR decont5,mask_th 0x1010 */
208 0x002F, 0x0000, /* DNR block_th 0x0400 */
209 0x003A, 0x000D, /* HDTR DE CS */
210 0x003B, 0x03ff, /* DE SHARPNESS */
211 0x003C, 0x0000, /* NOISE LEVEL */
212 0x0042, 0x0000, /* DE TH (MAX DIFF) */
227 static const unsigned short cmc623_vt_cabc_tn[] = {
228 0x0000, 0x0000, /* BANK 0 */
229 0x0001, 0x0070, /* SCR LABC CABC */
230 0x002c, 0x0fff, /* DNR bypass,dir_th 0x003c */
231 0x002d, 0x19ff, /* DNR dir_num,decont7 0x0a08 */
232 0x002e, 0xff16, /* DNR decont5,mask_th 0x1010 */
233 0x002F, 0x0000, /* DNR block_th 0x0400 */
234 0x003A, 0x000D, /* HDTR DE CS */
235 0x003B, 0x03ff, /* DE SHARPNESS */
236 0x003C, 0x0000, /* NOISE LEVEL */
237 0x0042, 0x0000, /* DE TH (MAX DIFF) */
238 0x0072, 0x0000, /* CABC Dgain */
242 0x007C, 0x0002, /* Dynamic LCD */
257 static const unsigned short cmc623_dmb_tn[] = {
258 0x0000, 0x0000, /* BANK 0 */
259 0x0001, 0x0060, /* SCR LABC */
260 0x002c, 0x003c, /* DNR bypass,dir_th 0x003c */
261 0x002d, 0x0a08, /* DNR dir_num,decont7 0x0a08 */
262 0x002e, 0x1010, /* DNR decont5,mask_th 0x1010 */
263 0x002F, 0x0400, /* DNR block_th 0x0400 */
264 0x003A, 0x000D, /* HDTR DE CS */
265 0x003B, 0x03ff, /* DE SHARPNESS */
266 0x003C, 0x0000, /* NOISE LEVEL */
267 0x0042, 0x0000, /* DE TH (MAX DIFF) */
272 0x00cc, SCR_CC_DMB_TN,
282 static const unsigned short cmc623_dmb_cabc_tn[] = {
283 0x0000, 0x0000, /* BANK 0 */
284 0x0001, 0x0070, /* SCR LABC CABC */
285 0x002c, 0x003c, /* DNR bypass,dir_th 0x003c */
286 0x002d, 0x0a08, /* DNR dir_num,decont7 0x0a08 */
287 0x002e, 0x1010, /* DNR decont5,mask_th 0x1010 */
288 0x002F, 0x0400, /* DNR block_th 0x0400 */
289 0x003A, 0x000D, /* HDTR DE CS */
290 0x003B, 0x03ff, /* DE SHARPNESS */
291 0x003C, 0x0000, /* NOISE LEVEL */
292 0x0042, 0x0000, /* DE TH (MAX DIFF) */
293 0x0072, 0x0000, /* CABC Dgain */
297 0x007C, 0x0002, /* Dynamic LCD */
302 0x00cc, SCR_CC_DMB_TN,
312 static const unsigned short cmc623_gallery_tn[] = {
313 0x0000, 0x0000, /* BANK 0 */
314 0x0001, 0x0060, /* SCR LABC */
315 0x002c, 0x0fff, /* DNR bypass 0x003C */
316 0x002d, 0x1900, /* DNR bypass 0x0a08 */
317 0x002e, 0x0000, /* DNR bypass 0x1010 */
318 0x002f, 0x00ff, /* DNR bypass 0x0400 */
319 0x003A, 0x000D, /* HDTR DE CS */
320 0x003B, 0x03ff, /* DE SHARPNESS */
321 0x003C, 0x0000, /* NOISE LEVEL */
322 0x0042, 0x0000, /* DE TH (MAX DIFF) */
337 static const unsigned short cmc623_gallery_cabc_tn[] = {
338 0x0000, 0x0000, /* BANK 0 */
339 0x0001, 0x0070, /* SCR LABC CABC */
340 0x002c, 0x0fff, /* DNR bypass 0x003C */
341 0x002d, 0x1900, /* DNR bypass 0x0a08 */
342 0x002e, 0x0000, /* DNR bypass 0x1010 */
343 0x002f, 0x00ff, /* DNR bypass 0x0400 */
344 0x003A, 0x000D, /* HDTR DE CS */
345 0x003B, 0x03ff, /* DE SHARPNESS */
346 0x003C, 0x0000, /* NOISE LEVEL */
347 0x0042, 0x0000, /* DE TH (MAX DIFF) */
348 0x0072, 0x0000, /* CABC Dgain */
352 0x007C, 0x0002, /* Dynamic LCD */
367 const struct mdnie_tables cmc623_tables = {
368 .tables[CMC623_MODE_UI] = (unsigned short *)&cmc623_ui_tn,
369 .tables[CMC623_MODE_VIDEO] = (unsigned short *)&cmc623_video_tn,
370 .tables[CMC623_MODE_CAMERA] = (unsigned short *)&cmc623_camera_tn,
371 .tables[CMC623_MODE_VT] = (unsigned short *)&cmc623_vt_tn,
372 .tables[CMC623_MODE_DMB] = (unsigned short *)&cmc623_dmb_tn,
373 .tables[CMC623_MODE_GALLERY] = (unsigned short *)&cmc623_gallery_tn,
376 .cabc_tables[CMC623_MODE_UI] =
377 (unsigned short *)&cmc623_ui_cabc_tn,
378 .cabc_tables[CMC623_MODE_VIDEO] =
379 (unsigned short *)&cmc623_video_cabc_tn,
380 .cabc_tables[CMC623_MODE_CAMERA] =
381 (unsigned short *)&cmc623_camera_cabc_tn,
382 .cabc_tables[CMC623_MODE_VT] =
383 (unsigned short *)&cmc623_vt_cabc_tn,
384 .cabc_tables[CMC623_MODE_DMB] =
385 (unsigned short *)&cmc623_dmb_cabc_tn,
386 .cabc_tables[CMC623_MODE_GALLERY] =
387 (unsigned short *)&cmc623_gallery_cabc_tn,