chip.h 5.0 KB

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