1 /* 2 * Copyright (c) 2005 ASPEED Technology Inc. 3 * 4 * Permission to use, copy, modify, distribute, and sell this software and its 5 * documentation for any purpose is hereby granted without fee, provided that 6 * the above copyright notice appear in all copies and that both that 7 * copyright notice and this permission notice appear in supporting 8 * documentation, and that the name of the authors not be used in 9 * advertising or publicity pertaining to distribution of the software without 10 * specific, written prior permission. The authors makes no representations 11 * about the suitability of this software for any purpose. It is provided 12 * "as is" without express or implied warranty. 13 * 14 * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16 * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20 * PERFORMANCE OF THIS SOFTWARE. 21 */ 22 /* Ported from xf86-video-ast driver */ 23 24 #ifndef AST_TABLES_H 25 #define AST_TABLES_H 26 27 #include "ast_drv.h" 28 29 /* Std. Table Index Definition */ 30 #define TextModeIndex 0 31 #define EGAModeIndex 1 32 #define VGAModeIndex 2 33 #define HiCModeIndex 3 34 #define TrueCModeIndex 4 35 36 static const struct ast_vbios_dclk_info dclk_table[] = { 37 {0x2C, 0xE7, 0x03}, /* 00: VCLK25_175 */ 38 {0x95, 0x62, 0x03}, /* 01: VCLK28_322 */ 39 {0x67, 0x63, 0x01}, /* 02: VCLK31_5 */ 40 {0x76, 0x63, 0x01}, /* 03: VCLK36 */ 41 {0xEE, 0x67, 0x01}, /* 04: VCLK40 */ 42 {0x82, 0x62, 0x01}, /* 05: VCLK49_5 */ 43 {0xC6, 0x64, 0x01}, /* 06: VCLK50 */ 44 {0x94, 0x62, 0x01}, /* 07: VCLK56_25 */ 45 {0x80, 0x64, 0x00}, /* 08: VCLK65 */ 46 {0x7B, 0x63, 0x00}, /* 09: VCLK75 */ 47 {0x67, 0x62, 0x00}, /* 0A: VCLK78_75 */ 48 {0x7C, 0x62, 0x00}, /* 0B: VCLK94_5 */ 49 {0x8E, 0x62, 0x00}, /* 0C: VCLK108 */ 50 {0x85, 0x24, 0x00}, /* 0D: VCLK135 */ 51 {0x67, 0x22, 0x00}, /* 0E: VCLK157_5 */ 52 {0x6A, 0x22, 0x00}, /* 0F: VCLK162 */ 53 {0x4d, 0x4c, 0x80}, /* 10: VCLK154 */ 54 {0x68, 0x6f, 0x80}, /* 11: VCLK83.5 */ 55 {0x28, 0x49, 0x80}, /* 12: VCLK106.5 */ 56 {0x37, 0x49, 0x80}, /* 13: VCLK146.25 */ 57 {0x1f, 0x45, 0x80}, /* 14: VCLK148.5 */ 58 {0x47, 0x6c, 0x80}, /* 15: VCLK71 */ 59 {0x25, 0x65, 0x80}, /* 16: VCLK88.75 */ 60 {0x77, 0x58, 0x80}, /* 17: VCLK119 */ 61 {0x32, 0x67, 0x80}, /* 18: VCLK85_5 */ 62 {0x6a, 0x6d, 0x80}, /* 19: VCLK97_75 */ 63 {0x3b, 0x2c, 0x81}, /* 1A: VCLK118_25 */ 64 }; 65 66 static const struct ast_vbios_dclk_info dclk_table_ast2500[] = { 67 {0x2C, 0xE7, 0x03}, /* 00: VCLK25_175 */ 68 {0x95, 0x62, 0x03}, /* 01: VCLK28_322 */ 69 {0x67, 0x63, 0x01}, /* 02: VCLK31_5 */ 70 {0x76, 0x63, 0x01}, /* 03: VCLK36 */ 71 {0xEE, 0x67, 0x01}, /* 04: VCLK40 */ 72 {0x82, 0x62, 0x01}, /* 05: VCLK49_5 */ 73 {0xC6, 0x64, 0x01}, /* 06: VCLK50 */ 74 {0x94, 0x62, 0x01}, /* 07: VCLK56_25 */ 75 {0x80, 0x64, 0x00}, /* 08: VCLK65 */ 76 {0x7B, 0x63, 0x00}, /* 09: VCLK75 */ 77 {0x67, 0x62, 0x00}, /* 0A: VCLK78_75 */ 78 {0x7C, 0x62, 0x00}, /* 0B: VCLK94_5 */ 79 {0x8E, 0x62, 0x00}, /* 0C: VCLK108 */ 80 {0x85, 0x24, 0x00}, /* 0D: VCLK135 */ 81 {0x67, 0x22, 0x00}, /* 0E: VCLK157_5 */ 82 {0x6A, 0x22, 0x00}, /* 0F: VCLK162 */ 83 {0x4d, 0x4c, 0x80}, /* 10: VCLK154 */ 84 {0x68, 0x6f, 0x80}, /* 11: VCLK83.5 */ 85 {0x28, 0x49, 0x80}, /* 12: VCLK106.5 */ 86 {0x37, 0x49, 0x80}, /* 13: VCLK146.25 */ 87 {0x1f, 0x45, 0x80}, /* 14: VCLK148.5 */ 88 {0x47, 0x6c, 0x80}, /* 15: VCLK71 */ 89 {0x25, 0x65, 0x80}, /* 16: VCLK88.75 */ 90 {0x58, 0x01, 0x42}, /* 17: VCLK119 */ 91 {0x32, 0x67, 0x80}, /* 18: VCLK85_5 */ 92 {0x6a, 0x6d, 0x80}, /* 19: VCLK97_75 */ 93 {0x44, 0x20, 0x43}, /* 1A: VCLK118_25 */ 94 }; 95 96 static const struct ast_vbios_stdtable vbios_stdtable[] = { 97 /* MD_2_3_400 */ 98 { 99 0x67, 100 {0x00,0x03,0x00,0x02}, 101 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, 102 0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00, 103 0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3, 104 0xff}, 105 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07, 106 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f, 107 0x0c,0x00,0x0f,0x08}, 108 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00, 109 0xff} 110 }, 111 /* Mode12/ExtEGATable */ 112 { 113 0xe3, 114 {0x01,0x0f,0x00,0x06}, 115 {0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e, 116 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00, 117 0xe9,0x8b,0xdf,0x28,0x00,0xe7,0x04,0xe3, 118 0xff}, 119 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07, 120 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f, 121 0x01,0x00,0x0f,0x00}, 122 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f, 123 0xff} 124 }, 125 /* ExtVGATable */ 126 { 127 0x2f, 128 {0x01,0x0f,0x00,0x0e}, 129 {0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e, 130 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00, 131 0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3, 132 0xff}, 133 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, 134 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f, 135 0x01,0x00,0x00,0x00}, 136 {0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f, 137 0xff} 138 }, 139 /* ExtHiCTable */ 140 { 141 0x2f, 142 {0x01,0x0f,0x00,0x0e}, 143 {0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e, 144 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00, 145 0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3, 146 0xff}, 147 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, 148 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f, 149 0x01,0x00,0x00,0x00}, 150 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f, 151 0xff} 152 }, 153 /* ExtTrueCTable */ 154 { 155 0x2f, 156 {0x01,0x0f,0x00,0x0e}, 157 {0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e, 158 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00, 159 0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3, 160 0xff}, 161 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, 162 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f, 163 0x01,0x00,0x00,0x00}, 164 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f, 165 0xff} 166 }, 167 }; 168 169 #endif 170