chip.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. /**************************************************/
  56. /* Definition TMDS Trasmitter Information */
  57. /**************************************************/
  58. /* Definition TMDS Trasmitter Index */
  59. #define NON_TMDS_TRANSMITTER 0x00
  60. #define VT1632_TMDS 0x01
  61. #define INTEGRATED_TMDS 0x42
  62. /* Definition TMDS Trasmitter I2C Slave Address */
  63. #define VT1632_TMDS_I2C_ADDR 0x10
  64. /**************************************************/
  65. /* Definition LVDS Trasmitter Information */
  66. /**************************************************/
  67. /* Definition LVDS Trasmitter Index */
  68. #define NON_LVDS_TRANSMITTER 0x00
  69. #define VT1631_LVDS 0x01
  70. #define VT1636_LVDS 0x0E
  71. #define INTEGRATED_LVDS 0x41
  72. /* Definition Digital Transmitter Mode */
  73. #define TX_DATA_12_BITS 0x01
  74. #define TX_DATA_24_BITS 0x02
  75. #define TX_DATA_DDR_MODE 0x04
  76. #define TX_DATA_SDR_MODE 0x08
  77. /* Definition LVDS Trasmitter I2C Slave Address */
  78. #define VT1631_LVDS_I2C_ADDR 0x70
  79. #define VT3271_LVDS_I2C_ADDR 0x80
  80. #define VT1636_LVDS_I2C_ADDR 0x80
  81. struct tmds_chip_information {
  82. int tmds_chip_name;
  83. int tmds_chip_slave_addr;
  84. int dvi_panel_id;
  85. int data_mode;
  86. int output_interface;
  87. int i2c_port;
  88. int device_type;
  89. };
  90. struct lvds_chip_information {
  91. int lvds_chip_name;
  92. int lvds_chip_slave_addr;
  93. int data_mode;
  94. int output_interface;
  95. int i2c_port;
  96. };
  97. struct chip_information {
  98. int gfx_chip_name;
  99. int gfx_chip_revision;
  100. struct tmds_chip_information tmds_chip_info;
  101. struct lvds_chip_information lvds_chip_info;
  102. struct lvds_chip_information lvds_chip_info2;
  103. };
  104. struct crt_setting_information {
  105. int iga_path;
  106. int h_active;
  107. int v_active;
  108. int bpp;
  109. int refresh_rate;
  110. };
  111. struct tmds_setting_information {
  112. int iga_path;
  113. int h_active;
  114. int v_active;
  115. int bpp;
  116. int refresh_rate;
  117. int get_dvi_size_method;
  118. int max_pixel_clock;
  119. int dvi_panel_size;
  120. int dvi_panel_hres;
  121. int dvi_panel_vres;
  122. int native_size;
  123. };
  124. struct lvds_setting_information {
  125. int iga_path;
  126. int h_active;
  127. int v_active;
  128. int bpp;
  129. int refresh_rate;
  130. int get_lcd_size_method;
  131. int lcd_panel_id;
  132. int lcd_panel_size;
  133. int lcd_panel_hres;
  134. int lcd_panel_vres;
  135. int display_method;
  136. int device_lcd_dualedge;
  137. int LCDDithering;
  138. int lcd_mode;
  139. u32 vclk; /*panel mode clock value */
  140. };
  141. struct GFX_DPA_SETTING {
  142. int ClkRangeIndex;
  143. u8 DVP0; /* CR96[3:0] */
  144. u8 DVP0DataDri_S1; /* SR2A[5] */
  145. u8 DVP0DataDri_S; /* SR1B[1] */
  146. u8 DVP0ClockDri_S1; /* SR2A[4] */
  147. u8 DVP0ClockDri_S; /* SR1E[2] */
  148. u8 DVP1; /* CR9B[3:0] */
  149. u8 DVP1Driving; /* SR65[3:0], Data and Clock driving */
  150. u8 DFPHigh; /* CR97[3:0] */
  151. u8 DFPLow; /* CR99[3:0] */
  152. };
  153. struct VT1636_DPA_SETTING {
  154. int PanelSizeID;
  155. u8 CLK_SEL_ST1;
  156. u8 CLK_SEL_ST2;
  157. };
  158. #endif /* __CHIP_H__ */