tblDPASetting.c 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
  3. * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public
  6. * License as published by the Free Software Foundation;
  7. * either version 2, or (at your option) any later version.
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTIES OR REPRESENTATIONS; without even
  10. * the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. * A PARTICULAR PURPOSE.See the GNU General Public License
  12. * for more details.
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc.,
  16. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. */
  18. #include "global.h"
  19. /* For VT3324: */
  20. struct VT1636_DPA_SETTING VT1636_DPA_SETTING_TBL_VT3324[] = {
  21. /* Panel ID, CLK_SEL_ST1[09], CLK_SEL_ST2[08] */
  22. {LCD_PANEL_ID0_640X480, 0x00, 0x00}, /* For 640x480 */
  23. {LCD_PANEL_ID1_800X600, 0x00, 0x00}, /* For 800x600 */
  24. {LCD_PANEL_ID2_1024X768, 0x00, 0x00}, /* For 1024x768 */
  25. {LCD_PANEL_ID3_1280X768, 0x00, 0x00}, /* For 1280x768 */
  26. {LCD_PANEL_ID4_1280X1024, 0x00, 0x00}, /* For 1280x1024 */
  27. {LCD_PANEL_ID5_1400X1050, 0x00, 0x00}, /* For 1400x1050 */
  28. {LCD_PANEL_ID6_1600X1200, 0x0B, 0x03} /* For 1600x1200 */
  29. };
  30. struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3324[] = {
  31. /* ClkRange, DVP0, DVP0DataDriving, DVP0ClockDriving, DVP1,
  32. DVP1Driving, DFPHigh, DFPLow */
  33. /* CR96, SR2A[5], SR1B[1], SR2A[4], SR1E[2], CR9B,
  34. SR65, CR97, CR99 */
  35. /* LCK/VCK < 30000000 will use this value */
  36. {DPA_CLK_RANGE_30M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
  37. 0x00},
  38. /* 30000000 < LCK/VCK < 50000000 will use this value */
  39. {DPA_CLK_RANGE_30_50M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
  40. 0x00},
  41. /* 50000000 < LCK/VCK < 70000000 will use this value */
  42. {DPA_CLK_RANGE_50_70M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
  43. 0x00},
  44. /* 70000000 < LCK/VCK < 100000000 will use this value */
  45. {DPA_CLK_RANGE_70_100M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
  46. 0x00},
  47. /* 100000000 < LCK/VCK < 15000000 will use this value */
  48. {DPA_CLK_RANGE_100_150M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
  49. 0x00},
  50. /* 15000000 < LCK/VCK will use this value */
  51. {DPA_CLK_RANGE_150M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0E, 0x00,
  52. 0x00},
  53. };
  54. /* For VT3327: */
  55. struct VT1636_DPA_SETTING VT1636_DPA_SETTING_TBL_VT3327[] = {
  56. /* Panel ID, CLK_SEL_ST1[09], CLK_SEL_ST2[08] */
  57. {LCD_PANEL_ID0_640X480, 0x00, 0x00}, /* For 640x480 */
  58. {LCD_PANEL_ID1_800X600, 0x00, 0x00}, /* For 800x600 */
  59. {LCD_PANEL_ID2_1024X768, 0x00, 0x00}, /* For 1024x768 */
  60. {LCD_PANEL_ID3_1280X768, 0x00, 0x00}, /* For 1280x768 */
  61. {LCD_PANEL_ID4_1280X1024, 0x00, 0x00}, /* For 1280x1024 */
  62. {LCD_PANEL_ID5_1400X1050, 0x00, 0x00}, /* For 1400x1050 */
  63. {LCD_PANEL_ID6_1600X1200, 0x00, 0x00} /* For 1600x1200 */
  64. };
  65. struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3327[] = {
  66. /* ClkRange,DVP0, DVP0DataDriving, DVP0ClockDriving, DVP1,
  67. DVP1Driving, DFPHigh, DFPLow */
  68. /* CR96, SR2A[5], SR1B[1], SR2A[4], SR1E[2], CR9B,
  69. SR65, CR97, CR99 */
  70. /* LCK/VCK < 30000000 will use this value */
  71. {DPA_CLK_RANGE_30M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x01},
  72. /* 30000000 < LCK/VCK < 50000000 will use this value */
  73. {DPA_CLK_RANGE_30_50M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x01},
  74. /* 50000000 < LCK/VCK < 70000000 will use this value */
  75. {DPA_CLK_RANGE_50_70M, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x01},
  76. /* 70000000 < LCK/VCK < 100000000 will use this value */
  77. {DPA_CLK_RANGE_70_100M, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x03},
  78. /* 100000000 < LCK/VCK < 15000000 will use this value */
  79. {DPA_CLK_RANGE_100_150M, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x02},
  80. /* 15000000 < LCK/VCK will use this value */
  81. {DPA_CLK_RANGE_150M, 0x00, 0x20, 0x00, 0x10, 0x00, 0x03, 0x00, 0x0D, 0x03},
  82. };
  83. /* For VT3364: */
  84. struct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3364[] = {
  85. /* ClkRange,DVP0, DVP0DataDriving, DVP0ClockDriving, DVP1,
  86. DVP1Driving, DFPHigh, DFPLow */
  87. /* CR96, SR2A[5], SR1B[1], SR2A[4], SR1E[2], CR9B,
  88. SR65, CR97, CR99 */
  89. /* LCK/VCK < 30000000 will use this value */
  90. {DPA_CLK_RANGE_30M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
  91. /* 30000000 < LCK/VCK < 50000000 will use this value */
  92. {DPA_CLK_RANGE_30_50M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
  93. /* 50000000 < LCK/VCK < 70000000 will use this value */
  94. {DPA_CLK_RANGE_50_70M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
  95. /* 70000000 < LCK/VCK < 100000000 will use this value */
  96. {DPA_CLK_RANGE_70_100M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
  97. /* 100000000 < LCK/VCK < 15000000 will use this value */
  98. {DPA_CLK_RANGE_100_150M, 0x03, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
  99. /* 15000000 < LCK/VCK will use this value */
  100. {DPA_CLK_RANGE_150M, 0x01, 0x00, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x08},
  101. };