xref: /OK3568_Linux_fs/kernel/drivers/video/fbdev/via/tblDPASetting.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0-or-later
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
4*4882a593Smuzhiyun  * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun #include "global.h"
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3324[] = {
11*4882a593Smuzhiyun /*  ClkRange, DVP0, DVP0DataDriving,  DVP0ClockDriving, DVP1,
12*4882a593Smuzhiyun 					DVP1Driving, DFPHigh, DFPLow */
13*4882a593Smuzhiyun /*  CR96, SR2A[5], SR1B[1], SR2A[4], SR1E[2], CR9B,
14*4882a593Smuzhiyun 					SR65,        CR97,    CR99   */
15*4882a593Smuzhiyun 	/* LCK/VCK < 30000000 will use this value */
16*4882a593Smuzhiyun 	{DPA_CLK_RANGE_30M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
17*4882a593Smuzhiyun 	 0x00},
18*4882a593Smuzhiyun 	/* 30000000 < LCK/VCK < 50000000 will use this value */
19*4882a593Smuzhiyun 	{DPA_CLK_RANGE_30_50M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
20*4882a593Smuzhiyun 	 0x00},
21*4882a593Smuzhiyun 	/* 50000000 < LCK/VCK < 70000000 will use this value */
22*4882a593Smuzhiyun 	{DPA_CLK_RANGE_50_70M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
23*4882a593Smuzhiyun 	 0x00},
24*4882a593Smuzhiyun 	/* 70000000 < LCK/VCK < 100000000 will use this value */
25*4882a593Smuzhiyun 	{DPA_CLK_RANGE_70_100M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
26*4882a593Smuzhiyun 	 0x00},
27*4882a593Smuzhiyun 	/* 100000000 < LCK/VCK < 15000000 will use this value */
28*4882a593Smuzhiyun 	{DPA_CLK_RANGE_100_150M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
29*4882a593Smuzhiyun 	 0x00},
30*4882a593Smuzhiyun 	/* 15000000 < LCK/VCK will use this value */
31*4882a593Smuzhiyun 	{DPA_CLK_RANGE_150M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0E, 0x00,
32*4882a593Smuzhiyun 	 0x00},
33*4882a593Smuzhiyun };
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3327[] = {
36*4882a593Smuzhiyun /*  ClkRange,DVP0, DVP0DataDriving,  DVP0ClockDriving, DVP1,
37*4882a593Smuzhiyun 					DVP1Driving, DFPHigh,   DFPLow */
38*4882a593Smuzhiyun /*   CR96, SR2A[5], SR1B[1], SR2A[4], SR1E[2], CR9B,
39*4882a593Smuzhiyun 					SR65,        CR97,      CR99   */
40*4882a593Smuzhiyun /* LCK/VCK < 30000000 will use this value */
41*4882a593Smuzhiyun {DPA_CLK_RANGE_30M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x01},
42*4882a593Smuzhiyun /* 30000000 < LCK/VCK < 50000000 will use this value */
43*4882a593Smuzhiyun {DPA_CLK_RANGE_30_50M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x01},
44*4882a593Smuzhiyun /* 50000000 < LCK/VCK < 70000000 will use this value */
45*4882a593Smuzhiyun {DPA_CLK_RANGE_50_70M, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x01},
46*4882a593Smuzhiyun /* 70000000 < LCK/VCK < 100000000 will use this value */
47*4882a593Smuzhiyun {DPA_CLK_RANGE_70_100M, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x03},
48*4882a593Smuzhiyun /* 100000000 < LCK/VCK < 15000000 will use this value */
49*4882a593Smuzhiyun {DPA_CLK_RANGE_100_150M, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x02},
50*4882a593Smuzhiyun /* 15000000 < LCK/VCK will use this value */
51*4882a593Smuzhiyun {DPA_CLK_RANGE_150M, 0x00, 0x20, 0x00, 0x10, 0x00, 0x03, 0x00, 0x0D, 0x03},
52*4882a593Smuzhiyun };
53*4882a593Smuzhiyun 
54*4882a593Smuzhiyun /* For VT3364: */
55*4882a593Smuzhiyun struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3364[] = {
56*4882a593Smuzhiyun /*  ClkRange,DVP0, DVP0DataDriving,  DVP0ClockDriving, DVP1,
57*4882a593Smuzhiyun 					DVP1Driving, DFPHigh,   DFPLow */
58*4882a593Smuzhiyun /*   CR96, SR2A[5], SR1B[1], SR2A[4], SR1E[2], CR9B,
59*4882a593Smuzhiyun 					SR65,        CR97,      CR99   */
60*4882a593Smuzhiyun /* LCK/VCK < 30000000 will use this value */
61*4882a593Smuzhiyun {DPA_CLK_RANGE_30M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
62*4882a593Smuzhiyun /* 30000000 < LCK/VCK < 50000000 will use this value */
63*4882a593Smuzhiyun {DPA_CLK_RANGE_30_50M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
64*4882a593Smuzhiyun /* 50000000 < LCK/VCK < 70000000 will use this value */
65*4882a593Smuzhiyun {DPA_CLK_RANGE_50_70M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
66*4882a593Smuzhiyun /* 70000000 < LCK/VCK < 100000000 will use this value */
67*4882a593Smuzhiyun {DPA_CLK_RANGE_70_100M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
68*4882a593Smuzhiyun /* 100000000 < LCK/VCK < 15000000 will use this value */
69*4882a593Smuzhiyun {DPA_CLK_RANGE_100_150M, 0x03, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
70*4882a593Smuzhiyun /* 15000000 < LCK/VCK will use this value */
71*4882a593Smuzhiyun {DPA_CLK_RANGE_150M, 0x01, 0x00, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x08},
72*4882a593Smuzhiyun };
73