chip.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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. #ifndef __CHIP_H__
  19. #define __CHIP_H__
  20. #include "global.h"
  21. /***************************************/
  22. /* Definition Graphic Chip Information */
  23. /***************************************/
  24. #define PCI_VIA_VENDOR_ID 0x1106
  25. /* Define VIA Graphic Chip Name */
  26. #define UNICHROME_CLE266 1
  27. #define UNICHROME_CLE266_DID 0x3122
  28. #define CLE266_REVISION_AX 0x0A
  29. #define CLE266_REVISION_CX 0x0C
  30. #define UNICHROME_K400 2
  31. #define UNICHROME_K400_DID 0x7205
  32. #define UNICHROME_K800 3
  33. #define UNICHROME_K800_DID 0x3108
  34. #define UNICHROME_PM800 4
  35. #define UNICHROME_PM800_DID 0x3118
  36. #define UNICHROME_CN700 5
  37. #define UNICHROME_CN700_DID 0x3344
  38. #define UNICHROME_CX700 6
  39. #define UNICHROME_CX700_DID 0x3157
  40. #define CX700_REVISION_700 0x0
  41. #define CX700_REVISION_700M 0x1
  42. #define CX700_REVISION_700M2 0x2
  43. #define UNICHROME_CN750 7
  44. #define UNICHROME_CN750_DID 0x3225
  45. #define UNICHROME_K8M890 8
  46. #define UNICHROME_K8M890_DID 0x3230
  47. #define UNICHROME_P4M890 9
  48. #define UNICHROME_P4M890_DID 0x3343
  49. #define UNICHROME_P4M900 10
  50. #define UNICHROME_P4M900_DID 0x3371
  51. #define UNICHROME_VX800 11
  52. #define UNICHROME_VX800_DID 0x1122
  53. #define UNICHROME_VX855 12
  54. #define UNICHROME_VX855_DID 0x5122
  55. #define UNICHROME_VX900 13
  56. #define UNICHROME_VX900_DID 0x7122
  57. /**************************************************/
  58. /* Definition TMDS Trasmitter Information */
  59. /**************************************************/
  60. /* Definition TMDS Trasmitter Index */
  61. #define NON_TMDS_TRANSMITTER 0x00
  62. #define VT1632_TMDS 0x01
  63. #define INTEGRATED_TMDS 0x42
  64. /* Definition TMDS Trasmitter I2C Slave Address */
  65. #define VT1632_TMDS_I2C_ADDR 0x10
  66. /**************************************************/
  67. /* Definition LVDS Trasmitter Information */
  68. /**************************************************/
  69. /* Definition LVDS Trasmitter Index */
  70. #define NON_LVDS_TRANSMITTER 0x00
  71. #define VT1631_LVDS 0x01
  72. #define VT1636_LVDS 0x0E
  73. #define INTEGRATED_LVDS 0x41
  74. /* Definition Digital Transmitter Mode */
  75. #define TX_DATA_12_BITS 0x01
  76. #define TX_DATA_24_BITS 0x02
  77. #define TX_DATA_DDR_MODE 0x04
  78. #define TX_DATA_SDR_MODE 0x08
  79. /* Definition LVDS Trasmitter I2C Slave Address */
  80. #define VT1631_LVDS_I2C_ADDR 0x70
  81. #define VT3271_LVDS_I2C_ADDR 0x80
  82. #define VT1636_LVDS_I2C_ADDR 0x80
  83. struct tmds_chip_information {
  84. int tmds_chip_name;
  85. int tmds_chip_slave_addr;
  86. int output_interface;
  87. int i2c_port;
  88. };
  89. struct lvds_chip_information {
  90. int lvds_chip_name;
  91. int lvds_chip_slave_addr;
  92. int output_interface;
  93. int i2c_port;
  94. };
  95. /* The type of 2D engine */
  96. enum via_2d_engine {
  97. VIA_2D_ENG_H2,
  98. VIA_2D_ENG_H5,
  99. VIA_2D_ENG_M1,
  100. };
  101. struct chip_information {
  102. int gfx_chip_name;
  103. int gfx_chip_revision;
  104. enum via_2d_engine twod_engine;
  105. struct tmds_chip_information tmds_chip_info;
  106. struct lvds_chip_information lvds_chip_info;
  107. struct lvds_chip_information lvds_chip_info2;
  108. };
  109. struct tmds_setting_information {
  110. int iga_path;
  111. int h_active;
  112. int v_active;
  113. int max_pixel_clock;
  114. };
  115. struct lvds_setting_information {
  116. int iga_path;
  117. int lcd_panel_hres;
  118. int lcd_panel_vres;
  119. int display_method;
  120. int device_lcd_dualedge;
  121. int LCDDithering;
  122. int lcd_mode;
  123. u32 vclk; /*panel mode clock value */
  124. };
  125. struct GFX_DPA_SETTING {
  126. int ClkRangeIndex;
  127. u8 DVP0; /* CR96[3:0] */
  128. u8 DVP0DataDri_S1; /* SR2A[5] */
  129. u8 DVP0DataDri_S; /* SR1B[1] */
  130. u8 DVP0ClockDri_S1; /* SR2A[4] */
  131. u8 DVP0ClockDri_S; /* SR1E[2] */
  132. u8 DVP1; /* CR9B[3:0] */
  133. u8 DVP1Driving; /* SR65[3:0], Data and Clock driving */
  134. u8 DFPHigh; /* CR97[3:0] */
  135. u8 DFPLow; /* CR99[3:0] */
  136. };
  137. struct VT1636_DPA_SETTING {
  138. u8 CLK_SEL_ST1;
  139. u8 CLK_SEL_ST2;
  140. };
  141. #endif /* __CHIP_H__ */